[ 
https://issues.apache.org/jira/browse/HIVE-8267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Muhammad Ehsan ul Haque updated HIVE-8267:
------------------------------------------
    Description: 
Previous attempts HIVE-2781 (not accepted), HIVE-2828 (broken and proposed with 
restricted feature).
The feature is to have hbase cell latest timestamp accessible in hive query, by 
mapping the cell timestamp with a hive column, using mapping format like 
{code}:timestamp:cf:[optional qualifier or qualifier prefix]{code}
The hive create table statement would be like
h4. For mapping a cell latest timestamp.
{code}
CREATE TABLE hive_hbase_table (key STRING, col1 STRING, col1_ts BIGINT)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:qualifier, 
:timestamp:cf:qualifier")
TBLPROPERTIES ("hbase.table.name" = "hbase_table");
{code}
h4. For mapping a column family latest timestamp.
{code}
CREATE TABLE hive_hbase_table (key STRING, valuemap MAP<STRING, STRING>, 
timestampmap MAP<STRING, BIGINT>)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:,:timestamp:cf:")
TBLPROPERTIES ("hbase.table.name" = "hbase_table");
{code}
h4. Providing default cell value
{code}
CREATE TABLE hive_hbase_table(key int, value string, value_timestamp bigint)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:qualifier, 
:timestamp:cf:qualifier",
                      "hbase.put.default.cell.value" = "default value")
TBLPROPERTIES ("hbase.table.name" = "hbase_table");
{code}

  was:
Previous attempts HIVE-2781 (not accepted), HIVE-2828 (broken and proposed with 
restricted feature).
The feature is to have hbase cell latest timestamp accessible in hive query, by 
mapping the cell timestamp with a hive column, using mapping format like 
{code}:timestamp:cf:[optional qualifier or qualifier prefix]{code}
The hive create table statement would be like
h4. For mapping a cell latest timestamp.
{code}
CREATE TABLE hive_hbase_table (key STRING, col1 STRING, col1_ts BIGINT)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:qualifier, 
:timestamp:cf:qualifier")
TBLPROPERTIES ("hbase.table.name" = "hbase_table");
{code}
h4. For mapping a column family latest timestamp.
{code}
CREATE TABLE hive_hbase_table (key STRING, valuemap MAP<STRING, STRING>, 
timestampmap MAP<STRING, BIGINT>)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:,:timestamp:cf:")
TBLPROPERTIES ("hbase.table.name" = "hbase_table");
{code}


> Exposing hbase cell latest timestamp through hbase columns mappings to hive 
> columns.
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-8267
>                 URL: https://issues.apache.org/jira/browse/HIVE-8267
>             Project: Hive
>          Issue Type: Bug
>          Components: HBase Handler
>    Affects Versions: 0.14.0
>            Reporter: Muhammad Ehsan ul Haque
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: HIVE-8267.0.patch
>
>
> Previous attempts HIVE-2781 (not accepted), HIVE-2828 (broken and proposed 
> with restricted feature).
> The feature is to have hbase cell latest timestamp accessible in hive query, 
> by mapping the cell timestamp with a hive column, using mapping format like 
> {code}:timestamp:cf:[optional qualifier or qualifier prefix]{code}
> The hive create table statement would be like
> h4. For mapping a cell latest timestamp.
> {code}
> CREATE TABLE hive_hbase_table (key STRING, col1 STRING, col1_ts BIGINT)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:qualifier, 
> :timestamp:cf:qualifier")
> TBLPROPERTIES ("hbase.table.name" = "hbase_table");
> {code}
> h4. For mapping a column family latest timestamp.
> {code}
> CREATE TABLE hive_hbase_table (key STRING, valuemap MAP<STRING, STRING>, 
> timestampmap MAP<STRING, BIGINT>)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:,:timestamp:cf:")
> TBLPROPERTIES ("hbase.table.name" = "hbase_table");
> {code}
> h4. Providing default cell value
> {code}
> CREATE TABLE hive_hbase_table(key int, value string, value_timestamp bigint)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES ("hbase.columns.mapping" = "cf:qualifier, 
> :timestamp:cf:qualifier",
>                       "hbase.put.default.cell.value" = "default value")
> TBLPROPERTIES ("hbase.table.name" = "hbase_table");
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to