phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-3571) Potential divide by zero exception in LongDivideExpression
Date Fri, 03 Feb 2017 01:27:51 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated PHOENIX-3571:
----------------------------
    Description: 
Running SaltedIndexIT, I saw the following:
{code}
===> testExpressionThrowsException(org.apache.phoenix.end2end.index.IndexExpressionIT)
starts
2017-01-05 19:42:48,992 INFO  [main] client.HBaseAdmin: Created I
2017-01-05 19:42:48,996 INFO  [main] schema.MetaDataClient: Created index I at 1483645369000
2017-01-05 19:42:49,066 WARN  [hconnection-0x5a45c218-shared--pool52-t6] client.AsyncProcess:
#38, table=T, attempt=1/35 failed=1ops, last exception: org.apache.phoenix.hbase.index.builder.IndexBuildingFailureException:
org.apache.phoenix.hbase.index.builder.IndexBuildingFailureException: Failed to build index
for unexpected reason!
  at org.apache.phoenix.hbase.index.util.IndexManagementUtil.rethrowIndexingException(IndexManagementUtil.java:183)
  at org.apache.phoenix.hbase.index.Indexer.preBatchMutate(Indexer.java:204)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$35.call(RegionCoprocessorHost.java:974)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1660)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1734)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1692)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preBatchMutate(RegionCoprocessorHost.java:970)
  at org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchMutation(HRegion.java:3218)
  at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2984)
  at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2926)
  at org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:718)
  at org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:680)
  at org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2065)
  at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32393)
  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2141)
  at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112)
  at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:238)
  at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:218)
Caused by: java.lang.ArithmeticException: / by zero
  at org.apache.phoenix.expression.LongDivideExpression.evaluate(LongDivideExpression.java:50)
  at org.apache.phoenix.index.IndexMaintainer.buildRowKey(IndexMaintainer.java:521)
  at org.apache.phoenix.index.IndexMaintainer.buildUpdateMutation(IndexMaintainer.java:859)
  at org.apache.phoenix.index.PhoenixIndexCodec.getIndexUpserts(PhoenixIndexCodec.java:76)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addCurrentStateMutationsForBatch(NonTxIndexBuilder.java:288)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addUpdateForGivenTimestamp(NonTxIndexBuilder.java:256)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addMutationsForBatch(NonTxIndexBuilder.java:222)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.batchMutationAndAddUpdates(NonTxIndexBuilder.java:109)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.getIndexUpdate(NonTxIndexBuilder.java:71)
  at org.apache.phoenix.hbase.index.builder.IndexBuildManager$1.call(IndexBuildManager.java:136)
  at org.apache.phoenix.hbase.index.builder.IndexBuildManager$1.call(IndexBuildManager.java:132)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
  at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:56)
  at org.apache.phoenix.hbase.index.parallel.BaseTaskRunner.submit(BaseTaskRunner.java:58)
  at org.apache.phoenix.hbase.index.parallel.BaseTaskRunner.submitUninterruptible(BaseTaskRunner.java:99)
  at org.apache.phoenix.hbase.index.builder.IndexBuildManager.getIndexUpdate(IndexBuildManager.java:143)
  at org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(Indexer.java:273)
  at org.apache.phoenix.hbase.index.Indexer.preBatchMutate(Indexer.java:201)
  ... 16 more
{code}

Better handling of divide by zero should be provided.

  was:
Running SaltedIndexIT, I saw the following:
{code}
===> testExpressionThrowsException(org.apache.phoenix.end2end.index.IndexExpressionIT)
starts
2017-01-05 19:42:48,992 INFO  [main] client.HBaseAdmin: Created I
2017-01-05 19:42:48,996 INFO  [main] schema.MetaDataClient: Created index I at 1483645369000
2017-01-05 19:42:49,066 WARN  [hconnection-0x5a45c218-shared--pool52-t6] client.AsyncProcess:
#38, table=T, attempt=1/35 failed=1ops, last exception: org.apache.phoenix.hbase.index.builder.IndexBuildingFailureException:
org.apache.phoenix.hbase.index.builder.IndexBuildingFailureException: Failed to build index
for unexpected reason!
  at org.apache.phoenix.hbase.index.util.IndexManagementUtil.rethrowIndexingException(IndexManagementUtil.java:183)
  at org.apache.phoenix.hbase.index.Indexer.preBatchMutate(Indexer.java:204)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$35.call(RegionCoprocessorHost.java:974)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1660)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1734)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1692)
  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preBatchMutate(RegionCoprocessorHost.java:970)
  at org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchMutation(HRegion.java:3218)
  at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2984)
  at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2926)
  at org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:718)
  at org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:680)
  at org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2065)
  at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32393)
  at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2141)
  at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112)
  at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:238)
  at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:218)
Caused by: java.lang.ArithmeticException: / by zero
  at org.apache.phoenix.expression.LongDivideExpression.evaluate(LongDivideExpression.java:50)
  at org.apache.phoenix.index.IndexMaintainer.buildRowKey(IndexMaintainer.java:521)
  at org.apache.phoenix.index.IndexMaintainer.buildUpdateMutation(IndexMaintainer.java:859)
  at org.apache.phoenix.index.PhoenixIndexCodec.getIndexUpserts(PhoenixIndexCodec.java:76)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addCurrentStateMutationsForBatch(NonTxIndexBuilder.java:288)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addUpdateForGivenTimestamp(NonTxIndexBuilder.java:256)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addMutationsForBatch(NonTxIndexBuilder.java:222)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.batchMutationAndAddUpdates(NonTxIndexBuilder.java:109)
  at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.getIndexUpdate(NonTxIndexBuilder.java:71)
  at org.apache.phoenix.hbase.index.builder.IndexBuildManager$1.call(IndexBuildManager.java:136)
  at org.apache.phoenix.hbase.index.builder.IndexBuildManager$1.call(IndexBuildManager.java:132)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
  at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:56)
  at org.apache.phoenix.hbase.index.parallel.BaseTaskRunner.submit(BaseTaskRunner.java:58)
  at org.apache.phoenix.hbase.index.parallel.BaseTaskRunner.submitUninterruptible(BaseTaskRunner.java:99)
  at org.apache.phoenix.hbase.index.builder.IndexBuildManager.getIndexUpdate(IndexBuildManager.java:143)
  at org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(Indexer.java:273)
  at org.apache.phoenix.hbase.index.Indexer.preBatchMutate(Indexer.java:201)
  ... 16 more
{code}
Better handling of divide by zero should be provided.


> Potential divide by zero exception in LongDivideExpression
> ----------------------------------------------------------
>
>                 Key: PHOENIX-3571
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3571
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Ted Yu
>            Priority: Minor
>
> Running SaltedIndexIT, I saw the following:
> {code}
> ===> testExpressionThrowsException(org.apache.phoenix.end2end.index.IndexExpressionIT)
starts
> 2017-01-05 19:42:48,992 INFO  [main] client.HBaseAdmin: Created I
> 2017-01-05 19:42:48,996 INFO  [main] schema.MetaDataClient: Created index I at 1483645369000
> 2017-01-05 19:42:49,066 WARN  [hconnection-0x5a45c218-shared--pool52-t6] client.AsyncProcess:
#38, table=T, attempt=1/35 failed=1ops, last exception: org.apache.phoenix.hbase.index.builder.IndexBuildingFailureException:
org.apache.phoenix.hbase.index.builder.IndexBuildingFailureException: Failed to build index
for unexpected reason!
>   at org.apache.phoenix.hbase.index.util.IndexManagementUtil.rethrowIndexingException(IndexManagementUtil.java:183)
>   at org.apache.phoenix.hbase.index.Indexer.preBatchMutate(Indexer.java:204)
>   at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$35.call(RegionCoprocessorHost.java:974)
>   at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1660)
>   at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1734)
>   at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1692)
>   at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preBatchMutate(RegionCoprocessorHost.java:970)
>   at org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchMutation(HRegion.java:3218)
>   at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2984)
>   at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2926)
>   at org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:718)
>   at org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:680)
>   at org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2065)
>   at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32393)
>   at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2141)
>   at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112)
>   at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:238)
>   at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:218)
> Caused by: java.lang.ArithmeticException: / by zero
>   at org.apache.phoenix.expression.LongDivideExpression.evaluate(LongDivideExpression.java:50)
>   at org.apache.phoenix.index.IndexMaintainer.buildRowKey(IndexMaintainer.java:521)
>   at org.apache.phoenix.index.IndexMaintainer.buildUpdateMutation(IndexMaintainer.java:859)
>   at org.apache.phoenix.index.PhoenixIndexCodec.getIndexUpserts(PhoenixIndexCodec.java:76)
>   at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addCurrentStateMutationsForBatch(NonTxIndexBuilder.java:288)
>   at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addUpdateForGivenTimestamp(NonTxIndexBuilder.java:256)
>   at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.addMutationsForBatch(NonTxIndexBuilder.java:222)
>   at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.batchMutationAndAddUpdates(NonTxIndexBuilder.java:109)
>   at org.apache.phoenix.hbase.index.covered.NonTxIndexBuilder.getIndexUpdate(NonTxIndexBuilder.java:71)
>   at org.apache.phoenix.hbase.index.builder.IndexBuildManager$1.call(IndexBuildManager.java:136)
>   at org.apache.phoenix.hbase.index.builder.IndexBuildManager$1.call(IndexBuildManager.java:132)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
>   at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:56)
>   at org.apache.phoenix.hbase.index.parallel.BaseTaskRunner.submit(BaseTaskRunner.java:58)
>   at org.apache.phoenix.hbase.index.parallel.BaseTaskRunner.submitUninterruptible(BaseTaskRunner.java:99)
>   at org.apache.phoenix.hbase.index.builder.IndexBuildManager.getIndexUpdate(IndexBuildManager.java:143)
>   at org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(Indexer.java:273)
>   at org.apache.phoenix.hbase.index.Indexer.preBatchMutate(Indexer.java:201)
>   ... 16 more
> {code}
> Better handling of divide by zero should be provided.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message