Class MasterProcedureUtil

java.lang.Object
org.apache.hadoop.hbase.master.procedure.MasterProcedureUtil

@Private @Evolving public final class MasterProcedureUtil extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • toProtoUserInfo

      public static org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation toProtoUserInfo(User user)
    • toUserInfo

      public static User toUserInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation userInfoProto)
    • submitProcedure

      Helper used to deal with submitting procs with nonce. Internally the NonceProcedureRunnable.run() will be called only if no one else registered the nonce. any Exception thrown by the run() method will be collected/handled and rethrown. long procId = MasterProcedureUtil.submitProcedure( new NonceProcedureRunnable(procExec, nonceGroup, nonce) { @Override public void run() { cpHost.preOperation(); submitProcedure(new MyProc()); cpHost.postOperation(); } });
      Throws:
      IOException
    • validateProcedureWALFilename

      public static boolean validateProcedureWALFilename(String filename)
      A Procedure WAL file name is of the format: pv-<wal-id>.log where wal-id is 20 digits.
      Parameters:
      filename - name of the file to validate
      Returns:
      true if the filename matches a Procedure WAL, false otherwise
    • getTablePriority

      public static int getTablePriority(TableName tableName)
      Return the priority for the given table. Now meta table is 3, other system tables are 2, and user tables are 1.
    • getServerPriority

      public static int getServerPriority(ServerProcedureInterface proc)
      Return the priority for the given procedure. For now we only have two priorities, 100 for server carrying meta, and 1 for others.
    • unwrapRemoteIOException

      This is a version of unwrapRemoteIOException that can do DoNotRetryIOE. We need to throw DNRIOE to clients if a failed Procedure else they will keep trying. The default proc.getException().unwrapRemoteException doesn't have access to DNRIOE from the procedure2 module.