[ https://issues.apache.org/jira/browse/HIVE-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13548348#comment-13548348 ]
Hudson commented on HIVE-2989: ------------------------------ Integrated in Hive-trunk-hadoop2 #54 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/54/]) HIVE-3079. Revert HIVE-2989 (Carl Steinbach via cws) (Revision 1345806) HIVE-2989 Adding Table Links to Hive (Bhushan Mandhani via namit) (Revision 1345318) Result = ABORTED cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1345806 Files : * /hive/trunk/metastore/if/hive_metastore.thrift * /hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-2989.mysql.sql * /hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql * /hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql * /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp * /hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp * /hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableIdentifier.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java * /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php * /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php * /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py * /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py * /hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/TableType.java * /hive/trunk/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java * /hive/trunk/metastore/src/model/package.jdo * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableLinkDesc.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java * /hive/trunk/ql/src/test/queries/clientnegative/create_table_failure5.q * /hive/trunk/ql/src/test/queries/clientnegative/create_tablelink_failure1.q * /hive/trunk/ql/src/test/queries/clientnegative/create_tablelink_failure2.q * /hive/trunk/ql/src/test/queries/clientpositive/create_tablelink.q * /hive/trunk/ql/src/test/results/clientnegative/create_table_failure5.q.out * /hive/trunk/ql/src/test/results/clientnegative/create_tablelink_failure1.q.out * /hive/trunk/ql/src/test/results/clientnegative/create_tablelink_failure2.q.out * /hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out * /hive/trunk/ql/src/test/results/clientnegative/drop_view_failure1.q.out * /hive/trunk/ql/src/test/results/clientpositive/create_tablelink.q.out * /hive/trunk/ql/src/test/results/clientpositive/create_view.q.out * /hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out * /hive/trunk/ql/src/test/results/clientpositive/insert2_overwrite_partitions.q.out namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1345318 Files : * /hive/trunk/metastore/if/hive_metastore.thrift * /hive/trunk/metastore/scripts/upgrade/mysql/010-HIVE-2989.mysql.sql * /hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.10.0.mysql.sql * /hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.10.0.oracle.sql * /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp * /hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp * /hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableIdentifier.java * /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java * /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php * /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php * /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py * /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py * /hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/TableType.java * /hive/trunk/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java * /hive/trunk/metastore/src/model/package.jdo * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableLinkDesc.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DropTableDesc.java * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java * /hive/trunk/ql/src/test/queries/clientnegative/create_table_failure5.q * /hive/trunk/ql/src/test/queries/clientnegative/create_tablelink_failure1.q * /hive/trunk/ql/src/test/queries/clientnegative/create_tablelink_failure2.q * /hive/trunk/ql/src/test/queries/clientpositive/create_tablelink.q * /hive/trunk/ql/src/test/results/clientnegative/create_table_failure5.q.out * /hive/trunk/ql/src/test/results/clientnegative/create_tablelink_failure1.q.out * /hive/trunk/ql/src/test/results/clientnegative/create_tablelink_failure2.q.out * /hive/trunk/ql/src/test/results/clientnegative/drop_table_failure2.q.out * /hive/trunk/ql/src/test/results/clientnegative/drop_view_failure1.q.out * /hive/trunk/ql/src/test/results/clientpositive/create_tablelink.q.out * /hive/trunk/ql/src/test/results/clientpositive/create_view.q.out * /hive/trunk/ql/src/test/results/clientpositive/create_view_partitioned.q.out * /hive/trunk/ql/src/test/results/clientpositive/insert2_overwrite_partitions.q.out > Adding Table Links to Hive > -------------------------- > > Key: HIVE-2989 > URL: https://issues.apache.org/jira/browse/HIVE-2989 > Project: Hive > Issue Type: Improvement > Components: Metastore, Query Processor, Security > Affects Versions: 0.10.0 > Reporter: Bhushan Mandhani > Assignee: Bhushan Mandhani > Attachments: HIVE-2989.10.patch.txt, HIVE-2989.1.patch.txt, > HIVE-2989.2.patch.txt, HIVE-2989.3.patch.txt, HIVE-2989.4.patch.txt, > HIVE-2989.5.patch.txt, HIVE-2989.6.patch.txt, HIVE-2989.9.patch.txt > > Original Estimate: 672h > Remaining Estimate: 672h > > This will add Table Links to Hive. This will be an alternate mechanism for a > user to access tables and data in a database that is different from the one > he is associated with. This feature can be used to provide access control (if > access to databasename.tablename in queries and "use database X" is turned > off in conjunction). > If db X wants to access one or more partitions from table T in db Y, the user > will issue: > CREATE [STATIC] LINK TO T@Y LINKPROPERTIES ('RETENTION'='N') > New partitions added to T will automatically be added to the link as well and > become available to X. However, if the link is specified to be static, that > will not be the case. The X user will then have to explicitly import each > partition of T that he needs. The command above will not actually make any > existing partitions of T available to X. Instead, we provide the following > command to add an existing partition to a link: > ALTER LINK T@Y ADD PARTITION (ds='2012-04-27') > The user will need to execute the above for each existing partition that > needs to be imported. For future partitions, Hive will take care of this. An > imported partition can be dropped from a link using a similar command. We > just specify "DROP" instead of "ADD". For querying the linked table, the X > user will refer to it as T@Y. Link Tables will only have read access and not > be writable. The entire Table Link alongwith all its imported partitions can > be dropped as follows: > DROP LINK TO T@Y > The above commands are purely MetaStore operations. The implementation will > rely on replicating the entire partition metadata when a partition is added > to a link. For every link that is created, we will add a new row to table > TBLS. The TBL_TYPE column will have a new kind of value "LINK_TABLE" (or > "STATIC_LINK_TABLE" if the link has been specified as static). A new column > LINK_TBL_ID will be added which will contain the id of the imported table. It > will be NULL for all other table types including the regular managed tables. > When a partition is added to a link, the new row in the table PARTITIONS will > point to the LINK_TABLE in the same database and not the master table in the > other database. We will replicate all the metadata for this partition from > the master database. The advantage of this approach is that fewer changes > will be needed in query processing and DDL for LINK_TABLEs. Also, commands > like "SHOW TABLES" and "SHOW PARTITIONS" will work as expected for > LINK_TABLEs too. Of course, even though the metadata is not shared, the > underlying data on disk is still shared. Hive still needs to know that when > dropping a partition which belongs to a LINK_TABLE, it should not drop the > underlying data from HDFS. Views and external tables cannot be imported from > one database to another. > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira