data/raw/hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
/**
   * Triggers a synchronous attempt to run a distributed procedure and sets
   * return data in response.
   * {@inheritDoc}
   */
Triggers a synchronous attempt to run a distributed procedure and sets
return data in response.
Triggers a synchronous attempt to run a distributed procedure and sets return data in response .
@Override
  public ExecProcedureResponse execProcedureWithRet(RpcController controller,
      ExecProcedureRequest request) throws ServiceException {
    rpcPreCheck("execProcedureWithRet");
    try {
      ProcedureDescription desc = request.getProcedure();
      MasterProcedureManager mpm =
        master.getMasterProcedureManagerHost().getProcedureManager(desc.getSignature());
      if (mpm == null) {
        throw new ServiceException("The procedure is not registered: " + desc.getSignature());
      }
      LOG.info(master.getClientIdAuditPrefix() + " procedure request for: " + desc.getSignature());
      byte[] data = mpm.execProcedureWithRet(desc);
      ExecProcedureResponse.Builder builder = ExecProcedureResponse.newBuilder();
      if (data != null) {
        builder.setReturnData(UnsafeByteOperations.unsafeWrap(data));
      }
      return builder.build();
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
@ Override public ExecProcedureResponse execProcedureWithRet ( RpcController controller , ExecProcedureRequest request ) throws ServiceException { rpcPreCheck ( "execProcedureWithRet" ) ; try { ProcedureDescription desc = request . getProcedure ( ) ; MasterProcedureManager mpm = master . getMasterProcedureManagerHost ( ) . getProcedureManager ( desc . getSignature ( ) ) ; if ( mpm == null ) { throw new ServiceException ( "The procedure is not registered: " + desc . getSignature ( ) ) ; } LOG . info ( master . getClientIdAuditPrefix ( ) + " procedure request for: " + desc . getSignature ( ) ) ; byte [ ] data = mpm . execProcedureWithRet ( desc ) ; ExecProcedureResponse . Builder builder = ExecProcedureResponse . newBuilder ( ) ; if ( data != null ) { builder . setReturnData ( UnsafeByteOperations . unsafeWrap ( data ) ) ; } return builder . build ( ) ; } catch ( IOException e ) { throw new ServiceException ( e ) ; } }
Triggers a synchronous attempt to run a distributed procedure and sets
 return data in response.
Triggers a synchronous attempt to run a distributed procedure and sets return data in response .
// set return data if available