/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package alluxio.thrift;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class FileInfo implements org.apache.thrift.TBase<FileInfo, FileInfo._Fields>, java.io.Serializable, Cloneable, Comparable<FileInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileInfo");
private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("length", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField BLOCK_SIZE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockSizeBytes", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField CREATION_TIME_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTimeMs", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField COMPLETED_FIELD_DESC = new org.apache.thrift.protocol.TField("completed", org.apache.thrift.protocol.TType.BOOL, (short)8);
private static final org.apache.thrift.protocol.TField FOLDER_FIELD_DESC = new org.apache.thrift.protocol.TField("folder", org.apache.thrift.protocol.TType.BOOL, (short)9);
private static final org.apache.thrift.protocol.TField PINNED_FIELD_DESC = new org.apache.thrift.protocol.TField("pinned", org.apache.thrift.protocol.TType.BOOL, (short)10);
private static final org.apache.thrift.protocol.TField CACHEABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheable", org.apache.thrift.protocol.TType.BOOL, (short)11);
private static final org.apache.thrift.protocol.TField PERSISTED_FIELD_DESC = new org.apache.thrift.protocol.TField("persisted", org.apache.thrift.protocol.TType.BOOL, (short)12);
private static final org.apache.thrift.protocol.TField BLOCK_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("blockIds", org.apache.thrift.protocol.TType.LIST, (short)13);
private static final org.apache.thrift.protocol.TField IN_MEMORY_PERCENTAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("inMemoryPercentage", org.apache.thrift.protocol.TType.I32, (short)15);
private static final org.apache.thrift.protocol.TField LAST_MODIFICATION_TIME_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("lastModificationTimeMs", org.apache.thrift.protocol.TType.I64, (short)16);
private static final org.apache.thrift.protocol.TField TTL_FIELD_DESC = new org.apache.thrift.protocol.TField("ttl", org.apache.thrift.protocol.TType.I64, (short)17);
private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)18);
private static final org.apache.thrift.protocol.TField GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("group", org.apache.thrift.protocol.TType.STRING, (short)19);
private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I32, (short)20);
private static final org.apache.thrift.protocol.TField PERSISTENCE_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("persistenceState", org.apache.thrift.protocol.TType.STRING, (short)21);
private static final org.apache.thrift.protocol.TField MOUNT_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("mountPoint", org.apache.thrift.protocol.TType.BOOL, (short)22);
private static final org.apache.thrift.protocol.TField FILE_BLOCK_INFOS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileBlockInfos", org.apache.thrift.protocol.TType.LIST, (short)23);
private static final org.apache.thrift.protocol.TField TTL_ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ttlAction", org.apache.thrift.protocol.TType.I32, (short)24);
private static final org.apache.thrift.protocol.TField MOUNT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mountId", org.apache.thrift.protocol.TType.I64, (short)25);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new FileInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new FileInfoTupleSchemeFactory());
}
private long fileId; // required
private String name; // required
private String path; // required
private String ufsPath; // required
private long length; // required
private long blockSizeBytes; // required
private long creationTimeMs; // required
private boolean completed; // required
private boolean folder; // required
private boolean pinned; // required
private boolean cacheable; // required
private boolean persisted; // required
private List<Long> blockIds; // required
private int inMemoryPercentage; // required
private long lastModificationTimeMs; // required
private long ttl; // required
private String owner; // required
private String group; // required
private int mode; // required
private String persistenceState; // required
private boolean mountPoint; // required
private List<FileBlockInfo> fileBlockInfos; // required
private alluxio.thrift.TTtlAction ttlAction; // required
private long mountId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FILE_ID((short)1, "fileId"),
NAME((short)2, "name"),
PATH((short)3, "path"),
UFS_PATH((short)4, "ufsPath"),
LENGTH((short)5, "length"),
BLOCK_SIZE_BYTES((short)6, "blockSizeBytes"),
CREATION_TIME_MS((short)7, "creationTimeMs"),
COMPLETED((short)8, "completed"),
FOLDER((short)9, "folder"),
PINNED((short)10, "pinned"),
CACHEABLE((short)11, "cacheable"),
PERSISTED((short)12, "persisted"),
BLOCK_IDS((short)13, "blockIds"),
IN_MEMORY_PERCENTAGE((short)15, "inMemoryPercentage"),
LAST_MODIFICATION_TIME_MS((short)16, "lastModificationTimeMs"),
TTL((short)17, "ttl"),
OWNER((short)18, "owner"),
GROUP((short)19, "group"),
MODE((short)20, "mode"),
PERSISTENCE_STATE((short)21, "persistenceState"),
MOUNT_POINT((short)22, "mountPoint"),
FILE_BLOCK_INFOS((short)23, "fileBlockInfos"),
/**
*
* @see alluxio.thrift.TTtlAction
*/
TTL_ACTION((short)24, "ttlAction"),
MOUNT_ID((short)25, "mountId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FILE_ID
return FILE_ID;
case 2: // NAME
return NAME;
case 3: // PATH
return PATH;
case 4: // UFS_PATH
return UFS_PATH;
case 5: // LENGTH
return LENGTH;
case 6: // BLOCK_SIZE_BYTES
return BLOCK_SIZE_BYTES;
case 7: // CREATION_TIME_MS
return CREATION_TIME_MS;
case 8: // COMPLETED
return COMPLETED;
case 9: // FOLDER
return FOLDER;
case 10: // PINNED
return PINNED;
case 11: // CACHEABLE
return CACHEABLE;
case 12: // PERSISTED
return PERSISTED;
case 13: // BLOCK_IDS
return BLOCK_IDS;
case 15: // IN_MEMORY_PERCENTAGE
return IN_MEMORY_PERCENTAGE;
case 16: // LAST_MODIFICATION_TIME_MS
return LAST_MODIFICATION_TIME_MS;
case 17: // TTL
return TTL;
case 18: // OWNER
return OWNER;
case 19: // GROUP
return GROUP;
case 20: // MODE
return MODE;
case 21: // PERSISTENCE_STATE
return PERSISTENCE_STATE;
case 22: // MOUNT_POINT
return MOUNT_POINT;
case 23: // FILE_BLOCK_INFOS
return FILE_BLOCK_INFOS;
case 24: // TTL_ACTION
return TTL_ACTION;
case 25: // MOUNT_ID
return MOUNT_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __FILEID_ISSET_ID = 0;
private static final int __LENGTH_ISSET_ID = 1;
private static final int __BLOCKSIZEBYTES_ISSET_ID = 2;
private static final int __CREATIONTIMEMS_ISSET_ID = 3;
private static final int __COMPLETED_ISSET_ID = 4;
private static final int __FOLDER_ISSET_ID = 5;
private static final int __PINNED_ISSET_ID = 6;
private static final int __CACHEABLE_ISSET_ID = 7;
private static final int __PERSISTED_ISSET_ID = 8;
private static final int __INMEMORYPERCENTAGE_ISSET_ID = 9;
private static final int __LASTMODIFICATIONTIMEMS_ISSET_ID = 10;
private static final int __TTL_ISSET_ID = 11;
private static final int __MODE_ISSET_ID = 12;
private static final int __MOUNTPOINT_ISSET_ID = 13;
private static final int __MOUNTID_ISSET_ID = 14;
private short __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LENGTH, new org.apache.thrift.meta_data.FieldMetaData("length", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.BLOCK_SIZE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("blockSizeBytes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CREATION_TIME_MS, new org.apache.thrift.meta_data.FieldMetaData("creationTimeMs", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COMPLETED, new org.apache.thrift.meta_data.FieldMetaData("completed", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.FOLDER, new org.apache.thrift.meta_data.FieldMetaData("folder", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.PINNED, new org.apache.thrift.meta_data.FieldMetaData("pinned", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.CACHEABLE, new org.apache.thrift.meta_data.FieldMetaData("cacheable", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.PERSISTED, new org.apache.thrift.meta_data.FieldMetaData("persisted", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.BLOCK_IDS, new org.apache.thrift.meta_data.FieldMetaData("blockIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
tmpMap.put(_Fields.IN_MEMORY_PERCENTAGE, new org.apache.thrift.meta_data.FieldMetaData("inMemoryPercentage", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.LAST_MODIFICATION_TIME_MS, new org.apache.thrift.meta_data.FieldMetaData("lastModificationTimeMs", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TTL, new org.apache.thrift.meta_data.FieldMetaData("ttl", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData("group", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PERSISTENCE_STATE, new org.apache.thrift.meta_data.FieldMetaData("persistenceState", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MOUNT_POINT, new org.apache.thrift.meta_data.FieldMetaData("mountPoint", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.FILE_BLOCK_INFOS, new org.apache.thrift.meta_data.FieldMetaData("fileBlockInfos", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileBlockInfo.class))));
tmpMap.put(_Fields.TTL_ACTION, new org.apache.thrift.meta_data.FieldMetaData("ttlAction", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, alluxio.thrift.TTtlAction.class)));
tmpMap.put(_Fields.MOUNT_ID, new org.apache.thrift.meta_data.FieldMetaData("mountId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FileInfo.class, metaDataMap);
}
public FileInfo() {
}
public FileInfo(
long fileId,
String name,
String path,
String ufsPath,
long length,
long blockSizeBytes,
long creationTimeMs,
boolean completed,
boolean folder,
boolean pinned,
boolean cacheable,
boolean persisted,
List<Long> blockIds,
int inMemoryPercentage,
long lastModificationTimeMs,
long ttl,
String owner,
String group,
int mode,
String persistenceState,
boolean mountPoint,
List<FileBlockInfo> fileBlockInfos,
alluxio.thrift.TTtlAction ttlAction,
long mountId)
{
this();
this.fileId = fileId;
setFileIdIsSet(true);
this.name = name;
this.path = path;
this.ufsPath = ufsPath;
this.length = length;
setLengthIsSet(true);
this.blockSizeBytes = blockSizeBytes;
setBlockSizeBytesIsSet(true);
this.creationTimeMs = creationTimeMs;
setCreationTimeMsIsSet(true);
this.completed = completed;
setCompletedIsSet(true);
this.folder = folder;
setFolderIsSet(true);
this.pinned = pinned;
setPinnedIsSet(true);
this.cacheable = cacheable;
setCacheableIsSet(true);
this.persisted = persisted;
setPersistedIsSet(true);
this.blockIds = blockIds;
this.inMemoryPercentage = inMemoryPercentage;
setInMemoryPercentageIsSet(true);
this.lastModificationTimeMs = lastModificationTimeMs;
setLastModificationTimeMsIsSet(true);
this.ttl = ttl;
setTtlIsSet(true);
this.owner = owner;
this.group = group;
this.mode = mode;
setModeIsSet(true);
this.persistenceState = persistenceState;
this.mountPoint = mountPoint;
setMountPointIsSet(true);
this.fileBlockInfos = fileBlockInfos;
this.ttlAction = ttlAction;
this.mountId = mountId;
setMountIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public FileInfo(FileInfo other) {
__isset_bitfield = other.__isset_bitfield;
this.fileId = other.fileId;
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetUfsPath()) {
this.ufsPath = other.ufsPath;
}
this.length = other.length;
this.blockSizeBytes = other.blockSizeBytes;
this.creationTimeMs = other.creationTimeMs;
this.completed = other.completed;
this.folder = other.folder;
this.pinned = other.pinned;
this.cacheable = other.cacheable;
this.persisted = other.persisted;
if (other.isSetBlockIds()) {
List<Long> __this__blockIds = new ArrayList<Long>(other.blockIds);
this.blockIds = __this__blockIds;
}
this.inMemoryPercentage = other.inMemoryPercentage;
this.lastModificationTimeMs = other.lastModificationTimeMs;
this.ttl = other.ttl;
if (other.isSetOwner()) {
this.owner = other.owner;
}
if (other.isSetGroup()) {
this.group = other.group;
}
this.mode = other.mode;
if (other.isSetPersistenceState()) {
this.persistenceState = other.persistenceState;
}
this.mountPoint = other.mountPoint;
if (other.isSetFileBlockInfos()) {
List<FileBlockInfo> __this__fileBlockInfos = new ArrayList<FileBlockInfo>(other.fileBlockInfos.size());
for (FileBlockInfo other_element : other.fileBlockInfos) {
__this__fileBlockInfos.add(new FileBlockInfo(other_element));
}
this.fileBlockInfos = __this__fileBlockInfos;
}
if (other.isSetTtlAction()) {
this.ttlAction = other.ttlAction;
}
this.mountId = other.mountId;
}
public FileInfo deepCopy() {
return new FileInfo(this);
}
@Override
public void clear() {
setFileIdIsSet(false);
this.fileId = 0;
this.name = null;
this.path = null;
this.ufsPath = null;
setLengthIsSet(false);
this.length = 0;
setBlockSizeBytesIsSet(false);
this.blockSizeBytes = 0;
setCreationTimeMsIsSet(false);
this.creationTimeMs = 0;
setCompletedIsSet(false);
this.completed = false;
setFolderIsSet(false);
this.folder = false;
setPinnedIsSet(false);
this.pinned = false;
setCacheableIsSet(false);
this.cacheable = false;
setPersistedIsSet(false);
this.persisted = false;
this.blockIds = null;
setInMemoryPercentageIsSet(false);
this.inMemoryPercentage = 0;
setLastModificationTimeMsIsSet(false);
this.lastModificationTimeMs = 0;
setTtlIsSet(false);
this.ttl = 0;
this.owner = null;
this.group = null;
setModeIsSet(false);
this.mode = 0;
this.persistenceState = null;
setMountPointIsSet(false);
this.mountPoint = false;
this.fileBlockInfos = null;
this.ttlAction = null;
setMountIdIsSet(false);
this.mountId = 0;
}
public long getFileId() {
return this.fileId;
}
public FileInfo setFileId(long fileId) {
this.fileId = fileId;
setFileIdIsSet(true);
return this;
}
public void unsetFileId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID);
}
/** Returns true if field fileId is set (has been assigned a value) and false otherwise */
public boolean isSetFileId() {
return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID);
}
public void setFileIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value);
}
public String getName() {
return this.name;
}
public FileInfo setName(String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
public String getPath() {
return this.path;
}
public FileInfo setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public String getUfsPath() {
return this.ufsPath;
}
public FileInfo setUfsPath(String ufsPath) {
this.ufsPath = ufsPath;
return this;
}
public void unsetUfsPath() {
this.ufsPath = null;
}
/** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */
public boolean isSetUfsPath() {
return this.ufsPath != null;
}
public void setUfsPathIsSet(boolean value) {
if (!value) {
this.ufsPath = null;
}
}
public long getLength() {
return this.length;
}
public FileInfo setLength(long length) {
this.length = length;
setLengthIsSet(true);
return this;
}
public void unsetLength() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LENGTH_ISSET_ID);
}
/** Returns true if field length is set (has been assigned a value) and false otherwise */
public boolean isSetLength() {
return EncodingUtils.testBit(__isset_bitfield, __LENGTH_ISSET_ID);
}
public void setLengthIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LENGTH_ISSET_ID, value);
}
public long getBlockSizeBytes() {
return this.blockSizeBytes;
}
public FileInfo setBlockSizeBytes(long blockSizeBytes) {
this.blockSizeBytes = blockSizeBytes;
setBlockSizeBytesIsSet(true);
return this;
}
public void unsetBlockSizeBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID);
}
/** Returns true if field blockSizeBytes is set (has been assigned a value) and false otherwise */
public boolean isSetBlockSizeBytes() {
return EncodingUtils.testBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID);
}
public void setBlockSizeBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID, value);
}
public long getCreationTimeMs() {
return this.creationTimeMs;
}
public FileInfo setCreationTimeMs(long creationTimeMs) {
this.creationTimeMs = creationTimeMs;
setCreationTimeMsIsSet(true);
return this;
}
public void unsetCreationTimeMs() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIMEMS_ISSET_ID);
}
/** Returns true if field creationTimeMs is set (has been assigned a value) and false otherwise */
public boolean isSetCreationTimeMs() {
return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIMEMS_ISSET_ID);
}
public void setCreationTimeMsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIMEMS_ISSET_ID, value);
}
public boolean isCompleted() {
return this.completed;
}
public FileInfo setCompleted(boolean completed) {
this.completed = completed;
setCompletedIsSet(true);
return this;
}
public void unsetCompleted() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPLETED_ISSET_ID);
}
/** Returns true if field completed is set (has been assigned a value) and false otherwise */
public boolean isSetCompleted() {
return EncodingUtils.testBit(__isset_bitfield, __COMPLETED_ISSET_ID);
}
public void setCompletedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPLETED_ISSET_ID, value);
}
public boolean isFolder() {
return this.folder;
}
public FileInfo setFolder(boolean folder) {
this.folder = folder;
setFolderIsSet(true);
return this;
}
public void unsetFolder() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FOLDER_ISSET_ID);
}
/** Returns true if field folder is set (has been assigned a value) and false otherwise */
public boolean isSetFolder() {
return EncodingUtils.testBit(__isset_bitfield, __FOLDER_ISSET_ID);
}
public void setFolderIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FOLDER_ISSET_ID, value);
}
public boolean isPinned() {
return this.pinned;
}
public FileInfo setPinned(boolean pinned) {
this.pinned = pinned;
setPinnedIsSet(true);
return this;
}
public void unsetPinned() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PINNED_ISSET_ID);
}
/** Returns true if field pinned is set (has been assigned a value) and false otherwise */
public boolean isSetPinned() {
return EncodingUtils.testBit(__isset_bitfield, __PINNED_ISSET_ID);
}
public void setPinnedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PINNED_ISSET_ID, value);
}
public boolean isCacheable() {
return this.cacheable;
}
public FileInfo setCacheable(boolean cacheable) {
this.cacheable = cacheable;
setCacheableIsSet(true);
return this;
}
public void unsetCacheable() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEABLE_ISSET_ID);
}
/** Returns true if field cacheable is set (has been assigned a value) and false otherwise */
public boolean isSetCacheable() {
return EncodingUtils.testBit(__isset_bitfield, __CACHEABLE_ISSET_ID);
}
public void setCacheableIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEABLE_ISSET_ID, value);
}
public boolean isPersisted() {
return this.persisted;
}
public FileInfo setPersisted(boolean persisted) {
this.persisted = persisted;
setPersistedIsSet(true);
return this;
}
public void unsetPersisted() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTED_ISSET_ID);
}
/** Returns true if field persisted is set (has been assigned a value) and false otherwise */
public boolean isSetPersisted() {
return EncodingUtils.testBit(__isset_bitfield, __PERSISTED_ISSET_ID);
}
public void setPersistedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTED_ISSET_ID, value);
}
public int getBlockIdsSize() {
return (this.blockIds == null) ? 0 : this.blockIds.size();
}
public java.util.Iterator<Long> getBlockIdsIterator() {
return (this.blockIds == null) ? null : this.blockIds.iterator();
}
public void addToBlockIds(long elem) {
if (this.blockIds == null) {
this.blockIds = new ArrayList<Long>();
}
this.blockIds.add(elem);
}
public List<Long> getBlockIds() {
return this.blockIds;
}
public FileInfo setBlockIds(List<Long> blockIds) {
this.blockIds = blockIds;
return this;
}
public void unsetBlockIds() {
this.blockIds = null;
}
/** Returns true if field blockIds is set (has been assigned a value) and false otherwise */
public boolean isSetBlockIds() {
return this.blockIds != null;
}
public void setBlockIdsIsSet(boolean value) {
if (!value) {
this.blockIds = null;
}
}
public int getInMemoryPercentage() {
return this.inMemoryPercentage;
}
public FileInfo setInMemoryPercentage(int inMemoryPercentage) {
this.inMemoryPercentage = inMemoryPercentage;
setInMemoryPercentageIsSet(true);
return this;
}
public void unsetInMemoryPercentage() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INMEMORYPERCENTAGE_ISSET_ID);
}
/** Returns true if field inMemoryPercentage is set (has been assigned a value) and false otherwise */
public boolean isSetInMemoryPercentage() {
return EncodingUtils.testBit(__isset_bitfield, __INMEMORYPERCENTAGE_ISSET_ID);
}
public void setInMemoryPercentageIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INMEMORYPERCENTAGE_ISSET_ID, value);
}
public long getLastModificationTimeMs() {
return this.lastModificationTimeMs;
}
public FileInfo setLastModificationTimeMs(long lastModificationTimeMs) {
this.lastModificationTimeMs = lastModificationTimeMs;
setLastModificationTimeMsIsSet(true);
return this;
}
public void unsetLastModificationTimeMs() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTMODIFICATIONTIMEMS_ISSET_ID);
}
/** Returns true if field lastModificationTimeMs is set (has been assigned a value) and false otherwise */
public boolean isSetLastModificationTimeMs() {
return EncodingUtils.testBit(__isset_bitfield, __LASTMODIFICATIONTIMEMS_ISSET_ID);
}
public void setLastModificationTimeMsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTMODIFICATIONTIMEMS_ISSET_ID, value);
}
public long getTtl() {
return this.ttl;
}
public FileInfo setTtl(long ttl) {
this.ttl = ttl;
setTtlIsSet(true);
return this;
}
public void unsetTtl() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID);
}
/** Returns true if field ttl is set (has been assigned a value) and false otherwise */
public boolean isSetTtl() {
return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID);
}
public void setTtlIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value);
}
public String getOwner() {
return this.owner;
}
public FileInfo setOwner(String owner) {
this.owner = owner;
return this;
}
public void unsetOwner() {
this.owner = null;
}
/** Returns true if field owner is set (has been assigned a value) and false otherwise */
public boolean isSetOwner() {
return this.owner != null;
}
public void setOwnerIsSet(boolean value) {
if (!value) {
this.owner = null;
}
}
public String getGroup() {
return this.group;
}
public FileInfo setGroup(String group) {
this.group = group;
return this;
}
public void unsetGroup() {
this.group = null;
}
/** Returns true if field group is set (has been assigned a value) and false otherwise */
public boolean isSetGroup() {
return this.group != null;
}
public void setGroupIsSet(boolean value) {
if (!value) {
this.group = null;
}
}
public int getMode() {
return this.mode;
}
public FileInfo setMode(int mode) {
this.mode = mode;
setModeIsSet(true);
return this;
}
public void unsetMode() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MODE_ISSET_ID);
}
/** Returns true if field mode is set (has been assigned a value) and false otherwise */
public boolean isSetMode() {
return EncodingUtils.testBit(__isset_bitfield, __MODE_ISSET_ID);
}
public void setModeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MODE_ISSET_ID, value);
}
public String getPersistenceState() {
return this.persistenceState;
}
public FileInfo setPersistenceState(String persistenceState) {
this.persistenceState = persistenceState;
return this;
}
public void unsetPersistenceState() {
this.persistenceState = null;
}
/** Returns true if field persistenceState is set (has been assigned a value) and false otherwise */
public boolean isSetPersistenceState() {
return this.persistenceState != null;
}
public void setPersistenceStateIsSet(boolean value) {
if (!value) {
this.persistenceState = null;
}
}
public boolean isMountPoint() {
return this.mountPoint;
}
public FileInfo setMountPoint(boolean mountPoint) {
this.mountPoint = mountPoint;
setMountPointIsSet(true);
return this;
}
public void unsetMountPoint() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOUNTPOINT_ISSET_ID);
}
/** Returns true if field mountPoint is set (has been assigned a value) and false otherwise */
public boolean isSetMountPoint() {
return EncodingUtils.testBit(__isset_bitfield, __MOUNTPOINT_ISSET_ID);
}
public void setMountPointIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOUNTPOINT_ISSET_ID, value);
}
public int getFileBlockInfosSize() {
return (this.fileBlockInfos == null) ? 0 : this.fileBlockInfos.size();
}
public java.util.Iterator<FileBlockInfo> getFileBlockInfosIterator() {
return (this.fileBlockInfos == null) ? null : this.fileBlockInfos.iterator();
}
public void addToFileBlockInfos(FileBlockInfo elem) {
if (this.fileBlockInfos == null) {
this.fileBlockInfos = new ArrayList<FileBlockInfo>();
}
this.fileBlockInfos.add(elem);
}
public List<FileBlockInfo> getFileBlockInfos() {
return this.fileBlockInfos;
}
public FileInfo setFileBlockInfos(List<FileBlockInfo> fileBlockInfos) {
this.fileBlockInfos = fileBlockInfos;
return this;
}
public void unsetFileBlockInfos() {
this.fileBlockInfos = null;
}
/** Returns true if field fileBlockInfos is set (has been assigned a value) and false otherwise */
public boolean isSetFileBlockInfos() {
return this.fileBlockInfos != null;
}
public void setFileBlockInfosIsSet(boolean value) {
if (!value) {
this.fileBlockInfos = null;
}
}
/**
*
* @see alluxio.thrift.TTtlAction
*/
public alluxio.thrift.TTtlAction getTtlAction() {
return this.ttlAction;
}
/**
*
* @see alluxio.thrift.TTtlAction
*/
public FileInfo setTtlAction(alluxio.thrift.TTtlAction ttlAction) {
this.ttlAction = ttlAction;
return this;
}
public void unsetTtlAction() {
this.ttlAction = null;
}
/** Returns true if field ttlAction is set (has been assigned a value) and false otherwise */
public boolean isSetTtlAction() {
return this.ttlAction != null;
}
public void setTtlActionIsSet(boolean value) {
if (!value) {
this.ttlAction = null;
}
}
public long getMountId() {
return this.mountId;
}
public FileInfo setMountId(long mountId) {
this.mountId = mountId;
setMountIdIsSet(true);
return this;
}
public void unsetMountId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOUNTID_ISSET_ID);
}
/** Returns true if field mountId is set (has been assigned a value) and false otherwise */
public boolean isSetMountId() {
return EncodingUtils.testBit(__isset_bitfield, __MOUNTID_ISSET_ID);
}
public void setMountIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOUNTID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILE_ID:
if (value == null) {
unsetFileId();
} else {
setFileId((Long)value);
}
break;
case NAME:
if (value == null) {
unsetName();
} else {
setName((String)value);
}
break;
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case UFS_PATH:
if (value == null) {
unsetUfsPath();
} else {
setUfsPath((String)value);
}
break;
case LENGTH:
if (value == null) {
unsetLength();
} else {
setLength((Long)value);
}
break;
case BLOCK_SIZE_BYTES:
if (value == null) {
unsetBlockSizeBytes();
} else {
setBlockSizeBytes((Long)value);
}
break;
case CREATION_TIME_MS:
if (value == null) {
unsetCreationTimeMs();
} else {
setCreationTimeMs((Long)value);
}
break;
case COMPLETED:
if (value == null) {
unsetCompleted();
} else {
setCompleted((Boolean)value);
}
break;
case FOLDER:
if (value == null) {
unsetFolder();
} else {
setFolder((Boolean)value);
}
break;
case PINNED:
if (value == null) {
unsetPinned();
} else {
setPinned((Boolean)value);
}
break;
case CACHEABLE:
if (value == null) {
unsetCacheable();
} else {
setCacheable((Boolean)value);
}
break;
case PERSISTED:
if (value == null) {
unsetPersisted();
} else {
setPersisted((Boolean)value);
}
break;
case BLOCK_IDS:
if (value == null) {
unsetBlockIds();
} else {
setBlockIds((List<Long>)value);
}
break;
case IN_MEMORY_PERCENTAGE:
if (value == null) {
unsetInMemoryPercentage();
} else {
setInMemoryPercentage((Integer)value);
}
break;
case LAST_MODIFICATION_TIME_MS:
if (value == null) {
unsetLastModificationTimeMs();
} else {
setLastModificationTimeMs((Long)value);
}
break;
case TTL:
if (value == null) {
unsetTtl();
} else {
setTtl((Long)value);
}
break;
case OWNER:
if (value == null) {
unsetOwner();
} else {
setOwner((String)value);
}
break;
case GROUP:
if (value == null) {
unsetGroup();
} else {
setGroup((String)value);
}
break;
case MODE:
if (value == null) {
unsetMode();
} else {
setMode((Integer)value);
}
break;
case PERSISTENCE_STATE:
if (value == null) {
unsetPersistenceState();
} else {
setPersistenceState((String)value);
}
break;
case MOUNT_POINT:
if (value == null) {
unsetMountPoint();
} else {
setMountPoint((Boolean)value);
}
break;
case FILE_BLOCK_INFOS:
if (value == null) {
unsetFileBlockInfos();
} else {
setFileBlockInfos((List<FileBlockInfo>)value);
}
break;
case TTL_ACTION:
if (value == null) {
unsetTtlAction();
} else {
setTtlAction((alluxio.thrift.TTtlAction)value);
}
break;
case MOUNT_ID:
if (value == null) {
unsetMountId();
} else {
setMountId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILE_ID:
return getFileId();
case NAME:
return getName();
case PATH:
return getPath();
case UFS_PATH:
return getUfsPath();
case LENGTH:
return getLength();
case BLOCK_SIZE_BYTES:
return getBlockSizeBytes();
case CREATION_TIME_MS:
return getCreationTimeMs();
case COMPLETED:
return isCompleted();
case FOLDER:
return isFolder();
case PINNED:
return isPinned();
case CACHEABLE:
return isCacheable();
case PERSISTED:
return isPersisted();
case BLOCK_IDS:
return getBlockIds();
case IN_MEMORY_PERCENTAGE:
return getInMemoryPercentage();
case LAST_MODIFICATION_TIME_MS:
return getLastModificationTimeMs();
case TTL:
return getTtl();
case OWNER:
return getOwner();
case GROUP:
return getGroup();
case MODE:
return getMode();
case PERSISTENCE_STATE:
return getPersistenceState();
case MOUNT_POINT:
return isMountPoint();
case FILE_BLOCK_INFOS:
return getFileBlockInfos();
case TTL_ACTION:
return getTtlAction();
case MOUNT_ID:
return getMountId();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case FILE_ID:
return isSetFileId();
case NAME:
return isSetName();
case PATH:
return isSetPath();
case UFS_PATH:
return isSetUfsPath();
case LENGTH:
return isSetLength();
case BLOCK_SIZE_BYTES:
return isSetBlockSizeBytes();
case CREATION_TIME_MS:
return isSetCreationTimeMs();
case COMPLETED:
return isSetCompleted();
case FOLDER:
return isSetFolder();
case PINNED:
return isSetPinned();
case CACHEABLE:
return isSetCacheable();
case PERSISTED:
return isSetPersisted();
case BLOCK_IDS:
return isSetBlockIds();
case IN_MEMORY_PERCENTAGE:
return isSetInMemoryPercentage();
case LAST_MODIFICATION_TIME_MS:
return isSetLastModificationTimeMs();
case TTL:
return isSetTtl();
case OWNER:
return isSetOwner();
case GROUP:
return isSetGroup();
case MODE:
return isSetMode();
case PERSISTENCE_STATE:
return isSetPersistenceState();
case MOUNT_POINT:
return isSetMountPoint();
case FILE_BLOCK_INFOS:
return isSetFileBlockInfos();
case TTL_ACTION:
return isSetTtlAction();
case MOUNT_ID:
return isSetMountId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof FileInfo)
return this.equals((FileInfo)that);
return false;
}
public boolean equals(FileInfo that) {
if (that == null)
return false;
boolean this_present_fileId = true;
boolean that_present_fileId = true;
if (this_present_fileId || that_present_fileId) {
if (!(this_present_fileId && that_present_fileId))
return false;
if (this.fileId != that.fileId)
return false;
}
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_ufsPath = true && this.isSetUfsPath();
boolean that_present_ufsPath = true && that.isSetUfsPath();
if (this_present_ufsPath || that_present_ufsPath) {
if (!(this_present_ufsPath && that_present_ufsPath))
return false;
if (!this.ufsPath.equals(that.ufsPath))
return false;
}
boolean this_present_length = true;
boolean that_present_length = true;
if (this_present_length || that_present_length) {
if (!(this_present_length && that_present_length))
return false;
if (this.length != that.length)
return false;
}
boolean this_present_blockSizeBytes = true;
boolean that_present_blockSizeBytes = true;
if (this_present_blockSizeBytes || that_present_blockSizeBytes) {
if (!(this_present_blockSizeBytes && that_present_blockSizeBytes))
return false;
if (this.blockSizeBytes != that.blockSizeBytes)
return false;
}
boolean this_present_creationTimeMs = true;
boolean that_present_creationTimeMs = true;
if (this_present_creationTimeMs || that_present_creationTimeMs) {
if (!(this_present_creationTimeMs && that_present_creationTimeMs))
return false;
if (this.creationTimeMs != that.creationTimeMs)
return false;
}
boolean this_present_completed = true;
boolean that_present_completed = true;
if (this_present_completed || that_present_completed) {
if (!(this_present_completed && that_present_completed))
return false;
if (this.completed != that.completed)
return false;
}
boolean this_present_folder = true;
boolean that_present_folder = true;
if (this_present_folder || that_present_folder) {
if (!(this_present_folder && that_present_folder))
return false;
if (this.folder != that.folder)
return false;
}
boolean this_present_pinned = true;
boolean that_present_pinned = true;
if (this_present_pinned || that_present_pinned) {
if (!(this_present_pinned && that_present_pinned))
return false;
if (this.pinned != that.pinned)
return false;
}
boolean this_present_cacheable = true;
boolean that_present_cacheable = true;
if (this_present_cacheable || that_present_cacheable) {
if (!(this_present_cacheable && that_present_cacheable))
return false;
if (this.cacheable != that.cacheable)
return false;
}
boolean this_present_persisted = true;
boolean that_present_persisted = true;
if (this_present_persisted || that_present_persisted) {
if (!(this_present_persisted && that_present_persisted))
return false;
if (this.persisted != that.persisted)
return false;
}
boolean this_present_blockIds = true && this.isSetBlockIds();
boolean that_present_blockIds = true && that.isSetBlockIds();
if (this_present_blockIds || that_present_blockIds) {
if (!(this_present_blockIds && that_present_blockIds))
return false;
if (!this.blockIds.equals(that.blockIds))
return false;
}
boolean this_present_inMemoryPercentage = true;
boolean that_present_inMemoryPercentage = true;
if (this_present_inMemoryPercentage || that_present_inMemoryPercentage) {
if (!(this_present_inMemoryPercentage && that_present_inMemoryPercentage))
return false;
if (this.inMemoryPercentage != that.inMemoryPercentage)
return false;
}
boolean this_present_lastModificationTimeMs = true;
boolean that_present_lastModificationTimeMs = true;
if (this_present_lastModificationTimeMs || that_present_lastModificationTimeMs) {
if (!(this_present_lastModificationTimeMs && that_present_lastModificationTimeMs))
return false;
if (this.lastModificationTimeMs != that.lastModificationTimeMs)
return false;
}
boolean this_present_ttl = true;
boolean that_present_ttl = true;
if (this_present_ttl || that_present_ttl) {
if (!(this_present_ttl && that_present_ttl))
return false;
if (this.ttl != that.ttl)
return false;
}
boolean this_present_owner = true && this.isSetOwner();
boolean that_present_owner = true && that.isSetOwner();
if (this_present_owner || that_present_owner) {
if (!(this_present_owner && that_present_owner))
return false;
if (!this.owner.equals(that.owner))
return false;
}
boolean this_present_group = true && this.isSetGroup();
boolean that_present_group = true && that.isSetGroup();
if (this_present_group || that_present_group) {
if (!(this_present_group && that_present_group))
return false;
if (!this.group.equals(that.group))
return false;
}
boolean this_present_mode = true;
boolean that_present_mode = true;
if (this_present_mode || that_present_mode) {
if (!(this_present_mode && that_present_mode))
return false;
if (this.mode != that.mode)
return false;
}
boolean this_present_persistenceState = true && this.isSetPersistenceState();
boolean that_present_persistenceState = true && that.isSetPersistenceState();
if (this_present_persistenceState || that_present_persistenceState) {
if (!(this_present_persistenceState && that_present_persistenceState))
return false;
if (!this.persistenceState.equals(that.persistenceState))
return false;
}
boolean this_present_mountPoint = true;
boolean that_present_mountPoint = true;
if (this_present_mountPoint || that_present_mountPoint) {
if (!(this_present_mountPoint && that_present_mountPoint))
return false;
if (this.mountPoint != that.mountPoint)
return false;
}
boolean this_present_fileBlockInfos = true && this.isSetFileBlockInfos();
boolean that_present_fileBlockInfos = true && that.isSetFileBlockInfos();
if (this_present_fileBlockInfos || that_present_fileBlockInfos) {
if (!(this_present_fileBlockInfos && that_present_fileBlockInfos))
return false;
if (!this.fileBlockInfos.equals(that.fileBlockInfos))
return false;
}
boolean this_present_ttlAction = true && this.isSetTtlAction();
boolean that_present_ttlAction = true && that.isSetTtlAction();
if (this_present_ttlAction || that_present_ttlAction) {
if (!(this_present_ttlAction && that_present_ttlAction))
return false;
if (!this.ttlAction.equals(that.ttlAction))
return false;
}
boolean this_present_mountId = true;
boolean that_present_mountId = true;
if (this_present_mountId || that_present_mountId) {
if (!(this_present_mountId && that_present_mountId))
return false;
if (this.mountId != that.mountId)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_fileId = true;
list.add(present_fileId);
if (present_fileId)
list.add(fileId);
boolean present_name = true && (isSetName());
list.add(present_name);
if (present_name)
list.add(name);
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_ufsPath = true && (isSetUfsPath());
list.add(present_ufsPath);
if (present_ufsPath)
list.add(ufsPath);
boolean present_length = true;
list.add(present_length);
if (present_length)
list.add(length);
boolean present_blockSizeBytes = true;
list.add(present_blockSizeBytes);
if (present_blockSizeBytes)
list.add(blockSizeBytes);
boolean present_creationTimeMs = true;
list.add(present_creationTimeMs);
if (present_creationTimeMs)
list.add(creationTimeMs);
boolean present_completed = true;
list.add(present_completed);
if (present_completed)
list.add(completed);
boolean present_folder = true;
list.add(present_folder);
if (present_folder)
list.add(folder);
boolean present_pinned = true;
list.add(present_pinned);
if (present_pinned)
list.add(pinned);
boolean present_cacheable = true;
list.add(present_cacheable);
if (present_cacheable)
list.add(cacheable);
boolean present_persisted = true;
list.add(present_persisted);
if (present_persisted)
list.add(persisted);
boolean present_blockIds = true && (isSetBlockIds());
list.add(present_blockIds);
if (present_blockIds)
list.add(blockIds);
boolean present_inMemoryPercentage = true;
list.add(present_inMemoryPercentage);
if (present_inMemoryPercentage)
list.add(inMemoryPercentage);
boolean present_lastModificationTimeMs = true;
list.add(present_lastModificationTimeMs);
if (present_lastModificationTimeMs)
list.add(lastModificationTimeMs);
boolean present_ttl = true;
list.add(present_ttl);
if (present_ttl)
list.add(ttl);
boolean present_owner = true && (isSetOwner());
list.add(present_owner);
if (present_owner)
list.add(owner);
boolean present_group = true && (isSetGroup());
list.add(present_group);
if (present_group)
list.add(group);
boolean present_mode = true;
list.add(present_mode);
if (present_mode)
list.add(mode);
boolean present_persistenceState = true && (isSetPersistenceState());
list.add(present_persistenceState);
if (present_persistenceState)
list.add(persistenceState);
boolean present_mountPoint = true;
list.add(present_mountPoint);
if (present_mountPoint)
list.add(mountPoint);
boolean present_fileBlockInfos = true && (isSetFileBlockInfos());
list.add(present_fileBlockInfos);
if (present_fileBlockInfos)
list.add(fileBlockInfos);
boolean present_ttlAction = true && (isSetTtlAction());
list.add(present_ttlAction);
if (present_ttlAction)
list.add(ttlAction.getValue());
boolean present_mountId = true;
list.add(present_mountId);
if (present_mountId)
list.add(mountId);
return list.hashCode();
}
@Override
public int compareTo(FileInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUfsPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLength()).compareTo(other.isSetLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, other.length);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBlockSizeBytes()).compareTo(other.isSetBlockSizeBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockSizeBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockSizeBytes, other.blockSizeBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCreationTimeMs()).compareTo(other.isSetCreationTimeMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCreationTimeMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTimeMs, other.creationTimeMs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCompleted()).compareTo(other.isSetCompleted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompleted()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.completed, other.completed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFolder()).compareTo(other.isSetFolder());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFolder()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.folder, other.folder);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPinned()).compareTo(other.isSetPinned());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPinned()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinned, other.pinned);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCacheable()).compareTo(other.isSetCacheable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCacheable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheable, other.cacheable);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPersisted()).compareTo(other.isSetPersisted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPersisted()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persisted, other.persisted);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBlockIds()).compareTo(other.isSetBlockIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockIds, other.blockIds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetInMemoryPercentage()).compareTo(other.isSetInMemoryPercentage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInMemoryPercentage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemoryPercentage, other.inMemoryPercentage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLastModificationTimeMs()).compareTo(other.isSetLastModificationTimeMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastModificationTimeMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastModificationTimeMs, other.lastModificationTimeMs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTtl()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttl, other.ttl);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOwner()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetGroup()).compareTo(other.isSetGroup());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroup()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group, other.group);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMode()).compareTo(other.isSetMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPersistenceState()).compareTo(other.isSetPersistenceState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPersistenceState()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistenceState, other.persistenceState);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMountPoint()).compareTo(other.isSetMountPoint());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMountPoint()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mountPoint, other.mountPoint);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFileBlockInfos()).compareTo(other.isSetFileBlockInfos());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileBlockInfos()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileBlockInfos, other.fileBlockInfos);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTtlAction()).compareTo(other.isSetTtlAction());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTtlAction()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttlAction, other.ttlAction);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMountId()).compareTo(other.isSetMountId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMountId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mountId, other.mountId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("FileInfo(");
boolean first = true;
sb.append("fileId:");
sb.append(this.fileId);
first = false;
if (!first) sb.append(", ");
sb.append("name:");
if (this.name == null) {
sb.append("null");
} else {
sb.append(this.name);
}
first = false;
if (!first) sb.append(", ");
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("ufsPath:");
if (this.ufsPath == null) {
sb.append("null");
} else {
sb.append(this.ufsPath);
}
first = false;
if (!first) sb.append(", ");
sb.append("length:");
sb.append(this.length);
first = false;
if (!first) sb.append(", ");
sb.append("blockSizeBytes:");
sb.append(this.blockSizeBytes);
first = false;
if (!first) sb.append(", ");
sb.append("creationTimeMs:");
sb.append(this.creationTimeMs);
first = false;
if (!first) sb.append(", ");
sb.append("completed:");
sb.append(this.completed);
first = false;
if (!first) sb.append(", ");
sb.append("folder:");
sb.append(this.folder);
first = false;
if (!first) sb.append(", ");
sb.append("pinned:");
sb.append(this.pinned);
first = false;
if (!first) sb.append(", ");
sb.append("cacheable:");
sb.append(this.cacheable);
first = false;
if (!first) sb.append(", ");
sb.append("persisted:");
sb.append(this.persisted);
first = false;
if (!first) sb.append(", ");
sb.append("blockIds:");
if (this.blockIds == null) {
sb.append("null");
} else {
sb.append(this.blockIds);
}
first = false;
if (!first) sb.append(", ");
sb.append("inMemoryPercentage:");
sb.append(this.inMemoryPercentage);
first = false;
if (!first) sb.append(", ");
sb.append("lastModificationTimeMs:");
sb.append(this.lastModificationTimeMs);
first = false;
if (!first) sb.append(", ");
sb.append("ttl:");
sb.append(this.ttl);
first = false;
if (!first) sb.append(", ");
sb.append("owner:");
if (this.owner == null) {
sb.append("null");
} else {
sb.append(this.owner);
}
first = false;
if (!first) sb.append(", ");
sb.append("group:");
if (this.group == null) {
sb.append("null");
} else {
sb.append(this.group);
}
first = false;
if (!first) sb.append(", ");
sb.append("mode:");
sb.append(this.mode);
first = false;
if (!first) sb.append(", ");
sb.append("persistenceState:");
if (this.persistenceState == null) {
sb.append("null");
} else {
sb.append(this.persistenceState);
}
first = false;
if (!first) sb.append(", ");
sb.append("mountPoint:");
sb.append(this.mountPoint);
first = false;
if (!first) sb.append(", ");
sb.append("fileBlockInfos:");
if (this.fileBlockInfos == null) {
sb.append("null");
} else {
sb.append(this.fileBlockInfos);
}
first = false;
if (!first) sb.append(", ");
sb.append("ttlAction:");
if (this.ttlAction == null) {
sb.append("null");
} else {
sb.append(this.ttlAction);
}
first = false;
if (!first) sb.append(", ");
sb.append("mountId:");
sb.append(this.mountId);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class FileInfoStandardSchemeFactory implements SchemeFactory {
public FileInfoStandardScheme getScheme() {
return new FileInfoStandardScheme();
}
}
private static class FileInfoStandardScheme extends StandardScheme<FileInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, FileInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // FILE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.fileId = iprot.readI64();
struct.setFileIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // UFS_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ufsPath = iprot.readString();
struct.setUfsPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // LENGTH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.length = iprot.readI64();
struct.setLengthIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // BLOCK_SIZE_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockSizeBytes = iprot.readI64();
struct.setBlockSizeBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // CREATION_TIME_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.creationTimeMs = iprot.readI64();
struct.setCreationTimeMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // COMPLETED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.completed = iprot.readBool();
struct.setCompletedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // FOLDER
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.folder = iprot.readBool();
struct.setFolderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // PINNED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.pinned = iprot.readBool();
struct.setPinnedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // CACHEABLE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.cacheable = iprot.readBool();
struct.setCacheableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // PERSISTED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.persisted = iprot.readBool();
struct.setPersistedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // BLOCK_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
struct.blockIds = new ArrayList<Long>(_list26.size);
long _elem27;
for (int _i28 = 0; _i28 < _list26.size; ++_i28)
{
_elem27 = iprot.readI64();
struct.blockIds.add(_elem27);
}
iprot.readListEnd();
}
struct.setBlockIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // IN_MEMORY_PERCENTAGE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.inMemoryPercentage = iprot.readI32();
struct.setInMemoryPercentageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // LAST_MODIFICATION_TIME_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.lastModificationTimeMs = iprot.readI64();
struct.setLastModificationTimeMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // TTL
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.ttl = iprot.readI64();
struct.setTtlIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 18: // OWNER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.owner = iprot.readString();
struct.setOwnerIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 19: // GROUP
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.group = iprot.readString();
struct.setGroupIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 20: // MODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.mode = iprot.readI32();
struct.setModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 21: // PERSISTENCE_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.persistenceState = iprot.readString();
struct.setPersistenceStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 22: // MOUNT_POINT
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.mountPoint = iprot.readBool();
struct.setMountPointIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 23: // FILE_BLOCK_INFOS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
struct.fileBlockInfos = new ArrayList<FileBlockInfo>(_list29.size);
FileBlockInfo _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = new FileBlockInfo();
_elem30.read(iprot);
struct.fileBlockInfos.add(_elem30);
}
iprot.readListEnd();
}
struct.setFileBlockInfosIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 24: // TTL_ACTION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.ttlAction = alluxio.thrift.TTtlAction.findByValue(iprot.readI32());
struct.setTtlActionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 25: // MOUNT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.mountId = iprot.readI64();
struct.setMountIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, FileInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FILE_ID_FIELD_DESC);
oprot.writeI64(struct.fileId);
oprot.writeFieldEnd();
if (struct.name != null) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(struct.name);
oprot.writeFieldEnd();
}
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.ufsPath != null) {
oprot.writeFieldBegin(UFS_PATH_FIELD_DESC);
oprot.writeString(struct.ufsPath);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(LENGTH_FIELD_DESC);
oprot.writeI64(struct.length);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BLOCK_SIZE_BYTES_FIELD_DESC);
oprot.writeI64(struct.blockSizeBytes);
oprot.writeFieldEnd();
oprot.writeFieldBegin(CREATION_TIME_MS_FIELD_DESC);
oprot.writeI64(struct.creationTimeMs);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COMPLETED_FIELD_DESC);
oprot.writeBool(struct.completed);
oprot.writeFieldEnd();
oprot.writeFieldBegin(FOLDER_FIELD_DESC);
oprot.writeBool(struct.folder);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PINNED_FIELD_DESC);
oprot.writeBool(struct.pinned);
oprot.writeFieldEnd();
oprot.writeFieldBegin(CACHEABLE_FIELD_DESC);
oprot.writeBool(struct.cacheable);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PERSISTED_FIELD_DESC);
oprot.writeBool(struct.persisted);
oprot.writeFieldEnd();
if (struct.blockIds != null) {
oprot.writeFieldBegin(BLOCK_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.blockIds.size()));
for (long _iter32 : struct.blockIds)
{
oprot.writeI64(_iter32);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(IN_MEMORY_PERCENTAGE_FIELD_DESC);
oprot.writeI32(struct.inMemoryPercentage);
oprot.writeFieldEnd();
oprot.writeFieldBegin(LAST_MODIFICATION_TIME_MS_FIELD_DESC);
oprot.writeI64(struct.lastModificationTimeMs);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TTL_FIELD_DESC);
oprot.writeI64(struct.ttl);
oprot.writeFieldEnd();
if (struct.owner != null) {
oprot.writeFieldBegin(OWNER_FIELD_DESC);
oprot.writeString(struct.owner);
oprot.writeFieldEnd();
}
if (struct.group != null) {
oprot.writeFieldBegin(GROUP_FIELD_DESC);
oprot.writeString(struct.group);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MODE_FIELD_DESC);
oprot.writeI32(struct.mode);
oprot.writeFieldEnd();
if (struct.persistenceState != null) {
oprot.writeFieldBegin(PERSISTENCE_STATE_FIELD_DESC);
oprot.writeString(struct.persistenceState);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MOUNT_POINT_FIELD_DESC);
oprot.writeBool(struct.mountPoint);
oprot.writeFieldEnd();
if (struct.fileBlockInfos != null) {
oprot.writeFieldBegin(FILE_BLOCK_INFOS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fileBlockInfos.size()));
for (FileBlockInfo _iter33 : struct.fileBlockInfos)
{
_iter33.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.ttlAction != null) {
oprot.writeFieldBegin(TTL_ACTION_FIELD_DESC);
oprot.writeI32(struct.ttlAction.getValue());
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MOUNT_ID_FIELD_DESC);
oprot.writeI64(struct.mountId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class FileInfoTupleSchemeFactory implements SchemeFactory {
public FileInfoTupleScheme getScheme() {
return new FileInfoTupleScheme();
}
}
private static class FileInfoTupleScheme extends TupleScheme<FileInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, FileInfo struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetFileId()) {
optionals.set(0);
}
if (struct.isSetName()) {
optionals.set(1);
}
if (struct.isSetPath()) {
optionals.set(2);
}
if (struct.isSetUfsPath()) {
optionals.set(3);
}
if (struct.isSetLength()) {
optionals.set(4);
}
if (struct.isSetBlockSizeBytes()) {
optionals.set(5);
}
if (struct.isSetCreationTimeMs()) {
optionals.set(6);
}
if (struct.isSetCompleted()) {
optionals.set(7);
}
if (struct.isSetFolder()) {
optionals.set(8);
}
if (struct.isSetPinned()) {
optionals.set(9);
}
if (struct.isSetCacheable()) {
optionals.set(10);
}
if (struct.isSetPersisted()) {
optionals.set(11);
}
if (struct.isSetBlockIds()) {
optionals.set(12);
}
if (struct.isSetInMemoryPercentage()) {
optionals.set(13);
}
if (struct.isSetLastModificationTimeMs()) {
optionals.set(14);
}
if (struct.isSetTtl()) {
optionals.set(15);
}
if (struct.isSetOwner()) {
optionals.set(16);
}
if (struct.isSetGroup()) {
optionals.set(17);
}
if (struct.isSetMode()) {
optionals.set(18);
}
if (struct.isSetPersistenceState()) {
optionals.set(19);
}
if (struct.isSetMountPoint()) {
optionals.set(20);
}
if (struct.isSetFileBlockInfos()) {
optionals.set(21);
}
if (struct.isSetTtlAction()) {
optionals.set(22);
}
if (struct.isSetMountId()) {
optionals.set(23);
}
oprot.writeBitSet(optionals, 24);
if (struct.isSetFileId()) {
oprot.writeI64(struct.fileId);
}
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetUfsPath()) {
oprot.writeString(struct.ufsPath);
}
if (struct.isSetLength()) {
oprot.writeI64(struct.length);
}
if (struct.isSetBlockSizeBytes()) {
oprot.writeI64(struct.blockSizeBytes);
}
if (struct.isSetCreationTimeMs()) {
oprot.writeI64(struct.creationTimeMs);
}
if (struct.isSetCompleted()) {
oprot.writeBool(struct.completed);
}
if (struct.isSetFolder()) {
oprot.writeBool(struct.folder);
}
if (struct.isSetPinned()) {
oprot.writeBool(struct.pinned);
}
if (struct.isSetCacheable()) {
oprot.writeBool(struct.cacheable);
}
if (struct.isSetPersisted()) {
oprot.writeBool(struct.persisted);
}
if (struct.isSetBlockIds()) {
{
oprot.writeI32(struct.blockIds.size());
for (long _iter34 : struct.blockIds)
{
oprot.writeI64(_iter34);
}
}
}
if (struct.isSetInMemoryPercentage()) {
oprot.writeI32(struct.inMemoryPercentage);
}
if (struct.isSetLastModificationTimeMs()) {
oprot.writeI64(struct.lastModificationTimeMs);
}
if (struct.isSetTtl()) {
oprot.writeI64(struct.ttl);
}
if (struct.isSetOwner()) {
oprot.writeString(struct.owner);
}
if (struct.isSetGroup()) {
oprot.writeString(struct.group);
}
if (struct.isSetMode()) {
oprot.writeI32(struct.mode);
}
if (struct.isSetPersistenceState()) {
oprot.writeString(struct.persistenceState);
}
if (struct.isSetMountPoint()) {
oprot.writeBool(struct.mountPoint);
}
if (struct.isSetFileBlockInfos()) {
{
oprot.writeI32(struct.fileBlockInfos.size());
for (FileBlockInfo _iter35 : struct.fileBlockInfos)
{
_iter35.write(oprot);
}
}
}
if (struct.isSetTtlAction()) {
oprot.writeI32(struct.ttlAction.getValue());
}
if (struct.isSetMountId()) {
oprot.writeI64(struct.mountId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, FileInfo struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(24);
if (incoming.get(0)) {
struct.fileId = iprot.readI64();
struct.setFileIdIsSet(true);
}
if (incoming.get(1)) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
}
if (incoming.get(2)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(3)) {
struct.ufsPath = iprot.readString();
struct.setUfsPathIsSet(true);
}
if (incoming.get(4)) {
struct.length = iprot.readI64();
struct.setLengthIsSet(true);
}
if (incoming.get(5)) {
struct.blockSizeBytes = iprot.readI64();
struct.setBlockSizeBytesIsSet(true);
}
if (incoming.get(6)) {
struct.creationTimeMs = iprot.readI64();
struct.setCreationTimeMsIsSet(true);
}
if (incoming.get(7)) {
struct.completed = iprot.readBool();
struct.setCompletedIsSet(true);
}
if (incoming.get(8)) {
struct.folder = iprot.readBool();
struct.setFolderIsSet(true);
}
if (incoming.get(9)) {
struct.pinned = iprot.readBool();
struct.setPinnedIsSet(true);
}
if (incoming.get(10)) {
struct.cacheable = iprot.readBool();
struct.setCacheableIsSet(true);
}
if (incoming.get(11)) {
struct.persisted = iprot.readBool();
struct.setPersistedIsSet(true);
}
if (incoming.get(12)) {
{
org.apache.thrift.protocol.TList _list36 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
struct.blockIds = new ArrayList<Long>(_list36.size);
long _elem37;
for (int _i38 = 0; _i38 < _list36.size; ++_i38)
{
_elem37 = iprot.readI64();
struct.blockIds.add(_elem37);
}
}
struct.setBlockIdsIsSet(true);
}
if (incoming.get(13)) {
struct.inMemoryPercentage = iprot.readI32();
struct.setInMemoryPercentageIsSet(true);
}
if (incoming.get(14)) {
struct.lastModificationTimeMs = iprot.readI64();
struct.setLastModificationTimeMsIsSet(true);
}
if (incoming.get(15)) {
struct.ttl = iprot.readI64();
struct.setTtlIsSet(true);
}
if (incoming.get(16)) {
struct.owner = iprot.readString();
struct.setOwnerIsSet(true);
}
if (incoming.get(17)) {
struct.group = iprot.readString();
struct.setGroupIsSet(true);
}
if (incoming.get(18)) {
struct.mode = iprot.readI32();
struct.setModeIsSet(true);
}
if (incoming.get(19)) {
struct.persistenceState = iprot.readString();
struct.setPersistenceStateIsSet(true);
}
if (incoming.get(20)) {
struct.mountPoint = iprot.readBool();
struct.setMountPointIsSet(true);
}
if (incoming.get(21)) {
{
org.apache.thrift.protocol.TList _list39 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.fileBlockInfos = new ArrayList<FileBlockInfo>(_list39.size);
FileBlockInfo _elem40;
for (int _i41 = 0; _i41 < _list39.size; ++_i41)
{
_elem40 = new FileBlockInfo();
_elem40.read(iprot);
struct.fileBlockInfos.add(_elem40);
}
}
struct.setFileBlockInfosIsSet(true);
}
if (incoming.get(22)) {
struct.ttlAction = alluxio.thrift.TTtlAction.findByValue(iprot.readI32());
struct.setTtlActionIsSet(true);
}
if (incoming.get(23)) {
struct.mountId = iprot.readI64();
struct.setMountIdIsSet(true);
}
}
}
}