@Override public TSet readSetBegin() throws TException { assert (!inner); TSet set = new TSet(); if (columns[index] == null || columns[index].equals(nullString)) { index++; if (returnNulls) { return null; } } else if (columns[index].isEmpty()) { index++; } else { fields = secondaryPattern.split(columns[index++]); set = new TSet(ORDERED_TYPE, fields.length); } inner = true; innerIndex = 0; return set; }
@Override public TSet readSetBegin() throws TException { final int size = readSequenceBegin(); return new TSet(UNUSED_TYPE, size); }
/** * This method always return the same instance of TSet to avoid creating new * instances. It is the responsibility of the caller to read the value before * calling this method again. */ @Override public TSet readSetBegin() throws TException { stackLevel++; set = new TSet(ORDERED_TYPE, readI32()); if (set.size == 0 && lastPrimitiveWasNull()) { return null; } return set; }
public void write(org.apache.thrift.protocol.TProtocol oprot, SetIntString struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.sIntString != null) { oprot.writeFieldBegin(S_INT_STRING_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.sIntString.size())); for (IntString _iter85 : struct.sIntString) { _iter85.write(oprot); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } if (struct.aString != null) { oprot.writeFieldBegin(A_STRING_FIELD_DESC); oprot.writeString(struct.aString); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.aborted != null) { oprot.writeFieldBegin(ABORTED_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.aborted.size())); for (long _iter712 : struct.aborted) { oprot.writeI64(_iter712); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } if (struct.nosuch != null) { oprot.writeFieldBegin(NOSUCH_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.nosuch.size())); for (long _iter713 : struct.nosuch) { oprot.writeI64(_iter713); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
oprot.writeFieldBegin(TABLES_USED_FIELD_DESC); oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.tablesUsed.size())); for (String _iter751 : struct.tablesUsed)
@Override public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TSet _set716 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.aborted = new HashSet<Long>(2*_set716.size); long _elem717; for (int _i718 = 0; _i718 < _set716.size; ++_i718) { _elem717 = iprot.readI64(); struct.aborted.add(_elem717); } } struct.setAbortedIsSet(true); { org.apache.thrift.protocol.TSet _set719 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.nosuch = new HashSet<Long>(2*_set719.size); long _elem720; for (int _i721 = 0; _i721 < _set719.size; ++_i721) { _elem720 = iprot.readI64(); struct.nosuch.add(_elem720); } } struct.setNosuchIsSet(true); } }
oprot.writeFieldBegin(TRIED_HOSTS_FIELD_DESC); oprot.writeSetBegin(new TSet(TType.STRING, this.triedHosts.size())); for (String _iter7 : this.triedHosts)
@Override public void read(org.apache.thrift.protocol.TProtocol prot, SetIntString struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TSet _set87 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.sIntString = new HashSet<IntString>(2*_set87.size); IntString _elem88; for (int _i89 = 0; _i89 < _set87.size; ++_i89) { _elem88 = new IntString(); _elem88.read(iprot); struct.sIntString.add(_elem88); } } struct.setSIntStringIsSet(true); } if (incoming.get(1)) { struct.aString = iprot.readString(); struct.setAStringIsSet(true); } } }
@Override public void serialize(Object o, ObjectInspector oi, TProtocol oprot) throws TException, SerDeException, NoSuchFieldException, IllegalAccessException { ListObjectInspector loi = (ListObjectInspector) oi; Set<Object> set = (Set<Object>) o; DynamicSerDeTypeBase mt = getElementType(); tset = new TSet(mt.getType(), set.size()); oprot.writeSetBegin(tset); for (Object element : set) { mt.serialize(element, loi.getListElementObjectInspector(), oprot); } // in theory, the below call isn't needed in non thrift_mode, but let's not // get too crazy oprot.writeSetEnd(); } }
struct.setTblNameIsSet(true); org.apache.thrift.protocol.TSet _set753 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.tablesUsed = new HashSet<String>(2*_set753.size); String _elem754;
oprot.writeSetBegin(new TSet((byte) 11, struct.set_values.size())); var3 = struct.set_values.iterator();
oprot.writeFieldBegin(STR_SET_FIELD_DESC); oprot.writeSetBegin(new TSet(TType.STRING, this.strSet.size())); for(String _iter17: this.strSet) { oprot.writeString(_iter17);
oprot.writeFieldBegin(SET_VAL_FIELD_DESC); oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.setVal.size())); for (FooUnion _iter11 : struct.setVal)
oprot.writeFieldBegin(SET_VAL_FIELD_DESC); oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.setVal.size())); for (FooUnion _iter11 : struct.setVal)
oprot.writeFieldBegin(FOO6_FIELD_DESC); oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.foo6.size())); for (String _iter102 : struct.foo6)
oprot.writeFieldBegin(FOO6_FIELD_DESC); oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.foo6.size())); for (java.lang.String _iter102 : struct.foo6)
TSet _set23 = new TSet((byte) 11, iprot.readI32()); struct.set_values = new HashSet(2 * _set23.size);
org.apache.thrift.protocol.TSet _set20 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.setVal = new java.util.HashSet<FooUnion>(2*_set20.size); FooUnion _elem21;
org.apache.thrift.protocol.TSet _set20 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.setVal = new HashSet<FooUnion>(2*_set20.size); FooUnion _elem21;