@ThreadSafe public final class IdUtils extends Object
Modifier and Type | Field and Description |
---|---|
static long |
INVALID_FILE_ID |
static long |
INVALID_MOUNT_ID |
static long |
INVALID_WORKER_ID |
static long |
ROOT_MOUNT_ID |
Modifier and Type | Method and Description |
---|---|
static long |
createFileId(long containerId)
Creates an id for a file based on the given id of the container.
|
static String |
createFileSystemContextId() |
static long |
createMountId() |
static String |
createOrGetAppIdFromConfig(AlluxioConfiguration conf) |
static String |
createRpcId() |
static long |
createSessionId() |
static long |
fileIdFromBlockId(long blockId)
Creates a file ID from a block ID.
|
static long |
getRandomNonNegativeLong()
Generates a positive random number by zero-ing the sign bit.
|
public static final long INVALID_FILE_ID
public static final long INVALID_WORKER_ID
public static final long INVALID_MOUNT_ID
public static final long ROOT_MOUNT_ID
public static long createFileId(long containerId)
containerId
- the id of the containerpublic static long fileIdFromBlockId(long blockId)
blockId
- the block IDpublic static String createRpcId()
public static long getRandomNonNegativeLong()
public static long createSessionId()
public static long createMountId()
public static String createFileSystemContextId()
public static String createOrGetAppIdFromConfig(AlluxioConfiguration conf)
conf
- an alluxio configuration with the USER_APP_ID property keyCopyright © 2023. All Rights Reserved.