@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_metadata = true && (isSetMetadata()); list.add(present_metadata); if (present_metadata) list.add(metadata); boolean present_includeBitset = true && (isSetIncludeBitset()); list.add(present_includeBitset); if (present_includeBitset) list.add(includeBitset); return list.hashCode(); }
/** 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 METADATA: return isSetMetadata(); case INCLUDE_BITSET: return isSetIncludeBitset(); } throw new IllegalStateException(); }
public boolean equals(MetadataPpdResult that) { if (that == null) return false; boolean this_present_metadata = true && this.isSetMetadata(); boolean that_present_metadata = true && that.isSetMetadata(); if (this_present_metadata || that_present_metadata) { if (!(this_present_metadata && that_present_metadata)) return false; if (!this.metadata.equals(that.metadata)) return false; } boolean this_present_includeBitset = true && this.isSetIncludeBitset(); boolean that_present_includeBitset = true && that.isSetIncludeBitset(); if (this_present_includeBitset || that_present_includeBitset) { if (!(this_present_includeBitset && that_present_includeBitset)) return false; if (!this.includeBitset.equals(that.includeBitset)) return false; } return true; }
@Override public int compareTo(MetadataPpdResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); if (lastComparison != 0) { return lastComparison; } if (isSetMetadata()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIncludeBitset()).compareTo(other.isSetIncludeBitset()); if (lastComparison != 0) { return lastComparison; } if (isSetIncludeBitset()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeBitset, other.includeBitset); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public String toString() { StringBuilder sb = new StringBuilder("MetadataPpdResult("); boolean first = true; if (isSetMetadata()) { sb.append("metadata:"); if (this.metadata == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.metadata, sb); } first = false; } if (isSetIncludeBitset()) { if (!first) sb.append(", "); sb.append("includeBitset:"); if (this.includeBitset == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.includeBitset, sb); } first = false; } sb.append(")"); return sb.toString(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, MetadataPpdResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.metadata != null) { if (struct.isSetMetadata()) { oprot.writeFieldBegin(METADATA_FIELD_DESC); oprot.writeBinary(struct.metadata); oprot.writeFieldEnd(); } } if (struct.includeBitset != null) { if (struct.isSetIncludeBitset()) { oprot.writeFieldBegin(INCLUDE_BITSET_FIELD_DESC); oprot.writeBinary(struct.includeBitset); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, MetadataPpdResult struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMetadata()) { optionals.set(0); } if (struct.isSetIncludeBitset()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMetadata()) { oprot.writeBinary(struct.metadata); } if (struct.isSetIncludeBitset()) { oprot.writeBinary(struct.includeBitset); } }
/** * Performs a deep copy on <i>other</i>. */ public MetadataPpdResult(MetadataPpdResult other) { if (other.isSetMetadata()) { this.metadata = org.apache.thrift.TBaseHelper.copyBinary(other.metadata); } if (other.isSetIncludeBitset()) { this.includeBitset = org.apache.thrift.TBaseHelper.copyBinary(other.includeBitset); } }
private void processPpdResult(MetadataPpdResult mpr, HdfsFileStatusWithId file, int ix, OrcTail[] result, ByteBuffer[] ppdResult) throws IOException { if (mpr == null) { return; // This file is unknown to metastore. } ppdResult[ix] = mpr.isSetIncludeBitset() ? mpr.bufferForIncludeBitset() : NO_SPLIT_AFTER_PPD; if (mpr.isSetMetadata()) { result[ix] = createOrcTailFromMs(file, mpr.bufferForMetadata()); if (result[ix] != null) { localCache.put(file.getFileStatus().getPath(), result[ix]); } } }
private void processPpdResult(MetadataPpdResult mpr, HdfsFileStatusWithId file, int ix, OrcTail[] result, ByteBuffer[] ppdResult) throws IOException { if (mpr == null) return; // This file is unknown to metastore. ppdResult[ix] = mpr.isSetIncludeBitset() ? mpr.bufferForIncludeBitset() : NO_SPLIT_AFTER_PPD; if (mpr.isSetMetadata()) { result[ix] = createOrcTailFromMs(file, mpr.bufferForMetadata()); if (result[ix] != null) { localCache.put(file.getFileStatus().getPath(), result[ix]); } } }
/** 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 METADATA: return isSetMetadata(); case INCLUDE_BITSET: return isSetIncludeBitset(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_metadata = true && (isSetMetadata()); list.add(present_metadata); if (present_metadata) list.add(metadata); boolean present_includeBitset = true && (isSetIncludeBitset()); list.add(present_includeBitset); if (present_includeBitset) list.add(includeBitset); return list.hashCode(); }
public boolean equals(MetadataPpdResult that) { if (that == null) return false; boolean this_present_metadata = true && this.isSetMetadata(); boolean that_present_metadata = true && that.isSetMetadata(); if (this_present_metadata || that_present_metadata) { if (!(this_present_metadata && that_present_metadata)) return false; if (!this.metadata.equals(that.metadata)) return false; } boolean this_present_includeBitset = true && this.isSetIncludeBitset(); boolean that_present_includeBitset = true && that.isSetIncludeBitset(); if (this_present_includeBitset || that_present_includeBitset) { if (!(this_present_includeBitset && that_present_includeBitset)) return false; if (!this.includeBitset.equals(that.includeBitset)) return false; } return true; }
@Override public int compareTo(MetadataPpdResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); if (lastComparison != 0) { return lastComparison; } if (isSetMetadata()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIncludeBitset()).compareTo(other.isSetIncludeBitset()); if (lastComparison != 0) { return lastComparison; } if (isSetIncludeBitset()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeBitset, other.includeBitset); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, MetadataPpdResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.metadata != null) { if (struct.isSetMetadata()) { oprot.writeFieldBegin(METADATA_FIELD_DESC); oprot.writeBinary(struct.metadata); oprot.writeFieldEnd(); } } if (struct.includeBitset != null) { if (struct.isSetIncludeBitset()) { oprot.writeFieldBegin(INCLUDE_BITSET_FIELD_DESC); oprot.writeBinary(struct.includeBitset); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("MetadataPpdResult("); boolean first = true; if (isSetMetadata()) { sb.append("metadata:"); if (this.metadata == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.metadata, sb); } first = false; } if (isSetIncludeBitset()) { if (!first) sb.append(", "); sb.append("includeBitset:"); if (this.includeBitset == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.includeBitset, sb); } first = false; } sb.append(")"); return sb.toString(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, MetadataPpdResult struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMetadata()) { optionals.set(0); } if (struct.isSetIncludeBitset()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMetadata()) { oprot.writeBinary(struct.metadata); } if (struct.isSetIncludeBitset()) { oprot.writeBinary(struct.includeBitset); } }
/** * Performs a deep copy on <i>other</i>. */ public MetadataPpdResult(MetadataPpdResult other) { if (other.isSetMetadata()) { this.metadata = org.apache.thrift.TBaseHelper.copyBinary(other.metadata); } if (other.isSetIncludeBitset()) { this.includeBitset = org.apache.thrift.TBaseHelper.copyBinary(other.includeBitset); } }