Jim Apple has posted comments on this change.

Change subject: IMPALA-2840: Don't store table location in partition location
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/2355/2/fe/src/main/java/com/cloudera/impala/catalog/HdfsPartition.java
File fe/src/main/java/com/cloudera/impala/catalog/HdfsPartition.java:

Line 76: HdfsTable table
> What will happen if after a partition is created I do an alter table set lo
Good point. I tried testing the first scenario:

    create table alter_table_test_db.change_loc_1 (s string) partitioned by (i 
int);

    insert into alter_table_test_db.change_loc_1 partition (i=1) values ('a');

    alter table alter_table_test_db.change_loc_1 set location 
'$FILESYSTEM_PREFIX/test-warehouse/alter_table_test_db.db/garbage';

    select * from alter_table_test_db.change_loc_1;

It does not work in the code as-is. If we want to make it work with the design 
as it is, we need alter table set location to change the location_ of every one 
its partitions with is_relative_ set to true. Right now it is an O(1) 
operation, setting only the location of the metastore table. I'm reluctant to 
make this a \Theta(n) operation by adding the partition inspection (and 
locking) to make it work.

One way we could fix this is to jump right to solution #3, where partitions 
have pointers/ids of their prefixes, and HdfsTables store a whole set of 
prefixes.

Thoughts?


-- 
To view, visit http://gerrit.cloudera.org:8080/2355
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c67b6ce0f83de2f5277a528a9ce67e47d638adb
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-HasComments: Yes

Reply via email to