Hive
  1. Hive
  2. HIVE-6853

show create table for hbase tables should exclude LOCATION

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.14.0
    • Component/s: StorageHandler
    • Labels:
      None

      Description

      If you create a table on top of hbase in hive and issue a "show create table <hbase_table>", it gives a bad DDL. It should not show LOCATION:

      [hive]$ cat /tmp/test_create.sql
      CREATE EXTERNAL TABLE nba_twitter.hbase2(
      key string COMMENT 'from deserializer',
      name string COMMENT 'from deserializer',
      pdt string COMMENT 'from deserializer',
      service string COMMENT 'from deserializer',
      term string COMMENT 'from deserializer',
      update1 string COMMENT 'from deserializer')
      ROW FORMAT SERDE
      'org.apache.hadoop.hive.hbase.HBaseSerDe'
      STORED BY
      'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
      WITH SERDEPROPERTIES (
      'serialization.format'='1',
      'hbase.columns.mapping'=':key,srv:name,srv:pdt,srv:service,srv:term,srv:update')
      LOCATION
      'hdfs://nameservice1/user/hive/warehouse/nba_twitter.db/hbase'
      TBLPROPERTIES (
      'hbase.table.name'='NBATwitter',
      'transient_lastDdlTime'='1386172188')
      Trying to create a table using the above fails:

      [hive]$ hive -f /tmp/test_create.sql
      cli "-f /tmp/test_create.sql"
      Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hive/lib/hive-common-0.10.0-cdh4.4.0.jar!/hive-log4j.properties
      FAILED: Error in metadata: MetaException(message:LOCATION may not be specified for HBase.)
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

      However, if I remove the LOCATION, then the DDL is valid.

      1. HIVE-6853-0.patch
        4 kB
        Miklos Christine
      2. HIVE-6853.patch
        4 kB
        Miklos Christine

        Activity

        Thejas M Nair made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ashutosh Chauhan made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.14.0 [ 12326450 ]
        Resolution Fixed [ 1 ]
        Ashutosh Chauhan made changes -
        Assignee Miklos Christine [ mwc ]
        Miklos Christine made changes -
        Attachment HIVE-6853.patch [ 12639336 ]
        Miklos Christine made changes -
        Attachment HIVE-6853-0.patch [ 12639002 ]
        Miklos Christine made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Miklos Christine created issue -

          People

          • Assignee:
            Miklos Christine
            Reporter:
            Miklos Christine
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development