List of usage examples for org.apache.thrift.protocol TProtocol writeI32
public void writeI32(Integer i32) throws TException
From source file:backtype.storm.generated.ClusterSummary.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();/*from w ww . j a v a 2 s . c om*/ oprot.writeStructBegin(STRUCT_DESC); if (this.supervisors != null) { oprot.writeFieldBegin(SUPERVISORS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.supervisors.size())); for (SupervisorSummary _iter43 : this.supervisors) { _iter43.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(NIMBUS_UPTIME_SECS_FIELD_DESC); oprot.writeI32(this.nimbus_uptime_secs); oprot.writeFieldEnd(); if (this.topologies != null) { oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.topologies.size())); for (TopologySummary _iter44 : this.topologies) { _iter44.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.ComponentCommon.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();/* w ww .j av a 2s . com*/ oprot.writeStructBegin(STRUCT_DESC); if (this.inputs != null) { oprot.writeFieldBegin(INPUTS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, this.inputs.size())); for (Map.Entry<GlobalStreamId, Grouping> _iter20 : this.inputs.entrySet()) { _iter20.getKey().write(oprot); _iter20.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (this.streams != null) { oprot.writeFieldBegin(STREAMS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.streams.size())); for (Map.Entry<String, StreamInfo> _iter21 : this.streams.entrySet()) { oprot.writeString(_iter21.getKey()); _iter21.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (is_set_parallelism_hint()) { oprot.writeFieldBegin(PARALLELISM_HINT_FIELD_DESC); oprot.writeI32(this.parallelism_hint); oprot.writeFieldEnd(); } if (this.json_conf != null) { if (is_set_json_conf()) { oprot.writeFieldBegin(JSON_CONF_FIELD_DESC); oprot.writeString(this.json_conf); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.ErrorInfo.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();//w w w.j a v a 2 s.com oprot.writeStructBegin(STRUCT_DESC); if (this.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); oprot.writeString(this.error); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ERROR_TIME_SECS_FIELD_DESC); oprot.writeI32(this.error_time_secs); oprot.writeFieldEnd(); if (this.host != null) { if (is_set_host()) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(this.host); oprot.writeFieldEnd(); } } if (is_set_port()) { oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(this.port); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.ExecutorInfo.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();/*from w w w . j a va 2 s . co m*/ oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(TASK_START_FIELD_DESC); oprot.writeI32(this.task_start); oprot.writeFieldEnd(); oprot.writeFieldBegin(TASK_END_FIELD_DESC); oprot.writeI32(this.task_end); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.ExecutorSummary.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();//from w w w . j ava 2 s. c o m oprot.writeStructBegin(STRUCT_DESC); if (this.executor_info != null) { oprot.writeFieldBegin(EXECUTOR_INFO_FIELD_DESC); this.executor_info.write(oprot); oprot.writeFieldEnd(); } if (this.component_id != null) { oprot.writeFieldBegin(COMPONENT_ID_FIELD_DESC); oprot.writeString(this.component_id); oprot.writeFieldEnd(); } if (this.host != null) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(this.host); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(this.port); oprot.writeFieldEnd(); oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC); oprot.writeI32(this.uptime_secs); oprot.writeFieldEnd(); if (this.stats != null) { if (is_set_stats()) { oprot.writeFieldBegin(STATS_FIELD_DESC); this.stats.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.JavaObjectArg.java
License:Apache License
@Override protected void writeValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case INT_ARG: Integer int_arg = (Integer) value_; oprot.writeI32(int_arg); return;/*from w w w .j a v a 2 s. c o m*/ case LONG_ARG: Long long_arg = (Long) value_; oprot.writeI64(long_arg); return; case STRING_ARG: String string_arg = (String) value_; oprot.writeString(string_arg); return; case BOOL_ARG: Boolean bool_arg = (Boolean) value_; oprot.writeBool(bool_arg); return; case BINARY_ARG: ByteBuffer binary_arg = (ByteBuffer) value_; oprot.writeBinary(binary_arg); return; case DOUBLE_ARG: Double double_arg = (Double) value_; oprot.writeDouble(double_arg); return; default: throw new IllegalStateException("Cannot write union with unknown field " + setField_); } }
From source file:backtype.storm.generated.KillOptions.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();// ww w . j a v a 2s .c o m oprot.writeStructBegin(STRUCT_DESC); if (is_set_wait_secs()) { oprot.writeFieldBegin(WAIT_SECS_FIELD_DESC); oprot.writeI32(this.wait_secs); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.RebalanceOptions.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();//from w ww .j ava 2 s .c o m oprot.writeStructBegin(STRUCT_DESC); if (is_set_wait_secs()) { oprot.writeFieldBegin(WAIT_SECS_FIELD_DESC); oprot.writeI32(this.wait_secs); oprot.writeFieldEnd(); } if (is_set_num_workers()) { oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC); oprot.writeI32(this.num_workers); oprot.writeFieldEnd(); } if (this.num_executors != null) { if (is_set_num_executors()) { oprot.writeFieldBegin(NUM_EXECUTORS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, this.num_executors.size())); for (Map.Entry<String, Integer> _iter162 : this.num_executors.entrySet()) { oprot.writeString(_iter162.getKey()); oprot.writeI32(_iter162.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.SubmitOptions.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();// ww w . ja va 2s .com oprot.writeStructBegin(STRUCT_DESC); if (this.initial_status != null) { oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC); oprot.writeI32(this.initial_status.getValue()); oprot.writeFieldEnd(); } if (this.creds != null) { if (is_set_creds()) { oprot.writeFieldBegin(CREDS_FIELD_DESC); this.creds.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
From source file:backtype.storm.generated.SupervisorSummary.java
License:Apache License
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate();/*from w ww . jav a 2 s . c o m*/ oprot.writeStructBegin(STRUCT_DESC); if (this.host != null) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(this.host); oprot.writeFieldEnd(); } oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC); oprot.writeI32(this.uptime_secs); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC); oprot.writeI32(this.num_workers); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_USED_WORKERS_FIELD_DESC); oprot.writeI32(this.num_used_workers); oprot.writeFieldEnd(); if (this.supervisor_id != null) { oprot.writeFieldBegin(SUPERVISOR_ID_FIELD_DESC); oprot.writeString(this.supervisor_id); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }