Package org.apache.hadoop.hbase.ipc

Examples of org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController.cellScanner()


  public MutateResponse mutate(final RpcController rpcc,
      final MutateRequest request) throws ServiceException {
    // rpc controller is how we bring in data via the back door;  it is unprotobuf'ed data.
    // It is also the conduit via which we pass back data.
    PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc;
    CellScanner cellScanner = controller != null? controller.cellScanner(): null;
    // Clear scanner so we are not holding on to reference across call.
    if (controller != null) controller.setCellScanner(null);
    try {
      checkOpen();
      requestCount.increment();
View Full Code Here


    }

    // rpc controller is how we bring in data via the back door;  it is unprotobuf'ed data.
    // It is also the conduit via which we pass back data.
    PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc;
    CellScanner cellScanner = controller != null ? controller.cellScanner(): null;
    if (controller != null) controller.setCellScanner(null);

    long nonceGroup = request.hasNonceGroup() ? request.getNonceGroup() : HConstants.NO_NONCE;

    // this will contain all the cells that we need to return. It's created later, if needed.
View Full Code Here

  public MutateResponse mutate(final RpcController rpcc,
      final MutateRequest request) throws ServiceException {
    // rpc controller is how we bring in data via the back door;  it is unprotobuf'ed data.
    // It is also the conduit via which we pass back data.
    PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc;
    CellScanner cellScanner = controller != null? controller.cellScanner(): null;
    // Clear scanner so we are not holding on to reference across call.
    controller.setCellScanner(null);
    try {
      requestCount.increment();
      HRegion region = getRegion(request.getRegion());
View Full Code Here

  public MultiResponse multi(final RpcController rpcc, final MultiRequest request)
  throws ServiceException {
    // rpc controller is how we bring in data via the back door;  it is unprotobuf'ed data.
    // It is also the conduit via which we pass back data.
    PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc;
    CellScanner cellScanner = controller != null? controller.cellScanner(): null;
    // Clear scanner so we are not holding on to reference across call.
    controller.setCellScanner(null);
    List<CellScannable> cellsToReturn = null;
    try {
      HRegion region = getRegion(request.getRegion());
View Full Code Here

                location.getRegionInfo().getRegionName(), append);
              PayloadCarryingRpcController rpcController =
                new PayloadCarryingRpcController();
              MutateResponse response = server.mutate(rpcController, request);
              if (!response.hasResult()) return null;
              return ProtobufUtil.toResult(response.getResult(), rpcController.cellScanner());
            } catch (ServiceException se) {
              throw ProtobufUtil.getRemoteException(se);
            }
          }
        }.withRetries();
View Full Code Here

            try {
              MutateRequest request = RequestConverter.buildMutateRequest(
                location.getRegionInfo().getRegionName(), increment);
              PayloadCarryingRpcController rpcContoller = new PayloadCarryingRpcController();
              MutateResponse response = server.mutate(rpcContoller, request);
              return ProtobufUtil.toResult(response.getResult(), rpcContoller.cellScanner());
            } catch (ServiceException se) {
              throw ProtobufUtil.getRemoteException(se);
            }
          }
        }.withRetries();
View Full Code Here

                location.getRegionInfo().getRegionName(), row, family,
                qualifier, amount, writeToWAL);
              PayloadCarryingRpcController rpcController = new PayloadCarryingRpcController();
              MutateResponse response = server.mutate(rpcController, request);
              Result result =
                ProtobufUtil.toResult(response.getResult(), rpcController.cellScanner());
              return Long.valueOf(Bytes.toLong(result.getValue(family, qualifier)));
            } catch (ServiceException se) {
              throw ProtobufUtil.getRemoteException(se);
            }
          }
View Full Code Here

              RequestConverter.buildNoDataMultiRequest(regionName, actions, cells);
          // Controller optionally carries cell data over the proxy/service boundary and also
          // optionally ferries cell response data back out again.
          PayloadCarryingRpcController controller = new PayloadCarryingRpcController(cells);
          ClientProtos.MultiResponse responseProto = server.multi(controller, multiRequest);
          results = ResponseConverter.getResults(responseProto, controller.cellScanner());
        } catch (ServiceException se) {
          ex = ProtobufUtil.getRemoteException(se);
        }
        for (int i = 0, n = actions.size(); i < n; i++) {
          int originalIndex = actions.get(i).getOriginalIndex();
View Full Code Here

  public MutateResponse mutate(final RpcController rpcc,
      final MutateRequest request) throws ServiceException {
    // rpc controller is how we bring in data via the back door;  it is unprotobuf'ed data.
    // It is also the conduit via which we pass back data.
    PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc;
    CellScanner cellScanner = controller != null? controller.cellScanner(): null;
    // Clear scanner so we are not holding on to reference across call.
    if (controller != null) controller.setCellScanner(null);
    try {
      checkOpen();
      requestCount.increment();
View Full Code Here

    }

    // rpc controller is how we bring in data via the back door;  it is unprotobuf'ed data.
    // It is also the conduit via which we pass back data.
    PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc;
    CellScanner cellScanner = controller != null ? controller.cellScanner(): null;
    if (controller != null) controller.setCellScanner(null);

    long nonceGroup = request.hasNonceGroup() ? request.getNonceGroup() : HConstants.NO_NONCE;

    // this will contain all the cells that we need to return. It's created later, if needed.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.