You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2018/03/13 17:24:00 UTC
[jira] [Commented] (TRAFODION-2977) Trafodion allows creating
objects with longer key lengths than HBase supports
[ https://issues.apache.org/jira/browse/TRAFODION-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397314#comment-16397314 ]
David Wayne Birdsall commented on TRAFODION-2977:
-------------------------------------------------
A related issue. If one tries to create an index on a long column, we get cores in tdm_arkesp processes at run time. The following script reproduces the issue:
drop table if exists t2;
create table t2 (c1 char(16777216));
insert into t2 values ('A');
create index idx2 on t2 (c1);
> Trafodion allows creating objects with longer key lengths than HBase supports
> -----------------------------------------------------------------------------
>
> Key: TRAFODION-2977
> URL: https://issues.apache.org/jira/browse/TRAFODION-2977
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.3
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
> Priority: Major
>
> The following illustrates the problem:
> {quote}
> >>create table t0 (c1 char(16777216));
> --- SQL operation complete.
> >>
> >>insert into t0 values ('A');
> --- 1 row(s) inserted.
> >>
> >>create table t1 (c1 char(32768) unique);
> --- SQL operation complete.
> >>
> >>-- next statement fails
> >>insert into t1 values ('A');
> *** ERROR[8448] Unable to access Hbase interface. Call to ExpHbaseInterface::checkAndInsertRow returned error HBASE_ACCESS_ERROR(-706). Cause: java.lang.IllegalArgumentException: Row length 32770 is > 32767
> org.apache.hadoop.hbase.client.Mutation.checkRow(Mutation.java:537)
> org.apache.hadoop.hbase.client.Put.<init>(Put.java:110)
> org.apache.hadoop.hbase.client.Put.<init>(Put.java:68)
> org.apache.hadoop.hbase.client.Put.<init>(Put.java:58)
> org.trafodion.sql.HTableClient.putRow(HTableClient.java:1543)
> org.trafodion.sql.HBaseClient.insertRow(HBaseClient.java:1931).
> --- 0 row(s) inserted.
> >>
> >>create table t2 (c1 char(32768) not null primary key);
> --- SQL operation complete.
> >>
> >>-- next statement fails
> >>insert into t2 values ('A');
> *** ERROR[8448] Unable to access Hbase interface. Call to ExpHbaseInterface::checkAndInsertRow returned error HBASE_ACCESS_ERROR(-706). Cause: java.lang.IllegalArgumentException: Row length 32768 is > 32767
> org.apache.hadoop.hbase.client.Mutation.checkRow(Mutation.java:537)
> org.apache.hadoop.hbase.client.Put.<init>(Put.java:110)
> org.apache.hadoop.hbase.client.Put.<init>(Put.java:68)
> org.apache.hadoop.hbase.client.Put.<init>(Put.java:58)
> org.trafodion.sql.HTableClient.putRow(HTableClient.java:1543)
> org.trafodion.sql.HBaseClient.insertRow(HBaseClient.java:1931).
> --- 0 row(s) inserted.
> >>
> >>create table t3 (c1 char(32768) check (c1!='ZZZZ'));
> --- SQL operation complete.
> >>
> >>insert into t3 values ('A');
> --- 1 row(s) inserted.
> >>
> {quote}
>
> In the example above, table T1 has an implicit index with a key length greater than 32767. Table T2 has a primary key length greater than 32767. HBase 1.0.0 imposes a limit on key length in the hbase-client module Mutation.java at Put time (as seen in the stack traces). The T0 and T3 examples succeed because the long character value occurs in the value part of an HBase KeyValue, not in the key part.
> The behavior above is unfriendly from a user perspective. It would be better to catch the over-long key at CREATE time and raise an error there.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)