/** {@inheritDoc} */ @Override public Boolean checkAndMutateRow(ConditionalRowMutation conditionalRowMutation) { CheckAndMutateRowResponse response = delegate.checkAndMutateRow(conditionalRowMutation.toProto(requestContext)); return response.getPredicateMatched(); }
private boolean checkAndMutate(final byte[] row, ConditionalRowMutation request, String type) throws IOException { Span span = TRACER.spanBuilder("BigtableTable." + type).startSpan(); try (Scope scope = TRACER.withSpan(span)) { CheckAndMutateRowRequest checkAndMutateRowRequest = request.toProto(requestContext); CheckAndMutateRowResponse response = client.checkAndMutateRow(checkAndMutateRowRequest); return CheckAndMutateUtil.wasMutationApplied(checkAndMutateRowRequest, response); } catch (Throwable t) { span.setStatus(Status.UNKNOWN); throw logAndCreateIOException(type, row, t); } finally { span.end(); } }
private boolean checkAndMutate(final byte[] row, ConditionalRowMutation request, String type) throws IOException { Span span = TRACER.spanBuilder("BigtableTable." + type).startSpan(); try (Scope scope = TRACER.withSpan(span)) { CheckAndMutateRowRequest checkAndMutateRowRequest = request.toProto(requestContext); CheckAndMutateRowResponse response = client.checkAndMutateRow(checkAndMutateRowRequest); return CheckAndMutateUtil.wasMutationApplied(checkAndMutateRowRequest, response); } catch (Throwable t) { span.setStatus(Status.UNKNOWN); throw logAndCreateIOException(type, row, t); } finally { span.end(); } }