@Override public void setCellScanner(CellScanner cellScanner) { delegate.setCellScanner(cellScanner); }
protected void setRpcControllerCellScanner(CellScanner cellScanner) { if (getRpcController() != null && getRpcController() instanceof HBaseRpcController) { ((HBaseRpcController)this.rpcController).setCellScanner(cellScanner); } }
private void addResult(final MutateResponse.Builder builder, final Result result, final HBaseRpcController rpcc, boolean clientCellBlockSupported) { if (result == null) return; if (clientCellBlockSupported) { builder.setResult(ProtobufUtil.toResultNoData(result)); rpcc.setCellScanner(result.cellScanner()); } else { ClientProtos.Result pbr = ProtobufUtil.toResult(result); builder.setResult(pbr); } }
ReplicationProtbufUtil.buildReplicateWALEntryRequest(entriesArray, location .getRegionInfo().getEncodedNameAsBytes(), null, null, null); controller.setCellScanner(p.getSecond()); return stub.replay(controller, p.getFirst());
resetController(controller, Math.min(rpcTimeoutNs, remainingNs)); if (!cells.isEmpty()) { controller.setCellScanner(createCellScanner(cells));
@Override public ScanResponse answer(InvocationOnMock invocation) throws Throwable { ((HBaseRpcController) invocation.getArgument(0)).setCellScanner(CellUtil .createCellScanner(cellScannables)); return builder.setScannerId(1234567890L).setMoreResults(false).build(); } });
private void addResults(ScanResponse.Builder builder, List<Result> results, HBaseRpcController controller, boolean isDefaultRegion, boolean clientCellBlockSupported) { builder.setStale(!isDefaultRegion); if (results.isEmpty()) { return; } if (clientCellBlockSupported) { for (Result res : results) { builder.addCellsPerResult(res.size()); builder.addPartialFlagPerResult(res.mayHaveMoreCellsInRow()); } controller.setCellScanner(CellUtil.createCellScanner(results)); } else { for (Result res : results) { ClientProtos.Result pbr = ProtobufUtil.toResult(res); builder.addResults(pbr); } } }
@Override public void setCellScanner(CellScanner cellScanner) { delegate.setCellScanner(cellScanner); }
@Override public EchoResponseProto echo(RpcController controller, EchoRequestProto request) throws ServiceException { if (controller instanceof HBaseRpcController) { HBaseRpcController pcrc = (HBaseRpcController) controller; // If cells, scan them to check we are able to iterate what we were given and since this is an // echo, just put them back on the controller creating a new block. Tests our block building. CellScanner cellScanner = pcrc.cellScanner(); List<Cell> list = null; if (cellScanner != null) { list = new ArrayList<>(); try { while (cellScanner.advance()) { list.add(cellScanner.current()); } } catch (IOException e) { throw new ServiceException(e); } } cellScanner = CellUtil.createCellScanner(list); pcrc.setCellScanner(cellScanner); } return EchoResponseProto.newBuilder().setMessage(request.getMessage()).build(); }
CellScanner cellScanner = controller != null ? controller.cellScanner(): null; if (controller != null) { controller.setCellScanner(null); controller.setCellScanner(CellUtil.createCellScanner(cellsToReturn));
List<CellScannable> results = new ArrayList<>(1); results.add(result); ((HBaseRpcController) controller).setCellScanner(CellUtil .createCellScanner(results)); builder.setMoreResults(true);
protected void setRpcControllerCellScanner(CellScanner cellScanner) { if (getRpcController() != null && getRpcController() instanceof HBaseRpcController) { ((HBaseRpcController)this.rpcController).setCellScanner(cellScanner); } }
&& VersionInfoUtil.hasMinimumVersion(context.getClientVersionInfo(), 1, 3)) { pbr = ProtobufUtil.toResultNoData(r); ((HBaseRpcController) controller).setCellScanner(CellUtil.createCellScanner(r .rawCells())); addSize(context, r, null);
controller.setCellScanner(null);
resetController(controller, Math.min(rpcTimeoutNs, remainingNs)); if (!cells.isEmpty()) { controller.setCellScanner(createCellScanner(cells));
@Override public void setCellScanner(CellScanner cellScanner) { delegate.setCellScanner(cellScanner); }
protected void setRpcControllerCellScanner(CellScanner cellScanner) { if (getRpcController() != null && getRpcController() instanceof HBaseRpcController) { ((HBaseRpcController)this.rpcController).setCellScanner(cellScanner); } }
@Override public ScanResponse answer(InvocationOnMock invocation) throws Throwable { ((HBaseRpcController) invocation.getArgument(0)).setCellScanner(CellUtil .createCellScanner(cellScannables)); return builder.setScannerId(1234567890L).setMoreResults(false).build(); } });
@Override public EchoResponseProto echo(RpcController controller, EchoRequestProto request) throws ServiceException { if (controller instanceof HBaseRpcController) { HBaseRpcController pcrc = (HBaseRpcController) controller; // If cells, scan them to check we are able to iterate what we were given and since this is an // echo, just put them back on the controller creating a new block. Tests our block building. CellScanner cellScanner = pcrc.cellScanner(); List<Cell> list = null; if (cellScanner != null) { list = new ArrayList<>(); try { while (cellScanner.advance()) { list.add(cellScanner.current()); } } catch (IOException e) { throw new ServiceException(e); } } cellScanner = CellUtil.createCellScanner(list); pcrc.setCellScanner(cellScanner); } return EchoResponseProto.newBuilder().setMessage(request.getMessage()).build(); }
List<CellScannable> results = new ArrayList<>(1); results.add(result); ((HBaseRpcController) controller).setCellScanner(CellUtil .createCellScanner(results)); builder.setMoreResults(true);