You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by "yingshuai.li@esgyn.cn" <yi...@esgyn.cn> on 2017/12/26 09:04:19 UTC
question about hbase option TTL
Hi all,
i 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:
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();
is this a bug?
李英帅
易鲸捷信息技术有限公司
手机:18701691214
邮箱:yingshuai.li@esgyn.cn
RE: question about hbase option TTL
Posted by Dave Birdsall <da...@esgyn.com>.
It sure looks like a bug. Either the SQL Reference Manual is wrong or the code is wrong. Either way it is a bug.
Please file a JIRA.
Dave
-----Original Message-----
From: yingshuai.li@esgyn.cn [mailto:yingshuai.li@esgyn.cn]
Sent: Tuesday, December 26, 2017 1:04 AM
To: dev <de...@trafodion.incubator.apache.org>
Subject: question about hbase option TTL
Hi all,
i 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:
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();
is this a bug?
李英帅
易鲸捷信息技术有限公司
手机:18701691214
邮箱:yingshuai.li@esgyn.cn