predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "李伟" <liwei.cont...@foxmail.com>
Subject Re:Exception : Incorrect byte array size in eventserver
Date Thu, 09 Nov 2017 11:25:00 GMT
I met same exception while importing a data file exported from MySQL eventserver into hbase
eventserver.


Data rows like this:
{"eventId":"0002e945e06c4ba79e360e92ce4376d4","event":"$set","entityType":"item","entityId":"Galaxy","properties":{"categories":["Phones","Electronics","Samsung"]},"eventTime":"2017-10-05T23:48:30.000Z","creationTime":"2017-11-09T09:24:33.000Z"}





The data file exported from hbase eventserver can be imported successfully.
Data rows like this:
{"eventId":"KpjNMVrQzY2s0TZhYB3vsAAAAV3jJ35Dpq6EWTaWJLM","event":"$set","entityType":"item","entityId":"Nexus","properties":{"defaultRank":4.0,"expires":"2017-11-10T14:14:02.563101+00:00","countries":["United
States","Canada"],"date":"2017-11-08T14:14:02.563101+00:00","categories":["Tablets","Electronics","Google"],"available":"2017-11-06T14:14:02.563101+00:00"},"eventTime":"2017-11-09T09:26:08.938Z","creationTime":"2017-11-09T09:26:08.938Z"}


 
Exception detail :
[Stage 0:>                                                          (0 + 2) / 2][WARN]
[TaskSetManager] Lost task 1.0 in stage 0.0 (TID 1, mtime-bigdata01, executor 2): org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKeyException:
Failed to convert String 01df69bb9bd8486c9413f34d66e56646 to RowKey because org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKeyException:
Incorrect byte array size. Bytes: -45,87,95,-21,-42,-37,-11,-73,124,-29,-50,-100,-9,-115,119,127,126,29,-21,-89,-71,-21,-82,58.
        at org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKey$.apply(HBEventsUtil.scala:118)
        at org.apache.predictionio.data.storage.hbase.HBEventsUtil$$anonfun$7.apply(HBEventsUtil.scala:150)
        at org.apache.predictionio.data.storage.hbase.HBEventsUtil$$anonfun$7.apply(HBEventsUtil.scala:149)
        at scala.Option.map(Option.scala:146)
        at org.apache.predictionio.data.storage.hbase.HBEventsUtil$.eventToPut(HBEventsUtil.scala:149)
        at org.apache.predictionio.data.storage.hbase.HBPEvents$$anonfun$write$1.apply(HBPEvents.scala:104)
        at org.apache.predictionio.data.storage.hbase.HBPEvents$$anonfun$write$1.apply(HBPEvents.scala:103)
        at scala.collection.Iterator$$anon$11.next(Iterator.scala:409)
        at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1$$anonfun$12$$anonfun$apply$4.apply$mcV$sp(PairRDDFunctions.scala:1124)
        at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1$$anonfun$12$$anonfun$apply$4.apply(PairRDDFunctions.scala:1123)
        at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1$$anonfun$12$$anonfun$apply$4.apply(PairRDDFunctions.scala:1123)
        at org.apache.spark.util.Utils$.tryWithSafeFinallyAndFailureCallbacks(Utils.scala:1341)
        at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1$$anonfun$12.apply(PairRDDFunctions.scala:1131)
        at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1$$anonfun$12.apply(PairRDDFunctions.scala:1102)
        at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87)
        at org.apache.spark.scheduler.Task.run(Task.scala:99)
        at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:282)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKeyException: Incorrect
byte array size. Bytes: -45,87,95,-21,-42,-37,-11,-73,124,-29,-50,-100,-9,-115,119,127,126,29,-21,-89,-71,-21,-82,58.
        at org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKey$.apply(HBEventsUtil.scala:126)
        at org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKey$.apply(HBEventsUtil.scala:116)
        ... 19 more



it seems like a eventId format problem.


Does anyone have any idea about this problem?


Thanks






------------------ 原始邮件 ------------------
发件人: "vaibhav goel";<vaibhavgoel83@gmail.com>;
发送时间: 2017年11月8日(星期三) 晚上10:04
收件人: "user"<user@predictionio.apache.org>;

主题: Exception : Incorrect byte array size in eventserver



While checking data using Eventserver i am getting the following exception
{
message: "org.apache.predictionio.data.storage.hbase.HBEventsUtil$RowKeyException: Incorrect
byte array size. Bytes: -65,-51,-28,105,42,13,90,-24,21,111,82,-66,-118,-32,101,127,0,0,1,93,17,-60,-77,-112,-109,-97,-7,-101,21,89,-95."
}


Hit on eventserver : http://localhost:7070/events.json?accessKey=tocDjIfQ58c5I6C5mNfnY4WkMwqpsxxOQPefV2T9BemtgiR9nTq0crMrMYXD7yIP&entityId=vaibhav&event=purchased
Mime
View raw message