[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2017-03-25 Thread Pengcheng Xiong (JIRA)

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

Pengcheng Xiong updated HIVE-11233:
---
Target Version/s: 3.0.0  (was: 2.2.0)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.5.patch, 
> HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I use it in my code with applied patch:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-07-10 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Description: 
Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
sortable key and values. It is necessary when given HBase table is used for 
persistence by Apache Hive and Apache Phoenix. In that way all byte arrays read 
or written by Hive will be compatible with binary sortable format used in 
Phoenix.

It turns out the major difference is in all numeric data types accordingly 
officially provided documentation - 
https://phoenix.apache.org/language/datatypes.html.

That's how I use it in my code with applied patch:
{code}
private static String buildWithSerDeProperties(TableDescriptor 
tableDescriptor) {
Map serdePropertiesMap = new HashMap<>();

serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
tableDescriptor.getTableName());
serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
BINARY_STORAGE_TYPE);
serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
buildHBaseColumnsDefinition(tableDescriptor));


serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
PhoenixValueFactory.class.getName());
/* Use different key factory for simple and composite primary key */
if (tableDescriptor.getPkDescriptors().size() == 1) {
serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
PhoenixKeyFactory.class.getName());
} else {
serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
PhoenixCompositeKeyFactory.class.getName());
}

String serDeProperties = serdePropertiesMap.entrySet().stream()
.map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
quoteInSingleQuotes(e.getValue()))
.collect(Collectors.joining(COLUMNS_SEPARATOR));

logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
return serDeProperties;
}
{code}

  was:
Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
sortable key and values. It is necessary when given HBase table is used for 
persistence by Apache Hive and Apache Phoenix. In that way all byte arrays read 
or written by Hive will be compatible with binary sortable format used in 
Phoenix.

It turns out the major difference is in all numeric data types accordingly 
officially provided documentation - 
https://phoenix.apache.org/language/datatypes.html.

That's how I'm using it in my code with applied patch:
{code}
private static String buildWithSerDeProperties(TableDescriptor 
tableDescriptor) {
Map serdePropertiesMap = new HashMap<>();

serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
tableDescriptor.getTableName());
serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
BINARY_STORAGE_TYPE);
serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
buildHBaseColumnsDefinition(tableDescriptor));


serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
PhoenixValueFactory.class.getName());
/* Use different key factory for simple and composite primary key */
if (tableDescriptor.getPkDescriptors().size() == 1) {
serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
PhoenixKeyFactory.class.getName());
} else {
serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
PhoenixCompositeKeyFactory.class.getName());
}

String serDeProperties = serdePropertiesMap.entrySet().stream()
.map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
quoteInSingleQuotes(e.getValue()))
.collect(Collectors.joining(COLUMNS_SEPARATOR));

logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
return serDeProperties;
}
{code}


> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.5.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in 

[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-07-10 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Release Note: 
Thanks of this patch are possible read or write operations for HBase table in 
Apache Phoenix persistence mode. Following classes could be considered as 3 
keypoints:
- org.apache.hadoop.hive.hbase.phoenix.PhoenixValueFactory
- org.apache.hadoop.hive.hbase.phoenix.PhoenixKeyFactory
- org.apache.hadoop.hive.hbase.phoenix.PhoenixCompositeKeyFactory

Note: See the code sample provided in description field of that issue for more 
details.

  was:
Thanks of this patch are possible read or write operations for HBase table in 
Apache Phoenix persistence mode. Following classes could be considered as 3 
keypoints:
- org.apache.hadoop.hive.hbase.phoenix.PhoenixValueFactory
- org.apache.hadoop.hive.hbase.phoenix.PhoenixKeyFactory
- org.apache.hadoop.hive.hbase.phoenix.PhoenixCompositeKeyFactory


> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.5.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-07-10 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Release Note: 
Thanks of this patch are possible read or write operations for HBase table in 
Apache Phoenix persistence mode. Following classes could be considered as 3 
keypoints:
- org.apache.hadoop.hive.hbase.phoenix.PhoenixValueFactory
- org.apache.hadoop.hive.hbase.phoenix.PhoenixKeyFactory
- org.apache.hadoop.hive.hbase.phoenix.PhoenixCompositeKeyFactory

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.5.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-06-17 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.5.patch

https://reviews.apache.org/r/43811/

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.5.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-06-17 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.5.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-06-17 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-31 Thread Jesus Camacho Rodriguez (JIRA)

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

Jesus Camacho Rodriguez updated HIVE-11233:
---
Target Version/s: 2.2.0  (was: 2.1.0, 2.0.1)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-25 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-25 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.4.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-25 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.4.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-22 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-22 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.3.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-22 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.3.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.2.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.2.patch, 
> HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Target Version/s: 2.1.0, 2.0.1  (was: 2.0.1)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-20 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-20 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-20 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.1.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.1.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-19 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-19 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233-branch-2.0.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-19 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
> return serDeProperties;
> }
> {code}



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-11 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Description: 
Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
sortable key and values. It is necessary when given HBase table is used for 
persistence by Apache Hive and Apache Phoenix. In that way all byte arrays read 
or written by Hive will be compatible with binary sortable format used in 
Phoenix.

It turns out the major difference is in all numeric data types accordingly 
officially provided documentation - 
https://phoenix.apache.org/language/datatypes.html.

That's how I'm using it in my code:
{code}
private static String buildWithSerDeProperties(TableDescriptor 
tableDescriptor) {
Map serdePropertiesMap = new HashMap<>();

serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
tableDescriptor.getTableName());
serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
BINARY_STORAGE_TYPE);
serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
buildHBaseColumnsDefinition(tableDescriptor));


serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
PhoenixValueFactory.class.getName());
/* Use different key factory for simple and composite primary key */
if (tableDescriptor.getPkDescriptors().size() == 1) {
serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
PhoenixKeyFactory.class.getName());
} else {
serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
PhoenixCompositeKeyFactory.class.getName());
}

String serDeProperties = serdePropertiesMap.entrySet().stream()
.map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
quoteInSingleQuotes(e.getValue()))
.collect(Collectors.joining(COLUMNS_SEPARATOR));

logger.debug("SERDEPROPERTIES are [{}]", serDeProperties);
return serDeProperties;
}
{code}

  was:
Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
sortable key and values. It is necessary when given HBase table is used for 
persistence by Apache Hive and Apache Phoenix. In that way all byte arrays read 
or written by Hive will be compatible with binary sortable format used in 
Phoenix.

It turns out the major difference is in all numeric data types accordingly 
officially provided documentation - 
https://phoenix.apache.org/language/datatypes.html.


> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.
> That's how I'm using it in my code:
> {code}
> private static String buildWithSerDeProperties(TableDescriptor 
> tableDescriptor) {
> Map serdePropertiesMap = new HashMap<>();
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_NAME, 
> tableDescriptor.getTableName());
> serdePropertiesMap.put(HBaseSerDe.HBASE_TABLE_DEFAULT_STORAGE_TYPE, 
> BINARY_STORAGE_TYPE);
> serdePropertiesMap.put(HBaseSerDe.HBASE_COLUMNS_MAPPING, 
> buildHBaseColumnsDefinition(tableDescriptor));
> serdePropertiesMap.put(HBaseSerDe.HBASE_VALUE_FACTORY_CLASS, 
> PhoenixValueFactory.class.getName());
> /* Use different key factory for simple and composite primary key */
> if (tableDescriptor.getPkDescriptors().size() == 1) {
> serdePropertiesMap.put(HBaseSerDe.HBASE_KEY_FACTORY_CLASS, 
> PhoenixKeyFactory.class.getName());
> } else {
> serdePropertiesMap.put(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY, 
> PhoenixCompositeKeyFactory.class.getName());
> }
> String serDeProperties = serdePropertiesMap.entrySet().stream()
> .map(e -> quoteInSingleQuotes(e.getKey()) + " = " + 
> quoteInSingleQuotes(e.getValue()))
> .collect(Collectors.joining(COLUMNS_SEPARATOR));
> logger.debug("SERDEPROPERTIES are [{}]", 

[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-05-10 Thread Lefty Leverenz (JIRA)

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

Lefty Leverenz updated HIVE-11233:
--
Target Version/s: 2.0.1
   Fix Version/s: (was: 2.0.1)

I moved 2.0.1 from Fix Version to Target Version because this hasn't been 
committed yet.

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-04-28 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Fix Version/s: 2.0.1

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Fix For: 2.0.1
>
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-04-28 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Open  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-04-28 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: Open)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 2.0.0, 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-04-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Affects Version/s: 2.0.0

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1, 2.0.0
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-04-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233-branch-2.0.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233-branch-2.0.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: In Progress)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: In Progress  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233-branch-1.2.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: (was: HIVE-11233-branch-1.2.patch)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: (was: HIVE-11233.3-branch-1.2.patch)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: (was: HIVE-11233.patch)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: Patch Available  (was: In Progress)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233.3-branch-1.2.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Status: In Progress  (was: Patch Available)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233.3-branch-1.2.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-21 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Attachment: HIVE-11233.3-branch-1.2.patch

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, 
> HIVE-11233.3-branch-1.2.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-20 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Description: 
Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
sortable key and values. It is necessary when given HBase table is used for 
persistence by Apache Hive and Apache Phoenix. In that way all byte arrays read 
or written by Hive will be compatible with binary sortable format used in 
Phoenix.

It turns out the major difference is in all numeric data types accordingly 
officially provided documentation - 
https://phoenix.apache.org/language/datatypes.html.

  was:
Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
sortable key and values. It is necessary when given HBase table is used for 
persistence by Apache Hive and Apache Phoenix. In that way all byte arrays read 
or written by Hive will be compatible with binary sortable format used by 
Phoenix.

It turns out the major difference is in all numeric data types accordingly 
officially provided documentation - 
https://phoenix.apache.org/language/datatypes.html.


> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> in Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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


[jira] [Updated] (HIVE-11233) Include Apache Phoenix support in HBaseStorageHandler

2016-02-20 Thread Svetozar Ivanov (JIRA)

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

Svetozar Ivanov updated HIVE-11233:
---
Summary: Include Apache Phoenix support in HBaseStorageHandler  (was: 
Support of binary sortable key and values for HBaseStorageHandler)

> Include Apache Phoenix support in HBaseStorageHandler
> -
>
> Key: HIVE-11233
> URL: https://issues.apache.org/jira/browse/HIVE-11233
> Project: Hive
>  Issue Type: New Feature
>  Components: HBase Handler
>Affects Versions: 1.2.1
>Reporter: Svetozar Ivanov
>Assignee: Svetozar Ivanov
>  Labels: Binary, Hbase, Numeric, Phoenix, Sortable
> Attachments: HIVE-11233-branch-1.2.patch, HIVE-11233.patch
>
>
> Currently HBaseStorageHandler doesn't provide mechanism for storage of binary 
> sortable key and values. It is necessary when given HBase table is used for 
> persistence by Apache Hive and Apache Phoenix. In that way all byte arrays 
> read or written by Hive will be compatible with binary sortable format used 
> by Phoenix.
> It turns out the major difference is in all numeric data types accordingly 
> officially provided documentation - 
> https://phoenix.apache.org/language/datatypes.html.



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