You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Manish Gupta (JIRA)" <ji...@apache.org> on 2018/02/24 05:30:00 UTC
[jira] [Resolved] (CARBONDATA-1763) Carbon1.3.0-Pre-AggregateTable
- Recreating a failed pre-aggregate table fails due to table exists
[ https://issues.apache.org/jira/browse/CARBONDATA-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manish Gupta resolved CARBONDATA-1763.
--------------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.4.0)
1.3.0
1.3.1
> Carbon1.3.0-Pre-AggregateTable - Recreating a failed pre-aggregate table fails due to table exists
> --------------------------------------------------------------------------------------------------
>
> Key: CARBONDATA-1763
> URL: https://issues.apache.org/jira/browse/CARBONDATA-1763
> 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
> Priority: Major
> Labels: DFX
> Fix For: 1.3.1, 1.3.0
>
> Time Spent: 4h 10m
> Remaining Estimate: 0h
>
> 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
(v7.6.3#76005)