Hive
  1. Hive
  2. HIVE-3211

Enhance hbase column mapping strategy to support complicated structures

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.0
    • Fix Version/s: None
    • Component/s: HBase Handler
    • Labels:
      None

      Description

      With the current Hive-HBase integration, we need to specify the "hbase.columns.mapping" property that maps the hbase columns to the columns in hive. So for example,

      hive> CREATE EXTERNAL TABLE complex(
      key string, 
      s struct<col1 : int, col2 : int>)
      STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
      WITH SERDEPROPERTIES (
      "hbase.columns.mapping" = ":key,cf:a"
      )TBLPROPERTIES ("hbase.table.name" = "TEST_TABLE");;
      

      The struct definition in the above query can quickly get very ugly if we are dealing with a very complicated structures stored in hbase columns. We should probably enhance the current columns mapping strategy to be able to provide a custom serializer and let it detect the structure by itself.

        Issue Links

          Activity

          Swarnim Kulkarni created issue -
          Swarnim Kulkarni made changes -
          Field Original Value New Value
          Assignee Swarnim Kulkarni [ swarnim ]
          Nick Dimiduk made changes -
          Link This issue is related to HBASE-10091 [ HBASE-10091 ]
          Brock Noland made changes -
          Description With the current Hive-HBase integration, we need to specify the "hbase.columns.mapping" property that maps the hbase columns to the columns in hive. So for example,

          hive> CREATE EXTERNAL TABLE complex(
          key string,
          s struct<col1 : int, col2 : int>)
          STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
          WITH SERDEPROPERTIES (
          "hbase.columns.mapping" = ":key,cf:a"
          )TBLPROPERTIES ("hbase.table.name" = "TEST_TABLE");;

          The struct definition in the above query can quickly get very ugly if we are dealing with a very complicated structures stored in hbase columns. We should probably enhance the current columns mapping strategy to be able to provide a custom serializer and let it detect the structure by itself.
          With the current Hive-HBase integration, we need to specify the "hbase.columns.mapping" property that maps the hbase columns to the columns in hive. So for example,

          {noformat}
          hive> CREATE EXTERNAL TABLE complex(
          key string,
          s struct<col1 : int, col2 : int>)
          STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
          WITH SERDEPROPERTIES (
          "hbase.columns.mapping" = ":key,cf:a"
          )TBLPROPERTIES ("hbase.table.name" = "TEST_TABLE");;
          {noformat}

          The struct definition in the above query can quickly get very ugly if we are dealing with a very complicated structures stored in hbase columns. We should probably enhance the current columns mapping strategy to be able to provide a custom serializer and let it detect the structure by itself.

            People

            • Assignee:
              Swarnim Kulkarni
              Reporter:
              Swarnim Kulkarni
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Development