hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xudong Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-18755) Set Increment getReturnResults to false will cause batch failed by using BufferedMutator
Date Tue, 05 Sep 2017 02:31:02 GMT
Xudong Zheng created HBASE-18755:
------------------------------------

             Summary: Set Increment getReturnResults to false will cause batch failed by using
BufferedMutator 
                 Key: HBASE-18755
                 URL: https://issues.apache.org/jira/browse/HBASE-18755
             Project: HBase
          Issue Type: Bug
          Components: Client
    Affects Versions: 1.2.0
            Reporter: Xudong Zheng


I try to do batch of increment in Spark rdd like this:

{code:scala}
    var connection: Connection = null
    var bufferdMutator: BufferedMutator = null
    try {
      connection = getConnection
      bufferdMutator = getBufferedMutator(connection)
      dataItr.foreach(row => try {
        val rowKey = toRowKey(row)
        val increment = new Increment(rowKey)
        increment.setDurability(Durability.SKIP_WAL)
        increment.setReturnResults(false)
        meas.foreach(columnName => {
          increment.addColumn("cf".getBytes, Bytes.toBytes(columnName), row.getAs[Long](columnName))
        })
        bufferdMutator.mutate(increment)

      } catch {
        case t: Throwable => logger.error(t.getMessage, t)
      })
      bufferdMutator.flush()
    } catch {
      case t: Throwable => logger.error(t.getMessage, t)
    } finally {
      IOUtils.closeQuietly(bufferdMutator)
    }
{code}

Because I do not need the return result, thus I use increment.setReturnResults(false) . When
flush to Hbase, I got the flowing exception. When I change  increment.setReturnResults(true)
everything is OK

17/09/04 17:55:39 ERROR client.AsyncProcess: #32, Caught throwable while calling. This is
unexpected. Retrying. Server is hadoop02,60020,1502272041150, tableName=push:msgHourInfo
java.lang.RuntimeException: java.lang.IllegalStateException: actions.getActionCount=1, actionResult.getResultOrExceptionCount=0
for region type: REGION_NAME
value: "msgHourInfo,,1504318878177.1edc4215ef0853432b1598a0b1965519."

        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:208)
        at org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl$SingleServerRequestRunnable.run(AsyncProcess.java:733)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: actions.getActionCount=1, actionResult.getResultOrExceptionCount=0
for region type: REGION_NAME
value: "push:msgHourInfo,,1504318878177.1edc4215ef0853432b1598a0b1965519."

        at org.apache.hadoop.hbase.protobuf.ResponseConverter.getResults(ResponseConverter.java:117)
        at org.apache.hadoop.hbase.client.MultiServerCallable.call(MultiServerCallable.java:133)
        at org.apache.hadoop.hbase.client.MultiServerCallable.call(MultiServerCallable.java:53)
        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
        ... 6 more



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message