@InterfaceAudience.Private @InterfaceStability.Evolving public final class MasterProcedureUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MasterProcedureUtil.NonceProcedureRunnable
Helper Runnable used in conjunction with submitProcedure() to deal with
submitting procs with nonce.
|
Modifier and Type | Field and Description |
---|---|
private static Pattern |
pattern
Pattern used to validate a Procedure WAL file name see
validateProcedureWALFilename(String) for description. |
Modifier | Constructor and Description |
---|---|
private |
MasterProcedureUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getServerPriority(ServerProcedureInterface proc)
Return the priority for the given procedure.
|
static int |
getTablePriority(TableName tableName)
Return the priority for the given table.
|
static long |
submitProcedure(MasterProcedureUtil.NonceProcedureRunnable runnable)
Helper used to deal with submitting procs with nonce.
|
static org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation |
toProtoUserInfo(User user) |
static User |
toUserInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation userInfoProto) |
static IOException |
unwrapRemoteIOException(Procedure proc)
This is a version of unwrapRemoteIOException that can do DoNotRetryIOE.
|
static boolean |
validateProcedureWALFilename(String filename)
A Procedure WAL file name is of the format: pv-<wal-id>.log where wal-id is 20 digits.
|
private static final Pattern pattern
validateProcedureWALFilename(String)
for description.private MasterProcedureUtil()
public static org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation toProtoUserInfo(User user)
public static User toUserInfo(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.UserInformation userInfoProto)
public static long submitProcedure(MasterProcedureUtil.NonceProcedureRunnable runnable) throws IOException
long procId = MasterProcedureUtil.submitProcedure(
new NonceProcedureRunnable(procExec, nonceGroup, nonce) {
@Override
public void run() {
cpHost.preOperation();
submitProcedure(new MyProc());
cpHost.postOperation();
}
});
IOException
public static boolean validateProcedureWALFilename(String filename)
filename
- name of the file to validatepublic static int getTablePriority(TableName tableName)
public static int getServerPriority(ServerProcedureInterface proc)
public static IOException unwrapRemoteIOException(Procedure proc)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.