[jira] [Created] (CARBONDATA-1777) Carbon1.3.0-Pre-AggregateTable - Pre-aggregate tables creation in Spark-shell sessions are not used in the beeline session

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (CARBONDATA-1777) Carbon1.3.0-Pre-AggregateTable - Pre-aggregate tables creation in Spark-shell sessions are not used in the beeline session

Akash R Nilugal (Jira)
Ramakrishna S created CARBONDATA-1777:
-----------------------------------------

             Summary: Carbon1.3.0-Pre-AggregateTable - Pre-aggregate tables creation in Spark-shell sessions are not used in the beeline session
                 Key: CARBONDATA-1777
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1777
             Project: CarbonData
          Issue Type: Bug
          Components: data-load
    Affects Versions: 1.3.0
         Environment: Test - 3 node ant cluster
            Reporter: Ramakrishna S
            Assignee: Kunal Kapoor
             Fix For: 1.3.0


Steps:
1. Create table and load with  data
2. Run update query on the table - this will take table metalock
3. In parallel run the pre-aggregate table create step - this will not be allowed due to table lock
4. Rerun pre-aggegate table create step

*+Expected:+* Pre-aggregate table should be created
*+Actual:+* Pre-aggregate table creation fails

+Create, Load & Update+:
0: jdbc:hive2://10.18.98.136:23040> create table if not exists lineitem4(L_SHIPDATE string,L_SHIPMODE string,L_SHIPINSTRUCT string,L_RETURNFLAG string,L_RECEIPTDATE string,L_ORDERKEY string,L_PARTKEY string,L_SUPPKEY   string,L_LINENUMBER int,L_QUANTITY double,L_EXTENDEDPRICE double,L_DISCOUNT double,L_TAX double,L_LINESTATUS string,L_COMMITDATE string,L_COMMENT  string) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ('table_blocksize'='128','NO_INVERTED_INDEX'='L_SHIPDATE,L_SHIPMODE,L_SHIPINSTRUCT,L_RETURNFLAG,L_RECEIPTDATE,L_ORDERKEY,L_PARTKEY,L_SUPPKEY','sort_columns'='');
+---------+--+
| Result  |
+---------+--+
+---------+--+
No rows selected (0.266 seconds)
0: jdbc:hive2://10.18.98.136:23040> load data inpath "hdfs://hacluster/user/test/lineitem.tbl.5" into table lineitem4 options('DELIMITER'='|','FILEHEADER'='L_ORDERKEY,L_PARTKEY,L_SUPPKEY,L_LINENUMBER,L_QUANTITY,L_EXTENDEDPRICE,L_DISCOUNT,L_TAX,L_RETURNFLAG,L_LINESTATUS,L_SHIPDATE,L_COMMITDATE,L_RECEIPTDATE,L_SHIPINSTRUCT,L_SHIPMODE,L_COMMENT');
+---------+--+
| Result  |
+---------+--+
+---------+--+
No rows selected (6.331 seconds)
0: jdbc:hive2://10.18.98.136:23040> update lineitem4 set (l_linestatus) = ('xx');

+Create Datamap:+
0: jdbc:hive2://10.18.98.136:23040> create datamap agr_lineitem4 ON TABLE lineitem4 USING "org.apache.carbondata.datamap.AggregateDataMapHandler" as select l_returnflag,l_linestatus,sum(l_quantity),avg(l_quantity),count(l_quantity) from lineitem4  group by l_returnflag, l_linestatus;
Error: java.lang.RuntimeException: Acquire table lock failed after retry, please try after some time (state=,code=0)
0: jdbc:hive2://10.18.98.136:23040> select l_returnflag,l_linestatus,sum(l_quantity),avg(l_quantity),count(l_quantity) from lineitem4 group by l_returnflag, l_linestatus;
+---------------+---------------+------------------+---------------------+--------------------+--+
| l_returnflag  | l_linestatus  | sum(l_quantity)  |   avg(l_quantity)   | count(l_quantity)  |
+---------------+---------------+------------------+---------------------+--------------------+--+
| N             | xx            | 1.2863213E7      | 25.48745561614304   | 504688             |
| A             | xx            | 6318125.0        | 25.506342144783375  | 247708             |
| R             | xx            | 6321939.0        | 25.532459087898417  | 247604             |
+---------------+---------------+------------------+---------------------+--------------------+--+
3 rows selected (1.033 seconds)
0: jdbc:hive2://10.18.98.136:23040> create datamap agr_lineitem4 ON TABLE lineitem4 USING "org.apache.carbondata.datamap.AggregateDataMapHandler" as select l_returnflag,l_linestatus,sum(l_quantity),avg(l_quantity),count(l_quantity) from lineitem4  group by l_returnflag, l_linestatus;
Error: java.lang.RuntimeException: Table [lineitem4_agr_lineitem4] already exists under database [test_db1] (state=,code=0)




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)