@InterfaceAudience.Private public final class ProcedureUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Procedure<?> |
convertToProcedure(ProcedureProtos.Procedure proto)
Helper to convert the protobuf procedure.
|
static LockServiceProtos.LockedResource |
convertToProtoLockedResource(LockedResource lockedResource) |
static LockServiceProtos.LockType |
convertToProtoLockType(LockType lockType) |
static ProcedureProtos.Procedure |
convertToProtoProcedure(Procedure<?> proc)
Helper to convert the procedure to protobuf.
|
static LockServiceProtos.LockedResourceType |
convertToProtoResourceType(LockedResourceType resourceType) |
static long |
getBackoffTimeMs(int attempts)
Get an exponential backoff time, in milliseconds.
|
public static ProcedureProtos.Procedure convertToProtoProcedure(Procedure<?> proc) throws IOException
IOException
public static Procedure<?> convertToProcedure(ProcedureProtos.Procedure proto) throws IOException
IOException
public static LockServiceProtos.LockedResourceType convertToProtoResourceType(LockedResourceType resourceType)
public static LockServiceProtos.LockType convertToProtoLockType(LockType lockType)
public static LockServiceProtos.LockedResource convertToProtoLockedResource(LockedResource lockedResource) throws IOException
IOException
public static long getBackoffTimeMs(int attempts)
Copyright © 2007–2019 Cloudera. All rights reserved.