You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Vandana Yadav (JIRA)" <ji...@apache.org> on 2018/01/10 11:13:00 UTC

[jira] [Created] (CARBONDATA-2016) Exception displays while implementing compaction with alter query

Vandana Yadav created CARBONDATA-2016:
-----------------------------------------

             Summary: Exception displays while implementing compaction with alter query
                 Key: CARBONDATA-2016
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2016
             Project: CarbonData
          Issue Type: Bug
          Components: data-load
    Affects Versions: 1.3.0
         Environment: spark 2.1
            Reporter: Vandana Yadav
            Priority: Minor


Exception displays while implementing compaction with alter query.

Steps to reproduce:

1) Create a table :
CREATE TABLE CUSTOMER1 ( C_CUSTKEY INT , C_NAME STRING , C_ADDRESS STRING , C_NATIONKEY INT , C_PHONE STRING , C_ACCTBAL DECIMAL(15,2) , C_MKTSEGMENT STRING , C_COMMENT STRING) stored by 'carbondata';

2) Insert data into the table:
a) insert into customer1 values(1,'vandana','noida',1,'123456789',45987.78,'hello','comment')
b) insert into customer1 values(2,'vandana','noida',2,'123456789',487.78,'hello','comment')
c) insert into customer1 values(3,'geetika','delhi',3,'123456789',487897.78,'hello','comment')
d) insert into customer1 values(4,'sangeeta','delhi',3,'123456789',48789.78,'hello','comment')

3) Perform alter table query:
 alter table customer1 add columns (intfield int) TBLPROPERTIES ('DEFAULT.VALUE.intfield'='10');

4) show segments for displaying segments before compaction
show segments for table customer1;

output:
+--------------------+----------+--------------------------+--------------------------+------------+--------------+--+
| SegmentSequenceId  |  Status  |     Load Start Time      |      Load End Time       | Merged To  | File Format  |
+--------------------+----------+--------------------------+--------------------------+------------+--------------+--+
| 3                  | Success  | 2018-01-10 16:16:53.611  | 2018-01-10 16:16:54.99   | NA         | COLUMNAR_V3  |
| 2                  | Success  | 2018-01-10 16:16:46.878  | 2018-01-10 16:16:47.75   | NA         | COLUMNAR_V3  |
| 1                  | Success  | 2018-01-10 16:16:38.096  | 2018-01-10 16:16:38.972  | NA         | COLUMNAR_V3  |
| 0                  | Success  | 2018-01-10 16:16:31.979  | 2018-01-10 16:16:33.293  | NA         | COLUMNAR_V3  |
+--------------------+----------+--------------------------+--------------------------+------------+--------------+--+
4 rows selected (0.029 seconds)

5) alter table query for compaction:
alter table customer1 compact 'minor';

Expected Result: Table should be compacted successfully.

Actual Result: 
Error: org.apache.spark.sql.AnalysisException: Compaction failed. Please check logs for more info. Exception in compaction Compaction Failure in Merger Rdd.; (state=,code=0)



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