[
https://issues.apache.org/jira/browse/TRAFODION-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15858554#comment-15858554
]
ASF GitHub Bot commented on TRAFODION-2475:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/949#discussion_r100171468
--- Diff: core/sql/src/main/java/org/trafodion/sql/HBaseClient.java ---
@@ -354,16 +368,28 @@ else if (tableOption.equalsIgnoreCase("PREFIX_TREE"))
returnStatus.setColumnDescriptorChanged();
break ;
case HBASE_COMPACT_COMPRESSION:
- if (tableOption.equalsIgnoreCase("GZ"))
- colDesc.setCompactionCompressionType(Algorithm.GZ);
- else if (tableOption.equalsIgnoreCase("LZ4"))
+ if (tableOption.equalsIgnoreCase("GZ")) {
+ // throws IOException
+ CompressionTest.testCompression(Algorithm.GZ);
+ colDesc.setCompactionCompressionType(Algorithm.GZ);
+ }
+ else if (tableOption.equalsIgnoreCase("LZ4")) {
+ // throws IOException
+ CompressionTest.testCompression(Algorithm.LZ4);
colDesc.setCompactionCompressionType(Algorithm.LZ4);
- else if (tableOption.equalsIgnoreCase("LZO"))
+ }
+ else if (tableOption.equalsIgnoreCase("LZO")) {
+ // throws IOException
+ CompressionTest.testCompression(Algorithm.LZO);
colDesc.setCompactionCompressionType(Algorithm.LZO);
+ }
else if (tableOption.equalsIgnoreCase("NONE"))
colDesc.setCompactionCompressionType(Algorithm.NONE);
- else if (tableOption.equalsIgnoreCase("SNAPPY"))
+ else if (tableOption.equalsIgnoreCase("SNAPPY")) {
+ // throws IOException
+ CompressionTest.testCompression(Algorithm.SNAPPY);
colDesc.setCompactionCompressionType(Algorithm.SNAPPY);
+ }
--- End diff --
Same remark as above.
> Create table/index or alter does not work with unavailable compression options
> ------------------------------------------------------------------------------
>
> Key: TRAFODION-2475
> URL: https://issues.apache.org/jira/browse/TRAFODION-2475
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-general
> Affects Versions: any
> Reporter: Suresh Subbiah
> Assignee: Suresh Subbiah
> Fix For: 2.0-incubating
>
>
> Create table/index option with HBASE_OPTIONS (COMPRESSION = '<val>') does not
> work well when <val> is a compression option that is not installed or enabled
> for HBase on the cluster. The 5 allowed values are GZ, LZO, LZ4, NONE,
> SNAPPY. If one of the 4 allowed compression settings is either not installed
> or available to HBase, then while creating a table it can either
> a) hang or take a long time to error out OR
> b) succeed, but have problems while inserting rows later.
> Non-existent compression library should be detected early and CREATE
> statement should error out. Same is true for ALTER table.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)