Class MasterProcedureUtil
java.lang.Object
org.apache.hadoop.hbase.master.procedure.MasterProcedureUtil
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classHelper Runnable used in conjunction with submitProcedure() to deal with submitting procs with nonce.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic intReturn the priority for the given procedure.static intgetTablePriority(TableName tableName) Return the priority for the given table.static longHelper used to deal with submitting procs with nonce.static org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformationtoProtoUserInfo(User user) static UsertoUserInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation userInfoProto) static IOExceptionThis is a version of unwrapRemoteIOException that can do DoNotRetryIOE.static booleanvalidateProcedureWALFilename(String filename) A Procedure WAL file name is of the format: pv-<wal-id>.log where wal-id is 20 digits.
- 
Field Details- 
PATTERNDeprecated.Since 2.3.0, will be removed in 4.0.0. We do not use this style of procedure wal file name any more.Pattern used to validate a Procedure WAL file name seevalidateProcedureWALFilename(String)for description.
 
- 
- 
Constructor Details- 
MasterProcedureUtilprivate MasterProcedureUtil()
 
- 
- 
Method Details- 
toProtoUserInfopublic static org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation toProtoUserInfo(User user) 
- 
toUserInfopublic static User toUserInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation userInfoProto) 
- 
submitProcedurepublic static long submitProcedure(MasterProcedureUtil.NonceProcedureRunnable runnable) throws IOException 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
 
- 
validateProcedureWALFilenameA 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
 
- 
getTablePriorityReturn the priority for the given table. Now meta table is 3, other system tables are 2, and user tables are 1.
- 
getServerPriorityReturn the priority for the given procedure. For now we only have two priorities, 100 for server carrying meta, and 1 for others.
- 
unwrapRemoteIOExceptionThis 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.
 
-