liyingshuai created TRAFODION-2868: -------------------------------------- Summary: bug of hbase option TTL Key: TRAFODION-2868 URL: https://issues.apache.org/jira/browse/TRAFODION-2868 Project: Apache Trafodion Issue Type: Bug Components: sql-cmp Affects Versions: any Reporter: liyingshuai
create a table with TTL option, then an error occurred: CREATE TABLE t_hbaseoption22(c1 INT NOT NULL, c2 varchar(5)) SALT USING 2 PARTITIONS ON (c1) store BY (c1) HBASE_OPTIONS (TTL='-1'); *** ERROR[8448] Unable to access Hbase interface. Call to CmpSeabaseDDL::generateHbaseOptionsArray() returned error HBASE_CREATE_OPTIONS_ERROR(710). Cause: TTL. [2017-12-25 17:45:01] as described in SQL REFERENCE MANUAL that the accepted value of TTL can be '-1' (forever) and 'positive-integer' i found the following source code, if the value is -1 then throw an error and TTL in hbase source code -1 means forever: CmpSeabaseDDLcommon.cpp // 代码中设置不能等于-1 else if ((hbaseOption->key() == "TIME_TO_LIVE") || (hbaseOption->key() == "TTL")) { if ((str_atoi(hbaseOption->val().data(), hbaseOption->val().length()) == -1) || (!hbaseCreateOptionsArray[HBASE_TTL].empty())) isError = TRUE; hbaseCreateOptionsArray[HBASE_TTL] = hbaseOption->val(); -- This message was sent by Atlassian JIRA (v6.4.14#64029)