Package alluxio.client
Enum ReadType
- java.lang.Object
-
- java.lang.Enum<ReadType>
-
- alluxio.client.ReadType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ReadType>
@PublicApi @ThreadSafe public enum ReadType extends java.lang.Enum<ReadType>
Convenience modes for commonly used read types. For finer grained control over data storage, advanced users may specifyAlluxioStorageType
andUnderStorageType
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CACHE
Read the file and cache it in the highest tier of a local worker.CACHE_PROMOTE
Read the file and cache it in a local worker.NO_CACHE
Read the file and skip Alluxio storage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReadType
fromProto(alluxio.grpc.ReadPType readPType)
static ReadType
fromString(java.lang.String text)
Creates an instance type from the string.AlluxioStorageType
getAlluxioStorageType()
int
getValue()
boolean
isCache()
boolean
isPromote()
alluxio.grpc.ReadPType
toProto()
static ReadType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ReadType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_CACHE
public static final ReadType NO_CACHE
Read the file and skip Alluxio storage. This read type will not cause any data migration or eviction in Alluxio storage.
-
CACHE
public static final ReadType CACHE
Read the file and cache it in the highest tier of a local worker. This read type will not move data between tiers of Alluxio Storage. Users should useCACHE_PROMOTE
for more optimized performance with tiered storage.
-
CACHE_PROMOTE
public static final ReadType CACHE_PROMOTE
Read the file and cache it in a local worker. Additionally, if the file was in Alluxio storage, it will be promoted to the top storage layer.
-
-
Method Detail
-
values
public static ReadType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ReadType c : ReadType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReadType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getAlluxioStorageType
public AlluxioStorageType getAlluxioStorageType()
- Returns:
- the
AlluxioStorageType
associated with this read type
-
getValue
public int getValue()
- Returns:
- the read type value
-
isCache
public boolean isCache()
- Returns:
- true if the read type is
CACHE
, false otherwise
-
isPromote
public boolean isPromote()
- Returns:
- true if the read type is
CACHE_PROMOTE
, false otherwise
-
fromProto
public static ReadType fromProto(alluxio.grpc.ReadPType readPType)
- Parameters:
readPType
- proto type- Returns:
- wire type for given proto type
-
toProto
public alluxio.grpc.ReadPType toProto()
- Returns:
- proto representation of this instance
-
fromString
public static ReadType fromString(java.lang.String text)
Creates an instance type from the string. This method is case insensitive.- Parameters:
text
- the instance type in string- Returns:
- the created instance
-
-