/** * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.thriftfs.api; 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; public class FileStatus implements org.apache.thrift.TBase<FileStatus, FileStatus._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileStatus"); 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)1); 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)2); private static final org.apache.thrift.protocol.TField ISDIR_FIELD_DESC = new org.apache.thrift.protocol.TField("isdir", org.apache.thrift.protocol.TType.BOOL, (short)3); private static final org.apache.thrift.protocol.TField BLOCK_REPLICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("block_replication", org.apache.thrift.protocol.TType.I16, (short)4); private static final org.apache.thrift.protocol.TField BLOCKSIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("blocksize", org.apache.thrift.protocol.TType.I64, (short)5); private static final org.apache.thrift.protocol.TField MODIFICATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("modification_time", org.apache.thrift.protocol.TType.I64, (short)6); private static final org.apache.thrift.protocol.TField PERMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("permission", org.apache.thrift.protocol.TType.STRING, (short)7); 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)8); 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)9); public String path; // required public long length; // required public boolean isdir; // required public short block_replication; // required public long blocksize; // required public long modification_time; // required public String permission; // required public String owner; // required public String group; // 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 { PATH((short)1, "path"), LENGTH((short)2, "length"), ISDIR((short)3, "isdir"), BLOCK_REPLICATION((short)4, "block_replication"), BLOCKSIZE((short)5, "blocksize"), MODIFICATION_TIME((short)6, "modification_time"), PERMISSION((short)7, "permission"), OWNER((short)8, "owner"), GROUP((short)9, "group"); 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: // PATH return PATH; case 2: // LENGTH return LENGTH; case 3: // ISDIR return ISDIR; case 4: // BLOCK_REPLICATION return BLOCK_REPLICATION; case 5: // BLOCKSIZE return BLOCKSIZE; case 6: // MODIFICATION_TIME return MODIFICATION_TIME; case 7: // PERMISSION return PERMISSION; case 8: // OWNER return OWNER; case 9: // GROUP return GROUP; 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 __LENGTH_ISSET_ID = 0; private static final int __ISDIR_ISSET_ID = 1; private static final int __BLOCK_REPLICATION_ISSET_ID = 2; private static final int __BLOCKSIZE_ISSET_ID = 3; private static final int __MODIFICATION_TIME_ISSET_ID = 4; private BitSet __isset_bit_vector = new BitSet(5); 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.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.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.ISDIR, new org.apache.thrift.meta_data.FieldMetaData("isdir", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.BLOCK_REPLICATION, new org.apache.thrift.meta_data.FieldMetaData("block_replication", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); tmpMap.put(_Fields.BLOCKSIZE, new org.apache.thrift.meta_data.FieldMetaData("blocksize", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.MODIFICATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("modification_time", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.PERMISSION, new org.apache.thrift.meta_data.FieldMetaData("permission", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FileStatus.class, metaDataMap); } public FileStatus() { } public FileStatus( String path, long length, boolean isdir, short block_replication, long blocksize, long modification_time, String permission, String owner, String group) { this(); this.path = path; this.length = length; setLengthIsSet(true); this.isdir = isdir; setIsdirIsSet(true); this.block_replication = block_replication; setBlock_replicationIsSet(true); this.blocksize = blocksize; setBlocksizeIsSet(true); this.modification_time = modification_time; setModification_timeIsSet(true); this.permission = permission; this.owner = owner; this.group = group; } /** * Performs a deep copy on <i>other</i>. */ public FileStatus(FileStatus other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetPath()) { this.path = other.path; } this.length = other.length; this.isdir = other.isdir; this.block_replication = other.block_replication; this.blocksize = other.blocksize; this.modification_time = other.modification_time; if (other.isSetPermission()) { this.permission = other.permission; } if (other.isSetOwner()) { this.owner = other.owner; } if (other.isSetGroup()) { this.group = other.group; } } public FileStatus deepCopy() { return new FileStatus(this); } @Override public void clear() { this.path = null; setLengthIsSet(false); this.length = 0; setIsdirIsSet(false); this.isdir = false; setBlock_replicationIsSet(false); this.block_replication = 0; setBlocksizeIsSet(false); this.blocksize = 0; setModification_timeIsSet(false); this.modification_time = 0; this.permission = null; this.owner = null; this.group = null; } public String getPath() { return this.path; } public FileStatus 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 long getLength() { return this.length; } public FileStatus setLength(long length) { this.length = length; setLengthIsSet(true); return this; } public void unsetLength() { __isset_bit_vector.clear(__LENGTH_ISSET_ID); } /** Returns true if field length is set (has been assigned a value) and false otherwise */ public boolean isSetLength() { return __isset_bit_vector.get(__LENGTH_ISSET_ID); } public void setLengthIsSet(boolean value) { __isset_bit_vector.set(__LENGTH_ISSET_ID, value); } public boolean isIsdir() { return this.isdir; } public FileStatus setIsdir(boolean isdir) { this.isdir = isdir; setIsdirIsSet(true); return this; } public void unsetIsdir() { __isset_bit_vector.clear(__ISDIR_ISSET_ID); } /** Returns true if field isdir is set (has been assigned a value) and false otherwise */ public boolean isSetIsdir() { return __isset_bit_vector.get(__ISDIR_ISSET_ID); } public void setIsdirIsSet(boolean value) { __isset_bit_vector.set(__ISDIR_ISSET_ID, value); } public short getBlock_replication() { return this.block_replication; } public FileStatus setBlock_replication(short block_replication) { this.block_replication = block_replication; setBlock_replicationIsSet(true); return this; } public void unsetBlock_replication() { __isset_bit_vector.clear(__BLOCK_REPLICATION_ISSET_ID); } /** Returns true if field block_replication is set (has been assigned a value) and false otherwise */ public boolean isSetBlock_replication() { return __isset_bit_vector.get(__BLOCK_REPLICATION_ISSET_ID); } public void setBlock_replicationIsSet(boolean value) { __isset_bit_vector.set(__BLOCK_REPLICATION_ISSET_ID, value); } public long getBlocksize() { return this.blocksize; } public FileStatus setBlocksize(long blocksize) { this.blocksize = blocksize; setBlocksizeIsSet(true); return this; } public void unsetBlocksize() { __isset_bit_vector.clear(__BLOCKSIZE_ISSET_ID); } /** Returns true if field blocksize is set (has been assigned a value) and false otherwise */ public boolean isSetBlocksize() { return __isset_bit_vector.get(__BLOCKSIZE_ISSET_ID); } public void setBlocksizeIsSet(boolean value) { __isset_bit_vector.set(__BLOCKSIZE_ISSET_ID, value); } public long getModification_time() { return this.modification_time; } public FileStatus setModification_time(long modification_time) { this.modification_time = modification_time; setModification_timeIsSet(true); return this; } public void unsetModification_time() { __isset_bit_vector.clear(__MODIFICATION_TIME_ISSET_ID); } /** Returns true if field modification_time is set (has been assigned a value) and false otherwise */ public boolean isSetModification_time() { return __isset_bit_vector.get(__MODIFICATION_TIME_ISSET_ID); } public void setModification_timeIsSet(boolean value) { __isset_bit_vector.set(__MODIFICATION_TIME_ISSET_ID, value); } public String getPermission() { return this.permission; } public FileStatus setPermission(String permission) { this.permission = permission; return this; } public void unsetPermission() { this.permission = null; } /** Returns true if field permission is set (has been assigned a value) and false otherwise */ public boolean isSetPermission() { return this.permission != null; } public void setPermissionIsSet(boolean value) { if (!value) { this.permission = null; } } public String getOwner() { return this.owner; } public FileStatus 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 FileStatus 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 void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; case LENGTH: if (value == null) { unsetLength(); } else { setLength((Long)value); } break; case ISDIR: if (value == null) { unsetIsdir(); } else { setIsdir((Boolean)value); } break; case BLOCK_REPLICATION: if (value == null) { unsetBlock_replication(); } else { setBlock_replication((Short)value); } break; case BLOCKSIZE: if (value == null) { unsetBlocksize(); } else { setBlocksize((Long)value); } break; case MODIFICATION_TIME: if (value == null) { unsetModification_time(); } else { setModification_time((Long)value); } break; case PERMISSION: if (value == null) { unsetPermission(); } else { setPermission((String)value); } break; case OWNER: if (value == null) { unsetOwner(); } else { setOwner((String)value); } break; case GROUP: if (value == null) { unsetGroup(); } else { setGroup((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); case LENGTH: return Long.valueOf(getLength()); case ISDIR: return Boolean.valueOf(isIsdir()); case BLOCK_REPLICATION: return Short.valueOf(getBlock_replication()); case BLOCKSIZE: return Long.valueOf(getBlocksize()); case MODIFICATION_TIME: return Long.valueOf(getModification_time()); case PERMISSION: return getPermission(); case OWNER: return getOwner(); case GROUP: return getGroup(); } 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 PATH: return isSetPath(); case LENGTH: return isSetLength(); case ISDIR: return isSetIsdir(); case BLOCK_REPLICATION: return isSetBlock_replication(); case BLOCKSIZE: return isSetBlocksize(); case MODIFICATION_TIME: return isSetModification_time(); case PERMISSION: return isSetPermission(); case OWNER: return isSetOwner(); case GROUP: return isSetGroup(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof FileStatus) return this.equals((FileStatus)that); return false; } public boolean equals(FileStatus that) { if (that == null) 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_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_isdir = true; boolean that_present_isdir = true; if (this_present_isdir || that_present_isdir) { if (!(this_present_isdir && that_present_isdir)) return false; if (this.isdir != that.isdir) return false; } boolean this_present_block_replication = true; boolean that_present_block_replication = true; if (this_present_block_replication || that_present_block_replication) { if (!(this_present_block_replication && that_present_block_replication)) return false; if (this.block_replication != that.block_replication) return false; } boolean this_present_blocksize = true; boolean that_present_blocksize = true; if (this_present_blocksize || that_present_blocksize) { if (!(this_present_blocksize && that_present_blocksize)) return false; if (this.blocksize != that.blocksize) return false; } boolean this_present_modification_time = true; boolean that_present_modification_time = true; if (this_present_modification_time || that_present_modification_time) { if (!(this_present_modification_time && that_present_modification_time)) return false; if (this.modification_time != that.modification_time) return false; } boolean this_present_permission = true && this.isSetPermission(); boolean that_present_permission = true && that.isSetPermission(); if (this_present_permission || that_present_permission) { if (!(this_present_permission && that_present_permission)) return false; if (!this.permission.equals(that.permission)) 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; } return true; } @Override public int hashCode() { return 0; } public int compareTo(FileStatus other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; FileStatus typedOther = (FileStatus)other; lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLength()).compareTo(typedOther.isSetLength()); if (lastComparison != 0) { return lastComparison; } if (isSetLength()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, typedOther.length); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIsdir()).compareTo(typedOther.isSetIsdir()); if (lastComparison != 0) { return lastComparison; } if (isSetIsdir()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isdir, typedOther.isdir); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBlock_replication()).compareTo(typedOther.isSetBlock_replication()); if (lastComparison != 0) { return lastComparison; } if (isSetBlock_replication()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.block_replication, typedOther.block_replication); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBlocksize()).compareTo(typedOther.isSetBlocksize()); if (lastComparison != 0) { return lastComparison; } if (isSetBlocksize()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blocksize, typedOther.blocksize); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetModification_time()).compareTo(typedOther.isSetModification_time()); if (lastComparison != 0) { return lastComparison; } if (isSetModification_time()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modification_time, typedOther.modification_time); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPermission()).compareTo(typedOther.isSetPermission()); if (lastComparison != 0) { return lastComparison; } if (isSetPermission()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permission, typedOther.permission); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); if (lastComparison != 0) { return lastComparison; } if (isSetOwner()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, typedOther.owner); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup()).compareTo(typedOther.isSetGroup()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group, typedOther.group); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATH if (field.type == org.apache.thrift.protocol.TType.STRING) { this.path = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // LENGTH if (field.type == org.apache.thrift.protocol.TType.I64) { this.length = iprot.readI64(); setLengthIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // ISDIR if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.isdir = iprot.readBool(); setIsdirIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // BLOCK_REPLICATION if (field.type == org.apache.thrift.protocol.TType.I16) { this.block_replication = iprot.readI16(); setBlock_replicationIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // BLOCKSIZE if (field.type == org.apache.thrift.protocol.TType.I64) { this.blocksize = iprot.readI64(); setBlocksizeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // MODIFICATION_TIME if (field.type == org.apache.thrift.protocol.TType.I64) { this.modification_time = iprot.readI64(); setModification_timeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // PERMISSION if (field.type == org.apache.thrift.protocol.TType.STRING) { this.permission = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 8: // OWNER if (field.type == org.apache.thrift.protocol.TType.STRING) { this.owner = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 9: // GROUP if (field.type == org.apache.thrift.protocol.TType.STRING) { this.group = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(this.path); oprot.writeFieldEnd(); } oprot.writeFieldBegin(LENGTH_FIELD_DESC); oprot.writeI64(this.length); oprot.writeFieldEnd(); oprot.writeFieldBegin(ISDIR_FIELD_DESC); oprot.writeBool(this.isdir); oprot.writeFieldEnd(); oprot.writeFieldBegin(BLOCK_REPLICATION_FIELD_DESC); oprot.writeI16(this.block_replication); oprot.writeFieldEnd(); oprot.writeFieldBegin(BLOCKSIZE_FIELD_DESC); oprot.writeI64(this.blocksize); oprot.writeFieldEnd(); oprot.writeFieldBegin(MODIFICATION_TIME_FIELD_DESC); oprot.writeI64(this.modification_time); oprot.writeFieldEnd(); if (this.permission != null) { oprot.writeFieldBegin(PERMISSION_FIELD_DESC); oprot.writeString(this.permission); oprot.writeFieldEnd(); } if (this.owner != null) { oprot.writeFieldBegin(OWNER_FIELD_DESC); oprot.writeString(this.owner); oprot.writeFieldEnd(); } if (this.group != null) { oprot.writeFieldBegin(GROUP_FIELD_DESC); oprot.writeString(this.group); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("FileStatus("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; if (!first) sb.append(", "); sb.append("length:"); sb.append(this.length); first = false; if (!first) sb.append(", "); sb.append("isdir:"); sb.append(this.isdir); first = false; if (!first) sb.append(", "); sb.append("block_replication:"); sb.append(this.block_replication); first = false; if (!first) sb.append(", "); sb.append("blocksize:"); sb.append(this.blocksize); first = false; if (!first) sb.append(", "); sb.append("modification_time:"); sb.append(this.modification_time); first = false; if (!first) sb.append(", "); sb.append("permission:"); if (this.permission == null) { sb.append("null"); } else { sb.append(this.permission); } 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; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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_bit_vector = new BitSet(1); 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); } } }