phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yixuan geng <gen...@soulgame.com>
Subject Re: NullPointerException thrown when inserting data to phoenix table using node-hbase-client
Date Fri, 09 May 2014 03:55:06 GMT
Problem is solved by upgrading to phoenix 3.0, sorry for spamming.

-Yixuan


2014-05-08 0:10 GMT-07:00 yixuan geng <gengyx@soulgame.com>:

> Hi all,
>
> I was using the a third-party node-hbase-client library to write data into
> hbase from node.js
> https://github.com/alibaba/node-hbase-client
>
> It works fine if I am writing to a regular hbase table, but if it is a
> table created by phoenix or has phoenix view on top of it, the write
> operations failed.
>
> I noticed the exception is thrown from
> org.apache.hadoop.hbase.regionserver.wal.*WALEdit*.write(). I vaguely
> recall that Phoneix does something special at the WAL level (sorry about my
> poor knowledge about hbase impl).
>
> I guess my question is why such a write that works on regular hbase table
> cannot work with phonenix tables.  I know this is a hard to debug because
> few people actually use node-hbase-client. But if you do play with it, you
> can very quickly reproduce this exception with a few lines of js code:
>
> *var HBase = require('hbase-client');*
>
> *var client = HBase.create({ zookeeperHosts: [ 'master-dev:2181'],
> zookeeperRoot: '/hbase', });*
>
> *client.putRow('test_table', 'rowkey2', { "testColumn:appid': 'foo_name'},
> function (err) { console.log(err); });*
>
> Thanks,
> Yixuan
>
> ----------
> StackTrace:
>
> java.io.IOException: java.io.IOException: java.lang.NullPointerException
>
> at
> org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter.append(SequenceFileLogWriter.java:287)
>
> at
> org.apache.hadoop.hbase.regionserver.wal.HLog$LogSyncer.hlogFlush(HLog.java:1296)
>
> at org.apache.hadoop.hbase.regionserver.wal.HLog.syncer(HLog.java:1352)
>
> at org.apache.hadoop.hbase.regionserver.wal.HLog.sync(HLog.java:1476)
>
> at org.apache.hadoop.hbase.regionserver.wal.HLog.append(HLog.java:1177)
>
> at org.apache.hadoop.hbase.regionserver.wal.HLog.append(HLog.java:1217)
>
> at
> org.apache.hadoop.hbase.regionserver.HRegion.internalPut(HRegion.java:2926)
>
> at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2098)
>
> at
> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:2242)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> t
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
>
> at
> org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:323)
>
> at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1426)
>
> Caused by: java.lang.NullPointerException
>
> at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:86)
>
> at java.io.DataOutputStream.write(DataOutputStream.java:90)
>
> at org.apache.hadoop.hbase.KeyValue.write(KeyValue.java:2271)
>
> at
> org.apache.hadoop.hbase.codec.KeyValueCodec$KeyValueEncoder.write(KeyValueCodec.java:52)
>
> at org.apache.hadoop.hbase.regionserver.wal.*WALEdit*
> .write(WALEdit.java:246)
>
> at
> org.apache.hadoop.io.serializer.WritableSerialization$WritableSerializer.serialize(WritableSerialization.java:90)
>
> at
> org.apache.hadoop.io.serializer.WritableSerialization$WritableSerializer.serialize(WritableSerialization.java:77)
>
> at org.apache.hadoop.io.SequenceFile$Writer.append(SequenceFile.java:1064)
>
> at org.apache.hadoop.io.SequenceFile$Writer.append(SequenceFile.java:1035)
>
>  at
> org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter.append(SequenceFileLogWriter.java:284)
>
>

Mime
View raw message