Review Board 1.7.22


HIVE-4573: JDBC Compliance getTables

Review Request #13262 - Created Aug. 4, 2013 and updated

Prasad Mujumdar
trunk
HIVE-4573
Reviewers
hive
hive-git
Support alternate table type name for GetTables() and GetTableTypes().
Currently HiveServer2 supports Hive's native table type names eg. MANAGED_TABLE, VIRTUAL_VIEW etc. The more common terms used by various DB vendors and tools are TABLE and VIEW. This makes it difficult to integrate Hive with various tools or custom applications.
The patch introduces an alternate table type name mapping that can be configured at instance level or session level.
Added test cases in TestJdbcDriver2.
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Revision 555343e New Change
[20] 735 lines
[+20] [+] public class HiveConf extends Configuration {
736
    HIVE_SERVER2_PLAIN_LDAP_URL("hive.server2.authentication.ldap.url", null),
736
    HIVE_SERVER2_PLAIN_LDAP_URL("hive.server2.authentication.ldap.url", null),
737
    HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", null),
737
    HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", null),
738
    HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", null),
738
    HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", null),
739
    HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null),
739
    HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null),
740
    HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true),
740
    HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true),

    
   
741
    HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", ""),
741

    
   
742

   
742
    HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", null),
743
    HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", null),
743

    
   
744

   
744
    // If this is set all move tasks at the end of a multi-insert query will only begin once all
745
    // If this is set all move tasks at the end of a multi-insert query will only begin once all
745
    // outputs are ready
746
    // outputs are ready
[+20] [20] 505 lines
jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
Revision 1042125 New Change
 
service/src/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java
New File
 
service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java
Revision eaf867e New Change
 
service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java
Revision d9d0e9c New Change
 
service/src/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java
New File
 
service/src/java/org/apache/hive/service/cli/operation/TableTypeMapping.java
New File
 
service/src/java/org/apache/hive/service/cli/operation/TableTypeMappingFactory.java
New File
 
  1. common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: Loading...
  2. jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java: Loading...
  3. service/src/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java: Loading...
  4. service/src/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java: Loading...
  5. service/src/java/org/apache/hive/service/cli/operation/GetTablesOperation.java: Loading...
  6. service/src/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java: Loading...
  7. service/src/java/org/apache/hive/service/cli/operation/TableTypeMapping.java: Loading...
  8. service/src/java/org/apache/hive/service/cli/operation/TableTypeMappingFactory.java: Loading...