carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geetika Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CARBONDATA-1988) Drop partition is not removing the partition folder from hdfs
Date Fri, 05 Jan 2018 06:19:00 GMT
Geetika Gupta created CARBONDATA-1988:
-----------------------------------------

             Summary: Drop partition is not removing the partition folder from hdfs
                 Key: CARBONDATA-1988
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1988
             Project: CarbonData
          Issue Type: Bug
          Components: data-query
    Affects Versions: 1.3.0
         Environment: spark2.1
            Reporter: Geetika Gupta
            Priority: Minor
             Fix For: 1.3.0
         Attachments: 2000_UniqData.csv

I created table using:
CREATE TABLE uniqdata_string(CUST_ID int,CUST_NAME String,DOB timestamp,DOJ timestamp, BIGINT_COLUMN1
bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10),DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1
double, Double_COLUMN2 double,INTEGER_COLUMN1 int) PARTITIONED BY(ACTIVE_EMUI_VERSION string)
STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ('TABLE_BLOCKSIZE'= '256 MB');

Load command:
LOAD DATA INPATH 'hdfs://localhost:54311/2000_UniqData.csv' 
into table uniqdata_string partition(active_emui_version='abc') OPTIONS('FILEHEADER'='CUST_ID,CUST_NAME
,ACTIVE_EMUI_VERSION,DOB,DOJ,
BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,
Double_COLUMN2,INTEGER_COLUMN1','BAD_RECORDS_ACTION'='FORCE');

LOAD DATA INPATH 'hdfs://localhost:54311/2000_UniqData.csv' 
into table uniqdata_string partition(active_emui_version='xyz') OPTIONS('FILEHEADER'='CUST_ID,CUST_NAME
,ACTIVE_EMUI_VERSION,DOB,DOJ,
BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,
Double_COLUMN2,INTEGER_COLUMN1','BAD_RECORDS_ACTION'='FORCE');

show partitions command:
show partitions uniqdata_string;

Output:
0: jdbc:hive2://localhost:10000> show partitions uniqdata_string_new;
+--------------------------+--+
|        partition         |
+--------------------------+--+
| active_emui_version=abc  |
| active_emui_version=xyz  |
+--------------------------+--+

drop partition:
alter table uniqdata_string_new drop partition(active_emui_version='xyz');

show partitions:
0: jdbc:hive2://localhost:10000> show partitions uniqdata_string_new;
+--------------------------+--+
|        partition         |
+--------------------------+--+
| active_emui_version=abc  |
+--------------------------+--+

The partition is successfully dropped but it's folder is not deleted from hdfs.




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

Mime
View raw message