You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:18:16 UTC

[jira] [Created] (TRAFODION-808) LP Bug: 1400553 - Insert into hbase native table with row-wise access cores sqlci

Alice Chen created TRAFODION-808:
------------------------------------

             Summary: LP Bug: 1400553 - Insert into hbase native table with row-wise access cores sqlci
                 Key: TRAFODION-808
                 URL: https://issues.apache.org/jira/browse/TRAFODION-808
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-exe
            Reporter: Weishiun Tsai
            Assignee: Anoop Sharma


Inserting a row into an hbase native table using row-wise access cores sqlci at ExHbaseAccessTcb::createDirectRowwiseBuffer().  The following example shows 2 inserts with cell-per-row access to hbase.”_CELL_”, and 2 inserts with row-wise access to hbase.”_ROW_”.   The 2 inserts to hbase.”_CELL_” work fine.  The first insert to hbase.”_ROW_” returns error 8448 even though the inserted column COLUMN_DETAILS is fetched directly out of a row from the same table (therefore there is no doubt that the value of the column is valid).  The second insert to hbase.”_ROW_” specifies a list of values.  It then cores sqlci at ExHbaseAccessTcb::createDirectRowwiseBuffer().  

This is seen on the v1208_0830 build installed on a workstation.

----------------------------------------------
Here are the scripts to reproduce this problem:

Execute the following commands from hbase shell:

create 'QAHBaseTbl', 'f1', 'f2'
put 'QAHBaseTbl', 'row1', 'f1:a', 'value1'
put 'QAHBaseTbl', 'row2', 'f2:a', 'value2'
scan 'QAHBaseTbl'
exit

Then execute the following statements from sqlci:

begin work;
select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COL_FAMILY as CHAR(10)) as COL_FAMILY, CAST(COL_NAME as CHAR(10)) as COL_NAME, COL_TIMESTAMP, CAST(COL_VALUE as CHAR(10)) as COL_VALUE from HBASE."_CELL_"."QAHBaseTbl";
insert into hbase."_CELL_"."QAHBaseTbl" select 'row3', 'f1', 'b', COL_TIMESTAMP, 'value3' from hbase."_CELL_"."QAHBaseTbl" where ROW_ID='row2';
insert into hbase."_CELL_"."QAHBaseTbl" values ('row4', 'f1', 'b', 1417829388787, 'value4');
select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COL_FAMILY as CHAR(10)) as COL_FAMILY, CAST(COL_NAME as CHAR(10)) as COL_NAME, COL_TIMESTAMP, CAST(COL_VALUE as CHAR(10)) as COL_VALUE from HBASE."_CELL_"."QAHBaseTbl";
rollback work;

begin work;
select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COLUMN_DETAILS as CHAR(100)) as COLUMN_DETAILS from hbase."_ROW_"."QAHBaseTbl";
insert into hbase."_ROW_"."QAHBaseTbl" select 'row3', COLUMN_DETAILS from hbase."_ROW_"."QAHBaseTbl" where ROW_ID='row2';
insert into hbase."_ROW_"."QAHBaseTbl" values ('row4', 'f1:bvalue4');
select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COLUMN_DETAILS as CHAR(100)) as COLUMN_DETAILS from hbase."_ROW_"."QAHBaseTbl";
rollback work;

----------------------------------------------
Here is the execution output from hbase shell and sqlci:

-bash-4.1$ hbase shell
2014-12-09 00:32:54,298 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.1-cdh5.1.0, rUnknown, Sat Jul 12 08:20:07 PDT 2014

hbase(main):008:0> create 'QAHBaseTbl', 'f1', 'f2'
0 row(s) in 3.3300 seconds

=> Hbase::Table - QAHBaseTbl
hbase(main):009:0> put 'QAHBaseTbl', 'row1', 'f1:a', 'value1'
0 row(s) in 0.0180 seconds

hbase(main):010:0> put 'QAHBaseTbl', 'row2', 'f2:a', 'value2'
0 row(s) in 0.0110 seconds

hbase(main):011:0> scan 'QAHBaseTbl'
ROW                   COLUMN+CELL
 row1                 column=f1:a, timestamp=1418086385348, value=value1
 row2                 column=f2:a, timestamp=1418086391076, value=value2
2 row(s) in 0.0220 seconds

hbase(main):012:0> exit


-bash-4.1$ sqlci
Trafodion Conversational Interface 0.9.1
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>begin work;

--- SQL operation complete.
>>select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COL_FAMILY as CHAR(10)) as COL_FAMILY, CAST(COL_NAME as CHAR(10)) as COL_NAME, COL_TIMESTAMP, CAST(COL_VALUE as CHAR(10)) as COL_VALUE from HBASE."_CELL_"."QAHBaseTbl";

ROW_ID      COL_FAMILY  COL_NAME    COL_TIMESTAMP         COL_VALUE
----------  ----------  ----------  --------------------  ----------

row1        f1          a                  1418086385348  value1
row2        f2          a                  1418086391076  value2

--- 2 row(s) selected.
>>insert into hbase."_CELL_"."QAHBaseTbl" select 'row3', 'f1', 'b', COL_TIMESTAMP, 'value3' from hbase."_CELL_"."QAHBaseTbl" where ROW_ID='row2';

--- 1 row(s) inserted.
>>insert into hbase."_CELL_"."QAHBaseTbl" values ('row4', 'f1', 'b', 1417829388787, 'value4');

--- 1 row(s) inserted.
>>select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COL_FAMILY as CHAR(10)) as COL_FAMILY, CAST(COL_NAME as CHAR(10)) as COL_NAME, COL_TIMESTAMP, CAST(COL_VALUE as CHAR(10)) as COL_VALUE from HBASE."_CELL_"."QAHBaseTbl";

ROW_ID      COL_FAMILY  COL_NAME    COL_TIMESTAMP         COL_VALUE
----------  ----------  ----------  --------------------  ----------

row1        f1          a                  1418086385348  value1
row2        f2          a                  1418086391076  value2
row3        f1          b                  1418086504934  value3
row4        f1          b                  1418086504950  value4

--- 4 row(s) selected.
>>rollback work;

--- SQL operation complete.
>>
>>begin work;

--- SQL operation complete.
>>select CAST(ROW_ID as CHAR(10)) as ROW_ID, CAST(COLUMN_DETAILS as CHAR(100)) as COLUMN_DETAILS from hbase."_ROW_"."QAHBaseTbl";

ROW_ID      COLUMN_DETAILS
----------  ----------------------------------------------------------------------------------------------------

row1        f1:avalue1                                                          
row2        f2:avalue2                                                          

--- 2 row(s) selected.
>>insert into hbase."_ROW_"."QAHBaseTbl" select 'row3', COLUMN_DETAILS from hbase."_ROW_"."QAHBaseTbl" where ROW_ID='row2';

*** ERROR[8448] Unable to access Hbase interface. Call to ExpHbaseInterface::insertRow returned error HBASE_ACCESS_ERROR(-705). Cause:
java.lang.IllegalArgumentException: Family > 127
org.apache.hadoop.hbase.KeyValue.checkParameters(KeyValue.java:822)
org.apache.hadoop.hbase.KeyValue.createByteArray(KeyValue.java:992)
org.apache.hadoop.hbase.KeyValue.<init>(KeyValue.java:639)
org.apache.hadoop.hbase.KeyValue.<init>(KeyValue.java:567)
org.apache.hadoop.hbase.KeyValue.<init>(KeyValue.java:470)
org.apache.hadoop.hbase.client.Mutation.createPutKeyValue(Mutation.java:115)
org.apache.hadoop.hbase.client.Put.add(Put.java:172)
org.apache.hadoop.hbase.client.Put.add(Put.java:138)
org.trafodion.sql.HBaseAccess.HTableClient.putRow(HTableClient.java:648)
org.trafodion.sql.HBaseAccess.HTableClient.insertRow(HTableClient.java:682)
.

*** ERROR[8839] Transaction was aborted.

--- 0 row(s) inserted.
>>insert into hbase."_ROW_"."QAHBaseTbl" values ('row4', 'f1:bvalue4');
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ffff4f0f7f0, pid=14569, tid=140737188128448
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libexecutor.so+0x2097f0]  ExHbaseAccessTcb::createDirectRowwiseBuffer(char*)+0xb0
#
# Core dump written. Default location: /opt/home/wtsai/v1208_0830/sql/scripts/core or core.14569
#
# An error report file with more information is saved as:
# /opt/home/wtsai/v1208_0830/sql/scripts/hs_err_pid14569.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)

----------------------------------------------

Here is the stack of the core:

(gdb) bt
#0  0x00000039e28328a5 in raise () from /lib64/libc.so.6
#1  0x00000039e283400d in abort () from /lib64/libc.so.6
#2  0x00007ffff6ee5a55 in os::abort(bool) ()
   from /opt/home/tools/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#3  0x00007ffff7065f87 in VMError::report_and_die() ()
   from /opt/home/tools/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#4  0x00007ffff6eea96f in JVM_handle_linux_signal ()
   from /opt/home/tools/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#5  <signal handler called>
#6  ExHbaseAccessTcb::createDirectRowwiseBuffer (this=0x7fffe9744c80,
    inputRow=<value optimized out>) at ../executor/ExHbaseAccess.cpp:2212
#7  0x00007ffff4f275d6 in ExHbaseAccessInsertRowwiseTcb::work (
    this=0x7fffe9744c80) at ../executor/ExHbaseIUD.cpp:702
#8  0x00007ffff4f43de3 in ExScheduler::work (this=0x7fffe97447e8,
    prevWaitTime=<value optimized out>) at ../executor/ExScheduler.cpp:328
#9  0x00007ffff4e6a5a3 in ex_root_tcb::oltExecute (this=0x7fffe97458a8,
    glob=<value optimized out>, input_desc=<value optimized out>,
    output_desc=0x0, diagsArea=@0x7fffffff13c0) at ../executor/ex_root.cpp:2070
#10 0x00007ffff5fadea3 in CliStatement::doOltExecute (this=0x7fffe9720bd0,
    cliGlobals=<value optimized out>, input_desc=0x0, output_desc=0x0,
    diagsArea=..., doNormalExecute=@0x7fffffff14dc, reExecute=@0x7fffffff14d8)
    at ../cli/Statement.cpp:5764
#11 0x00007ffff5f5b83b in SQLCLI_PerformTasks(CliGlobals *, ULng32, SQLSTMT_ID *, SQLDESC_ID *, SQLDESC_ID *, Lng32, Lng32, typedef __va_list_tag __va_list_tag *, SQLCLI_PTR_PAIRS *, SQLCLI_PTR_PAIRS *) (cliGlobals=0xb85750, tasks=8063,
    statement_id=0x236d500, input_descriptor=0x0, output_descriptor=0x0,
    num_input_ptr_pairs=0, num_output_ptr_pairs=0, ap=0x7fffffff1560,
    input_ptr_pairs=0x0, output_ptr_pairs=0x0) at ../cli/Cli.cpp:3239
#12 0x00007ffff5fc1035 in SQL_EXEC_ClearExecFetchClose (
    statement_id=0x236d500, input_descriptor=0x0, output_descriptor=0x0,
    num_input_ptr_pairs=0, num_output_ptr_pairs=0, num_total_ptr_pairs=0)
    at ../cli/CliExtern.cpp:2618
#13 0x00007ffff79ce1e5 in SqlCmd::doClearExecFetchClose (sqlci_env=0xb83f70,
    stmt=0x236d500, prep_stmt=0x1fe9da0,
    numUnnamedParams=<value optimized out>,
    unnamedParamArray=<value optimized out>,
    unnamedParamCharSetArray=<value optimized out>, handleError=1)
    at ../sqlci/SqlCmd.cpp:1764
#14 0x00007ffff79ce7ea in SqlCmd::do_execute (sqlci_env=0xb83f70,
    prep_stmt=0x1fe9da0, numUnnamedParams=0, unnamedParamArray=0x0,
    unnamedParamCharSetArray=0x0, prepcode=0) at ../sqlci/SqlCmd.cpp:2019
#15 0x00007ffff79cf4ad in DML::process (this=0x234e5f0, sqlci_env=0xb83f70)
    at ../sqlci/SqlCmd.cpp:2816
#16 0x00007ffff79b5ad4 in Obey::process (this=0x2a430a0,
    sqlci_env=<value optimized out>) at ../sqlci/Obey.cpp:264
#17 0x00007ffff79bbfe6 in SqlciEnv::executeCommands (this=0xb83f70,
    input_stmt=@0x7fffffff2df8) at ../sqlci/SqlciEnv.cpp:847
#18 0x00007ffff79be08b in SqlciEnv::run (this=0xb83f70)
    at ../sqlci/SqlciEnv.cpp:656
#19 0x0000000000401ab1 in main (argc=1, argv=0x7fffffff2fc8)
    at ../bin/SqlciMain.cpp:319



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