コード例 #1
0
ファイル: Grouping.java プロジェクト: abolibibelot/storm
 @Override
 protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
     throws org.apache.thrift.TException {
   switch (setField_) {
     case FIELDS:
       List<String> fields = (List<String>) value_;
       {
         oprot.writeListBegin(
             new org.apache.thrift.protocol.TList(
                 org.apache.thrift.protocol.TType.STRING, fields.size()));
         for (String _iter15 : fields) {
           oprot.writeString(_iter15);
         }
         oprot.writeListEnd();
       }
       return;
     case SHUFFLE:
       NullStruct shuffle = (NullStruct) value_;
       shuffle.write(oprot);
       return;
     case ALL:
       NullStruct all = (NullStruct) value_;
       all.write(oprot);
       return;
     case NONE:
       NullStruct none = (NullStruct) value_;
       none.write(oprot);
       return;
     case DIRECT:
       NullStruct direct = (NullStruct) value_;
       direct.write(oprot);
       return;
     case CUSTOM_OBJECT:
       JavaObject custom_object = (JavaObject) value_;
       custom_object.write(oprot);
       return;
     case CUSTOM_SERIALIZED:
       ByteBuffer custom_serialized = (ByteBuffer) value_;
       oprot.writeBinary(custom_serialized);
       return;
     case LOCAL_OR_SHUFFLE:
       NullStruct local_or_shuffle = (NullStruct) value_;
       local_or_shuffle.write(oprot);
       return;
     default:
       throw new IllegalStateException("Cannot write union with unknown field " + setField_);
   }
 }
コード例 #2
0
 @Override
 protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
     throws org.apache.thrift.TException {
   switch (setField_) {
     case SERIALIZED_JAVA:
       ByteBuffer serialized_java = (ByteBuffer) value_;
       oprot.writeBinary(serialized_java);
       return;
     case SHELL:
       ShellComponent shell = (ShellComponent) value_;
       shell.write(oprot);
       return;
     case JAVA_OBJECT:
       JavaObject java_object = (JavaObject) value_;
       java_object.write(oprot);
       return;
     default:
       throw new IllegalStateException("Cannot write union with unknown field " + setField_);
   }
 }