@Test public void rowKeyIsSetInRequest() throws IOException { Get get = makeValidGet(dataHelper.randomData(PREFIX_DATA)); getAdapter.adapt(get, throwingReadHooks, query); ByteString adaptedRowKey = query.toProto(requestContext).getRows().getRowKeys(0); Assert.assertEquals( new String(get.getRow(), StandardCharsets.UTF_8), adaptedRowKey.toStringUtf8()); }
@Override public void adapt(Get operation, ReadHooks readHooks, Query query) { Scan operationAsScan = new Scan(addKeyOnlyFilter(operation)); scanAdapter.throwIfUnsupportedScan(operationAsScan); query .filter(scanAdapter.buildFilter(operationAsScan, readHooks)) .rowKey(ByteString.copyFrom(operation.getRow())); }
GetAdapter implements ReadOperationAdapter<Get> { @Override public void adapt(Get operation, ReadHooks readHooks, Query query) { Scan operationAsScan = new Scan(addKeyOnlyFilter(operation)); scanAdapter.throwIfUnsupportedScan(operationAsScan); query .filter(scanAdapter.buildFilter(operationAsScan, readHooks)) .rowKey(ByteString.copyFrom(operation.getRow())); } }
GetAdapter implements ReadOperationAdapter<Get> { @Override public void adapt(Get operation, ReadHooks readHooks, Query query) { Scan operationAsScan = new Scan(addKeyOnlyFilter(operation)); scanAdapter.throwIfUnsupportedScan(operationAsScan); query .filter(scanAdapter.buildFilter(operationAsScan, readHooks)) .rowKey(ByteString.copyFrom(operation.getRow())); } GetAdapter(ScanAdapter scanAdapter); }
GetAdapter implements ReadOperationAdapter<Get> { @Override public void adapt(Get operation, ReadHooks readHooks, Query query) { Scan operationAsScan = new Scan(addKeyOnlyFilter(operation)); scanAdapter.throwIfUnsupportedScan(operationAsScan); query .filter(scanAdapter.buildFilter(operationAsScan, readHooks)) .rowKey(ByteString.copyFrom(operation.getRow())); } GetAdapter(ScanAdapter scanAdapter); static Get setCheckExistenceOnly(Get get); @Override void adapt(Get operation, ReadHooks readHooks, Query query); Filters.Filter buildFilter(Get operation); }
GetAdapter implements ReadOperationAdapter<Get> { @Override public void adapt(Get operation, ReadHooks readHooks, Query query) { Scan operationAsScan = new Scan(addKeyOnlyFilter(operation)); scanAdapter.throwIfUnsupportedScan(operationAsScan); query .filter(scanAdapter.buildFilter(operationAsScan, readHooks)) .rowKey(ByteString.copyFrom(operation.getRow())); } GetAdapter(ScanAdapter scanAdapter); static Get setCheckExistenceOnly(Get get); @Override void adapt(Get operation, ReadHooks readHooks, Query query); Filters.Filter buildFilter(Get operation);  }