You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2016/06/02 18:16:59 UTC

[jira] [Commented] (TRAFODION-1804) Raise an error early during CREATE TABLE if requested compression type is not available

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

Suresh Subbiah commented on TRAFODION-1804:
-------------------------------------------

An approach to resolving this may be to use the CompressionTest class that HBase provides

https://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/util/CompressionTest.html

If we can somehow call this class from a Java method we write, link up to the Java method through JNI from sqlcomp directory then we should have most of what we need. It may also be necessary to store the result of the test somewhere in memory so that it is not repeated for every CREATE table from the same session. Currently we do something similar for reading the fraction of region server heap that is reserved for block cache. 
If interested please see https://github.com/apache/incubator-trafodion/commit/8c2d98e099ccaeb0f338203dbaa2d87c5922c5e1 to see how block cache fraction is read through HBase API and stored in SchemaDB (in SchemaDB.cpp)

> Raise an error early during CREATE TABLE if requested compression type is not available
> ---------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-1804
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1804
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: sql-general
>    Affects Versions: 1.2-incubating
>            Reporter: Suresh Subbiah
>            Assignee: Suresh Subbiah
>            Priority: Minor
>
> If a table created with HBASE_OPTIONS (COMPRESSION = 'SNAPPY') but snappy compression is not available on the system, HBase will retry upto the configured number of retries (35 is default in some configurations) before raising an error.
> It will make the product more user friendly if Trafodion could detect this sooner and not send the DDL request to Hbase.
> Here is the DDL reported by Eric Owhadi
> create table Customer
> (
>     c_customer_sk           int not null,
>     c_customer_id           char(16)     CHARACTER SET UTF8 not null,
>     c_current_cdemo_sk      int,
>     c_current_hdemo_sk      int,
>     c_current_addr_sk       int,
>     c_first_shipto_date_sk  int,
>     c_first_sales_date_sk   int,
>     c_salutation            char(10) CHARACTER SET UTF8,
>     c_first_name            char(20) CHARACTER SET UTF8,
>     c_last_name             char(30) CHARACTER SET UTF8,
>     c_preferred_cust_flag   char(1),
>     c_birth_day             integer,
>     c_birth_month           integer,
>     c_birth_year            integer,
>     c_birth_country         varchar(20) CHARACTER SET UTF8,
>     c_login                 char(13) CHARACTER SET UTF8,
>     c_email_address         char(50) CHARACTER SET UTF8,
>     c_last_review_date_sk   int,
>     primary key (c_customer_sk)
> )SALT USING 2 PARTITIONS
>   HBASE_OPTIONS
>   (
>     DATA_BLOCK_ENCODING = 'FAST_DIFF',
>    COMPRESSION = 'SNAPPY'
>   );



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