[ 
https://issues.apache.org/jira/browse/TRAFODION-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15858553#comment-15858553
 ] 

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_r100171432
  
    --- Diff: core/sql/src/main/java/org/trafodion/sql/HBaseClient.java ---
    @@ -294,15 +296,27 @@ private ChangeFlags setDescriptors(Object[] 
tableOptions,
                    break ;
                case HBASE_COMPRESSION:
                    if (tableOption.equalsIgnoreCase("GZ"))
    +          {    // throws IOException
    +              CompressionTest.testCompression(Algorithm.GZ);
                        colDesc.setCompressionType(Algorithm.GZ);
    +          }
                    else if (tableOption.equalsIgnoreCase("LZ4"))
    +          {   // throws IOException
    +              CompressionTest.testCompression(Algorithm.LZ4);
                        colDesc.setCompressionType(Algorithm.LZ4);
    +          }
                    else if (tableOption.equalsIgnoreCase("LZO"))
    +          {   // throws IOException
    +              CompressionTest.testCompression(Algorithm.LZO);
                        colDesc.setCompressionType(Algorithm.LZO);
    +          }
                    else if (tableOption.equalsIgnoreCase("NONE"))
                        colDesc.setCompressionType(Algorithm.NONE);
                    else if (tableOption.equalsIgnoreCase("SNAPPY"))
    +          {   // throws IOException
    +              CompressionTest.testCompression(Algorithm.SNAPPY);
                        colDesc.setCompressionType(Algorithm.SNAPPY); 
    +          }
    --- End diff --
    
    Should there be an exception if the tableOption isn't recognized? (Right 
now the code just ignores it.)


> 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)

Reply via email to