Reply
Expert Contributor
Posts: 162
Registered: ‎07-29-2013

CDH 4.3 from RPM and parcels, different behaviour when deleting partitions

Hi, we have test cluster installed from RPMs and UAT, prod installed from RPM

The problem is on test cluster (RPM installation) we do can execute such query:

alter table event drop partition (year > '0', month > '0', day > '0', fulldate > '0')

 

On UAT/production (parcels) it doesn't work. What do we do wrong?

 

Here is the proof pic:

 

Prodcution:

[devops@prod-node017 ~]$ beeline
Beeline version 0.10.0-cdh4.3.0 by Apache Hive
beeline> !connect jdbc:hive2://prod-beeswax.lol.ru:10000 hive org.apache.hive.jdbc.HiveDriver       
scan complete in 7ms
Connecting to jdbc:hive2://prod-beeswax.lol..ru:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.10.0-cdh4.3.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://prod-beeswax.lol.ru:1>; alter table test_kholodilov drop partition (partkey1 > '0', partkey2 > '0')
. . . . . . . . . . . . . . . . . . . . . . .> ;
Error: Error while processing statement: FAILED: SemanticException [Error 10006]: Partition not found partkey1 > '0' AND partkey2 > '0' (state=42000,code=10006)
Error: Error while processing statement: FAILED: SemanticException [Error 10006]: Partition not found partkey1 > '0' AND partkey2 > '0' (state=42000,code=10006)


0: jdbc:hive2://prod-beeswax.lol.ru:1>; show partitions test_kholodilov
. . . . . . . . . . . . . . . . . . . . . . .> ;
+------------------------+
|       partition        |
+------------------------+
| partkey1=1/partkey2=2  |
+------------------------+
1 row selected (0,527 seconds)

 

 

And on test env:

 

beeline> !connect jdbc:hive2://localhost:10000 hive org.apache.hive.jdbc.HiveDriver       
scan complete in 11ms
Connecting to jdbc:hive2://localhost:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.10.0-cdh4.3.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000>; show partitions event
. . . . . . . . . . . . . . . .> ;
+------------------------------------------------+
|                   partition                    |
+------------------------------------------------+
| year=2013/month=10/day=09/fulldate=2013-10-09  |
+------------------------------------------------+
1 row selected (0,538 seconds)
0: jdbc:hive2://localhost:10000>; alter table event drop partition (year > '0', month > '0', day > '0', fulldate > '0')
. . . . . . . . . . . . . . . .> ;
No rows affected (0,342 seconds)
0: jdbc:hive2://localhost:10000>; show partitions event                                                                
. . . . . . . . . . . . . . . .> ;
+------------+
| partition  |
+------------+
+------------+
No rows selected (0,241 seconds)