hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
/**
   * Triggers an asynchronous attempt to run a distributed procedure.
   * {@inheritDoc}
   */
Triggers an asynchronous attempt to run a distributed procedure.
Triggers an asynchronous attempt to run a distributed procedure .
@Override
  public ExecProcedureResponse execProcedure(RpcController controller,
      ExecProcedureRequest request) throws ServiceException {
    try {
      master.checkInitialized();
      ProcedureDescription desc = request.getProcedure();
      MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
        desc.getSignature());
      if (mpm == null) {
        throw new ServiceException(new DoNotRetryIOException("The procedure is not registered: "
          + desc.getSignature()));
      }
      LOG.info(master.getClientIdAuditPrefix() + " procedure request for: " + desc.getSignature());
      mpm.checkPermissions(desc, getAccessChecker(), RpcServer.getRequestUser().orElse(null));
      mpm.execProcedure(desc);
      long waitTime = SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME;
      return ExecProcedureResponse.newBuilder().setExpectedTimeout(
        waitTime).build();
    } catch (ForeignException e) {
      throw new ServiceException(e.getCause());
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
@ Override public ExecProcedureResponse execProcedure ( RpcController controller , ExecProcedureRequest request ) throws ServiceException { try { master . checkInitialized ( ) ; ProcedureDescription desc = request . getProcedure ( ) ; MasterProcedureManager mpm = master . getMasterProcedureManagerHost ( ) . getProcedureManager ( desc . getSignature ( ) ) ; if ( mpm == null ) { throw new ServiceException ( new DoNotRetryIOException ( "The procedure is not registered: " + desc . getSignature ( ) ) ) ; } LOG . info ( master . getClientIdAuditPrefix ( ) + " procedure request for: " + desc . getSignature ( ) ) ; mpm . checkPermissions ( desc , getAccessChecker ( ) , RpcServer . getRequestUser ( ) . orElse ( null ) ) ; mpm . execProcedure ( desc ) ; long waitTime = SnapshotDescriptionUtils . DEFAULT_MAX_WAIT_TIME ; return ExecProcedureResponse . newBuilder ( ) . setExpectedTimeout ( waitTime ) . build ( ) ; } catch ( ForeignException e ) { throw new ServiceException ( e . getCause ( ) ) ; } catch ( IOException e ) { throw new ServiceException ( e ) ; } }
Triggers an asynchronous attempt to run a distributed procedure.
Triggers an asynchronous attempt to run a distributed procedure .
// send back the max amount of time the client should wait for the procedure // to complete