@Override protected MultiResponse rpcCall() throws Exception { CompareType compareType = CompareType.valueOf(opName); MultiRequest request = RequestConverter .buildMutateRequest(getLocation().getRegionInfo().getRegionName(), row, family, qualifier, new BinaryComparator(value), compareType, timeRange, rm); ClientProtos.MultiResponse response = doMulti(request); ClientProtos.RegionActionResult res = response.getRegionActionResultList().get(0); if (res.hasException()) { Throwable ex = ProtobufUtil.toException(res.getException()); if (ex instanceof IOException) { throw (IOException) ex; } throw new IOException( "Failed to checkAndMutate row: " + Bytes.toStringBinary(rm.getRow()), ex); } return ResponseConverter.getResults(request, response, getRpcControllerCellScanner()); } };
@Override protected MultiResponse rpcCall() throws Exception { RegionAction.Builder regionMutationBuilder = RequestConverter.buildRegionAction( getLocation().getRegionInfo().getRegionName(), rm); regionMutationBuilder.setAtomic(true); MultiRequest request = MultiRequest.newBuilder().addRegionAction(regionMutationBuilder.build()).build(); ClientProtos.MultiResponse response = doMulti(request); ClientProtos.RegionActionResult res = response.getRegionActionResultList().get(0); if (res.hasException()) { Throwable ex = ProtobufUtil.toException(res.getException()); if (ex instanceof IOException) { throw (IOException) ex; } throw new IOException("Failed to mutate row: " + Bytes.toStringBinary(rm.getRow()), ex); } return ResponseConverter.getResults(request, response, getRpcControllerCellScanner()); } };
assertTrue(response.getRegionActionResultList().get(0).hasException()); assertFalse(response.getRegionActionResultList().get(1).hasException()); assertEquals(1, response.getRegionActionResultList().get(1).getResultOrExceptionCount()); assertTrue(
if (actionResult.hasException()) { Throwable regionException = ProtobufUtil.toException(actionResult.getException()); results.addException(regionName, regionException);
assertTrue(response.getRegionActionResultList().get(0).hasException()); assertFalse(response.getRegionActionResultList().get(1).hasException()); assertEquals(1, response.getRegionActionResultList().get(1).getResultOrExceptionCount()); assertTrue(
@Override protected MultiResponse rpcCall() throws Exception { CompareType compareType = CompareType.valueOf(opName); MultiRequest request = RequestConverter .buildMutateRequest(getLocation().getRegionInfo().getRegionName(), row, family, qualifier, new BinaryComparator(value), compareType, timeRange, rm); ClientProtos.MultiResponse response = doMulti(request); ClientProtos.RegionActionResult res = response.getRegionActionResultList().get(0); if (res.hasException()) { Throwable ex = ProtobufUtil.toException(res.getException()); if (ex instanceof IOException) { throw (IOException) ex; } throw new IOException( "Failed to checkAndMutate row: " + Bytes.toStringBinary(rm.getRow()), ex); } return ResponseConverter.getResults(request, response, getRpcControllerCellScanner()); } };
@Override protected MultiResponse rpcCall() throws Exception { RegionAction.Builder regionMutationBuilder = RequestConverter.buildRegionAction( getLocation().getRegionInfo().getRegionName(), rm); regionMutationBuilder.setAtomic(true); MultiRequest request = MultiRequest.newBuilder().addRegionAction(regionMutationBuilder.build()).build(); ClientProtos.MultiResponse response = doMulti(request); ClientProtos.RegionActionResult res = response.getRegionActionResultList().get(0); if (res.hasException()) { Throwable ex = ProtobufUtil.toException(res.getException()); if (ex instanceof IOException) { throw (IOException) ex; } throw new IOException("Failed to mutate row: " + Bytes.toStringBinary(rm.getRow()), ex); } return ResponseConverter.getResults(request, response, getRpcControllerCellScanner()); } };
if (actionResult.hasException()) { Throwable regionException = ProtobufUtil.toException(actionResult.getException()); results.addException(regionName, regionException);
@Override protected MultiResponse rpcCall() throws Exception { CompareType compareType = CompareType.valueOf(opName); MultiRequest request = RequestConverter .buildMutateRequest(getLocation().getRegionInfo().getRegionName(), row, family, qualifier, new BinaryComparator(value), compareType, timeRange, rm); ClientProtos.MultiResponse response = doMulti(request); ClientProtos.RegionActionResult res = response.getRegionActionResultList().get(0); if (res.hasException()) { Throwable ex = ProtobufUtil.toException(res.getException()); if (ex instanceof IOException) { throw (IOException) ex; } throw new IOException( "Failed to checkAndMutate row: " + Bytes.toStringBinary(rm.getRow()), ex); } return ResponseConverter.getResults(request, response, getRpcControllerCellScanner()); } };
@Override protected MultiResponse rpcCall() throws Exception { RegionAction.Builder regionMutationBuilder = RequestConverter.buildRegionAction( getLocation().getRegionInfo().getRegionName(), rm); regionMutationBuilder.setAtomic(true); MultiRequest request = MultiRequest.newBuilder().addRegionAction(regionMutationBuilder.build()).build(); ClientProtos.MultiResponse response = doMulti(request); ClientProtos.RegionActionResult res = response.getRegionActionResultList().get(0); if (res.hasException()) { Throwable ex = ProtobufUtil.toException(res.getException()); if (ex instanceof IOException) { throw (IOException) ex; } throw new IOException("Failed to mutate row: " + Bytes.toStringBinary(rm.getRow()), ex); } return ResponseConverter.getResults(request, response, getRpcControllerCellScanner()); } };
if (actionResult.hasException()) { Throwable regionException = ProtobufUtil.toException(actionResult.getException()); results.addException(regionName, regionException);