diff --git a/README.md b/README.md
index 3bef27a04..b17f985eb 100644
Binary files a/README.md and b/README.md differ
diff --git a/history.md b/history.md
index 3210b402a..830b2b49c 100644
--- a/history.md
+++ b/history.md
@@ -1,4 +1,18 @@
-[JStorm 0.9.0 ](http://wenku.baidu.com/view/59e81017dd36a32d7375818b.html)
+[JStorm 0.9.0 介绍](http://wenku.baidu.com/view/59e81017dd36a32d7375818b.html)
+
+#Release 0.9.6
+1. Update UI
+ - Display the metrics information of task and worker
+ - Add warning flag when errors occur for a topology
+ - Add link from supervisor page to task page
+2. Send metrics data to Alimonitor
+3. Add metrics interface for user
+4. Add task.cleanup.timeout.sec setting to let task gently cleanup
+5. Set the worker's log name as topologyName-worker-port.log
+6. Add setting "worker.redirect.output.file", so worker can redirect System.out/System.err to one setting file
+7. Add storm list command
+8. Add closing channel check in netty client to avoid double close
+9. Add connecting check in netty client to avoid connecting one server twice at one time
#Release 0.9.5.1
1. Add netty sync mode
diff --git a/jstorm-client-extension/pom.xml b/jstorm-client-extension/pom.xml
index fa3fab4c7..72de9ef71 100644
--- a/jstorm-client-extension/pom.xml
+++ b/jstorm-client-extension/pom.xml
@@ -4,18 +4,18 @@
com.alibaba.jstorm
jstorm-all
- 0.9.5.1
+ 0.9.6
..
-
+
+ -->
4.0.0
com.alibaba.jstorm
jstorm-client-extension
- 0.9.5.1
+ 0.9.6
jar
${project.artifactId}-${project.version}
@@ -88,6 +88,16 @@
org.slf4j
slf4j-log4j12
1.7.5
+
+
+ com.codahale.metrics
+ metrics-core
+ 3.0.1
+
+
+ com.codahale.metrics
+ metrics-jvm
+ 3.0.1
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/ConfigExtension.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/ConfigExtension.java
index 15307b541..eb5bd797d 100644
--- a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/ConfigExtension.java
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/ConfigExtension.java
@@ -73,6 +73,16 @@ public static boolean getWorkerRedirectOutput(Map conf) {
return true;
return (Boolean) result;
}
+
+ protected static final String WOREKER_REDIRECT_OUTPUT_FILE = "worker.redirect.output.file";
+
+ public static void setWorkerRedirectOutputFile(Map conf, String outputPath) {
+ conf.put(WOREKER_REDIRECT_OUTPUT_FILE, outputPath);
+ }
+
+ public static String getWorkerRedirectOutputFile(Map conf) {
+ return (String)conf.get(WOREKER_REDIRECT_OUTPUT_FILE);
+ }
/**
* Usually, spout finish prepare before bolt, so spout need wait several
@@ -385,4 +395,26 @@ public static boolean isNettyASyncBlock(Map conf) {
public static void setNettyASyncBlock(Map conf, boolean block) {
conf.put(NETTY_ASYNC_BLOCK, block);
}
+
+ protected static String ALIMONITOR_METRICS_POST = "topology.alimonitor.metrics.post";
+
+ public static boolean isAlimonitorMetricsPost(Map conf) {
+ return JStormUtils.parseBoolean(conf.get(ALIMONITOR_METRICS_POST), true);
+ }
+
+ public static void setAlimonitorMetricsPost(Map conf, boolean post) {
+ conf.put(ALIMONITOR_METRICS_POST, post);
+ }
+
+ protected static String TASK_CLEANUP_TIMEOUT_SEC = "task.cleanup.timeout.sec";
+
+ public static int getTaskCleanupTimeoutSec(Map conf) {
+ return JStormUtils.parseInt(conf.get(TASK_CLEANUP_TIMEOUT_SEC), 10);
+ }
+
+ public static void setTaskCleanupTimeoutSec(Map conf, int timeout) {
+ conf.put(TASK_CLEANUP_TIMEOUT_SEC, timeout);
+ }
+
+
}
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/metric/MetricCallback.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/metric/MetricCallback.java
new file mode 100644
index 000000000..964913ef8
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/metric/MetricCallback.java
@@ -0,0 +1,7 @@
+package com.alibaba.jstorm.client.metric;
+
+import com.codahale.metrics.Metric;
+
+public interface MetricCallback {
+ void callback(T metric);
+}
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/metric/MetricClient.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/metric/MetricClient.java
new file mode 100644
index 000000000..becc36510
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/client/metric/MetricClient.java
@@ -0,0 +1,66 @@
+package com.alibaba.jstorm.client.metric;
+
+import backtype.storm.task.TopologyContext;
+
+import com.alibaba.jstorm.metric.Metrics;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.Meter;
+import com.codahale.metrics.Timer;
+import com.alibaba.jstorm.metric.JStormTimer;
+import com.alibaba.jstorm.metric.JStormHistogram;
+
+public class MetricClient {
+
+ private final int taskid;
+
+ public MetricClient(TopologyContext context) {
+ taskid = context.getThisTaskId();
+ }
+
+ private String getMetricName(Integer taskid, String name) {
+ return "task-" + String.valueOf(taskid) + ":" + name;
+ }
+
+ public Gauge> registerGauge(String name, Gauge> gauge, MetricCallback> callback) {
+ String userMetricName = getMetricName(taskid, name);
+ Gauge> ret = Metrics.registerGauge(userMetricName, gauge);
+ Metrics.registerUserDefine(userMetricName, gauge, callback);
+ return ret;
+ }
+
+ public Counter registerCounter(String name, MetricCallback callback) {
+ String userMetricName = getMetricName(taskid, name);
+ Counter ret = Metrics.registerCounter(userMetricName);
+ Metrics.registerUserDefine(userMetricName, ret, callback);
+ return ret;
+ }
+
+ public Meter registerMeter(String name, MetricCallback callback) {
+ String userMetricName = getMetricName(taskid, name);
+ Meter ret = Metrics.registerMeter(userMetricName);
+ Metrics.registerUserDefine(userMetricName, ret, callback);
+ return ret;
+ }
+
+ public JStormTimer registerTimer(String name, MetricCallback callback) {
+ String userMetricName = getMetricName(taskid, name);
+ JStormTimer ret = Metrics.registerTimer(userMetricName);
+ Metrics.registerUserDefine(userMetricName, ret, callback);
+ return ret;
+ }
+
+ public JStormHistogram registerHistogram(String name, MetricCallback callback) {
+ String userMetricName = getMetricName(taskid, name);
+ JStormHistogram ret = Metrics.registerHistograms(userMetricName);
+ Metrics.registerUserDefine(userMetricName, ret, callback);
+ return ret;
+ }
+
+ public boolean unregister(String name, Integer taskid) {
+ String userMetricName = getMetricName(taskid, name);
+ return Metrics.unregisterUserDefine(userMetricName);
+ }
+
+}
diff --git a/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/JStormHistogram.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/JStormHistogram.java
similarity index 86%
rename from jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/JStormHistogram.java
rename to jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/JStormHistogram.java
index d4cbb8d4c..863deaa5c 100644
--- a/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/JStormHistogram.java
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/JStormHistogram.java
@@ -1,35 +1,39 @@
-package com.alibaba.jstorm.daemon.worker.metrics;
-
-import com.codahale.metrics.Histogram;
-
-public class JStormHistogram {
- private static boolean isEnable = true;
-
- public static boolean isEnable() {
- return isEnable;
- }
-
- public static void setEnable(boolean isEnable) {
- JStormHistogram.isEnable = isEnable;
- }
-
- private Histogram instance;
- private String name;
-
- public JStormHistogram(String name, Histogram instance) {
- this.name = name;
- this.instance = instance;
- }
-
- public void update(int value) {
- if (isEnable == true) {
- instance.update(value);
- }
- }
-
- public void update(long value) {
- if (isEnable == true) {
- instance.update(value);
- }
- }
-}
+package com.alibaba.jstorm.metric;
+
+import com.codahale.metrics.Histogram;
+
+public class JStormHistogram {
+ private static boolean isEnable = true;
+
+ public static boolean isEnable() {
+ return isEnable;
+ }
+
+ public static void setEnable(boolean isEnable) {
+ JStormHistogram.isEnable = isEnable;
+ }
+
+ private Histogram instance;
+ private String name;
+
+ public JStormHistogram(String name, Histogram instance) {
+ this.name = name;
+ this.instance = instance;
+ }
+
+ public void update(int value) {
+ if (isEnable == true) {
+ instance.update(value);
+ }
+ }
+
+ public void update(long value) {
+ if (isEnable == true) {
+ instance.update(value);
+ }
+ }
+
+ public Histogram getInstance() {
+ return instance;
+ }
+}
diff --git a/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/JStormTimer.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/JStormTimer.java
similarity index 91%
rename from jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/JStormTimer.java
rename to jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/JStormTimer.java
index 25f23856a..2927b9d7a 100644
--- a/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/JStormTimer.java
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/JStormTimer.java
@@ -1,64 +1,64 @@
-package com.alibaba.jstorm.daemon.worker.metrics;
-
-
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.log4j.Logger;
-
-import com.codahale.metrics.Timer;
-
-public class JStormTimer {
- private static final Logger LOG = Logger.getLogger(JStormTimer.class);
- private static boolean isEnable = true;
-
- public static boolean isEnable() {
- return isEnable;
- }
-
- public static void setEnable(boolean isEnable) {
- JStormTimer.isEnable = isEnable;
- }
-
-
- private Timer instance;
- private String name;
- public JStormTimer(String name, Timer instance) {
- this.name = name;
- this.instance = instance;
- this.timerContext = new AtomicReference();
- }
-
- /**
- * This logic isn't perfect, it will miss metrics when it is called
- * in the same time. But this method performance is better than
- * create a new instance wrapper Timer.Context
- */
- private AtomicReference timerContext = null;
- public void start() {
- if (JStormTimer.isEnable == false) {
- return ;
- }
-
- if (timerContext.get() != null) {
- LOG.warn("Already start timer " + name);
- return ;
- }
-
-
- timerContext.set(instance.time());
-
- }
-
- public void stop() {
- Timer.Context context = timerContext.getAndSet(null);
- if (context != null) {
- context.stop();
- }
- }
-
- public Timer getInstance() {
- return instance;
- }
-
-
-}
+package com.alibaba.jstorm.metric;
+
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.log4j.Logger;
+
+import com.codahale.metrics.Timer;
+
+public class JStormTimer {
+ private static final Logger LOG = Logger.getLogger(JStormTimer.class);
+ private static boolean isEnable = true;
+
+ public static boolean isEnable() {
+ return isEnable;
+ }
+
+ public static void setEnable(boolean isEnable) {
+ JStormTimer.isEnable = isEnable;
+ }
+
+
+ private Timer instance;
+ private String name;
+ public JStormTimer(String name, Timer instance) {
+ this.name = name;
+ this.instance = instance;
+ this.timerContext = new AtomicReference();
+ }
+
+ /**
+ * This logic isn't perfect, it will miss metrics when it is called
+ * in the same time. But this method performance is better than
+ * create a new instance wrapper Timer.Context
+ */
+ private AtomicReference timerContext = null;
+ public void start() {
+ if (JStormTimer.isEnable == false) {
+ return ;
+ }
+
+ if (timerContext.get() != null) {
+ LOG.warn("Already start timer " + name);
+ return ;
+ }
+
+
+ timerContext.set(instance.time());
+
+ }
+
+ public void stop() {
+ Timer.Context context = timerContext.getAndSet(null);
+ if (context != null) {
+ context.stop();
+ }
+ }
+
+ public Timer getInstance() {
+ return instance;
+ }
+
+
+}
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricDef.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricDef.java
new file mode 100644
index 000000000..a28c9719d
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricDef.java
@@ -0,0 +1,43 @@
+package com.alibaba.jstorm.metric;
+
+public class MetricDef {
+ // metric name for task
+ public static final String DESERIALIZE_QUEUE = "Deserialize_Queue";
+ public static final String DESERIALIZE_TIME = "Deserialize_Time";
+ public static final String SERIALIZE_QUEUE = "Serialize_Queue";
+ public static final String SERIALIZE_TIME = "Serialize_Time";
+ public static final String EXECUTE_QUEUE = "Executor_Queue";
+ public static final String EXECUTE_TIME = "Execute_Time";
+ public static final String ACKER_TIME = "Acker_Time";
+ public static final String EMPTY_CPU_RATIO = "Empty_Cpu_Ratio";
+ public static final String PENDING_MAP = "Pending_Num";
+ public static final String EMIT_TIME = "Emit_Time";
+
+ // metric name for worker
+ public static final String NETWORK_MSG_TRANS_TIME = "Network_Transmit_Time";
+ public static final String NETTY_SERV_DECODE_TIME = "Netty_Server_Decode_Time";
+ public static final String DISPATCH_TIME = "Virtual_Port_Dispatch_Time";
+ public static final String DISPATCH_QUEUE = "Virtual_Port_Dispatch_Queue";
+ public static final String BATCH_TUPLE_TIME = "Batch_Tuple_Time";
+ public static final String BATCH_TUPLE_QUEUE = "Batch_Tuple_Queue";
+ public static final String DRAINER_TIME = "Drainer_Time";
+ public static final String DRAINER_QUEUE = "Drainer_Queue";
+ public static final String NETTY_CLI_SEND_TIME = "Netty_Client_Send_Time";
+ public static final String NETTY_CLI_BATCH_SIZE = "Netty_Client_Send_Batch_Size";
+ public static final String NETTY_CLI_SEND_PENDING = "Netty_Client_Send_Pendings";
+ public static final String NETTY_CLI_SYNC_BATCH_QUEUE = "Netty_Client_Sync_BatchQueue";
+ public static final String NETTY_CLI_SYNC_DISR_QUEUE = "Netty_Client_Sync_DisrQueue";
+
+ public static final String ZMQ_SEND_TIME = "ZMQ_Send_Time";
+ public static final String ZMQ_SEND_MSG_SIZE = "ZMQ_Send_MSG_Size";
+
+ public static final String CPU_USED_RATIO = "Used_Cpu";
+ public static final String MEMORY_USED = "Used_Memory";
+
+ public static final String REMOTE_CLI_ADDR = "Remote_Client_Address";
+ public static final String REMOTE_SERV_ADDR = "Remote_Server_Address";
+
+ // monitor name in Alimonitor
+ public static final String TASK_MONITOR_NAME = "jstorm_task_metrics";
+ public static final String WORKER_MONITOR_NAME = "jstorm_worker_metrics";
+}
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricInfo.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricInfo.java
new file mode 100644
index 000000000..09a2a107a
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricInfo.java
@@ -0,0 +1,27 @@
+package com.alibaba.jstorm.metric;
+
+import com.codahale.metrics.Metric;
+
+public class MetricInfo {
+ private Metric metric;
+ private String prefix;
+ private String name;
+
+ public MetricInfo(String prefix, String name, Metric metric) {
+ this.prefix = prefix;
+ this.name = name;
+ this.metric = metric;
+ }
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Metric getMetric() {
+ return metric;
+ }
+}
\ No newline at end of file
diff --git a/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/MetricJstack.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricJstack.java
similarity index 95%
rename from jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/MetricJstack.java
rename to jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricJstack.java
index 1a169aca6..c60525a5f 100644
--- a/jstorm-server/src/main/java/com/alibaba/jstorm/daemon/worker/metrics/MetricJstack.java
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/MetricJstack.java
@@ -1,123 +1,123 @@
-package com.alibaba.jstorm.daemon.worker.metrics;
-
-import java.lang.management.ManagementFactory;
-import java.lang.management.ThreadInfo;
-import java.lang.management.ThreadMXBean;
-
-import com.codahale.metrics.Gauge;
-
-public class MetricJstack implements Gauge {
-
- private String getTaskName(long id, String name) {
- if (name == null) {
- return Long.toString(id);
- }
- return id + " (" + name + ")";
- }
-
- public String dumpThread() throws Exception {
- StringBuilder writer = new StringBuilder();
-
- ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
-
- boolean contention = threadMXBean.isThreadContentionMonitoringEnabled();
-
- long[] threadIds = threadMXBean.getAllThreadIds();
- writer.append(threadIds.length + " active threads:");
- for (long tid : threadIds) {
- writer.append(tid).append(" ");
- }
- writer.append("\n");
-
- long[] deadLockTids = threadMXBean.findDeadlockedThreads();
- if (deadLockTids != null) {
- writer.append(threadIds.length + " deadlocked threads:");
- for (long tid : deadLockTids) {
- writer.append(tid).append(" ");
- }
- writer.append("\n");
- }
-
- long[] deadLockMonitorTids = threadMXBean
- .findMonitorDeadlockedThreads();
- if (deadLockMonitorTids != null) {
- writer.append(threadIds.length + " deadlocked monitor threads:");
- for (long tid : deadLockMonitorTids) {
- writer.append(tid).append(" ");
- }
- writer.append("\n");
- }
-
- for (long tid : threadIds) {
- ThreadInfo info = threadMXBean
- .getThreadInfo(tid, Integer.MAX_VALUE);
- if (info == null) {
- writer.append(" Inactive").append("\n");
- continue;
- }
- writer.append(
- "Thread "
- + getTaskName(info.getThreadId(),
- info.getThreadName()) + ":").append("\n");
- Thread.State state = info.getThreadState();
- writer.append(" State: " + state).append("\n");
- writer.append(" Blocked count: " + info.getBlockedCount()).append(
- "\n");
- writer.append(" Waited count: " + info.getWaitedCount()).append(
- "\n");
- writer.append(" Cpu time:")
- .append(threadMXBean.getThreadCpuTime(tid) / 1000000)
- .append("ms").append("\n");
- writer.append(" User time:")
- .append(threadMXBean.getThreadUserTime(tid) / 1000000)
- .append("ms").append("\n");
- if (contention) {
- writer.append(" Blocked time: " + info.getBlockedTime())
- .append("\n");
- writer.append(" Waited time: " + info.getWaitedTime()).append(
- "\n");
- }
- if (state == Thread.State.WAITING) {
- writer.append(" Waiting on " + info.getLockName())
- .append("\n");
- } else if (state == Thread.State.BLOCKED) {
- writer.append(" Blocked on " + info.getLockName())
- .append("\n");
- writer.append(
- " Blocked by "
- + getTaskName(info.getLockOwnerId(),
- info.getLockOwnerName())).append("\n");
- }
-
- }
- for (long tid : threadIds) {
- ThreadInfo info = threadMXBean
- .getThreadInfo(tid, Integer.MAX_VALUE);
- if (info == null) {
- writer.append(" Inactive").append("\n");
- continue;
- }
-
- writer.append(
- "Thread "
- + getTaskName(info.getThreadId(),
- info.getThreadName()) + ": Stack").append(
- "\n");
- for (StackTraceElement frame : info.getStackTrace()) {
- writer.append(" " + frame.toString()).append("\n");
- }
- }
-
- return writer.toString();
- }
-
- @Override
- public String getValue() {
- try {
- return dumpThread();
- } catch (Exception e) {
- return "Failed to get jstack thread info";
- }
- }
-
-}
+package com.alibaba.jstorm.metric;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+
+import com.codahale.metrics.Gauge;
+
+public class MetricJstack implements Gauge {
+
+ private String getTaskName(long id, String name) {
+ if (name == null) {
+ return Long.toString(id);
+ }
+ return id + " (" + name + ")";
+ }
+
+ public String dumpThread() throws Exception {
+ StringBuilder writer = new StringBuilder();
+
+ ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
+
+ boolean contention = threadMXBean.isThreadContentionMonitoringEnabled();
+
+ long[] threadIds = threadMXBean.getAllThreadIds();
+ writer.append(threadIds.length + " active threads:");
+ for (long tid : threadIds) {
+ writer.append(tid).append(" ");
+ }
+ writer.append("\n");
+
+ long[] deadLockTids = threadMXBean.findDeadlockedThreads();
+ if (deadLockTids != null) {
+ writer.append(threadIds.length + " deadlocked threads:");
+ for (long tid : deadLockTids) {
+ writer.append(tid).append(" ");
+ }
+ writer.append("\n");
+ }
+
+ long[] deadLockMonitorTids = threadMXBean
+ .findMonitorDeadlockedThreads();
+ if (deadLockMonitorTids != null) {
+ writer.append(threadIds.length + " deadlocked monitor threads:");
+ for (long tid : deadLockMonitorTids) {
+ writer.append(tid).append(" ");
+ }
+ writer.append("\n");
+ }
+
+ for (long tid : threadIds) {
+ ThreadInfo info = threadMXBean
+ .getThreadInfo(tid, Integer.MAX_VALUE);
+ if (info == null) {
+ writer.append(" Inactive").append("\n");
+ continue;
+ }
+ writer.append(
+ "Thread "
+ + getTaskName(info.getThreadId(),
+ info.getThreadName()) + ":").append("\n");
+ Thread.State state = info.getThreadState();
+ writer.append(" State: " + state).append("\n");
+ writer.append(" Blocked count: " + info.getBlockedCount()).append(
+ "\n");
+ writer.append(" Waited count: " + info.getWaitedCount()).append(
+ "\n");
+ writer.append(" Cpu time:")
+ .append(threadMXBean.getThreadCpuTime(tid) / 1000000)
+ .append("ms").append("\n");
+ writer.append(" User time:")
+ .append(threadMXBean.getThreadUserTime(tid) / 1000000)
+ .append("ms").append("\n");
+ if (contention) {
+ writer.append(" Blocked time: " + info.getBlockedTime())
+ .append("\n");
+ writer.append(" Waited time: " + info.getWaitedTime()).append(
+ "\n");
+ }
+ if (state == Thread.State.WAITING) {
+ writer.append(" Waiting on " + info.getLockName())
+ .append("\n");
+ } else if (state == Thread.State.BLOCKED) {
+ writer.append(" Blocked on " + info.getLockName())
+ .append("\n");
+ writer.append(
+ " Blocked by "
+ + getTaskName(info.getLockOwnerId(),
+ info.getLockOwnerName())).append("\n");
+ }
+
+ }
+ for (long tid : threadIds) {
+ ThreadInfo info = threadMXBean
+ .getThreadInfo(tid, Integer.MAX_VALUE);
+ if (info == null) {
+ writer.append(" Inactive").append("\n");
+ continue;
+ }
+
+ writer.append(
+ "Thread "
+ + getTaskName(info.getThreadId(),
+ info.getThreadName()) + ": Stack").append(
+ "\n");
+ for (StackTraceElement frame : info.getStackTrace()) {
+ writer.append(" " + frame.toString()).append("\n");
+ }
+ }
+
+ return writer.toString();
+ }
+
+ @Override
+ public String getValue() {
+ try {
+ return dumpThread();
+ } catch (Exception e) {
+ return "Failed to get jstack thread info";
+ }
+ }
+
+}
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/Metrics.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/Metrics.java
new file mode 100644
index 000000000..3e50c0ad4
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/Metrics.java
@@ -0,0 +1,330 @@
+package com.alibaba.jstorm.metric;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.log4j.Logger;
+
+import backtype.storm.utils.DisruptorQueue;
+
+import com.alibaba.jstorm.client.metric.MetricCallback;
+//import com.alibaba.jstorm.daemon.worker.Worker;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.Meter;
+import com.codahale.metrics.Metric;
+import com.codahale.metrics.MetricRegistry;
+import com.codahale.metrics.MetricSet;
+import com.codahale.metrics.Snapshot;
+import com.codahale.metrics.Timer;
+import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
+import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
+import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
+
+public class Metrics {
+
+ public enum MetricType {
+ TASK, WORKER
+ }
+
+ private static final Logger LOG = Logger.getLogger(Metrics.class);
+ //private static final Logger DEFAULT_LOG = Logger.getLogger(Worker.class);
+
+ private static final MetricRegistry metrics = new MetricRegistry();
+
+ private static final MetricRegistry jstack = new MetricRegistry();
+
+ private static Map> taskMetricMap = new ConcurrentHashMap>();
+ private static List workerMetricList = new ArrayList();
+ private static UserDefMetric userDefMetric = new UserDefMetric();
+
+ static {
+ try {
+ registerAll("jvm-thread-state", new ThreadStatesGaugeSet());
+ registerAll("jvm-mem", new MemoryUsageGaugeSet());
+ registerAll("jvm-gc", new GarbageCollectorMetricSet());
+
+ jstack.register("jstack", new MetricJstack());
+ } catch (Exception e) {
+ LOG.warn("Failed to regist jvm metrics");
+ }
+ }
+
+ public static MetricRegistry getMetrics() {
+ return metrics;
+ }
+
+ public static MetricRegistry getJstack() {
+ return jstack;
+ }
+
+ public static UserDefMetric getUserDefMetric() {
+ return userDefMetric;
+ }
+
+ public static boolean unregister(String name) {
+ LOG.info("Unregister metric " + name);
+ return metrics.remove(name);
+ }
+
+ public static boolean unregister(String prefix, String name, String id, Metrics.MetricType type) {
+ String MetricName;
+ if (prefix == null)
+ MetricName = name;
+ else
+ MetricName = prefix + "-" + name;
+ boolean ret = unregister(MetricName);
+
+ if (ret == true) {
+ List metricList = null;
+ if (type == MetricType.WORKER) {
+ metricList = workerMetricList;
+ } else {
+ metricList = taskMetricMap.get(id);
+ }
+
+ boolean found = false;
+ if (metricList != null) {
+ for (MetricInfo metric : metricList) {
+ if(metric.getName().equals(name)) {
+ if (prefix != null) {
+ if (metric.getPrefix().equals(prefix)) {
+ metricList.remove(metric);
+ found = true;
+ break;
+ }
+ } else {
+ if (metric.getPrefix() == null) {
+ metricList.remove(metric);
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (found != true)
+ LOG.warn("Name " + name + " is not found when unregister from metricList");
+ }
+ return ret;
+ }
+
+ public static boolean unregisterUserDefine(String name) {
+ boolean ret = unregister(name);
+
+ if (ret == true) {
+ userDefMetric.remove(name);
+ userDefMetric.unregisterCallback(name);
+ }
+
+ return ret;
+ }
+
+ public static T register(String name, T metric)
+ throws IllegalArgumentException {
+ LOG.info("Register Metric " + name);
+ return metrics.register(name, metric);
+ }
+
+ public static T register(String prefix, String name, T metric,
+ String idStr, MetricType metricType) throws IllegalArgumentException {
+ String metricName;
+ if (prefix == null)
+ metricName = name;
+ else
+ metricName = prefix + "-" + name;
+ T ret = register(metricName, metric);
+ updateMetric(prefix, name, metricType, ret, idStr);
+ return ret;
+ }
+
+ public static void registerUserDefine(String name, Object metric, MetricCallback callback) {
+ if(metric instanceof Gauge>) {
+ userDefMetric.addToGauge(name, (Gauge>)metric);
+ } else if (metric instanceof Timer) {
+ userDefMetric.addToTimer(name, (Timer)metric);
+ } else if (metric instanceof Counter) {
+ userDefMetric.addToCounter(name, (Counter)metric);
+ } else if (metric instanceof Meter) {
+ userDefMetric.addToMeter(name, (Meter)metric);
+ } else if (metric instanceof Histogram) {
+ userDefMetric.addToHistogram(name, (Histogram)metric);
+ } else if (metric instanceof JStormTimer) {
+ userDefMetric.addToTimer(name, ((JStormTimer)metric).getInstance());
+ } else if (metric instanceof JStormHistogram) {
+ userDefMetric.addToHistogram(name, ((JStormHistogram)metric).getInstance());
+ } else {
+ LOG.warn("registerUserDefine, unknow Metric type, name=" + name);
+ }
+
+ if (callback != null) {
+ userDefMetric.registerCallback(callback, name);
+ }
+ }
+
+
+ // copy from MetricRegistry
+ public static void registerAll(String prefix, MetricSet metrics)
+ throws IllegalArgumentException {
+ for (Map.Entry entry : metrics.getMetrics().entrySet()) {
+ if (entry.getValue() instanceof MetricSet) {
+ registerAll(MetricRegistry.name(prefix, entry.getKey()),
+ (MetricSet) entry.getValue());
+ } else {
+ register(MetricRegistry.name(prefix, entry.getKey()),
+ entry.getValue());
+ }
+ }
+ }
+
+ private static void updateMetric(String prefix, String name, MetricType metricType,
+ Metric metric, String idStr) {
+ Map> metricMap;
+ List metricList;
+ if (metricType == MetricType.TASK) {
+ metricMap = taskMetricMap;
+ metricList = metricMap.get(idStr);
+ if (null == metricList) {
+ metricList = new ArrayList();
+ metricMap.put(idStr, metricList);
+ }
+ } else if (metricType == MetricType.WORKER) {
+ metricList = workerMetricList;
+ } else {
+ LOG.error("updateMetricMap: unknown metric type");
+ return;
+ }
+
+ MetricInfo metricInfo = new MetricInfo(prefix, name, metric);
+ metricList.add(metricInfo);
+
+ }
+
+ public static Map> getTaskMetricMap() {
+ return taskMetricMap;
+ }
+
+ public static List getWorkerMetricList() {
+ return workerMetricList;
+ }
+
+ public static class QueueGauge implements Gauge {
+ DisruptorQueue queue;
+ String name;
+
+ public QueueGauge(String name, DisruptorQueue queue) {
+ this.queue = queue;
+ this.name = name;
+ }
+
+ @Override
+ public Float getValue() {
+ Float ret = queue.pctFull();
+ if (ret > 0.8) {
+ //DEFAULT_LOG.info("Queue " + name + "is full " + ret);
+ }
+
+ return ret;
+ }
+
+ }
+
+ public static Gauge registerQueue(String name, DisruptorQueue queue) {
+ LOG.info("Register Metric " + name);
+ return metrics.register(name, new QueueGauge(name, queue));
+ }
+
+ public static Gauge registerQueue(String prefix, String name, DisruptorQueue queue,
+ String idStr, MetricType metricType) {
+ String metricName;
+ if (prefix == null)
+ metricName = name;
+ else
+ metricName = prefix + "-" + name;
+ Gauge ret = registerQueue(metricName, queue);
+ updateMetric(prefix, name, metricType, ret, idStr);
+ return ret;
+ }
+
+ public static Gauge> registerGauge(String name, Gauge> gauge) {
+ LOG.info("Register Metric " + name);
+ return metrics.register(name, gauge);
+ }
+
+ public static Counter registerCounter(String name) {
+ LOG.info("Register Metric " + name);
+ return metrics.counter(name);
+ }
+
+ public static Counter registerCounter(String prefix, String name,
+ String idStr, MetricType metricType) {
+ String metricName;
+ if (prefix == null)
+ metricName = name;
+ else
+ metricName = prefix + "-" + name;
+ Counter ret = registerCounter(metricName);
+ updateMetric(prefix, name, metricType, ret, idStr);
+ return ret;
+ }
+
+ public static Meter registerMeter(String name) {
+ LOG.info("Register Metric " + name);
+ return metrics.meter(name);
+ }
+
+ public static Meter registerMeter(String prefix, String name,
+ String idStr, MetricType metricType) {
+ String metricName;
+ if (prefix == null)
+ metricName = name;
+ else
+ metricName = prefix + "-" + name;
+ Meter ret = registerMeter(metricName);
+ updateMetric(prefix, name, metricType, ret, idStr);
+ return ret;
+ }
+
+ public static JStormHistogram registerHistograms(String name) {
+ LOG.info("Register Metric " + name);
+ Histogram instance = metrics.histogram(name);
+
+ return new JStormHistogram(name, instance);
+ }
+
+ public static JStormHistogram registerHistograms(String prefix, String name,
+ String idStr, MetricType metricType) {
+ String metricName;
+ if (prefix == null)
+ metricName = name;
+ else
+ metricName = prefix + "-" + name;
+ JStormHistogram ret = registerHistograms(metricName);
+ updateMetric(prefix, name, metricType, ret.getInstance(), idStr);
+ return ret;
+ }
+
+ public static JStormTimer registerTimer(String name) {
+ LOG.info("Register Metric " + name);
+
+ Timer instance = metrics.timer(name);
+ return new JStormTimer(name, instance);
+ }
+
+ public static JStormTimer registerTimer(String prefix, String name,
+ String idStr, MetricType metricType) {
+ String metricName;
+ if (prefix == null)
+ metricName = name;
+ else
+ metricName = prefix + "-" + name;
+ JStormTimer ret = registerTimer(metricName);
+ updateMetric(prefix, name, metricType, ret.getInstance(), idStr);
+ return ret;
+ }
+
+}
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/UserDefMetric.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/UserDefMetric.java
new file mode 100644
index 000000000..5bc7c4d8e
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/UserDefMetric.java
@@ -0,0 +1,106 @@
+package com.alibaba.jstorm.metric;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Map.Entry;
+import java.io.Serializable;
+
+import com.codahale.metrics.Metric;
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.Sampling;
+import com.codahale.metrics.Snapshot;
+import com.codahale.metrics.Timer;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.Meter;
+import com.alibaba.jstorm.client.metric.MetricCallback;
+import com.alibaba.jstorm.metric.MetricInfo;
+
+
+/**
+ * /storm-zk-root/Monitor/{topologyid}/UserDefMetrics/{workerid} data
+ */
+public class UserDefMetric implements Serializable {
+
+ private static final long serialVersionUID = 4547327064057659279L;
+
+ private Map> gaugeMap = new HashMap>();
+ private Map counterMap = new HashMap();
+ private Map histogramMap = new HashMap();
+ private Map timerMap = new HashMap();
+ private Map meterMap = new HashMap();
+ private Map callbacks = new HashMap();
+
+ public UserDefMetric() {
+ }
+
+ public Map> getGauge() {
+ return this.gaugeMap;
+ }
+ public void registerCallback(MetricCallback callback, String name) {
+ if (callbacks.containsKey(name) != true) {
+ callbacks.put(name, callback);
+ }
+ }
+ public void unregisterCallback(String name) {
+ callbacks.remove(name);
+ }
+ public Map getCallbacks() {
+ return callbacks;
+ }
+ public void addToGauge(String name, Gauge> gauge) {
+ gaugeMap.put(name, gauge);
+ }
+
+ public Map getCounter() {
+ return this.counterMap;
+ }
+
+ public void addToCounter(String name, Counter counter) {
+ counterMap.put(name, counter);
+ }
+
+ public Map getHistogram() {
+ return this.histogramMap;
+ }
+
+ public void addToHistogram(String name, Histogram histogram) {
+ histogramMap.put(name, histogram);
+ }
+
+
+ public Map getTimer() {
+ return this.timerMap;
+ }
+
+ public void addToTimer(String name, Timer timer) {
+ timerMap.put(name, timer);
+ }
+
+ public Map getMeter() {
+ return this.meterMap;
+ }
+
+ public void addToMeter(String name, Meter meter) {
+ meterMap.put(name, meter);
+ }
+
+ public void remove(String name) {
+ if (gaugeMap.containsKey(name)) {
+ gaugeMap.remove(name);
+ } else if (counterMap.containsKey(name)) {
+ counterMap.remove(name);
+ } else if (histogramMap.containsKey(name)) {
+ histogramMap.remove(name);
+ } else if (timerMap.containsKey(name)) {
+ timerMap.remove(name);
+ } else if (meterMap.containsKey(name)) {
+ meterMap.remove(name);
+ }
+
+ if (callbacks.containsKey(name)) {
+ callbacks.remove(name);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/UserDefMetricData.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/UserDefMetricData.java
new file mode 100644
index 000000000..cab04e0d7
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/UserDefMetricData.java
@@ -0,0 +1,126 @@
+package com.alibaba.jstorm.metric;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Map.Entry;
+import java.io.Serializable;
+
+import com.codahale.metrics.Metric;
+import com.codahale.metrics.Gauge;
+import com.codahale.metrics.Sampling;
+import com.codahale.metrics.Snapshot;
+import com.codahale.metrics.Timer;
+import com.codahale.metrics.Counter;
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.Meter;
+import com.alibaba.jstorm.client.metric.MetricCallback;
+import com.alibaba.jstorm.metric.metrdata.*;
+
+
+/**
+ * /storm-zk-root/Monitor/{topologyid}/user/{workerid} data
+ */
+public class UserDefMetricData implements Serializable {
+
+ private static final long serialVersionUID = 954727168057659270L;
+
+ private Map gaugeDataMap = new HashMap();
+ private Map counterDataMap = new HashMap();
+ private Map timerDataMap = new HashMap();
+ private Map meterDataMap = new HashMap();
+ private Map histogramDataMap = new HashMap();
+
+ public UserDefMetricData() {
+ }
+
+ public Map getGaugeDataMap() {
+ return gaugeDataMap;
+ }
+
+ public Map getCounterDataMap() {
+ return counterDataMap;
+ }
+
+ public Map getTimerDataMap() {
+ return timerDataMap;
+ }
+
+ public Map getMeterDataMap() {
+ return meterDataMap;
+ }
+
+ public Map getHistogramDataMap() {
+ return histogramDataMap;
+ }
+
+ public void updateFromGauge(Map> gaugeMap) {
+ for(Entry> entry : gaugeMap.entrySet()) {
+ GaugeData gaugeData = new GaugeData();
+ gaugeData.setValue((Double)(entry.getValue().getValue()));
+ gaugeDataMap.put(entry.getKey(), gaugeData);
+ }
+ }
+
+ public void updateFromCounter(Map counterMap) {
+ for(Entry entry : counterMap.entrySet()) {
+ CounterData counterData = new CounterData();
+ counterData.setValue(entry.getValue().getCount());
+ counterDataMap.put(entry.getKey(), counterData);
+ }
+ }
+
+ public void updateFromMeterData(Map meterMap) {
+ for(Entry entry : meterMap.entrySet()) {
+ Meter meter = entry.getValue();
+ MeterData meterData = new MeterData();
+ meterData.setCount(meter.getCount());
+ meterData.setMeanRate(meter.getMeanRate());
+ meterData.setOneMinuteRate(meter.getOneMinuteRate());
+ meterData.setFiveMinuteRate(meter.getFiveMinuteRate());
+ meterData.setFifteenMinuteRate(meter.getFifteenMinuteRate());
+ meterDataMap.put(entry.getKey(), meterData);
+ }
+ }
+
+ public void updateFromHistogramData(Map histogramMap) {
+ for(Entry entry : histogramMap.entrySet()) {
+ Histogram histogram = entry.getValue();
+ HistogramData histogramData = new HistogramData();
+ histogramData.setCount(histogram.getCount());
+ histogramData.setMax(histogram.getSnapshot().getMax());
+ histogramData.setMin(histogram.getSnapshot().getMin());
+ histogramData.setMean(histogram.getSnapshot().getMean());
+ histogramData.setMedian(histogram.getSnapshot().getMedian());
+ histogramData.setStdDev(histogram.getSnapshot().getStdDev());
+ histogramData.setPercent75th(histogram.getSnapshot().get75thPercentile());
+ histogramData.setPercent95th(histogram.getSnapshot().get95thPercentile());
+ histogramData.setPercent98th(histogram.getSnapshot().get98thPercentile());
+ histogramData.setPercent99th(histogram.getSnapshot().get99thPercentile());
+ histogramData.setPercent999th(histogram.getSnapshot().get999thPercentile());
+ histogramDataMap.put(entry.getKey(), histogramData);
+ }
+ }
+
+ public void updateFromTimerData(Map timerMap) {
+ for(Entry entry : timerMap.entrySet()) {
+ Timer timer = entry.getValue();
+ TimerData timerData = new TimerData();
+ timerData.setCount(timer.getCount());
+ timerData.setMax(timer.getSnapshot().getMax());
+ timerData.setMin(timer.getSnapshot().getMin());
+ timerData.setMean(timer.getSnapshot().getMean());
+ timerData.setMedian(timer.getSnapshot().getMedian());
+ timerData.setStdDev(timer.getSnapshot().getStdDev());
+ timerData.setPercent75th(timer.getSnapshot().get75thPercentile());
+ timerData.setPercent95th(timer.getSnapshot().get95thPercentile());
+ timerData.setPercent98th(timer.getSnapshot().get98thPercentile());
+ timerData.setPercent99th(timer.getSnapshot().get99thPercentile());
+ timerData.setPercent999th(timer.getSnapshot().get999thPercentile());
+ timerData.setMeanRate(timer.getMeanRate());
+ timerData.setOneMinuteRate(timer.getOneMinuteRate());
+ timerData.setFiveMinuteRate(timer.getFiveMinuteRate());
+ timerData.setFifteenMinuteRate(timer.getFifteenMinuteRate());
+ timerDataMap.put(entry.getKey(), timerData);
+ }
+ }
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/CounterData.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/CounterData.java
new file mode 100644
index 000000000..727cb9da3
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/CounterData.java
@@ -0,0 +1,23 @@
+package com.alibaba.jstorm.metric.metrdata;
+
+import java.io.Serializable;
+
+
+public class CounterData implements Serializable {
+
+ private static final long serialVersionUID = 954627168057659219L;
+
+ private long value;
+
+ public CounterData () {
+ value = 0l;
+ }
+
+ public long getValue() {
+ return value;
+ }
+
+ public void setValue(long value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/GaugeData.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/GaugeData.java
new file mode 100644
index 000000000..9f64bf3db
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/GaugeData.java
@@ -0,0 +1,23 @@
+package com.alibaba.jstorm.metric.metrdata;
+
+import java.io.Serializable;
+
+
+public class GaugeData implements Serializable {
+
+ private static final long serialVersionUID = 954627168057659279L;
+
+ private double value;
+
+ public GaugeData () {
+ value = 0.0;
+ }
+
+ public double getValue() {
+ return value;
+ }
+
+ public void setValue(double value) {
+ this.value = value;
+ }
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/HistogramData.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/HistogramData.java
new file mode 100644
index 000000000..ec3985148
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/HistogramData.java
@@ -0,0 +1,112 @@
+package com.alibaba.jstorm.metric.metrdata;
+
+import java.io.Serializable;
+
+
+public class HistogramData implements Serializable {
+
+ private static final long serialVersionUID = 954627168057639289L;
+
+ private long count;
+ private long min;
+ private long max;
+ private double mean;
+ private double stdDev;
+ private double median;
+ private double percent75th;
+ private double percent95th;
+ private double percent98th;
+ private double percent99th;
+ private double percent999th;
+
+ public HistogramData() {
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+
+ public long getMin() {
+ return min;
+ }
+
+ public void setMin(long min) {
+ this.min = min;
+ }
+
+ public long getMax() {
+ return max;
+ }
+
+ public void setMax(long max) {
+ this.max = max;
+ }
+
+ public double getMean() {
+ return mean;
+ }
+
+ public void setMean(double mean) {
+ this.mean = mean;
+ }
+
+ public double getStdDev() {
+ return stdDev;
+ }
+
+ public void setStdDev(double stdDev) {
+ this.stdDev = stdDev;
+ }
+
+ public double getMedian() {
+ return median;
+ }
+
+ public void setMedian(double median) {
+ this.median = median;
+ }
+
+ public double getPercent75th() {
+ return percent75th;
+ }
+
+ public void setPercent75th(double percent75th) {
+ this.percent75th = percent75th;
+ }
+
+ public double getPercent95th() {
+ return percent95th;
+ }
+
+ public void setPercent95th(double percent95th) {
+ this.percent95th = percent95th;
+ }
+
+ public double getPercent98th() {
+ return percent98th;
+ }
+
+ public void setPercent98th(double percent98th) {
+ this.percent98th = percent98th;
+ }
+
+ public double getPercent99th() {
+ return percent99th;
+ }
+
+ public void setPercent99th(double percent99th) {
+ this.percent99th = percent99th;
+ }
+
+ public double getPercent999th() {
+ return percent999th;
+ }
+
+ public void setPercent999th(double percent999th) {
+ this.percent999th = percent999th;
+ }
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/MeterData.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/MeterData.java
new file mode 100644
index 000000000..865a3c418
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/MeterData.java
@@ -0,0 +1,58 @@
+package com.alibaba.jstorm.metric.metrdata;
+
+import java.io.Serializable;
+
+
+public class MeterData implements Serializable {
+
+ private static final long serialVersionUID = 954627168057659269L;
+
+ private long count;
+ private double meanRate;
+ private double oneMinuteRate;
+ private double fiveMinuteRate;
+ private double fifteenMinuteRate;
+
+ public MeterData() {
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+
+ public long getCount() {
+ return this.count;
+ }
+
+ public void setMeanRate(double meanRate) {
+ this.meanRate = meanRate;
+ }
+
+ public double getMeanRate() {
+ return this.meanRate;
+ }
+
+ public void setOneMinuteRate(double oneMinuteRate) {
+ this.oneMinuteRate = oneMinuteRate;
+ }
+
+ public double getOneMinuteRate() {
+ return this.oneMinuteRate;
+ }
+
+ public void setFiveMinuteRate(double fiveMinuteRate) {
+ this.fiveMinuteRate = fiveMinuteRate;
+ }
+
+ public double getFiveMinuteRate() {
+ return this.fiveMinuteRate;
+ }
+
+ public void setFifteenMinuteRate(double fifteenMinuteRate) {
+ this.fifteenMinuteRate = fifteenMinuteRate;
+ }
+
+ public double getFifteenMinuteRate() {
+ return this.fifteenMinuteRate;
+ }
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/TimerData.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/TimerData.java
new file mode 100644
index 000000000..5aaab01b4
--- /dev/null
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/metric/metrdata/TimerData.java
@@ -0,0 +1,149 @@
+package com.alibaba.jstorm.metric.metrdata;
+
+import java.io.Serializable;
+
+
+public class TimerData implements Serializable {
+
+ private static final long serialVersionUID = 954627168057659239L;
+
+ private long count;
+ private double meanRate;
+ private double oneMinuteRate;
+ private double fiveMinuteRate;
+ private double fifteenMinuteRate;
+ private long min;
+ private long max;
+ private double mean;
+ private double stdDev;
+ private double median;
+ private double percent75th;
+ private double percent95th;
+ private double percent98th;
+ private double percent99th;
+ private double percent999th;
+
+ public TimerData() {
+
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+
+ public long getMin() {
+ return min;
+ }
+
+ public void setMin(long min) {
+ this.min = min;
+ }
+
+ public long getMax() {
+ return max;
+ }
+
+ public void setMax(long max) {
+ this.max = max;
+ }
+
+ public double getMean() {
+ return mean;
+ }
+
+ public void setMean(double mean) {
+ this.mean = mean;
+ }
+
+ public double getStdDev() {
+ return stdDev;
+ }
+
+ public void setStdDev(double stdDev) {
+ this.stdDev = stdDev;
+ }
+
+ public double getMedian() {
+ return median;
+ }
+
+ public void setMedian(double median) {
+ this.median = median;
+ }
+
+ public double getPercent75th() {
+ return percent75th;
+ }
+
+ public void setPercent75th(double percent75th) {
+ this.percent75th = percent75th;
+ }
+
+ public double getPercent95th() {
+ return percent95th;
+ }
+
+ public void setPercent95th(double percent95th) {
+ this.percent95th = percent95th;
+ }
+
+ public double getPercent98th() {
+ return percent98th;
+ }
+
+ public void setPercent98th(double percent98th) {
+ this.percent98th = percent98th;
+ }
+
+ public double getPercent99th() {
+ return percent99th;
+ }
+
+ public void setPercent99th(double percent99th) {
+ this.percent99th = percent99th;
+ }
+
+ public double getPercent999th() {
+ return percent999th;
+ }
+
+ public void setPercent999th(double percent999th) {
+ this.percent999th = percent999th;
+ }
+
+ public void setMeanRate(double meanRate) {
+ this.meanRate = meanRate;
+ }
+
+ public double getMeanRate() {
+ return this.meanRate;
+ }
+
+ public void setOneMinuteRate(double oneMinuteRate) {
+ this.oneMinuteRate = oneMinuteRate;
+ }
+
+ public double getOneMinuteRate() {
+ return this.oneMinuteRate;
+ }
+
+ public void setFiveMinuteRate(double fiveMinuteRate) {
+ this.fiveMinuteRate = fiveMinuteRate;
+ }
+
+ public double getFiveMinuteRate() {
+ return this.fiveMinuteRate;
+ }
+
+ public void setFifteenMinuteRate(double fifteenMinuteRate) {
+ this.fifteenMinuteRate = fifteenMinuteRate;
+ }
+
+ public double getFifteenMinuteRate() {
+ return this.fifteenMinuteRate;
+ }
+}
\ No newline at end of file
diff --git a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java
index a4172670d..da72be493 100644
--- a/jstorm-client-extension/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java
+++ b/jstorm-client-extension/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java
@@ -258,6 +258,18 @@ public static void kill(Integer pid) {
ensure_process_killed(pid);
}
+
+ public static void kill_signal(Integer pid, String signal) {
+ String cmd = "kill " + signal + " " + pid;
+ try {
+ exec_command(cmd);
+ LOG.info(cmd);
+ } catch (ExecuteException e) {
+ LOG.info("Error when run " + cmd + ". Process has been killed. ");
+ } catch (Exception e) {
+ LOG.info("Error when run " + cmd + ". Exception ", e);
+ }
+ }
public static java.lang.Process launch_process(String command,
Map environment) throws IOException {
@@ -653,6 +665,50 @@ public static String formatSimpleDouble(Double value) {
}
}
+
+ public static double formatDoubleDecPoint2(Double value) {
+ try {
+ java.text.DecimalFormat form = new java.text.DecimalFormat(
+ "##.00");
+ String s = form.format(value);
+ return Double.valueOf(s);
+ } catch (Exception e) {
+ return 0.0;
+ }
+ }
+
+ public static double formatDoubleDecPoint4(Double value) {
+ try {
+ java.text.DecimalFormat form = new java.text.DecimalFormat(
+ "###.0000");
+ String s = form.format(value);
+ return Double.valueOf(s);
+ } catch (Exception e) {
+ return 0.0;
+ }
+ }
+
+ public static Double convertToDouble(Object value) {
+ Double ret;
+
+ if (value == null) {
+ ret = null;
+ } else {
+ if (value instanceof Integer) {
+ ret = ((Integer) value).doubleValue();
+ } else if (value instanceof Long) {
+ ret = ((Long) value).doubleValue();
+ } else if (value instanceof Float) {
+ ret = ((Float) value).doubleValue();
+ } else if (value instanceof Double) {
+ ret = (Double) value;
+ } else {
+ ret = null;
+ }
+ }
+
+ return ret;
+ }
public static String formatValue(Object value) {
if (value == null) {
@@ -728,6 +784,10 @@ public static Long getPhysicMemorySize() {
return ret;
}
+
+ public static String genLogName(String topology, Integer port) {
+ return topology + "-worker-" + port + ".log";
+ }
public static String getLogFileName() {
Enumeration enumAppender = Logger.getRootLogger()
diff --git a/jstorm-client/pom.xml b/jstorm-client/pom.xml
index c07152e6c..852932f4c 100644
--- a/jstorm-client/pom.xml
+++ b/jstorm-client/pom.xml
@@ -5,18 +5,18 @@
com.alibaba.jstorm
jstorm-all
- 0.9.5.1
+ 0.9.6
..
-
+ -->
4.0.0
com.alibaba.jstorm
jstorm-client
- 0.9.5.1
+ 0.9.6
jar
${project.artifactId}-${project.version}
@@ -76,7 +76,7 @@
org.apache.httpcomponents
httpclient
- 4.1.1
+ 4.3.2
storm
diff --git a/jstorm-client/src/main/java/backtype/storm/command/list.java b/jstorm-client/src/main/java/backtype/storm/command/list.java
new file mode 100644
index 000000000..3176be8d9
--- /dev/null
+++ b/jstorm-client/src/main/java/backtype/storm/command/list.java
@@ -0,0 +1,58 @@
+package backtype.storm.command;
+
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+
+import backtype.storm.generated.ClusterSummary;
+import backtype.storm.generated.TopologyInfo;
+import backtype.storm.utils.NimbusClient;
+import backtype.storm.utils.Utils;
+
+/**
+ * Activate topology
+ *
+ * @author longda
+ *
+ */
+public class list {
+
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+
+ NimbusClient client = null;
+ try {
+
+ Map conf = Utils.readStormConfig();
+ client = NimbusClient.getConfiguredClient(conf);
+
+ if (args.length > 0 && StringUtils.isBlank(args[0]) == false) {
+ String topologyId = args[0];
+ TopologyInfo info = client.getClient().getTopologyInfo(topologyId);
+
+ System.out.println("Successfully get topology info \n"
+ + info.toString());
+ }else {
+ ClusterSummary clusterSummary = client.getClient().getClusterInfo();
+
+
+ System.out.println("Successfully get cluster info \n"
+ + clusterSummary.toString());
+ }
+
+
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ } finally {
+ if (client != null) {
+ client.close();
+ }
+ }
+ }
+
+}
diff --git a/jstorm-client/src/main/java/backtype/storm/command/metrics_monitor.java b/jstorm-client/src/main/java/backtype/storm/command/metrics_monitor.java
new file mode 100644
index 000000000..bb339d462
--- /dev/null
+++ b/jstorm-client/src/main/java/backtype/storm/command/metrics_monitor.java
@@ -0,0 +1,56 @@
+package backtype.storm.command;
+
+import java.util.Map;
+import java.security.InvalidParameterException;
+
+import backtype.storm.generated.MonitorOptions;
+import backtype.storm.utils.NimbusClient;
+import backtype.storm.utils.Utils;
+
+/**
+ * Monitor topology
+ *
+ * @author Basti
+ *
+ */
+public class metrics_monitor {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ if (args == null || args.length <= 1) {
+ throw new InvalidParameterException("Should input topology name and enable flag");
+ }
+
+ String topologyName = args[0];
+
+ NimbusClient client = null;
+ try {
+
+ Map conf = Utils.readStormConfig();
+ client = NimbusClient.getConfiguredClient(conf);
+
+ boolean isEnable = Boolean.valueOf(args[1]).booleanValue();
+
+ MonitorOptions options = new MonitorOptions();
+ options.set_isEnable(isEnable);
+
+ client.getClient().metricMonitor(topologyName, options);
+
+ String str = (isEnable) ? "enable" : "disable";
+ System.out.println("Successfully submit command to " + str
+ + " the monitor of " + topologyName);
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ } finally {
+ if (client != null) {
+ client.close();
+ }
+ }
+ }
+
+}
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/MonitorOptions.java b/jstorm-client/src/main/java/backtype/storm/generated/MonitorOptions.java
new file mode 100644
index 000000000..fa0adf35c
--- /dev/null
+++ b/jstorm-client/src/main/java/backtype/storm/generated/MonitorOptions.java
@@ -0,0 +1,320 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package backtype.storm.generated;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+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 MonitorOptions implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("MonitorOptions");
+
+ private static final org.apache.thrift7.protocol.TField IS_ENABLE_FIELD_DESC = new org.apache.thrift7.protocol.TField("isEnable", org.apache.thrift7.protocol.TType.BOOL, (short)1);
+
+ private boolean isEnable; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+ IS_ENABLE((short)1, "isEnable");
+
+ private static final Map byName = new HashMap();
+
+ 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: // IS_ENABLE
+ return IS_ENABLE;
+ 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 __ISENABLE_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IS_ENABLE, new org.apache.thrift7.meta_data.FieldMetaData("isEnable", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(MonitorOptions.class, metaDataMap);
+ }
+
+ public MonitorOptions() {
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public MonitorOptions(MonitorOptions other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.isEnable = other.isEnable;
+ }
+
+ public MonitorOptions deepCopy() {
+ return new MonitorOptions(this);
+ }
+
+ @Override
+ public void clear() {
+ set_isEnable_isSet(false);
+ this.isEnable = false;
+ }
+
+ public boolean is_isEnable() {
+ return this.isEnable;
+ }
+
+ public void set_isEnable(boolean isEnable) {
+ this.isEnable = isEnable;
+ set_isEnable_isSet(true);
+ }
+
+ public void unset_isEnable() {
+ __isset_bit_vector.clear(__ISENABLE_ISSET_ID);
+ }
+
+ /** Returns true if field isEnable is set (has been assigned a value) and false otherwise */
+ public boolean is_set_isEnable() {
+ return __isset_bit_vector.get(__ISENABLE_ISSET_ID);
+ }
+
+ public void set_isEnable_isSet(boolean value) {
+ __isset_bit_vector.set(__ISENABLE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IS_ENABLE:
+ if (value == null) {
+ unset_isEnable();
+ } else {
+ set_isEnable((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IS_ENABLE:
+ return Boolean.valueOf(is_isEnable());
+
+ }
+ 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 IS_ENABLE:
+ return is_set_isEnable();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof MonitorOptions)
+ return this.equals((MonitorOptions)that);
+ return false;
+ }
+
+ public boolean equals(MonitorOptions that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_isEnable = true && this.is_set_isEnable();
+ boolean that_present_isEnable = true && that.is_set_isEnable();
+ if (this_present_isEnable || that_present_isEnable) {
+ if (!(this_present_isEnable && that_present_isEnable))
+ return false;
+ if (this.isEnable != that.isEnable)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_isEnable = true && (is_set_isEnable());
+ builder.append(present_isEnable);
+ if (present_isEnable)
+ builder.append(isEnable);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(MonitorOptions other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ MonitorOptions typedOther = (MonitorOptions)other;
+
+ lastComparison = Boolean.valueOf(is_set_isEnable()).compareTo(typedOther.is_set_isEnable());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_isEnable()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.isEnable, typedOther.isEnable);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
+ org.apache.thrift7.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift7.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 1: // IS_ENABLE
+ if (field.type == org.apache.thrift7.protocol.TType.BOOL) {
+ this.isEnable = iprot.readBool();
+ set_isEnable_isSet(true);
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (is_set_isEnable()) {
+ oprot.writeFieldBegin(IS_ENABLE_FIELD_DESC);
+ oprot.writeBool(this.isEnable);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("MonitorOptions(");
+ boolean first = true;
+
+ if (is_set_isEnable()) {
+ sb.append("isEnable:");
+ sb.append(this.isEnable);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift7.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+}
+
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/Nimbus.java b/jstorm-client/src/main/java/backtype/storm/generated/Nimbus.java
index 0291a740e..5b4729810 100644
--- a/jstorm-client/src/main/java/backtype/storm/generated/Nimbus.java
+++ b/jstorm-client/src/main/java/backtype/storm/generated/Nimbus.java
@@ -39,6 +39,8 @@ public interface Iface {
public void rebalance(String name, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, org.apache.thrift7.TException;
+ public void metricMonitor(String name, MonitorOptions options) throws NotAliveException, org.apache.thrift7.TException;
+
public void beginLibUpload(String libName) throws org.apache.thrift7.TException;
public String beginFileUpload() throws org.apache.thrift7.TException;
@@ -65,6 +67,8 @@ public interface Iface {
public StormTopology getUserTopology(String id) throws NotAliveException, org.apache.thrift7.TException;
+ public TopologyMetricInfo getTopologyMetric(String id) throws NotAliveException, org.apache.thrift7.TException;
+
}
public interface AsyncIface {
@@ -83,6 +87,8 @@ public interface AsyncIface {
public void rebalance(String name, RebalanceOptions options, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException;
+ public void metricMonitor(String name, MonitorOptions options, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException;
+
public void beginLibUpload(String libName, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException;
public void beginFileUpload(org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException;
@@ -109,6 +115,8 @@ public interface AsyncIface {
public void getUserTopology(String id, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException;
+ public void getTopologyMetric(String id, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException;
+
}
public static class Client extends org.apache.thrift7.TServiceClient implements Iface {
@@ -316,6 +324,30 @@ public void recv_rebalance() throws NotAliveException, InvalidTopologyException,
return;
}
+ public void metricMonitor(String name, MonitorOptions options) throws NotAliveException, org.apache.thrift7.TException
+ {
+ send_metricMonitor(name, options);
+ recv_metricMonitor();
+ }
+
+ public void send_metricMonitor(String name, MonitorOptions options) throws org.apache.thrift7.TException
+ {
+ metricMonitor_args args = new metricMonitor_args();
+ args.set_name(name);
+ args.set_options(options);
+ sendBase("metricMonitor", args);
+ }
+
+ public void recv_metricMonitor() throws NotAliveException, org.apache.thrift7.TException
+ {
+ metricMonitor_result result = new metricMonitor_result();
+ receiveBase(result, "metricMonitor");
+ if (result.e != null) {
+ throw result.e;
+ }
+ return;
+ }
+
public void beginLibUpload(String libName) throws org.apache.thrift7.TException
{
send_beginLibUpload(libName);
@@ -619,6 +651,32 @@ public StormTopology recv_getUserTopology() throws NotAliveException, org.apache
throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "getUserTopology failed: unknown result");
}
+ public TopologyMetricInfo getTopologyMetric(String id) throws NotAliveException, org.apache.thrift7.TException
+ {
+ send_getTopologyMetric(id);
+ return recv_getTopologyMetric();
+ }
+
+ public void send_getTopologyMetric(String id) throws org.apache.thrift7.TException
+ {
+ getTopologyMetric_args args = new getTopologyMetric_args();
+ args.set_id(id);
+ sendBase("getTopologyMetric", args);
+ }
+
+ public TopologyMetricInfo recv_getTopologyMetric() throws NotAliveException, org.apache.thrift7.TException
+ {
+ getTopologyMetric_result result = new getTopologyMetric_result();
+ receiveBase(result, "getTopologyMetric");
+ if (result.is_set_success()) {
+ return result.success;
+ }
+ if (result.e != null) {
+ throw result.e;
+ }
+ throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "getTopologyMetric failed: unknown result");
+ }
+
}
public static class AsyncClient extends org.apache.thrift7.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift7.async.TAsyncClientFactory {
@@ -888,6 +946,41 @@ public void getResult() throws NotAliveException, InvalidTopologyException, org.
}
}
+ public void metricMonitor(String name, MonitorOptions options, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException {
+ checkReady();
+ metricMonitor_call method_call = new metricMonitor_call(name, options, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class metricMonitor_call extends org.apache.thrift7.async.TAsyncMethodCall {
+ private String name;
+ private MonitorOptions options;
+ public metricMonitor_call(String name, MonitorOptions options, org.apache.thrift7.async.AsyncMethodCallback resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.name = name;
+ this.options = options;
+ }
+
+ public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
+ prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("metricMonitor", org.apache.thrift7.protocol.TMessageType.CALL, 0));
+ metricMonitor_args args = new metricMonitor_args();
+ args.set_name(name);
+ args.set_options(options);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws NotAliveException, org.apache.thrift7.TException {
+ if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_metricMonitor();
+ }
+ }
+
public void beginLibUpload(String libName, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException {
checkReady();
beginLibUpload_call method_call = new beginLibUpload_call(libName, resultHandler, this, ___protocolFactory, ___transport);
@@ -1298,6 +1391,38 @@ public StormTopology getResult() throws NotAliveException, org.apache.thrift7.TE
}
}
+ public void getTopologyMetric(String id, org.apache.thrift7.async.AsyncMethodCallback resultHandler) throws org.apache.thrift7.TException {
+ checkReady();
+ getTopologyMetric_call method_call = new getTopologyMetric_call(id, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getTopologyMetric_call extends org.apache.thrift7.async.TAsyncMethodCall {
+ private String id;
+ public getTopologyMetric_call(String id, org.apache.thrift7.async.AsyncMethodCallback resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.id = id;
+ }
+
+ public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
+ prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("getTopologyMetric", org.apache.thrift7.protocol.TMessageType.CALL, 0));
+ getTopologyMetric_args args = new getTopologyMetric_args();
+ args.set_id(id);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TopologyMetricInfo getResult() throws NotAliveException, org.apache.thrift7.TException {
+ if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getTopologyMetric();
+ }
+ }
+
}
public static class Processor extends org.apache.thrift7.TBaseProcessor implements org.apache.thrift7.TProcessor {
@@ -1318,6 +1443,7 @@ protected Processor(I iface, Map extends org.apache.thrift7.ProcessFunction {
+ public metricMonitor() {
+ super("metricMonitor");
+ }
+
+ protected metricMonitor_args getEmptyArgsInstance() {
+ return new metricMonitor_args();
+ }
+
+ protected metricMonitor_result getResult(I iface, metricMonitor_args args) throws org.apache.thrift7.TException {
+ metricMonitor_result result = new metricMonitor_result();
+ try {
+ iface.metricMonitor(args.name, args.options);
+ } catch (NotAliveException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
private static class beginLibUpload extends org.apache.thrift7.ProcessFunction {
public beginLibUpload() {
super("beginLibUpload");
@@ -1712,6 +1859,26 @@ protected getUserTopology_result getResult(I iface, getUserTopology_args args) t
}
}
+ private static class getTopologyMetric extends org.apache.thrift7.ProcessFunction {
+ public getTopologyMetric() {
+ super("getTopologyMetric");
+ }
+
+ protected getTopologyMetric_args getEmptyArgsInstance() {
+ return new getTopologyMetric_args();
+ }
+
+ protected getTopologyMetric_result getResult(I iface, getTopologyMetric_args args) throws org.apache.thrift7.TException {
+ getTopologyMetric_result result = new getTopologyMetric_result();
+ try {
+ result.success = iface.getTopologyMetric(args.id);
+ } catch (NotAliveException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
}
public static class submitTopology_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
@@ -7235,16 +7402,19 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class beginLibUpload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginLibUpload_args");
+ public static class metricMonitor_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("metricMonitor_args");
- private static final org.apache.thrift7.protocol.TField LIB_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("libName", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("name", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift7.protocol.TField("options", org.apache.thrift7.protocol.TType.STRUCT, (short)2);
- private String libName; // required
+ private String name; // required
+ private MonitorOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- LIB_NAME((short)1, "libName");
+ NAME((short)1, "name"),
+ OPTIONS((short)2, "options");
private static final Map byName = new HashMap();
@@ -7259,8 +7429,10 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // LIB_NAME
- return LIB_NAME;
+ case 1: // NAME
+ return NAME;
+ case 2: // OPTIONS
+ return OPTIONS;
default:
return null;
}
@@ -7305,70 +7477,109 @@ public String getFieldName() {
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LIB_NAME, new org.apache.thrift7.meta_data.FieldMetaData("libName", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.NAME, new org.apache.thrift7.meta_data.FieldMetaData("name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OPTIONS, new org.apache.thrift7.meta_data.FieldMetaData("options", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, MonitorOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginLibUpload_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(metricMonitor_args.class, metaDataMap);
}
- public beginLibUpload_args() {
+ public metricMonitor_args() {
}
- public beginLibUpload_args(
- String libName)
+ public metricMonitor_args(
+ String name,
+ MonitorOptions options)
{
this();
- this.libName = libName;
+ this.name = name;
+ this.options = options;
}
/**
* Performs a deep copy on other.
*/
- public beginLibUpload_args(beginLibUpload_args other) {
- if (other.is_set_libName()) {
- this.libName = other.libName;
+ public metricMonitor_args(metricMonitor_args other) {
+ if (other.is_set_name()) {
+ this.name = other.name;
+ }
+ if (other.is_set_options()) {
+ this.options = new MonitorOptions(other.options);
}
}
- public beginLibUpload_args deepCopy() {
- return new beginLibUpload_args(this);
+ public metricMonitor_args deepCopy() {
+ return new metricMonitor_args(this);
}
@Override
public void clear() {
- this.libName = null;
+ this.name = null;
+ this.options = null;
}
- public String get_libName() {
- return this.libName;
+ public String get_name() {
+ return this.name;
}
- public void set_libName(String libName) {
- this.libName = libName;
+ public void set_name(String name) {
+ this.name = name;
}
- public void unset_libName() {
- this.libName = null;
+ public void unset_name() {
+ this.name = null;
}
- /** Returns true if field libName is set (has been assigned a value) and false otherwise */
- public boolean is_set_libName() {
- return this.libName != null;
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean is_set_name() {
+ return this.name != null;
}
- public void set_libName_isSet(boolean value) {
+ public void set_name_isSet(boolean value) {
if (!value) {
- this.libName = null;
+ this.name = null;
+ }
+ }
+
+ public MonitorOptions get_options() {
+ return this.options;
+ }
+
+ public void set_options(MonitorOptions options) {
+ this.options = options;
+ }
+
+ public void unset_options() {
+ this.options = null;
+ }
+
+ /** Returns true if field options is set (has been assigned a value) and false otherwise */
+ public boolean is_set_options() {
+ return this.options != null;
+ }
+
+ public void set_options_isSet(boolean value) {
+ if (!value) {
+ this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case LIB_NAME:
+ case NAME:
if (value == null) {
- unset_libName();
+ unset_name();
} else {
- set_libName((String)value);
+ set_name((String)value);
+ }
+ break;
+
+ case OPTIONS:
+ if (value == null) {
+ unset_options();
+ } else {
+ set_options((MonitorOptions)value);
}
break;
@@ -7377,8 +7588,11 @@ public void setFieldValue(_Fields field, Object value) {
public Object getFieldValue(_Fields field) {
switch (field) {
- case LIB_NAME:
- return get_libName();
+ case NAME:
+ return get_name();
+
+ case OPTIONS:
+ return get_options();
}
throw new IllegalStateException();
@@ -7391,8 +7605,10 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case LIB_NAME:
- return is_set_libName();
+ case NAME:
+ return is_set_name();
+ case OPTIONS:
+ return is_set_options();
}
throw new IllegalStateException();
}
@@ -7401,21 +7617,30 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof beginLibUpload_args)
- return this.equals((beginLibUpload_args)that);
+ if (that instanceof metricMonitor_args)
+ return this.equals((metricMonitor_args)that);
return false;
}
- public boolean equals(beginLibUpload_args that) {
+ public boolean equals(metricMonitor_args that) {
if (that == null)
return false;
- boolean this_present_libName = true && this.is_set_libName();
- boolean that_present_libName = true && that.is_set_libName();
- if (this_present_libName || that_present_libName) {
- if (!(this_present_libName && that_present_libName))
+ boolean this_present_name = true && this.is_set_name();
+ boolean that_present_name = true && that.is_set_name();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
return false;
- if (!this.libName.equals(that.libName))
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_options = true && this.is_set_options();
+ boolean that_present_options = true && that.is_set_options();
+ if (this_present_options || that_present_options) {
+ if (!(this_present_options && that_present_options))
+ return false;
+ if (!this.options.equals(that.options))
return false;
}
@@ -7426,28 +7651,43 @@ public boolean equals(beginLibUpload_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- boolean present_libName = true && (is_set_libName());
- builder.append(present_libName);
- if (present_libName)
- builder.append(libName);
+ boolean present_name = true && (is_set_name());
+ builder.append(present_name);
+ if (present_name)
+ builder.append(name);
+
+ boolean present_options = true && (is_set_options());
+ builder.append(present_options);
+ if (present_options)
+ builder.append(options);
return builder.toHashCode();
}
- public int compareTo(beginLibUpload_args other) {
+ public int compareTo(metricMonitor_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- beginLibUpload_args typedOther = (beginLibUpload_args)other;
+ metricMonitor_args typedOther = (metricMonitor_args)other;
- lastComparison = Boolean.valueOf(is_set_libName()).compareTo(typedOther.is_set_libName());
+ lastComparison = Boolean.valueOf(is_set_name()).compareTo(typedOther.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
- if (is_set_libName()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.libName, typedOther.libName);
+ if (is_set_name()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.name, typedOther.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_options()).compareTo(typedOther.is_set_options());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_options()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.options, typedOther.options);
if (lastComparison != 0) {
return lastComparison;
}
@@ -7469,9 +7709,17 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 1: // LIB_NAME
+ case 1: // NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.libName = iprot.readString();
+ this.name = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // OPTIONS
+ if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
+ this.options = new MonitorOptions();
+ this.options.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -7489,9 +7737,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.libName != null) {
- oprot.writeFieldBegin(LIB_NAME_FIELD_DESC);
- oprot.writeString(this.libName);
+ if (this.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(this.name);
+ oprot.writeFieldEnd();
+ }
+ if (this.options != null) {
+ oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
+ this.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -7500,14 +7753,22 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("beginLibUpload_args(");
+ StringBuilder sb = new StringBuilder("metricMonitor_args(");
boolean first = true;
- sb.append("libName:");
- if (this.libName == null) {
+ sb.append("name:");
+ if (this.name == null) {
sb.append("null");
} else {
- sb.append(this.libName);
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("options:");
+ if (this.options == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.options);
}
first = false;
sb.append(")");
@@ -7536,14 +7797,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class beginLibUpload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginLibUpload_result");
+ public static class metricMonitor_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("metricMonitor_result");
+ private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
+ private NotAliveException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
-;
+ E((short)1, "e");
private static final Map byName = new HashMap();
@@ -7558,6 +7821,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // E
+ return E;
default:
return null;
}
@@ -7596,37 +7861,87 @@ public String getFieldName() {
return _fieldName;
}
}
+
+ // isset id assignments
+
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginLibUpload_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(metricMonitor_result.class, metaDataMap);
}
- public beginLibUpload_result() {
+ public metricMonitor_result() {
+ }
+
+ public metricMonitor_result(
+ NotAliveException e)
+ {
+ this();
+ this.e = e;
}
/**
* Performs a deep copy on other.
*/
- public beginLibUpload_result(beginLibUpload_result other) {
+ public metricMonitor_result(metricMonitor_result other) {
+ if (other.is_set_e()) {
+ this.e = new NotAliveException(other.e);
+ }
}
- public beginLibUpload_result deepCopy() {
- return new beginLibUpload_result(this);
+ public metricMonitor_result deepCopy() {
+ return new metricMonitor_result(this);
}
@Override
public void clear() {
+ this.e = null;
+ }
+
+ public NotAliveException get_e() {
+ return this.e;
+ }
+
+ public void set_e(NotAliveException e) {
+ this.e = e;
+ }
+
+ public void unset_e() {
+ this.e = null;
+ }
+
+ /** Returns true if field e is set (has been assigned a value) and false otherwise */
+ public boolean is_set_e() {
+ return this.e != null;
+ }
+
+ public void set_e_isSet(boolean value) {
+ if (!value) {
+ this.e = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case E:
+ if (value == null) {
+ unset_e();
+ } else {
+ set_e((NotAliveException)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case E:
+ return get_e();
+
}
throw new IllegalStateException();
}
@@ -7638,6 +7953,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
+ case E:
+ return is_set_e();
}
throw new IllegalStateException();
}
@@ -7646,15 +7963,24 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof beginLibUpload_result)
- return this.equals((beginLibUpload_result)that);
+ if (that instanceof metricMonitor_result)
+ return this.equals((metricMonitor_result)that);
return false;
}
- public boolean equals(beginLibUpload_result that) {
+ public boolean equals(metricMonitor_result that) {
if (that == null)
return false;
+ boolean this_present_e = true && this.is_set_e();
+ boolean that_present_e = true && that.is_set_e();
+ if (this_present_e || that_present_e) {
+ if (!(this_present_e && that_present_e))
+ return false;
+ if (!this.e.equals(that.e))
+ return false;
+ }
+
return true;
}
@@ -7662,17 +7988,32 @@ public boolean equals(beginLibUpload_result that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
+ boolean present_e = true && (is_set_e());
+ builder.append(present_e);
+ if (present_e)
+ builder.append(e);
+
return builder.toHashCode();
}
- public int compareTo(beginLibUpload_result other) {
+ public int compareTo(metricMonitor_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- beginLibUpload_result typedOther = (beginLibUpload_result)other;
+ metricMonitor_result typedOther = (metricMonitor_result)other;
+ lastComparison = Boolean.valueOf(is_set_e()).compareTo(typedOther.is_set_e());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_e()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.e, typedOther.e);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -7690,6 +8031,14 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
+ case 1: // E
+ if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
+ this.e = new NotAliveException();
+ this.e.read(iprot);
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -7702,15 +8051,27 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
+ if (this.is_set_e()) {
+ oprot.writeFieldBegin(E_FIELD_DESC);
+ this.e.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("beginLibUpload_result(");
+ StringBuilder sb = new StringBuilder("metricMonitor_result(");
boolean first = true;
+ sb.append("e:");
+ if (this.e == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.e);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -7737,14 +8098,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class beginFileUpload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileUpload_args");
+ public static class beginLibUpload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginLibUpload_args");
+ private static final org.apache.thrift7.protocol.TField LIB_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("libName", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private String libName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
-;
+ LIB_NAME((short)1, "libName");
private static final Map byName = new HashMap();
@@ -7759,6 +8122,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // LIB_NAME
+ return LIB_NAME;
default:
return null;
}
@@ -7797,37 +8162,87 @@ public String getFieldName() {
return _fieldName;
}
}
+
+ // isset id assignments
+
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.LIB_NAME, new org.apache.thrift7.meta_data.FieldMetaData("libName", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginLibUpload_args.class, metaDataMap);
}
- public beginFileUpload_args() {
+ public beginLibUpload_args() {
+ }
+
+ public beginLibUpload_args(
+ String libName)
+ {
+ this();
+ this.libName = libName;
}
/**
* Performs a deep copy on other.
*/
- public beginFileUpload_args(beginFileUpload_args other) {
+ public beginLibUpload_args(beginLibUpload_args other) {
+ if (other.is_set_libName()) {
+ this.libName = other.libName;
+ }
}
- public beginFileUpload_args deepCopy() {
- return new beginFileUpload_args(this);
+ public beginLibUpload_args deepCopy() {
+ return new beginLibUpload_args(this);
}
@Override
public void clear() {
+ this.libName = null;
+ }
+
+ public String get_libName() {
+ return this.libName;
+ }
+
+ public void set_libName(String libName) {
+ this.libName = libName;
+ }
+
+ public void unset_libName() {
+ this.libName = null;
+ }
+
+ /** Returns true if field libName is set (has been assigned a value) and false otherwise */
+ public boolean is_set_libName() {
+ return this.libName != null;
+ }
+
+ public void set_libName_isSet(boolean value) {
+ if (!value) {
+ this.libName = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case LIB_NAME:
+ if (value == null) {
+ unset_libName();
+ } else {
+ set_libName((String)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case LIB_NAME:
+ return get_libName();
+
}
throw new IllegalStateException();
}
@@ -7839,6 +8254,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
+ case LIB_NAME:
+ return is_set_libName();
}
throw new IllegalStateException();
}
@@ -7847,15 +8264,24 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof beginFileUpload_args)
- return this.equals((beginFileUpload_args)that);
+ if (that instanceof beginLibUpload_args)
+ return this.equals((beginLibUpload_args)that);
return false;
}
- public boolean equals(beginFileUpload_args that) {
+ public boolean equals(beginLibUpload_args that) {
if (that == null)
return false;
+ boolean this_present_libName = true && this.is_set_libName();
+ boolean that_present_libName = true && that.is_set_libName();
+ if (this_present_libName || that_present_libName) {
+ if (!(this_present_libName && that_present_libName))
+ return false;
+ if (!this.libName.equals(that.libName))
+ return false;
+ }
+
return true;
}
@@ -7863,17 +8289,32 @@ public boolean equals(beginFileUpload_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- return builder.toHashCode();
- }
-
- public int compareTo(beginFileUpload_args other) {
+ boolean present_libName = true && (is_set_libName());
+ builder.append(present_libName);
+ if (present_libName)
+ builder.append(libName);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(beginLibUpload_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- beginFileUpload_args typedOther = (beginFileUpload_args)other;
+ beginLibUpload_args typedOther = (beginLibUpload_args)other;
+ lastComparison = Boolean.valueOf(is_set_libName()).compareTo(typedOther.is_set_libName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_libName()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.libName, typedOther.libName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -7891,6 +8332,13 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
+ case 1: // LIB_NAME
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.libName = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -7904,15 +8352,27 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (this.libName != null) {
+ oprot.writeFieldBegin(LIB_NAME_FIELD_DESC);
+ oprot.writeString(this.libName);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("beginFileUpload_args(");
+ StringBuilder sb = new StringBuilder("beginLibUpload_args(");
boolean first = true;
+ sb.append("libName:");
+ if (this.libName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.libName);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -7939,16 +8399,14 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class beginFileUpload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileUpload_result");
+ public static class beginLibUpload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginLibUpload_result");
- private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
- private String success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- SUCCESS((short)0, "success");
+;
private static final Map byName = new HashMap();
@@ -7963,8 +8421,6 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
default:
return null;
}
@@ -8003,87 +8459,1144 @@ public String getFieldName() {
return _fieldName;
}
}
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginLibUpload_result.class, metaDataMap);
+ }
- // isset id assignments
+ public beginLibUpload_result() {
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public beginLibUpload_result(beginLibUpload_result other) {
+ }
+
+ public beginLibUpload_result deepCopy() {
+ return new beginLibUpload_result(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ 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) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof beginLibUpload_result)
+ return this.equals((beginLibUpload_result)that);
+ return false;
+ }
+
+ public boolean equals(beginLibUpload_result that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(beginLibUpload_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ beginLibUpload_result typedOther = (beginLibUpload_result)other;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
+ org.apache.thrift7.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift7.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ default:
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("beginLibUpload_result(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift7.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ }
+
+ public static class beginFileUpload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileUpload_args");
+
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+;
+
+ private static final Map byName = new HashMap();
+
+ 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) {
+ 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;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_args.class, metaDataMap);
+ }
+
+ public beginFileUpload_args() {
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public beginFileUpload_args(beginFileUpload_args other) {
+ }
+
+ public beginFileUpload_args deepCopy() {
+ return new beginFileUpload_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ 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) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof beginFileUpload_args)
+ return this.equals((beginFileUpload_args)that);
+ return false;
+ }
+
+ public boolean equals(beginFileUpload_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(beginFileUpload_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ beginFileUpload_args typedOther = (beginFileUpload_args)other;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
+ org.apache.thrift7.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift7.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ default:
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("beginFileUpload_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift7.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ }
+
+ public static class beginFileUpload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileUpload_result");
+
+ private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
+
+ private String success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map byName = new HashMap();
+
+ 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 0: // SUCCESS
+ return SUCCESS;
+ 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
+
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_result.class, metaDataMap);
+ }
+
+ public beginFileUpload_result() {
+ }
+
+ public beginFileUpload_result(
+ String success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public beginFileUpload_result(beginFileUpload_result other) {
+ if (other.is_set_success()) {
+ this.success = other.success;
+ }
+ }
+
+ public beginFileUpload_result deepCopy() {
+ return new beginFileUpload_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public String get_success() {
+ return this.success;
+ }
+
+ public void set_success(String success) {
+ this.success = success;
+ }
+
+ public void unset_success() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean is_set_success() {
+ return this.success != null;
+ }
+
+ public void set_success_isSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unset_success();
+ } else {
+ set_success((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return get_success();
+
+ }
+ 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 SUCCESS:
+ return is_set_success();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof beginFileUpload_result)
+ return this.equals((beginFileUpload_result)that);
+ return false;
+ }
+
+ public boolean equals(beginFileUpload_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.is_set_success();
+ boolean that_present_success = true && that.is_set_success();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_success = true && (is_set_success());
+ builder.append(present_success);
+ if (present_success)
+ builder.append(success);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(beginFileUpload_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ beginFileUpload_result typedOther = (beginFileUpload_result)other;
+
+ lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_success()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
+ org.apache.thrift7.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift7.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 0: // SUCCESS
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.success = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.is_set_success()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(this.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("beginFileUpload_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift7.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ }
+
+ public static class uploadChunk_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("uploadChunk_args");
+
+ private static final org.apache.thrift7.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift7.protocol.TField("location", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField CHUNK_FIELD_DESC = new org.apache.thrift7.protocol.TField("chunk", org.apache.thrift7.protocol.TType.STRING, (short)2);
+
+ private String location; // required
+ private ByteBuffer chunk; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+ LOCATION((short)1, "location"),
+ CHUNK((short)2, "chunk");
+
+ private static final Map byName = new HashMap();
+
+ 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: // LOCATION
+ return LOCATION;
+ case 2: // CHUNK
+ return CHUNK;
+ 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
+
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.LOCATION, new org.apache.thrift7.meta_data.FieldMetaData("location", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CHUNK, new org.apache.thrift7.meta_data.FieldMetaData("chunk", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING , true)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_args.class, metaDataMap);
+ }
+
+ public uploadChunk_args() {
+ }
+
+ public uploadChunk_args(
+ String location,
+ ByteBuffer chunk)
+ {
+ this();
+ this.location = location;
+ this.chunk = chunk;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public uploadChunk_args(uploadChunk_args other) {
+ if (other.is_set_location()) {
+ this.location = other.location;
+ }
+ if (other.is_set_chunk()) {
+ this.chunk = org.apache.thrift7.TBaseHelper.copyBinary(other.chunk);
+;
+ }
+ }
+
+ public uploadChunk_args deepCopy() {
+ return new uploadChunk_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.location = null;
+ this.chunk = null;
+ }
+
+ public String get_location() {
+ return this.location;
+ }
+
+ public void set_location(String location) {
+ this.location = location;
+ }
+
+ public void unset_location() {
+ this.location = null;
+ }
+
+ /** Returns true if field location is set (has been assigned a value) and false otherwise */
+ public boolean is_set_location() {
+ return this.location != null;
+ }
+
+ public void set_location_isSet(boolean value) {
+ if (!value) {
+ this.location = null;
+ }
+ }
+
+ public byte[] get_chunk() {
+ set_chunk(org.apache.thrift7.TBaseHelper.rightSize(chunk));
+ return chunk == null ? null : chunk.array();
+ }
+
+ public ByteBuffer buffer_for_chunk() {
+ return chunk;
+ }
+
+ public void set_chunk(byte[] chunk) {
+ set_chunk(chunk == null ? (ByteBuffer)null : ByteBuffer.wrap(chunk));
+ }
+
+ public void set_chunk(ByteBuffer chunk) {
+ this.chunk = chunk;
+ }
+
+ public void unset_chunk() {
+ this.chunk = null;
+ }
+
+ /** Returns true if field chunk is set (has been assigned a value) and false otherwise */
+ public boolean is_set_chunk() {
+ return this.chunk != null;
+ }
+
+ public void set_chunk_isSet(boolean value) {
+ if (!value) {
+ this.chunk = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LOCATION:
+ if (value == null) {
+ unset_location();
+ } else {
+ set_location((String)value);
+ }
+ break;
+
+ case CHUNK:
+ if (value == null) {
+ unset_chunk();
+ } else {
+ set_chunk((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LOCATION:
+ return get_location();
+
+ case CHUNK:
+ return get_chunk();
+
+ }
+ 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 LOCATION:
+ return is_set_location();
+ case CHUNK:
+ return is_set_chunk();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof uploadChunk_args)
+ return this.equals((uploadChunk_args)that);
+ return false;
+ }
+
+ public boolean equals(uploadChunk_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_location = true && this.is_set_location();
+ boolean that_present_location = true && that.is_set_location();
+ if (this_present_location || that_present_location) {
+ if (!(this_present_location && that_present_location))
+ return false;
+ if (!this.location.equals(that.location))
+ return false;
+ }
+
+ boolean this_present_chunk = true && this.is_set_chunk();
+ boolean that_present_chunk = true && that.is_set_chunk();
+ if (this_present_chunk || that_present_chunk) {
+ if (!(this_present_chunk && that_present_chunk))
+ return false;
+ if (!this.chunk.equals(that.chunk))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_location = true && (is_set_location());
+ builder.append(present_location);
+ if (present_location)
+ builder.append(location);
+
+ boolean present_chunk = true && (is_set_chunk());
+ builder.append(present_chunk);
+ if (present_chunk)
+ builder.append(chunk);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(uploadChunk_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ uploadChunk_args typedOther = (uploadChunk_args)other;
+
+ lastComparison = Boolean.valueOf(is_set_location()).compareTo(typedOther.is_set_location());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_location()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.location, typedOther.location);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_chunk()).compareTo(typedOther.is_set_chunk());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_chunk()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.chunk, typedOther.chunk);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
+ org.apache.thrift7.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift7.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 1: // LOCATION
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.location = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // CHUNK
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.chunk = iprot.readBinary();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.location != null) {
+ oprot.writeFieldBegin(LOCATION_FIELD_DESC);
+ oprot.writeString(this.location);
+ oprot.writeFieldEnd();
+ }
+ if (this.chunk != null) {
+ oprot.writeFieldBegin(CHUNK_FIELD_DESC);
+ oprot.writeBinary(this.chunk);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("uploadChunk_args(");
+ boolean first = true;
+
+ sb.append("location:");
+ if (this.location == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.location);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("chunk:");
+ if (this.chunk == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift7.TBaseHelper.toString(this.chunk, sb);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift7.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ }
+
+ public static class uploadChunk_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("uploadChunk_result");
+
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+;
+
+ private static final Map byName = new HashMap();
+
+ 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) {
+ 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;
+ }
+ }
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_result.class, metaDataMap);
- }
-
- public beginFileUpload_result() {
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_result.class, metaDataMap);
}
- public beginFileUpload_result(
- String success)
- {
- this();
- this.success = success;
+ public uploadChunk_result() {
}
/**
* Performs a deep copy on other.
*/
- public beginFileUpload_result(beginFileUpload_result other) {
- if (other.is_set_success()) {
- this.success = other.success;
- }
+ public uploadChunk_result(uploadChunk_result other) {
}
- public beginFileUpload_result deepCopy() {
- return new beginFileUpload_result(this);
+ public uploadChunk_result deepCopy() {
+ return new uploadChunk_result(this);
}
@Override
public void clear() {
- this.success = null;
- }
-
- public String get_success() {
- return this.success;
- }
-
- public void set_success(String success) {
- this.success = success;
- }
-
- public void unset_success() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean is_set_success() {
- return this.success != null;
- }
-
- public void set_success_isSet(boolean value) {
- if (!value) {
- this.success = null;
- }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unset_success();
- } else {
- set_success((String)value);
- }
- break;
-
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return get_success();
-
}
throw new IllegalStateException();
}
@@ -8095,8 +9608,6 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case SUCCESS:
- return is_set_success();
}
throw new IllegalStateException();
}
@@ -8105,24 +9616,15 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof beginFileUpload_result)
- return this.equals((beginFileUpload_result)that);
+ if (that instanceof uploadChunk_result)
+ return this.equals((uploadChunk_result)that);
return false;
}
- public boolean equals(beginFileUpload_result that) {
+ public boolean equals(uploadChunk_result that) {
if (that == null)
return false;
- boolean this_present_success = true && this.is_set_success();
- boolean that_present_success = true && that.is_set_success();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
return true;
}
@@ -8130,32 +9632,17 @@ public boolean equals(beginFileUpload_result that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- boolean present_success = true && (is_set_success());
- builder.append(present_success);
- if (present_success)
- builder.append(success);
-
return builder.toHashCode();
}
- public int compareTo(beginFileUpload_result other) {
+ public int compareTo(uploadChunk_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- beginFileUpload_result typedOther = (beginFileUpload_result)other;
+ uploadChunk_result typedOther = (uploadChunk_result)other;
- lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_success()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -8173,13 +9660,6 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 0: // SUCCESS
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.success = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -8192,27 +9672,15 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
- if (this.is_set_success()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(this.success);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("beginFileUpload_result(");
+ StringBuilder sb = new StringBuilder("uploadChunk_result(");
boolean first = true;
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -8239,19 +9707,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class uploadChunk_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("uploadChunk_args");
+ public static class finishFileUpload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("finishFileUpload_args");
private static final org.apache.thrift7.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift7.protocol.TField("location", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift7.protocol.TField CHUNK_FIELD_DESC = new org.apache.thrift7.protocol.TField("chunk", org.apache.thrift7.protocol.TType.STRING, (short)2);
private String location; // required
- private ByteBuffer chunk; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- LOCATION((short)1, "location"),
- CHUNK((short)2, "chunk");
+ LOCATION((short)1, "location");
private static final Map byName = new HashMap();
@@ -8268,8 +9733,6 @@ public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // LOCATION
return LOCATION;
- case 2: // CHUNK
- return CHUNK;
default:
return null;
}
@@ -8316,45 +9779,36 @@ public String getFieldName() {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.LOCATION, new org.apache.thrift7.meta_data.FieldMetaData("location", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.CHUNK, new org.apache.thrift7.meta_data.FieldMetaData("chunk", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_args.class, metaDataMap);
}
- public uploadChunk_args() {
+ public finishFileUpload_args() {
}
- public uploadChunk_args(
- String location,
- ByteBuffer chunk)
+ public finishFileUpload_args(
+ String location)
{
this();
this.location = location;
- this.chunk = chunk;
}
/**
* Performs a deep copy on other.
*/
- public uploadChunk_args(uploadChunk_args other) {
+ public finishFileUpload_args(finishFileUpload_args other) {
if (other.is_set_location()) {
this.location = other.location;
}
- if (other.is_set_chunk()) {
- this.chunk = org.apache.thrift7.TBaseHelper.copyBinary(other.chunk);
-;
- }
}
- public uploadChunk_args deepCopy() {
- return new uploadChunk_args(this);
+ public finishFileUpload_args deepCopy() {
+ return new finishFileUpload_args(this);
}
@Override
public void clear() {
this.location = null;
- this.chunk = null;
}
public String get_location() {
@@ -8380,38 +9834,6 @@ public void set_location_isSet(boolean value) {
}
}
- public byte[] get_chunk() {
- set_chunk(org.apache.thrift7.TBaseHelper.rightSize(chunk));
- return chunk == null ? null : chunk.array();
- }
-
- public ByteBuffer buffer_for_chunk() {
- return chunk;
- }
-
- public void set_chunk(byte[] chunk) {
- set_chunk(chunk == null ? (ByteBuffer)null : ByteBuffer.wrap(chunk));
- }
-
- public void set_chunk(ByteBuffer chunk) {
- this.chunk = chunk;
- }
-
- public void unset_chunk() {
- this.chunk = null;
- }
-
- /** Returns true if field chunk is set (has been assigned a value) and false otherwise */
- public boolean is_set_chunk() {
- return this.chunk != null;
- }
-
- public void set_chunk_isSet(boolean value) {
- if (!value) {
- this.chunk = null;
- }
- }
-
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case LOCATION:
@@ -8422,14 +9844,6 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
- case CHUNK:
- if (value == null) {
- unset_chunk();
- } else {
- set_chunk((ByteBuffer)value);
- }
- break;
-
}
}
@@ -8438,9 +9852,6 @@ public Object getFieldValue(_Fields field) {
case LOCATION:
return get_location();
- case CHUNK:
- return get_chunk();
-
}
throw new IllegalStateException();
}
@@ -8454,8 +9865,6 @@ public boolean isSet(_Fields field) {
switch (field) {
case LOCATION:
return is_set_location();
- case CHUNK:
- return is_set_chunk();
}
throw new IllegalStateException();
}
@@ -8464,12 +9873,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof uploadChunk_args)
- return this.equals((uploadChunk_args)that);
+ if (that instanceof finishFileUpload_args)
+ return this.equals((finishFileUpload_args)that);
return false;
}
- public boolean equals(uploadChunk_args that) {
+ public boolean equals(finishFileUpload_args that) {
if (that == null)
return false;
@@ -8482,15 +9891,6 @@ public boolean equals(uploadChunk_args that) {
return false;
}
- boolean this_present_chunk = true && this.is_set_chunk();
- boolean that_present_chunk = true && that.is_set_chunk();
- if (this_present_chunk || that_present_chunk) {
- if (!(this_present_chunk && that_present_chunk))
- return false;
- if (!this.chunk.equals(that.chunk))
- return false;
- }
-
return true;
}
@@ -8503,21 +9903,16 @@ public int hashCode() {
if (present_location)
builder.append(location);
- boolean present_chunk = true && (is_set_chunk());
- builder.append(present_chunk);
- if (present_chunk)
- builder.append(chunk);
-
return builder.toHashCode();
}
- public int compareTo(uploadChunk_args other) {
+ public int compareTo(finishFileUpload_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- uploadChunk_args typedOther = (uploadChunk_args)other;
+ finishFileUpload_args typedOther = (finishFileUpload_args)other;
lastComparison = Boolean.valueOf(is_set_location()).compareTo(typedOther.is_set_location());
if (lastComparison != 0) {
@@ -8529,16 +9924,6 @@ public int compareTo(uploadChunk_args other) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_chunk()).compareTo(typedOther.is_set_chunk());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_chunk()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.chunk, typedOther.chunk);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -8563,13 +9948,6 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
- case 2: // CHUNK
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.chunk = iprot.readBinary();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -8588,18 +9966,13 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
oprot.writeString(this.location);
oprot.writeFieldEnd();
}
- if (this.chunk != null) {
- oprot.writeFieldBegin(CHUNK_FIELD_DESC);
- oprot.writeBinary(this.chunk);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("uploadChunk_args(");
+ StringBuilder sb = new StringBuilder("finishFileUpload_args(");
boolean first = true;
sb.append("location:");
@@ -8609,14 +9982,6 @@ public String toString() {
sb.append(this.location);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("chunk:");
- if (this.chunk == null) {
- sb.append("null");
- } else {
- org.apache.thrift7.TBaseHelper.toString(this.chunk, sb);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -8643,8 +10008,8 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class uploadChunk_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("uploadChunk_result");
+ public static class finishFileUpload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("finishFileUpload_result");
@@ -8707,20 +10072,20 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_result.class, metaDataMap);
}
- public uploadChunk_result() {
+ public finishFileUpload_result() {
}
/**
* Performs a deep copy on other.
*/
- public uploadChunk_result(uploadChunk_result other) {
+ public finishFileUpload_result(finishFileUpload_result other) {
}
- public uploadChunk_result deepCopy() {
- return new uploadChunk_result(this);
+ public finishFileUpload_result deepCopy() {
+ return new finishFileUpload_result(this);
}
@Override
@@ -8753,12 +10118,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof uploadChunk_result)
- return this.equals((uploadChunk_result)that);
+ if (that instanceof finishFileUpload_result)
+ return this.equals((finishFileUpload_result)that);
return false;
}
- public boolean equals(uploadChunk_result that) {
+ public boolean equals(finishFileUpload_result that) {
if (that == null)
return false;
@@ -8772,13 +10137,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(uploadChunk_result other) {
+ public int compareTo(finishFileUpload_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- uploadChunk_result typedOther = (uploadChunk_result)other;
+ finishFileUpload_result typedOther = (finishFileUpload_result)other;
return 0;
}
@@ -8815,7 +10180,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("uploadChunk_result(");
+ StringBuilder sb = new StringBuilder("finishFileUpload_result(");
boolean first = true;
sb.append(")");
@@ -8844,16 +10209,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class finishFileUpload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("finishFileUpload_args");
+ public static class beginFileDownload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileDownload_args");
- private static final org.apache.thrift7.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift7.protocol.TField("location", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField FILE_FIELD_DESC = new org.apache.thrift7.protocol.TField("file", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private String location; // required
+ private String file; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- LOCATION((short)1, "location");
+ FILE((short)1, "file");
private static final Map byName = new HashMap();
@@ -8868,8 +10233,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // LOCATION
- return LOCATION;
+ case 1: // FILE
+ return FILE;
default:
return null;
}
@@ -8914,70 +10279,70 @@ public String getFieldName() {
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LOCATION, new org.apache.thrift7.meta_data.FieldMetaData("location", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.FILE, new org.apache.thrift7.meta_data.FieldMetaData("file", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_args.class, metaDataMap);
}
- public finishFileUpload_args() {
+ public beginFileDownload_args() {
}
- public finishFileUpload_args(
- String location)
+ public beginFileDownload_args(
+ String file)
{
this();
- this.location = location;
+ this.file = file;
}
/**
* Performs a deep copy on other.
*/
- public finishFileUpload_args(finishFileUpload_args other) {
- if (other.is_set_location()) {
- this.location = other.location;
+ public beginFileDownload_args(beginFileDownload_args other) {
+ if (other.is_set_file()) {
+ this.file = other.file;
}
}
- public finishFileUpload_args deepCopy() {
- return new finishFileUpload_args(this);
+ public beginFileDownload_args deepCopy() {
+ return new beginFileDownload_args(this);
}
@Override
public void clear() {
- this.location = null;
+ this.file = null;
}
- public String get_location() {
- return this.location;
+ public String get_file() {
+ return this.file;
}
- public void set_location(String location) {
- this.location = location;
+ public void set_file(String file) {
+ this.file = file;
}
- public void unset_location() {
- this.location = null;
+ public void unset_file() {
+ this.file = null;
}
- /** Returns true if field location is set (has been assigned a value) and false otherwise */
- public boolean is_set_location() {
- return this.location != null;
+ /** Returns true if field file is set (has been assigned a value) and false otherwise */
+ public boolean is_set_file() {
+ return this.file != null;
}
- public void set_location_isSet(boolean value) {
+ public void set_file_isSet(boolean value) {
if (!value) {
- this.location = null;
+ this.file = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case LOCATION:
+ case FILE:
if (value == null) {
- unset_location();
+ unset_file();
} else {
- set_location((String)value);
+ set_file((String)value);
}
break;
@@ -8986,8 +10351,8 @@ public void setFieldValue(_Fields field, Object value) {
public Object getFieldValue(_Fields field) {
switch (field) {
- case LOCATION:
- return get_location();
+ case FILE:
+ return get_file();
}
throw new IllegalStateException();
@@ -9000,8 +10365,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case LOCATION:
- return is_set_location();
+ case FILE:
+ return is_set_file();
}
throw new IllegalStateException();
}
@@ -9010,21 +10375,21 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof finishFileUpload_args)
- return this.equals((finishFileUpload_args)that);
+ if (that instanceof beginFileDownload_args)
+ return this.equals((beginFileDownload_args)that);
return false;
}
- public boolean equals(finishFileUpload_args that) {
+ public boolean equals(beginFileDownload_args that) {
if (that == null)
return false;
- boolean this_present_location = true && this.is_set_location();
- boolean that_present_location = true && that.is_set_location();
- if (this_present_location || that_present_location) {
- if (!(this_present_location && that_present_location))
+ boolean this_present_file = true && this.is_set_file();
+ boolean that_present_file = true && that.is_set_file();
+ if (this_present_file || that_present_file) {
+ if (!(this_present_file && that_present_file))
return false;
- if (!this.location.equals(that.location))
+ if (!this.file.equals(that.file))
return false;
}
@@ -9035,28 +10400,28 @@ public boolean equals(finishFileUpload_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- boolean present_location = true && (is_set_location());
- builder.append(present_location);
- if (present_location)
- builder.append(location);
+ boolean present_file = true && (is_set_file());
+ builder.append(present_file);
+ if (present_file)
+ builder.append(file);
return builder.toHashCode();
}
- public int compareTo(finishFileUpload_args other) {
+ public int compareTo(beginFileDownload_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- finishFileUpload_args typedOther = (finishFileUpload_args)other;
+ beginFileDownload_args typedOther = (beginFileDownload_args)other;
- lastComparison = Boolean.valueOf(is_set_location()).compareTo(typedOther.is_set_location());
+ lastComparison = Boolean.valueOf(is_set_file()).compareTo(typedOther.is_set_file());
if (lastComparison != 0) {
return lastComparison;
}
- if (is_set_location()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.location, typedOther.location);
+ if (is_set_file()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.file, typedOther.file);
if (lastComparison != 0) {
return lastComparison;
}
@@ -9078,9 +10443,9 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 1: // LOCATION
+ case 1: // FILE
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.location = iprot.readString();
+ this.file = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -9098,9 +10463,9 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.location != null) {
- oprot.writeFieldBegin(LOCATION_FIELD_DESC);
- oprot.writeString(this.location);
+ if (this.file != null) {
+ oprot.writeFieldBegin(FILE_FIELD_DESC);
+ oprot.writeString(this.file);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -9109,14 +10474,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("finishFileUpload_args(");
+ StringBuilder sb = new StringBuilder("beginFileDownload_args(");
boolean first = true;
- sb.append("location:");
- if (this.location == null) {
+ sb.append("file:");
+ if (this.file == null) {
sb.append("null");
} else {
- sb.append(this.location);
+ sb.append(this.file);
}
first = false;
sb.append(")");
@@ -9145,14 +10510,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class finishFileUpload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("finishFileUpload_result");
+ public static class beginFileDownload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileDownload_result");
+ private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
+ private String success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
-;
+ SUCCESS((short)0, "success");
private static final Map byName = new HashMap();
@@ -9167,6 +10534,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
default:
return null;
}
@@ -9205,37 +10574,87 @@ public String getFieldName() {
return _fieldName;
}
}
+
+ // isset id assignments
+
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_result.class, metaDataMap);
}
- public finishFileUpload_result() {
+ public beginFileDownload_result() {
+ }
+
+ public beginFileDownload_result(
+ String success)
+ {
+ this();
+ this.success = success;
}
/**
* Performs a deep copy on other.
*/
- public finishFileUpload_result(finishFileUpload_result other) {
+ public beginFileDownload_result(beginFileDownload_result other) {
+ if (other.is_set_success()) {
+ this.success = other.success;
+ }
}
- public finishFileUpload_result deepCopy() {
- return new finishFileUpload_result(this);
+ public beginFileDownload_result deepCopy() {
+ return new beginFileDownload_result(this);
}
@Override
public void clear() {
+ this.success = null;
+ }
+
+ public String get_success() {
+ return this.success;
+ }
+
+ public void set_success(String success) {
+ this.success = success;
+ }
+
+ public void unset_success() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean is_set_success() {
+ return this.success != null;
+ }
+
+ public void set_success_isSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unset_success();
+ } else {
+ set_success((String)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case SUCCESS:
+ return get_success();
+
}
throw new IllegalStateException();
}
@@ -9247,6 +10666,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
+ case SUCCESS:
+ return is_set_success();
}
throw new IllegalStateException();
}
@@ -9255,15 +10676,24 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof finishFileUpload_result)
- return this.equals((finishFileUpload_result)that);
+ if (that instanceof beginFileDownload_result)
+ return this.equals((beginFileDownload_result)that);
return false;
}
- public boolean equals(finishFileUpload_result that) {
+ public boolean equals(beginFileDownload_result that) {
if (that == null)
return false;
+ boolean this_present_success = true && this.is_set_success();
+ boolean that_present_success = true && that.is_set_success();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
return true;
}
@@ -9271,17 +10701,32 @@ public boolean equals(finishFileUpload_result that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
+ boolean present_success = true && (is_set_success());
+ builder.append(present_success);
+ if (present_success)
+ builder.append(success);
+
return builder.toHashCode();
}
- public int compareTo(finishFileUpload_result other) {
+ public int compareTo(beginFileDownload_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- finishFileUpload_result typedOther = (finishFileUpload_result)other;
+ beginFileDownload_result typedOther = (beginFileDownload_result)other;
+ lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_success()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -9299,6 +10744,13 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
+ case 0: // SUCCESS
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.success = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -9311,15 +10763,27 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
+ if (this.is_set_success()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(this.success);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("finishFileUpload_result(");
+ StringBuilder sb = new StringBuilder("beginFileDownload_result(");
boolean first = true;
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -9346,16 +10810,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class beginFileDownload_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileDownload_args");
+ public static class downloadChunk_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("downloadChunk_args");
- private static final org.apache.thrift7.protocol.TField FILE_FIELD_DESC = new org.apache.thrift7.protocol.TField("file", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private String file; // required
+ private String id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- FILE((short)1, "file");
+ ID((short)1, "id");
private static final Map byName = new HashMap();
@@ -9370,8 +10834,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // FILE
- return FILE;
+ case 1: // ID
+ return ID;
default:
return null;
}
@@ -9416,70 +10880,70 @@ public String getFieldName() {
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.FILE, new org.apache.thrift7.meta_data.FieldMetaData("file", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_args.class, metaDataMap);
}
- public beginFileDownload_args() {
+ public downloadChunk_args() {
}
- public beginFileDownload_args(
- String file)
+ public downloadChunk_args(
+ String id)
{
this();
- this.file = file;
+ this.id = id;
}
/**
* Performs a deep copy on other.
*/
- public beginFileDownload_args(beginFileDownload_args other) {
- if (other.is_set_file()) {
- this.file = other.file;
+ public downloadChunk_args(downloadChunk_args other) {
+ if (other.is_set_id()) {
+ this.id = other.id;
}
}
- public beginFileDownload_args deepCopy() {
- return new beginFileDownload_args(this);
+ public downloadChunk_args deepCopy() {
+ return new downloadChunk_args(this);
}
@Override
public void clear() {
- this.file = null;
+ this.id = null;
}
- public String get_file() {
- return this.file;
+ public String get_id() {
+ return this.id;
}
- public void set_file(String file) {
- this.file = file;
+ public void set_id(String id) {
+ this.id = id;
}
- public void unset_file() {
- this.file = null;
+ public void unset_id() {
+ this.id = null;
}
- /** Returns true if field file is set (has been assigned a value) and false otherwise */
- public boolean is_set_file() {
- return this.file != null;
+ /** Returns true if field id is set (has been assigned a value) and false otherwise */
+ public boolean is_set_id() {
+ return this.id != null;
}
- public void set_file_isSet(boolean value) {
+ public void set_id_isSet(boolean value) {
if (!value) {
- this.file = null;
+ this.id = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case FILE:
+ case ID:
if (value == null) {
- unset_file();
+ unset_id();
} else {
- set_file((String)value);
+ set_id((String)value);
}
break;
@@ -9488,8 +10952,8 @@ public void setFieldValue(_Fields field, Object value) {
public Object getFieldValue(_Fields field) {
switch (field) {
- case FILE:
- return get_file();
+ case ID:
+ return get_id();
}
throw new IllegalStateException();
@@ -9502,8 +10966,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case FILE:
- return is_set_file();
+ case ID:
+ return is_set_id();
}
throw new IllegalStateException();
}
@@ -9512,21 +10976,21 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof beginFileDownload_args)
- return this.equals((beginFileDownload_args)that);
+ if (that instanceof downloadChunk_args)
+ return this.equals((downloadChunk_args)that);
return false;
}
- public boolean equals(beginFileDownload_args that) {
+ public boolean equals(downloadChunk_args that) {
if (that == null)
return false;
- boolean this_present_file = true && this.is_set_file();
- boolean that_present_file = true && that.is_set_file();
- if (this_present_file || that_present_file) {
- if (!(this_present_file && that_present_file))
+ boolean this_present_id = true && this.is_set_id();
+ boolean that_present_id = true && that.is_set_id();
+ if (this_present_id || that_present_id) {
+ if (!(this_present_id && that_present_id))
return false;
- if (!this.file.equals(that.file))
+ if (!this.id.equals(that.id))
return false;
}
@@ -9537,28 +11001,28 @@ public boolean equals(beginFileDownload_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- boolean present_file = true && (is_set_file());
- builder.append(present_file);
- if (present_file)
- builder.append(file);
+ boolean present_id = true && (is_set_id());
+ builder.append(present_id);
+ if (present_id)
+ builder.append(id);
return builder.toHashCode();
}
- public int compareTo(beginFileDownload_args other) {
+ public int compareTo(downloadChunk_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- beginFileDownload_args typedOther = (beginFileDownload_args)other;
+ downloadChunk_args typedOther = (downloadChunk_args)other;
- lastComparison = Boolean.valueOf(is_set_file()).compareTo(typedOther.is_set_file());
+ lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
- if (is_set_file()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.file, typedOther.file);
+ if (is_set_id()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.id, typedOther.id);
if (lastComparison != 0) {
return lastComparison;
}
@@ -9580,9 +11044,9 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 1: // FILE
+ case 1: // ID
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.file = iprot.readString();
+ this.id = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -9600,9 +11064,9 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.file != null) {
- oprot.writeFieldBegin(FILE_FIELD_DESC);
- oprot.writeString(this.file);
+ if (this.id != null) {
+ oprot.writeFieldBegin(ID_FIELD_DESC);
+ oprot.writeString(this.id);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -9611,14 +11075,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("beginFileDownload_args(");
+ StringBuilder sb = new StringBuilder("downloadChunk_args(");
boolean first = true;
- sb.append("file:");
- if (this.file == null) {
+ sb.append("id:");
+ if (this.id == null) {
sb.append("null");
} else {
- sb.append(this.file);
+ sb.append(this.id);
}
first = false;
sb.append(")");
@@ -9647,12 +11111,12 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class beginFileDownload_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("beginFileDownload_result");
+ public static class downloadChunk_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("downloadChunk_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
- private String success; // required
+ private ByteBuffer success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
@@ -9718,16 +11182,16 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_result.class, metaDataMap);
}
- public beginFileDownload_result() {
+ public downloadChunk_result() {
}
- public beginFileDownload_result(
- String success)
+ public downloadChunk_result(
+ ByteBuffer success)
{
this();
this.success = success;
@@ -9736,14 +11200,15 @@ public beginFileDownload_result(
/**
* Performs a deep copy on other.
*/
- public beginFileDownload_result(beginFileDownload_result other) {
+ public downloadChunk_result(downloadChunk_result other) {
if (other.is_set_success()) {
- this.success = other.success;
+ this.success = org.apache.thrift7.TBaseHelper.copyBinary(other.success);
+;
}
}
- public beginFileDownload_result deepCopy() {
- return new beginFileDownload_result(this);
+ public downloadChunk_result deepCopy() {
+ return new downloadChunk_result(this);
}
@Override
@@ -9751,11 +11216,20 @@ public void clear() {
this.success = null;
}
- public String get_success() {
- return this.success;
+ public byte[] get_success() {
+ set_success(org.apache.thrift7.TBaseHelper.rightSize(success));
+ return success == null ? null : success.array();
}
- public void set_success(String success) {
+ public ByteBuffer buffer_for_success() {
+ return success;
+ }
+
+ public void set_success(byte[] success) {
+ set_success(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
+ }
+
+ public void set_success(ByteBuffer success) {
this.success = success;
}
@@ -9780,7 +11254,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((String)value);
+ set_success((ByteBuffer)value);
}
break;
@@ -9813,12 +11287,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof beginFileDownload_result)
- return this.equals((beginFileDownload_result)that);
+ if (that instanceof downloadChunk_result)
+ return this.equals((downloadChunk_result)that);
return false;
}
- public boolean equals(beginFileDownload_result that) {
+ public boolean equals(downloadChunk_result that) {
if (that == null)
return false;
@@ -9846,13 +11320,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(beginFileDownload_result other) {
+ public int compareTo(downloadChunk_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- beginFileDownload_result typedOther = (beginFileDownload_result)other;
+ downloadChunk_result typedOther = (downloadChunk_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -9883,7 +11357,7 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.success = iprot.readString();
+ this.success = iprot.readBinary();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -9902,7 +11376,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(this.success);
+ oprot.writeBinary(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -9911,14 +11385,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("beginFileDownload_result(");
+ StringBuilder sb = new StringBuilder("downloadChunk_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
- sb.append(this.success);
+ org.apache.thrift7.TBaseHelper.toString(this.success, sb);
}
first = false;
sb.append(")");
@@ -9947,16 +11421,14 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class downloadChunk_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("downloadChunk_args");
+ public static class getNimbusConf_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getNimbusConf_args");
- private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private String id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- ID((short)1, "id");
+;
private static final Map byName = new HashMap();
@@ -9971,8 +11443,6 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // ID
- return ID;
default:
return null;
}
@@ -10007,91 +11477,41 @@ public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
-
- public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_args.class, metaDataMap);
- }
-
- public downloadChunk_args() {
- }
-
- public downloadChunk_args(
- String id)
- {
- this();
- this.id = id;
- }
-
- /**
- * Performs a deep copy on other.
- */
- public downloadChunk_args(downloadChunk_args other) {
- if (other.is_set_id()) {
- this.id = other.id;
- }
- }
-
- public downloadChunk_args deepCopy() {
- return new downloadChunk_args(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- }
-
- public String get_id() {
- return this.id;
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getNimbusConf_args.class, metaDataMap);
}
- public void set_id(String id) {
- this.id = id;
+ public getNimbusConf_args() {
}
- public void unset_id() {
- this.id = null;
+ /**
+ * Performs a deep copy on other.
+ */
+ public getNimbusConf_args(getNimbusConf_args other) {
}
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean is_set_id() {
- return this.id != null;
+ public getNimbusConf_args deepCopy() {
+ return new getNimbusConf_args(this);
}
- public void set_id_isSet(boolean value) {
- if (!value) {
- this.id = null;
- }
+ @Override
+ public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case ID:
- if (value == null) {
- unset_id();
- } else {
- set_id((String)value);
- }
- break;
-
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case ID:
- return get_id();
-
}
throw new IllegalStateException();
}
@@ -10103,8 +11523,6 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case ID:
- return is_set_id();
}
throw new IllegalStateException();
}
@@ -10113,24 +11531,15 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof downloadChunk_args)
- return this.equals((downloadChunk_args)that);
+ if (that instanceof getNimbusConf_args)
+ return this.equals((getNimbusConf_args)that);
return false;
}
- public boolean equals(downloadChunk_args that) {
+ public boolean equals(getNimbusConf_args that) {
if (that == null)
return false;
- boolean this_present_id = true && this.is_set_id();
- boolean that_present_id = true && that.is_set_id();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
return true;
}
@@ -10138,32 +11547,17 @@ public boolean equals(downloadChunk_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- boolean present_id = true && (is_set_id());
- builder.append(present_id);
- if (present_id)
- builder.append(id);
-
return builder.toHashCode();
}
- public int compareTo(downloadChunk_args other) {
+ public int compareTo(getNimbusConf_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- downloadChunk_args typedOther = (downloadChunk_args)other;
+ getNimbusConf_args typedOther = (getNimbusConf_args)other;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_id()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.id, typedOther.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -10181,13 +11575,6 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 1: // ID
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.id = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -10201,27 +11588,15 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(this.id);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("downloadChunk_args(");
+ StringBuilder sb = new StringBuilder("getNimbusConf_args(");
boolean first = true;
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -10248,12 +11623,12 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class downloadChunk_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("downloadChunk_result");
+ public static class getNimbusConf_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getNimbusConf_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
- private ByteBuffer success; // required
+ private String success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
@@ -10319,16 +11694,16 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING , true)));
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getNimbusConf_result.class, metaDataMap);
}
- public downloadChunk_result() {
+ public getNimbusConf_result() {
}
- public downloadChunk_result(
- ByteBuffer success)
+ public getNimbusConf_result(
+ String success)
{
this();
this.success = success;
@@ -10337,15 +11712,14 @@ public downloadChunk_result(
/**
* Performs a deep copy on other.
*/
- public downloadChunk_result(downloadChunk_result other) {
+ public getNimbusConf_result(getNimbusConf_result other) {
if (other.is_set_success()) {
- this.success = org.apache.thrift7.TBaseHelper.copyBinary(other.success);
-;
+ this.success = other.success;
}
}
- public downloadChunk_result deepCopy() {
- return new downloadChunk_result(this);
+ public getNimbusConf_result deepCopy() {
+ return new getNimbusConf_result(this);
}
@Override
@@ -10353,20 +11727,11 @@ public void clear() {
this.success = null;
}
- public byte[] get_success() {
- set_success(org.apache.thrift7.TBaseHelper.rightSize(success));
- return success == null ? null : success.array();
- }
-
- public ByteBuffer buffer_for_success() {
- return success;
- }
-
- public void set_success(byte[] success) {
- set_success(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
+ public String get_success() {
+ return this.success;
}
- public void set_success(ByteBuffer success) {
+ public void set_success(String success) {
this.success = success;
}
@@ -10391,7 +11756,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((ByteBuffer)value);
+ set_success((String)value);
}
break;
@@ -10424,12 +11789,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof downloadChunk_result)
- return this.equals((downloadChunk_result)that);
+ if (that instanceof getNimbusConf_result)
+ return this.equals((getNimbusConf_result)that);
return false;
}
- public boolean equals(downloadChunk_result that) {
+ public boolean equals(getNimbusConf_result that) {
if (that == null)
return false;
@@ -10457,13 +11822,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(downloadChunk_result other) {
+ public int compareTo(getNimbusConf_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- downloadChunk_result typedOther = (downloadChunk_result)other;
+ getNimbusConf_result typedOther = (getNimbusConf_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -10494,7 +11859,7 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.success = iprot.readBinary();
+ this.success = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -10513,7 +11878,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBinary(this.success);
+ oprot.writeString(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -10522,14 +11887,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("downloadChunk_result(");
+ StringBuilder sb = new StringBuilder("getNimbusConf_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
- org.apache.thrift7.TBaseHelper.toString(this.success, sb);
+ sb.append(this.success);
}
first = false;
sb.append(")");
@@ -10558,8 +11923,8 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getNimbusConf_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getNimbusConf_args");
+ public static class getClusterInfo_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getClusterInfo_args");
@@ -10622,20 +11987,20 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getNimbusConf_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getClusterInfo_args.class, metaDataMap);
}
- public getNimbusConf_args() {
+ public getClusterInfo_args() {
}
/**
* Performs a deep copy on other.
*/
- public getNimbusConf_args(getNimbusConf_args other) {
+ public getClusterInfo_args(getClusterInfo_args other) {
}
- public getNimbusConf_args deepCopy() {
- return new getNimbusConf_args(this);
+ public getClusterInfo_args deepCopy() {
+ return new getClusterInfo_args(this);
}
@Override
@@ -10668,12 +12033,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getNimbusConf_args)
- return this.equals((getNimbusConf_args)that);
+ if (that instanceof getClusterInfo_args)
+ return this.equals((getClusterInfo_args)that);
return false;
}
- public boolean equals(getNimbusConf_args that) {
+ public boolean equals(getClusterInfo_args that) {
if (that == null)
return false;
@@ -10687,13 +12052,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getNimbusConf_args other) {
+ public int compareTo(getClusterInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getNimbusConf_args typedOther = (getNimbusConf_args)other;
+ getClusterInfo_args typedOther = (getClusterInfo_args)other;
return 0;
}
@@ -10731,7 +12096,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getNimbusConf_args(");
+ StringBuilder sb = new StringBuilder("getClusterInfo_args(");
boolean first = true;
sb.append(")");
@@ -10760,12 +12125,12 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getNimbusConf_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getNimbusConf_result");
+ public static class getClusterInfo_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getClusterInfo_result");
- private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
- private String success; // required
+ private ClusterSummary success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
@@ -10831,16 +12196,16 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, ClusterSummary.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getNimbusConf_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getClusterInfo_result.class, metaDataMap);
}
- public getNimbusConf_result() {
+ public getClusterInfo_result() {
}
- public getNimbusConf_result(
- String success)
+ public getClusterInfo_result(
+ ClusterSummary success)
{
this();
this.success = success;
@@ -10849,14 +12214,14 @@ public getNimbusConf_result(
/**
* Performs a deep copy on other.
*/
- public getNimbusConf_result(getNimbusConf_result other) {
+ public getClusterInfo_result(getClusterInfo_result other) {
if (other.is_set_success()) {
- this.success = other.success;
+ this.success = new ClusterSummary(other.success);
}
}
- public getNimbusConf_result deepCopy() {
- return new getNimbusConf_result(this);
+ public getClusterInfo_result deepCopy() {
+ return new getClusterInfo_result(this);
}
@Override
@@ -10864,11 +12229,11 @@ public void clear() {
this.success = null;
}
- public String get_success() {
+ public ClusterSummary get_success() {
return this.success;
}
- public void set_success(String success) {
+ public void set_success(ClusterSummary success) {
this.success = success;
}
@@ -10893,7 +12258,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((String)value);
+ set_success((ClusterSummary)value);
}
break;
@@ -10926,12 +12291,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getNimbusConf_result)
- return this.equals((getNimbusConf_result)that);
+ if (that instanceof getClusterInfo_result)
+ return this.equals((getClusterInfo_result)that);
return false;
}
- public boolean equals(getNimbusConf_result that) {
+ public boolean equals(getClusterInfo_result that) {
if (that == null)
return false;
@@ -10959,13 +12324,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getNimbusConf_result other) {
+ public int compareTo(getClusterInfo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getNimbusConf_result typedOther = (getNimbusConf_result)other;
+ getClusterInfo_result typedOther = (getClusterInfo_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -10995,8 +12360,9 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
}
switch (field.id) {
case 0: // SUCCESS
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.success = iprot.readString();
+ if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
+ this.success = new ClusterSummary();
+ this.success.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -11015,7 +12381,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(this.success);
+ this.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -11024,7 +12390,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getNimbusConf_result(");
+ StringBuilder sb = new StringBuilder("getClusterInfo_result(");
boolean first = true;
sb.append("success:");
@@ -11060,14 +12426,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getClusterInfo_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getClusterInfo_args");
+ public static class getTopologyInfo_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyInfo_args");
+ private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private String id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
-;
+ ID((short)1, "id");
private static final Map byName = new HashMap();
@@ -11082,6 +12450,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // ID
+ return ID;
default:
return null;
}
@@ -11120,37 +12490,87 @@ public String getFieldName() {
return _fieldName;
}
}
+
+ // isset id assignments
+
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getClusterInfo_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyInfo_args.class, metaDataMap);
+ }
+
+ public getTopologyInfo_args() {
}
- public getClusterInfo_args() {
+ public getTopologyInfo_args(
+ String id)
+ {
+ this();
+ this.id = id;
}
/**
* Performs a deep copy on other.
*/
- public getClusterInfo_args(getClusterInfo_args other) {
+ public getTopologyInfo_args(getTopologyInfo_args other) {
+ if (other.is_set_id()) {
+ this.id = other.id;
+ }
}
- public getClusterInfo_args deepCopy() {
- return new getClusterInfo_args(this);
+ public getTopologyInfo_args deepCopy() {
+ return new getTopologyInfo_args(this);
}
@Override
public void clear() {
+ this.id = null;
+ }
+
+ public String get_id() {
+ return this.id;
+ }
+
+ public void set_id(String id) {
+ this.id = id;
+ }
+
+ public void unset_id() {
+ this.id = null;
+ }
+
+ /** Returns true if field id is set (has been assigned a value) and false otherwise */
+ public boolean is_set_id() {
+ return this.id != null;
+ }
+
+ public void set_id_isSet(boolean value) {
+ if (!value) {
+ this.id = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case ID:
+ if (value == null) {
+ unset_id();
+ } else {
+ set_id((String)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case ID:
+ return get_id();
+
}
throw new IllegalStateException();
}
@@ -11162,6 +12582,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
+ case ID:
+ return is_set_id();
}
throw new IllegalStateException();
}
@@ -11170,15 +12592,24 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getClusterInfo_args)
- return this.equals((getClusterInfo_args)that);
+ if (that instanceof getTopologyInfo_args)
+ return this.equals((getTopologyInfo_args)that);
return false;
}
- public boolean equals(getClusterInfo_args that) {
+ public boolean equals(getTopologyInfo_args that) {
if (that == null)
return false;
+ boolean this_present_id = true && this.is_set_id();
+ boolean that_present_id = true && that.is_set_id();
+ if (this_present_id || that_present_id) {
+ if (!(this_present_id && that_present_id))
+ return false;
+ if (!this.id.equals(that.id))
+ return false;
+ }
+
return true;
}
@@ -11186,17 +12617,32 @@ public boolean equals(getClusterInfo_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
+ boolean present_id = true && (is_set_id());
+ builder.append(present_id);
+ if (present_id)
+ builder.append(id);
+
return builder.toHashCode();
}
- public int compareTo(getClusterInfo_args other) {
+ public int compareTo(getTopologyInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getClusterInfo_args typedOther = (getClusterInfo_args)other;
+ getTopologyInfo_args typedOther = (getTopologyInfo_args)other;
+ lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_id()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.id, typedOther.id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -11214,6 +12660,13 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
+ case 1: // ID
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.id = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -11227,15 +12680,27 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (this.id != null) {
+ oprot.writeFieldBegin(ID_FIELD_DESC);
+ oprot.writeString(this.id);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getClusterInfo_args(");
+ StringBuilder sb = new StringBuilder("getTopologyInfo_args(");
boolean first = true;
+ sb.append("id:");
+ if (this.id == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.id);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -11262,16 +12727,19 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getClusterInfo_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getClusterInfo_result");
+ public static class getTopologyInfo_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyInfo_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
- private ClusterSummary success; // required
+ private TopologyInfo success; // required
+ private NotAliveException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- SUCCESS((short)0, "success");
+ SUCCESS((short)0, "success"),
+ E((short)1, "e");
private static final Map byName = new HashMap();
@@ -11288,6 +12756,8 @@ public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
+ case 1: // E
+ return E;
default:
return null;
}
@@ -11333,44 +12803,52 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, ClusterSummary.class)));
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TopologyInfo.class)));
+ tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getClusterInfo_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyInfo_result.class, metaDataMap);
}
- public getClusterInfo_result() {
+ public getTopologyInfo_result() {
}
- public getClusterInfo_result(
- ClusterSummary success)
+ public getTopologyInfo_result(
+ TopologyInfo success,
+ NotAliveException e)
{
this();
this.success = success;
+ this.e = e;
}
/**
* Performs a deep copy on other.
*/
- public getClusterInfo_result(getClusterInfo_result other) {
+ public getTopologyInfo_result(getTopologyInfo_result other) {
if (other.is_set_success()) {
- this.success = new ClusterSummary(other.success);
+ this.success = new TopologyInfo(other.success);
+ }
+ if (other.is_set_e()) {
+ this.e = new NotAliveException(other.e);
}
}
- public getClusterInfo_result deepCopy() {
- return new getClusterInfo_result(this);
+ public getTopologyInfo_result deepCopy() {
+ return new getTopologyInfo_result(this);
}
@Override
public void clear() {
this.success = null;
+ this.e = null;
}
- public ClusterSummary get_success() {
+ public TopologyInfo get_success() {
return this.success;
}
- public void set_success(ClusterSummary success) {
+ public void set_success(TopologyInfo success) {
this.success = success;
}
@@ -11389,13 +12867,44 @@ public void set_success_isSet(boolean value) {
}
}
+ public NotAliveException get_e() {
+ return this.e;
+ }
+
+ public void set_e(NotAliveException e) {
+ this.e = e;
+ }
+
+ public void unset_e() {
+ this.e = null;
+ }
+
+ /** Returns true if field e is set (has been assigned a value) and false otherwise */
+ public boolean is_set_e() {
+ return this.e != null;
+ }
+
+ public void set_e_isSet(boolean value) {
+ if (!value) {
+ this.e = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
- set_success((ClusterSummary)value);
+ set_success((TopologyInfo)value);
+ }
+ break;
+
+ case E:
+ if (value == null) {
+ unset_e();
+ } else {
+ set_e((NotAliveException)value);
}
break;
@@ -11407,6 +12916,9 @@ public Object getFieldValue(_Fields field) {
case SUCCESS:
return get_success();
+ case E:
+ return get_e();
+
}
throw new IllegalStateException();
}
@@ -11420,6 +12932,8 @@ public boolean isSet(_Fields field) {
switch (field) {
case SUCCESS:
return is_set_success();
+ case E:
+ return is_set_e();
}
throw new IllegalStateException();
}
@@ -11428,12 +12942,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getClusterInfo_result)
- return this.equals((getClusterInfo_result)that);
+ if (that instanceof getTopologyInfo_result)
+ return this.equals((getTopologyInfo_result)that);
return false;
}
- public boolean equals(getClusterInfo_result that) {
+ public boolean equals(getTopologyInfo_result that) {
if (that == null)
return false;
@@ -11446,6 +12960,15 @@ public boolean equals(getClusterInfo_result that) {
return false;
}
+ boolean this_present_e = true && this.is_set_e();
+ boolean that_present_e = true && that.is_set_e();
+ if (this_present_e || that_present_e) {
+ if (!(this_present_e && that_present_e))
+ return false;
+ if (!this.e.equals(that.e))
+ return false;
+ }
+
return true;
}
@@ -11458,16 +12981,21 @@ public int hashCode() {
if (present_success)
builder.append(success);
+ boolean present_e = true && (is_set_e());
+ builder.append(present_e);
+ if (present_e)
+ builder.append(e);
+
return builder.toHashCode();
}
- public int compareTo(getClusterInfo_result other) {
+ public int compareTo(getTopologyInfo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getClusterInfo_result typedOther = (getClusterInfo_result)other;
+ getTopologyInfo_result typedOther = (getTopologyInfo_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -11479,6 +13007,16 @@ public int compareTo(getClusterInfo_result other) {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(is_set_e()).compareTo(typedOther.is_set_e());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_e()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.e, typedOther.e);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -11498,12 +13036,20 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
- this.success = new ClusterSummary();
+ this.success = new TopologyInfo();
this.success.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
+ case 1: // E
+ if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
+ this.e = new NotAliveException();
+ this.e.read(iprot);
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -11520,6 +13066,10 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
+ } else if (this.is_set_e()) {
+ oprot.writeFieldBegin(E_FIELD_DESC);
+ this.e.write(oprot);
+ oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -11527,7 +13077,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getClusterInfo_result(");
+ StringBuilder sb = new StringBuilder("getTopologyInfo_result(");
boolean first = true;
sb.append("success:");
@@ -11537,6 +13087,14 @@ public String toString() {
sb.append(this.success);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("e:");
+ if (this.e == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.e);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -11563,16 +13121,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getTopologyInfo_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyInfo_args");
+ public static class getSupervisorWorkers_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getSupervisorWorkers_args");
- private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField HOST_FIELD_DESC = new org.apache.thrift7.protocol.TField("host", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private String id; // required
+ private String host; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- ID((short)1, "id");
+ HOST((short)1, "host");
private static final Map byName = new HashMap();
@@ -11587,8 +13145,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // ID
- return ID;
+ case 1: // HOST
+ return HOST;
default:
return null;
}
@@ -11633,70 +13191,70 @@ public String getFieldName() {
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.HOST, new org.apache.thrift7.meta_data.FieldMetaData("host", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyInfo_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getSupervisorWorkers_args.class, metaDataMap);
}
- public getTopologyInfo_args() {
+ public getSupervisorWorkers_args() {
}
- public getTopologyInfo_args(
- String id)
+ public getSupervisorWorkers_args(
+ String host)
{
this();
- this.id = id;
+ this.host = host;
}
/**
* Performs a deep copy on other.
*/
- public getTopologyInfo_args(getTopologyInfo_args other) {
- if (other.is_set_id()) {
- this.id = other.id;
+ public getSupervisorWorkers_args(getSupervisorWorkers_args other) {
+ if (other.is_set_host()) {
+ this.host = other.host;
}
}
- public getTopologyInfo_args deepCopy() {
- return new getTopologyInfo_args(this);
+ public getSupervisorWorkers_args deepCopy() {
+ return new getSupervisorWorkers_args(this);
}
@Override
public void clear() {
- this.id = null;
+ this.host = null;
}
- public String get_id() {
- return this.id;
+ public String get_host() {
+ return this.host;
}
- public void set_id(String id) {
- this.id = id;
+ public void set_host(String host) {
+ this.host = host;
}
- public void unset_id() {
- this.id = null;
+ public void unset_host() {
+ this.host = null;
}
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean is_set_id() {
- return this.id != null;
+ /** Returns true if field host is set (has been assigned a value) and false otherwise */
+ public boolean is_set_host() {
+ return this.host != null;
}
- public void set_id_isSet(boolean value) {
+ public void set_host_isSet(boolean value) {
if (!value) {
- this.id = null;
+ this.host = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case ID:
+ case HOST:
if (value == null) {
- unset_id();
+ unset_host();
} else {
- set_id((String)value);
+ set_host((String)value);
}
break;
@@ -11705,8 +13263,8 @@ public void setFieldValue(_Fields field, Object value) {
public Object getFieldValue(_Fields field) {
switch (field) {
- case ID:
- return get_id();
+ case HOST:
+ return get_host();
}
throw new IllegalStateException();
@@ -11719,8 +13277,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case ID:
- return is_set_id();
+ case HOST:
+ return is_set_host();
}
throw new IllegalStateException();
}
@@ -11729,21 +13287,21 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getTopologyInfo_args)
- return this.equals((getTopologyInfo_args)that);
+ if (that instanceof getSupervisorWorkers_args)
+ return this.equals((getSupervisorWorkers_args)that);
return false;
}
- public boolean equals(getTopologyInfo_args that) {
+ public boolean equals(getSupervisorWorkers_args that) {
if (that == null)
return false;
- boolean this_present_id = true && this.is_set_id();
- boolean that_present_id = true && that.is_set_id();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
+ boolean this_present_host = true && this.is_set_host();
+ boolean that_present_host = true && that.is_set_host();
+ if (this_present_host || that_present_host) {
+ if (!(this_present_host && that_present_host))
return false;
- if (!this.id.equals(that.id))
+ if (!this.host.equals(that.host))
return false;
}
@@ -11754,28 +13312,28 @@ public boolean equals(getTopologyInfo_args that) {
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- boolean present_id = true && (is_set_id());
- builder.append(present_id);
- if (present_id)
- builder.append(id);
+ boolean present_host = true && (is_set_host());
+ builder.append(present_host);
+ if (present_host)
+ builder.append(host);
return builder.toHashCode();
}
- public int compareTo(getTopologyInfo_args other) {
+ public int compareTo(getSupervisorWorkers_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getTopologyInfo_args typedOther = (getTopologyInfo_args)other;
+ getSupervisorWorkers_args typedOther = (getSupervisorWorkers_args)other;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
+ lastComparison = Boolean.valueOf(is_set_host()).compareTo(typedOther.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
- if (is_set_id()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.id, typedOther.id);
+ if (is_set_host()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.host, typedOther.host);
if (lastComparison != 0) {
return lastComparison;
}
@@ -11797,9 +13355,9 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 1: // ID
+ case 1: // HOST
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.id = iprot.readString();
+ this.host = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -11817,9 +13375,9 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(this.id);
+ if (this.host != null) {
+ oprot.writeFieldBegin(HOST_FIELD_DESC);
+ oprot.writeString(this.host);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -11828,14 +13386,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getTopologyInfo_args(");
+ StringBuilder sb = new StringBuilder("getSupervisorWorkers_args(");
boolean first = true;
- sb.append("id:");
- if (this.id == null) {
+ sb.append("host:");
+ if (this.host == null) {
sb.append("null");
} else {
- sb.append(this.id);
+ sb.append(this.host);
}
first = false;
sb.append(")");
@@ -11864,13 +13422,13 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getTopologyInfo_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyInfo_result");
+ public static class getSupervisorWorkers_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getSupervisorWorkers_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
- private TopologyInfo success; // required
+ private SupervisorWorkers success; // required
private NotAliveException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -11940,18 +13498,18 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TopologyInfo.class)));
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, SupervisorWorkers.class)));
tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyInfo_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getSupervisorWorkers_result.class, metaDataMap);
}
- public getTopologyInfo_result() {
+ public getSupervisorWorkers_result() {
}
- public getTopologyInfo_result(
- TopologyInfo success,
+ public getSupervisorWorkers_result(
+ SupervisorWorkers success,
NotAliveException e)
{
this();
@@ -11962,17 +13520,17 @@ public getTopologyInfo_result(
/**
* Performs a deep copy on other.
*/
- public getTopologyInfo_result(getTopologyInfo_result other) {
+ public getSupervisorWorkers_result(getSupervisorWorkers_result other) {
if (other.is_set_success()) {
- this.success = new TopologyInfo(other.success);
+ this.success = new SupervisorWorkers(other.success);
}
if (other.is_set_e()) {
this.e = new NotAliveException(other.e);
}
}
- public getTopologyInfo_result deepCopy() {
- return new getTopologyInfo_result(this);
+ public getSupervisorWorkers_result deepCopy() {
+ return new getSupervisorWorkers_result(this);
}
@Override
@@ -11981,11 +13539,11 @@ public void clear() {
this.e = null;
}
- public TopologyInfo get_success() {
+ public SupervisorWorkers get_success() {
return this.success;
}
- public void set_success(TopologyInfo success) {
+ public void set_success(SupervisorWorkers success) {
this.success = success;
}
@@ -12033,7 +13591,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((TopologyInfo)value);
+ set_success((SupervisorWorkers)value);
}
break;
@@ -12079,12 +13637,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getTopologyInfo_result)
- return this.equals((getTopologyInfo_result)that);
+ if (that instanceof getSupervisorWorkers_result)
+ return this.equals((getSupervisorWorkers_result)that);
return false;
}
- public boolean equals(getTopologyInfo_result that) {
+ public boolean equals(getSupervisorWorkers_result that) {
if (that == null)
return false;
@@ -12126,13 +13684,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getTopologyInfo_result other) {
+ public int compareTo(getSupervisorWorkers_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getTopologyInfo_result typedOther = (getTopologyInfo_result)other;
+ getSupervisorWorkers_result typedOther = (getSupervisorWorkers_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -12173,7 +13731,7 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
- this.success = new TopologyInfo();
+ this.success = new SupervisorWorkers();
this.success.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -12214,7 +13772,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getTopologyInfo_result(");
+ StringBuilder sb = new StringBuilder("getSupervisorWorkers_result(");
boolean first = true;
sb.append("success:");
@@ -12258,16 +13816,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getSupervisorWorkers_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getSupervisorWorkers_args");
+ public static class getTopologyConf_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyConf_args");
- private static final org.apache.thrift7.protocol.TField HOST_FIELD_DESC = new org.apache.thrift7.protocol.TField("host", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private String host; // required
+ private String id; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- HOST((short)1, "host");
+ ID((short)1, "id");
private static final Map byName = new HashMap();
@@ -12282,8 +13840,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // HOST
- return HOST;
+ case 1: // ID
+ return ID;
default:
return null;
}
@@ -12328,70 +13886,70 @@ public String getFieldName() {
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.HOST, new org.apache.thrift7.meta_data.FieldMetaData("host", org.apache.thrift7.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getSupervisorWorkers_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyConf_args.class, metaDataMap);
}
- public getSupervisorWorkers_args() {
+ public getTopologyConf_args() {
}
- public getSupervisorWorkers_args(
- String host)
+ public getTopologyConf_args(
+ String id)
{
this();
- this.host = host;
+ this.id = id;
}
/**
* Performs a deep copy on other.
*/
- public getSupervisorWorkers_args(getSupervisorWorkers_args other) {
- if (other.is_set_host()) {
- this.host = other.host;
+ public getTopologyConf_args(getTopologyConf_args other) {
+ if (other.is_set_id()) {
+ this.id = other.id;
}
}
- public getSupervisorWorkers_args deepCopy() {
- return new getSupervisorWorkers_args(this);
+ public getTopologyConf_args deepCopy() {
+ return new getTopologyConf_args(this);
}
@Override
public void clear() {
- this.host = null;
+ this.id = null;
}
- public String get_host() {
- return this.host;
+ public String get_id() {
+ return this.id;
}
- public void set_host(String host) {
- this.host = host;
+ public void set_id(String id) {
+ this.id = id;
}
- public void unset_host() {
- this.host = null;
+ public void unset_id() {
+ this.id = null;
}
- /** Returns true if field host is set (has been assigned a value) and false otherwise */
- public boolean is_set_host() {
- return this.host != null;
+ /** Returns true if field id is set (has been assigned a value) and false otherwise */
+ public boolean is_set_id() {
+ return this.id != null;
}
- public void set_host_isSet(boolean value) {
+ public void set_id_isSet(boolean value) {
if (!value) {
- this.host = null;
+ this.id = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case HOST:
+ case ID:
if (value == null) {
- unset_host();
+ unset_id();
} else {
- set_host((String)value);
+ set_id((String)value);
}
break;
@@ -12400,8 +13958,8 @@ public void setFieldValue(_Fields field, Object value) {
public Object getFieldValue(_Fields field) {
switch (field) {
- case HOST:
- return get_host();
+ case ID:
+ return get_id();
}
throw new IllegalStateException();
@@ -12414,8 +13972,8 @@ public boolean isSet(_Fields field) {
}
switch (field) {
- case HOST:
- return is_set_host();
+ case ID:
+ return is_set_id();
}
throw new IllegalStateException();
}
@@ -12424,21 +13982,21 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getSupervisorWorkers_args)
- return this.equals((getSupervisorWorkers_args)that);
+ if (that instanceof getTopologyConf_args)
+ return this.equals((getTopologyConf_args)that);
return false;
}
- public boolean equals(getSupervisorWorkers_args that) {
+ public boolean equals(getTopologyConf_args that) {
if (that == null)
return false;
- boolean this_present_host = true && this.is_set_host();
- boolean that_present_host = true && that.is_set_host();
- if (this_present_host || that_present_host) {
- if (!(this_present_host && that_present_host))
+ boolean this_present_id = true && this.is_set_id();
+ boolean that_present_id = true && that.is_set_id();
+ if (this_present_id || that_present_id) {
+ if (!(this_present_id && that_present_id))
return false;
- if (!this.host.equals(that.host))
+ if (!this.id.equals(that.id))
return false;
}
@@ -12447,30 +14005,30 @@ public boolean equals(getSupervisorWorkers_args that) {
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_host = true && (is_set_host());
- builder.append(present_host);
- if (present_host)
- builder.append(host);
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_id = true && (is_set_id());
+ builder.append(present_id);
+ if (present_id)
+ builder.append(id);
return builder.toHashCode();
}
- public int compareTo(getSupervisorWorkers_args other) {
+ public int compareTo(getTopologyConf_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getSupervisorWorkers_args typedOther = (getSupervisorWorkers_args)other;
+ getTopologyConf_args typedOther = (getTopologyConf_args)other;
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(typedOther.is_set_host());
+ lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
- if (is_set_host()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.host, typedOther.host);
+ if (is_set_id()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.id, typedOther.id);
if (lastComparison != 0) {
return lastComparison;
}
@@ -12492,9 +14050,9 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
break;
}
switch (field.id) {
- case 1: // HOST
+ case 1: // ID
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.host = iprot.readString();
+ this.id = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -12512,9 +14070,9 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.host != null) {
- oprot.writeFieldBegin(HOST_FIELD_DESC);
- oprot.writeString(this.host);
+ if (this.id != null) {
+ oprot.writeFieldBegin(ID_FIELD_DESC);
+ oprot.writeString(this.id);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -12523,14 +14081,14 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getSupervisorWorkers_args(");
+ StringBuilder sb = new StringBuilder("getTopologyConf_args(");
boolean first = true;
- sb.append("host:");
- if (this.host == null) {
+ sb.append("id:");
+ if (this.id == null) {
sb.append("null");
} else {
- sb.append(this.host);
+ sb.append(this.id);
}
first = false;
sb.append(")");
@@ -12559,13 +14117,13 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getSupervisorWorkers_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getSupervisorWorkers_result");
+ public static class getTopologyConf_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyConf_result");
- private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
- private SupervisorWorkers success; // required
+ private String success; // required
private NotAliveException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -12635,18 +14193,18 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, SupervisorWorkers.class)));
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getSupervisorWorkers_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyConf_result.class, metaDataMap);
}
- public getSupervisorWorkers_result() {
+ public getTopologyConf_result() {
}
- public getSupervisorWorkers_result(
- SupervisorWorkers success,
+ public getTopologyConf_result(
+ String success,
NotAliveException e)
{
this();
@@ -12657,17 +14215,17 @@ public getSupervisorWorkers_result(
/**
* Performs a deep copy on other.
*/
- public getSupervisorWorkers_result(getSupervisorWorkers_result other) {
+ public getTopologyConf_result(getTopologyConf_result other) {
if (other.is_set_success()) {
- this.success = new SupervisorWorkers(other.success);
+ this.success = other.success;
}
if (other.is_set_e()) {
this.e = new NotAliveException(other.e);
}
}
- public getSupervisorWorkers_result deepCopy() {
- return new getSupervisorWorkers_result(this);
+ public getTopologyConf_result deepCopy() {
+ return new getTopologyConf_result(this);
}
@Override
@@ -12676,11 +14234,11 @@ public void clear() {
this.e = null;
}
- public SupervisorWorkers get_success() {
+ public String get_success() {
return this.success;
}
- public void set_success(SupervisorWorkers success) {
+ public void set_success(String success) {
this.success = success;
}
@@ -12728,7 +14286,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((SupervisorWorkers)value);
+ set_success((String)value);
}
break;
@@ -12774,12 +14332,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getSupervisorWorkers_result)
- return this.equals((getSupervisorWorkers_result)that);
+ if (that instanceof getTopologyConf_result)
+ return this.equals((getTopologyConf_result)that);
return false;
}
- public boolean equals(getSupervisorWorkers_result that) {
+ public boolean equals(getTopologyConf_result that) {
if (that == null)
return false;
@@ -12821,13 +14379,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getSupervisorWorkers_result other) {
+ public int compareTo(getTopologyConf_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getSupervisorWorkers_result typedOther = (getSupervisorWorkers_result)other;
+ getTopologyConf_result typedOther = (getTopologyConf_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -12867,9 +14425,8 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
}
switch (field.id) {
case 0: // SUCCESS
- if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
- this.success = new SupervisorWorkers();
- this.success.read(iprot);
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.success = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -12896,7 +14453,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- this.success.write(oprot);
+ oprot.writeString(this.success);
oprot.writeFieldEnd();
} else if (this.is_set_e()) {
oprot.writeFieldBegin(E_FIELD_DESC);
@@ -12909,7 +14466,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getSupervisorWorkers_result(");
+ StringBuilder sb = new StringBuilder("getTopologyConf_result(");
boolean first = true;
sb.append("success:");
@@ -12953,8 +14510,8 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getTopologyConf_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyConf_args");
+ public static class getTopology_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopology_args");
private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
@@ -13026,13 +14583,13 @@ public String getFieldName() {
tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyConf_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopology_args.class, metaDataMap);
}
- public getTopologyConf_args() {
+ public getTopology_args() {
}
- public getTopologyConf_args(
+ public getTopology_args(
String id)
{
this();
@@ -13042,14 +14599,14 @@ public getTopologyConf_args(
/**
* Performs a deep copy on other.
*/
- public getTopologyConf_args(getTopologyConf_args other) {
+ public getTopology_args(getTopology_args other) {
if (other.is_set_id()) {
this.id = other.id;
}
}
- public getTopologyConf_args deepCopy() {
- return new getTopologyConf_args(this);
+ public getTopology_args deepCopy() {
+ return new getTopology_args(this);
}
@Override
@@ -13119,12 +14676,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getTopologyConf_args)
- return this.equals((getTopologyConf_args)that);
+ if (that instanceof getTopology_args)
+ return this.equals((getTopology_args)that);
return false;
}
- public boolean equals(getTopologyConf_args that) {
+ public boolean equals(getTopology_args that) {
if (that == null)
return false;
@@ -13152,13 +14709,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getTopologyConf_args other) {
+ public int compareTo(getTopology_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getTopologyConf_args typedOther = (getTopologyConf_args)other;
+ getTopology_args typedOther = (getTopology_args)other;
lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
if (lastComparison != 0) {
@@ -13218,7 +14775,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getTopologyConf_args(");
+ StringBuilder sb = new StringBuilder("getTopology_args(");
boolean first = true;
sb.append("id:");
@@ -13254,13 +14811,13 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getTopologyConf_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyConf_result");
+ public static class getTopology_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopology_result");
- private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
- private String success; // required
+ private StormTopology success; // required
private NotAliveException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -13330,18 +14887,18 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, StormTopology.class)));
tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyConf_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopology_result.class, metaDataMap);
}
- public getTopologyConf_result() {
+ public getTopology_result() {
}
- public getTopologyConf_result(
- String success,
+ public getTopology_result(
+ StormTopology success,
NotAliveException e)
{
this();
@@ -13352,17 +14909,17 @@ public getTopologyConf_result(
/**
* Performs a deep copy on other.
*/
- public getTopologyConf_result(getTopologyConf_result other) {
+ public getTopology_result(getTopology_result other) {
if (other.is_set_success()) {
- this.success = other.success;
+ this.success = new StormTopology(other.success);
}
if (other.is_set_e()) {
this.e = new NotAliveException(other.e);
}
}
- public getTopologyConf_result deepCopy() {
- return new getTopologyConf_result(this);
+ public getTopology_result deepCopy() {
+ return new getTopology_result(this);
}
@Override
@@ -13371,11 +14928,11 @@ public void clear() {
this.e = null;
}
- public String get_success() {
+ public StormTopology get_success() {
return this.success;
}
- public void set_success(String success) {
+ public void set_success(StormTopology success) {
this.success = success;
}
@@ -13423,7 +14980,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((String)value);
+ set_success((StormTopology)value);
}
break;
@@ -13469,12 +15026,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getTopologyConf_result)
- return this.equals((getTopologyConf_result)that);
+ if (that instanceof getTopology_result)
+ return this.equals((getTopology_result)that);
return false;
}
- public boolean equals(getTopologyConf_result that) {
+ public boolean equals(getTopology_result that) {
if (that == null)
return false;
@@ -13516,13 +15073,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getTopologyConf_result other) {
+ public int compareTo(getTopology_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getTopologyConf_result typedOther = (getTopologyConf_result)other;
+ getTopology_result typedOther = (getTopology_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -13562,8 +15119,9 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
}
switch (field.id) {
case 0: // SUCCESS
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.success = iprot.readString();
+ if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
+ this.success = new StormTopology();
+ this.success.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -13590,7 +15148,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(this.success);
+ this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.is_set_e()) {
oprot.writeFieldBegin(E_FIELD_DESC);
@@ -13603,7 +15161,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getTopologyConf_result(");
+ StringBuilder sb = new StringBuilder("getTopology_result(");
boolean first = true;
sb.append("success:");
@@ -13647,8 +15205,8 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getTopology_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopology_args");
+ public static class getUserTopology_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getUserTopology_args");
private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
@@ -13720,13 +15278,13 @@ public String getFieldName() {
tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopology_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getUserTopology_args.class, metaDataMap);
}
- public getTopology_args() {
+ public getUserTopology_args() {
}
- public getTopology_args(
+ public getUserTopology_args(
String id)
{
this();
@@ -13736,14 +15294,14 @@ public getTopology_args(
/**
* Performs a deep copy on other.
*/
- public getTopology_args(getTopology_args other) {
+ public getUserTopology_args(getUserTopology_args other) {
if (other.is_set_id()) {
this.id = other.id;
}
}
- public getTopology_args deepCopy() {
- return new getTopology_args(this);
+ public getUserTopology_args deepCopy() {
+ return new getUserTopology_args(this);
}
@Override
@@ -13813,12 +15371,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getTopology_args)
- return this.equals((getTopology_args)that);
+ if (that instanceof getUserTopology_args)
+ return this.equals((getUserTopology_args)that);
return false;
}
- public boolean equals(getTopology_args that) {
+ public boolean equals(getUserTopology_args that) {
if (that == null)
return false;
@@ -13846,13 +15404,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getTopology_args other) {
+ public int compareTo(getUserTopology_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getTopology_args typedOther = (getTopology_args)other;
+ getUserTopology_args typedOther = (getUserTopology_args)other;
lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
if (lastComparison != 0) {
@@ -13912,7 +15470,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getTopology_args(");
+ StringBuilder sb = new StringBuilder("getUserTopology_args(");
boolean first = true;
sb.append("id:");
@@ -13948,8 +15506,8 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getTopology_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopology_result");
+ public static class getUserTopology_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getUserTopology_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
@@ -14028,13 +15586,13 @@ public String getFieldName() {
tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopology_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getUserTopology_result.class, metaDataMap);
}
- public getTopology_result() {
+ public getUserTopology_result() {
}
- public getTopology_result(
+ public getUserTopology_result(
StormTopology success,
NotAliveException e)
{
@@ -14046,7 +15604,7 @@ public getTopology_result(
/**
* Performs a deep copy on other.
*/
- public getTopology_result(getTopology_result other) {
+ public getUserTopology_result(getUserTopology_result other) {
if (other.is_set_success()) {
this.success = new StormTopology(other.success);
}
@@ -14055,8 +15613,8 @@ public getTopology_result(getTopology_result other) {
}
}
- public getTopology_result deepCopy() {
- return new getTopology_result(this);
+ public getUserTopology_result deepCopy() {
+ return new getUserTopology_result(this);
}
@Override
@@ -14163,12 +15721,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getTopology_result)
- return this.equals((getTopology_result)that);
+ if (that instanceof getUserTopology_result)
+ return this.equals((getUserTopology_result)that);
return false;
}
- public boolean equals(getTopology_result that) {
+ public boolean equals(getUserTopology_result that) {
if (that == null)
return false;
@@ -14210,13 +15768,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getTopology_result other) {
+ public int compareTo(getUserTopology_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getTopology_result typedOther = (getTopology_result)other;
+ getUserTopology_result typedOther = (getUserTopology_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -14298,7 +15856,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getTopology_result(");
+ StringBuilder sb = new StringBuilder("getUserTopology_result(");
boolean first = true;
sb.append("success:");
@@ -14342,8 +15900,8 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getUserTopology_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getUserTopology_args");
+ public static class getTopologyMetric_args implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyMetric_args");
private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
@@ -14415,13 +15973,13 @@ public String getFieldName() {
tmpMap.put(_Fields.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getUserTopology_args.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyMetric_args.class, metaDataMap);
}
- public getUserTopology_args() {
+ public getTopologyMetric_args() {
}
- public getUserTopology_args(
+ public getTopologyMetric_args(
String id)
{
this();
@@ -14431,14 +15989,14 @@ public getUserTopology_args(
/**
* Performs a deep copy on other.
*/
- public getUserTopology_args(getUserTopology_args other) {
+ public getTopologyMetric_args(getTopologyMetric_args other) {
if (other.is_set_id()) {
this.id = other.id;
}
}
- public getUserTopology_args deepCopy() {
- return new getUserTopology_args(this);
+ public getTopologyMetric_args deepCopy() {
+ return new getTopologyMetric_args(this);
}
@Override
@@ -14508,12 +16066,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getUserTopology_args)
- return this.equals((getUserTopology_args)that);
+ if (that instanceof getTopologyMetric_args)
+ return this.equals((getTopologyMetric_args)that);
return false;
}
- public boolean equals(getUserTopology_args that) {
+ public boolean equals(getTopologyMetric_args that) {
if (that == null)
return false;
@@ -14541,13 +16099,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getUserTopology_args other) {
+ public int compareTo(getTopologyMetric_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getUserTopology_args typedOther = (getUserTopology_args)other;
+ getTopologyMetric_args typedOther = (getTopologyMetric_args)other;
lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
if (lastComparison != 0) {
@@ -14607,7 +16165,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getUserTopology_args(");
+ StringBuilder sb = new StringBuilder("getTopologyMetric_args(");
boolean first = true;
sb.append("id:");
@@ -14643,13 +16201,13 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException
}
- public static class getUserTopology_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getUserTopology_result");
+ public static class getTopologyMetric_result implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("getTopologyMetric_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift7.protocol.TField E_FIELD_DESC = new org.apache.thrift7.protocol.TField("e", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
- private StormTopology success; // required
+ private TopologyMetricInfo success; // required
private NotAliveException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -14719,18 +16277,18 @@ public String getFieldName() {
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, StormTopology.class)));
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TopologyMetricInfo.class)));
tmpMap.put(_Fields.E, new org.apache.thrift7.meta_data.FieldMetaData("e", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getUserTopology_result.class, metaDataMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyMetric_result.class, metaDataMap);
}
- public getUserTopology_result() {
+ public getTopologyMetric_result() {
}
- public getUserTopology_result(
- StormTopology success,
+ public getTopologyMetric_result(
+ TopologyMetricInfo success,
NotAliveException e)
{
this();
@@ -14741,17 +16299,17 @@ public getUserTopology_result(
/**
* Performs a deep copy on other.
*/
- public getUserTopology_result(getUserTopology_result other) {
+ public getTopologyMetric_result(getTopologyMetric_result other) {
if (other.is_set_success()) {
- this.success = new StormTopology(other.success);
+ this.success = new TopologyMetricInfo(other.success);
}
if (other.is_set_e()) {
this.e = new NotAliveException(other.e);
}
}
- public getUserTopology_result deepCopy() {
- return new getUserTopology_result(this);
+ public getTopologyMetric_result deepCopy() {
+ return new getTopologyMetric_result(this);
}
@Override
@@ -14760,11 +16318,11 @@ public void clear() {
this.e = null;
}
- public StormTopology get_success() {
+ public TopologyMetricInfo get_success() {
return this.success;
}
- public void set_success(StormTopology success) {
+ public void set_success(TopologyMetricInfo success) {
this.success = success;
}
@@ -14812,7 +16370,7 @@ public void setFieldValue(_Fields field, Object value) {
if (value == null) {
unset_success();
} else {
- set_success((StormTopology)value);
+ set_success((TopologyMetricInfo)value);
}
break;
@@ -14858,12 +16416,12 @@ public boolean isSet(_Fields field) {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getUserTopology_result)
- return this.equals((getUserTopology_result)that);
+ if (that instanceof getTopologyMetric_result)
+ return this.equals((getTopologyMetric_result)that);
return false;
}
- public boolean equals(getUserTopology_result that) {
+ public boolean equals(getTopologyMetric_result that) {
if (that == null)
return false;
@@ -14905,13 +16463,13 @@ public int hashCode() {
return builder.toHashCode();
}
- public int compareTo(getUserTopology_result other) {
+ public int compareTo(getTopologyMetric_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- getUserTopology_result typedOther = (getUserTopology_result)other;
+ getTopologyMetric_result typedOther = (getTopologyMetric_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
@@ -14952,7 +16510,7 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
- this.success = new StormTopology();
+ this.success = new TopologyMetricInfo();
this.success.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
@@ -14993,7 +16551,7 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getUserTopology_result(");
+ StringBuilder sb = new StringBuilder("getTopologyMetric_result(");
boolean first = true;
sb.append("success:");
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TaskMetricData.java b/jstorm-client/src/main/java/backtype/storm/generated/TaskMetricData.java
new file mode 100644
index 000000000..f5311e43b
--- /dev/null
+++ b/jstorm-client/src/main/java/backtype/storm/generated/TaskMetricData.java
@@ -0,0 +1,1135 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package backtype.storm.generated;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+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 TaskMetricData implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("TaskMetricData");
+
+ private static final org.apache.thrift7.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("task_id", org.apache.thrift7.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift7.protocol.TField COMPONENT_ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("component_id", org.apache.thrift7.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift7.protocol.TField GAUGE_FIELD_DESC = new org.apache.thrift7.protocol.TField("gauge", org.apache.thrift7.protocol.TType.MAP, (short)3);
+ private static final org.apache.thrift7.protocol.TField COUNTER_FIELD_DESC = new org.apache.thrift7.protocol.TField("counter", org.apache.thrift7.protocol.TType.MAP, (short)4);
+ private static final org.apache.thrift7.protocol.TField METER_FIELD_DESC = new org.apache.thrift7.protocol.TField("meter", org.apache.thrift7.protocol.TType.MAP, (short)5);
+ private static final org.apache.thrift7.protocol.TField TIMER_FIELD_DESC = new org.apache.thrift7.protocol.TField("timer", org.apache.thrift7.protocol.TType.MAP, (short)6);
+ private static final org.apache.thrift7.protocol.TField HISTOGRAM_FIELD_DESC = new org.apache.thrift7.protocol.TField("histogram", org.apache.thrift7.protocol.TType.MAP, (short)7);
+
+ private int task_id; // required
+ private String component_id; // required
+ private Map gauge; // required
+ private Map counter; // required
+ private Map meter; // required
+ private Map timer; // required
+ private Map histogram; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+ TASK_ID((short)1, "task_id"),
+ COMPONENT_ID((short)2, "component_id"),
+ GAUGE((short)3, "gauge"),
+ COUNTER((short)4, "counter"),
+ METER((short)5, "meter"),
+ TIMER((short)6, "timer"),
+ HISTOGRAM((short)7, "histogram");
+
+ private static final Map byName = new HashMap();
+
+ 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: // TASK_ID
+ return TASK_ID;
+ case 2: // COMPONENT_ID
+ return COMPONENT_ID;
+ case 3: // GAUGE
+ return GAUGE;
+ case 4: // COUNTER
+ return COUNTER;
+ case 5: // METER
+ return METER;
+ case 6: // TIMER
+ return TIMER;
+ case 7: // HISTOGRAM
+ return HISTOGRAM;
+ 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 __TASK_ID_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TASK_ID, new org.apache.thrift7.meta_data.FieldMetaData("task_id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
+ tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift7.meta_data.FieldMetaData("component_id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ tmpMap.put(_Fields.GAUGE, new org.apache.thrift7.meta_data.FieldMetaData("gauge", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE))));
+ tmpMap.put(_Fields.COUNTER, new org.apache.thrift7.meta_data.FieldMetaData("counter", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE))));
+ tmpMap.put(_Fields.METER, new org.apache.thrift7.meta_data.FieldMetaData("meter", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE))));
+ tmpMap.put(_Fields.TIMER, new org.apache.thrift7.meta_data.FieldMetaData("timer", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE))));
+ tmpMap.put(_Fields.HISTOGRAM, new org.apache.thrift7.meta_data.FieldMetaData("histogram", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(TaskMetricData.class, metaDataMap);
+ }
+
+ public TaskMetricData() {
+ }
+
+ public TaskMetricData(
+ int task_id,
+ String component_id,
+ Map gauge,
+ Map counter,
+ Map meter,
+ Map timer,
+ Map histogram)
+ {
+ this();
+ this.task_id = task_id;
+ set_task_id_isSet(true);
+ this.component_id = component_id;
+ this.gauge = gauge;
+ this.counter = counter;
+ this.meter = meter;
+ this.timer = timer;
+ this.histogram = histogram;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public TaskMetricData(TaskMetricData other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.task_id = other.task_id;
+ if (other.is_set_component_id()) {
+ this.component_id = other.component_id;
+ }
+ if (other.is_set_gauge()) {
+ Map __this__gauge = new HashMap();
+ for (Map.Entry other_element : other.gauge.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ Double other_element_value = other_element.getValue();
+
+ String __this__gauge_copy_key = other_element_key;
+
+ Double __this__gauge_copy_value = other_element_value;
+
+ __this__gauge.put(__this__gauge_copy_key, __this__gauge_copy_value);
+ }
+ this.gauge = __this__gauge;
+ }
+ if (other.is_set_counter()) {
+ Map __this__counter = new HashMap();
+ for (Map.Entry other_element : other.counter.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ Double other_element_value = other_element.getValue();
+
+ String __this__counter_copy_key = other_element_key;
+
+ Double __this__counter_copy_value = other_element_value;
+
+ __this__counter.put(__this__counter_copy_key, __this__counter_copy_value);
+ }
+ this.counter = __this__counter;
+ }
+ if (other.is_set_meter()) {
+ Map __this__meter = new HashMap();
+ for (Map.Entry other_element : other.meter.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ Double other_element_value = other_element.getValue();
+
+ String __this__meter_copy_key = other_element_key;
+
+ Double __this__meter_copy_value = other_element_value;
+
+ __this__meter.put(__this__meter_copy_key, __this__meter_copy_value);
+ }
+ this.meter = __this__meter;
+ }
+ if (other.is_set_timer()) {
+ Map __this__timer = new HashMap();
+ for (Map.Entry other_element : other.timer.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ Double other_element_value = other_element.getValue();
+
+ String __this__timer_copy_key = other_element_key;
+
+ Double __this__timer_copy_value = other_element_value;
+
+ __this__timer.put(__this__timer_copy_key, __this__timer_copy_value);
+ }
+ this.timer = __this__timer;
+ }
+ if (other.is_set_histogram()) {
+ Map __this__histogram = new HashMap();
+ for (Map.Entry other_element : other.histogram.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ Double other_element_value = other_element.getValue();
+
+ String __this__histogram_copy_key = other_element_key;
+
+ Double __this__histogram_copy_value = other_element_value;
+
+ __this__histogram.put(__this__histogram_copy_key, __this__histogram_copy_value);
+ }
+ this.histogram = __this__histogram;
+ }
+ }
+
+ public TaskMetricData deepCopy() {
+ return new TaskMetricData(this);
+ }
+
+ @Override
+ public void clear() {
+ set_task_id_isSet(false);
+ this.task_id = 0;
+ this.component_id = null;
+ this.gauge = null;
+ this.counter = null;
+ this.meter = null;
+ this.timer = null;
+ this.histogram = null;
+ }
+
+ public int get_task_id() {
+ return this.task_id;
+ }
+
+ public void set_task_id(int task_id) {
+ this.task_id = task_id;
+ set_task_id_isSet(true);
+ }
+
+ public void unset_task_id() {
+ __isset_bit_vector.clear(__TASK_ID_ISSET_ID);
+ }
+
+ /** Returns true if field task_id is set (has been assigned a value) and false otherwise */
+ public boolean is_set_task_id() {
+ return __isset_bit_vector.get(__TASK_ID_ISSET_ID);
+ }
+
+ public void set_task_id_isSet(boolean value) {
+ __isset_bit_vector.set(__TASK_ID_ISSET_ID, value);
+ }
+
+ public String get_component_id() {
+ return this.component_id;
+ }
+
+ public void set_component_id(String component_id) {
+ this.component_id = component_id;
+ }
+
+ public void unset_component_id() {
+ this.component_id = null;
+ }
+
+ /** Returns true if field component_id is set (has been assigned a value) and false otherwise */
+ public boolean is_set_component_id() {
+ return this.component_id != null;
+ }
+
+ public void set_component_id_isSet(boolean value) {
+ if (!value) {
+ this.component_id = null;
+ }
+ }
+
+ public int get_gauge_size() {
+ return (this.gauge == null) ? 0 : this.gauge.size();
+ }
+
+ public void put_to_gauge(String key, double val) {
+ if (this.gauge == null) {
+ this.gauge = new HashMap();
+ }
+ this.gauge.put(key, val);
+ }
+
+ public Map get_gauge() {
+ return this.gauge;
+ }
+
+ public void set_gauge(Map gauge) {
+ this.gauge = gauge;
+ }
+
+ public void unset_gauge() {
+ this.gauge = null;
+ }
+
+ /** Returns true if field gauge is set (has been assigned a value) and false otherwise */
+ public boolean is_set_gauge() {
+ return this.gauge != null;
+ }
+
+ public void set_gauge_isSet(boolean value) {
+ if (!value) {
+ this.gauge = null;
+ }
+ }
+
+ public int get_counter_size() {
+ return (this.counter == null) ? 0 : this.counter.size();
+ }
+
+ public void put_to_counter(String key, double val) {
+ if (this.counter == null) {
+ this.counter = new HashMap();
+ }
+ this.counter.put(key, val);
+ }
+
+ public Map get_counter() {
+ return this.counter;
+ }
+
+ public void set_counter(Map counter) {
+ this.counter = counter;
+ }
+
+ public void unset_counter() {
+ this.counter = null;
+ }
+
+ /** Returns true if field counter is set (has been assigned a value) and false otherwise */
+ public boolean is_set_counter() {
+ return this.counter != null;
+ }
+
+ public void set_counter_isSet(boolean value) {
+ if (!value) {
+ this.counter = null;
+ }
+ }
+
+ public int get_meter_size() {
+ return (this.meter == null) ? 0 : this.meter.size();
+ }
+
+ public void put_to_meter(String key, double val) {
+ if (this.meter == null) {
+ this.meter = new HashMap();
+ }
+ this.meter.put(key, val);
+ }
+
+ public Map get_meter() {
+ return this.meter;
+ }
+
+ public void set_meter(Map meter) {
+ this.meter = meter;
+ }
+
+ public void unset_meter() {
+ this.meter = null;
+ }
+
+ /** Returns true if field meter is set (has been assigned a value) and false otherwise */
+ public boolean is_set_meter() {
+ return this.meter != null;
+ }
+
+ public void set_meter_isSet(boolean value) {
+ if (!value) {
+ this.meter = null;
+ }
+ }
+
+ public int get_timer_size() {
+ return (this.timer == null) ? 0 : this.timer.size();
+ }
+
+ public void put_to_timer(String key, double val) {
+ if (this.timer == null) {
+ this.timer = new HashMap();
+ }
+ this.timer.put(key, val);
+ }
+
+ public Map get_timer() {
+ return this.timer;
+ }
+
+ public void set_timer(Map timer) {
+ this.timer = timer;
+ }
+
+ public void unset_timer() {
+ this.timer = null;
+ }
+
+ /** Returns true if field timer is set (has been assigned a value) and false otherwise */
+ public boolean is_set_timer() {
+ return this.timer != null;
+ }
+
+ public void set_timer_isSet(boolean value) {
+ if (!value) {
+ this.timer = null;
+ }
+ }
+
+ public int get_histogram_size() {
+ return (this.histogram == null) ? 0 : this.histogram.size();
+ }
+
+ public void put_to_histogram(String key, double val) {
+ if (this.histogram == null) {
+ this.histogram = new HashMap();
+ }
+ this.histogram.put(key, val);
+ }
+
+ public Map get_histogram() {
+ return this.histogram;
+ }
+
+ public void set_histogram(Map histogram) {
+ this.histogram = histogram;
+ }
+
+ public void unset_histogram() {
+ this.histogram = null;
+ }
+
+ /** Returns true if field histogram is set (has been assigned a value) and false otherwise */
+ public boolean is_set_histogram() {
+ return this.histogram != null;
+ }
+
+ public void set_histogram_isSet(boolean value) {
+ if (!value) {
+ this.histogram = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TASK_ID:
+ if (value == null) {
+ unset_task_id();
+ } else {
+ set_task_id((Integer)value);
+ }
+ break;
+
+ case COMPONENT_ID:
+ if (value == null) {
+ unset_component_id();
+ } else {
+ set_component_id((String)value);
+ }
+ break;
+
+ case GAUGE:
+ if (value == null) {
+ unset_gauge();
+ } else {
+ set_gauge((Map)value);
+ }
+ break;
+
+ case COUNTER:
+ if (value == null) {
+ unset_counter();
+ } else {
+ set_counter((Map)value);
+ }
+ break;
+
+ case METER:
+ if (value == null) {
+ unset_meter();
+ } else {
+ set_meter((Map)value);
+ }
+ break;
+
+ case TIMER:
+ if (value == null) {
+ unset_timer();
+ } else {
+ set_timer((Map)value);
+ }
+ break;
+
+ case HISTOGRAM:
+ if (value == null) {
+ unset_histogram();
+ } else {
+ set_histogram((Map)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TASK_ID:
+ return Integer.valueOf(get_task_id());
+
+ case COMPONENT_ID:
+ return get_component_id();
+
+ case GAUGE:
+ return get_gauge();
+
+ case COUNTER:
+ return get_counter();
+
+ case METER:
+ return get_meter();
+
+ case TIMER:
+ return get_timer();
+
+ case HISTOGRAM:
+ return get_histogram();
+
+ }
+ 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 TASK_ID:
+ return is_set_task_id();
+ case COMPONENT_ID:
+ return is_set_component_id();
+ case GAUGE:
+ return is_set_gauge();
+ case COUNTER:
+ return is_set_counter();
+ case METER:
+ return is_set_meter();
+ case TIMER:
+ return is_set_timer();
+ case HISTOGRAM:
+ return is_set_histogram();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TaskMetricData)
+ return this.equals((TaskMetricData)that);
+ return false;
+ }
+
+ public boolean equals(TaskMetricData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_task_id = true;
+ boolean that_present_task_id = true;
+ if (this_present_task_id || that_present_task_id) {
+ if (!(this_present_task_id && that_present_task_id))
+ return false;
+ if (this.task_id != that.task_id)
+ return false;
+ }
+
+ boolean this_present_component_id = true && this.is_set_component_id();
+ boolean that_present_component_id = true && that.is_set_component_id();
+ if (this_present_component_id || that_present_component_id) {
+ if (!(this_present_component_id && that_present_component_id))
+ return false;
+ if (!this.component_id.equals(that.component_id))
+ return false;
+ }
+
+ boolean this_present_gauge = true && this.is_set_gauge();
+ boolean that_present_gauge = true && that.is_set_gauge();
+ if (this_present_gauge || that_present_gauge) {
+ if (!(this_present_gauge && that_present_gauge))
+ return false;
+ if (!this.gauge.equals(that.gauge))
+ return false;
+ }
+
+ boolean this_present_counter = true && this.is_set_counter();
+ boolean that_present_counter = true && that.is_set_counter();
+ if (this_present_counter || that_present_counter) {
+ if (!(this_present_counter && that_present_counter))
+ return false;
+ if (!this.counter.equals(that.counter))
+ return false;
+ }
+
+ boolean this_present_meter = true && this.is_set_meter();
+ boolean that_present_meter = true && that.is_set_meter();
+ if (this_present_meter || that_present_meter) {
+ if (!(this_present_meter && that_present_meter))
+ return false;
+ if (!this.meter.equals(that.meter))
+ return false;
+ }
+
+ boolean this_present_timer = true && this.is_set_timer();
+ boolean that_present_timer = true && that.is_set_timer();
+ if (this_present_timer || that_present_timer) {
+ if (!(this_present_timer && that_present_timer))
+ return false;
+ if (!this.timer.equals(that.timer))
+ return false;
+ }
+
+ boolean this_present_histogram = true && this.is_set_histogram();
+ boolean that_present_histogram = true && that.is_set_histogram();
+ if (this_present_histogram || that_present_histogram) {
+ if (!(this_present_histogram && that_present_histogram))
+ return false;
+ if (!this.histogram.equals(that.histogram))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_task_id = true;
+ builder.append(present_task_id);
+ if (present_task_id)
+ builder.append(task_id);
+
+ boolean present_component_id = true && (is_set_component_id());
+ builder.append(present_component_id);
+ if (present_component_id)
+ builder.append(component_id);
+
+ boolean present_gauge = true && (is_set_gauge());
+ builder.append(present_gauge);
+ if (present_gauge)
+ builder.append(gauge);
+
+ boolean present_counter = true && (is_set_counter());
+ builder.append(present_counter);
+ if (present_counter)
+ builder.append(counter);
+
+ boolean present_meter = true && (is_set_meter());
+ builder.append(present_meter);
+ if (present_meter)
+ builder.append(meter);
+
+ boolean present_timer = true && (is_set_timer());
+ builder.append(present_timer);
+ if (present_timer)
+ builder.append(timer);
+
+ boolean present_histogram = true && (is_set_histogram());
+ builder.append(present_histogram);
+ if (present_histogram)
+ builder.append(histogram);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TaskMetricData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TaskMetricData typedOther = (TaskMetricData)other;
+
+ lastComparison = Boolean.valueOf(is_set_task_id()).compareTo(typedOther.is_set_task_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_task_id()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.task_id, typedOther.task_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_component_id()).compareTo(typedOther.is_set_component_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_component_id()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.component_id, typedOther.component_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_gauge()).compareTo(typedOther.is_set_gauge());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_gauge()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.gauge, typedOther.gauge);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_counter()).compareTo(typedOther.is_set_counter());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_counter()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.counter, typedOther.counter);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_meter()).compareTo(typedOther.is_set_meter());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_meter()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.meter, typedOther.meter);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_timer()).compareTo(typedOther.is_set_timer());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_timer()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.timer, typedOther.timer);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(is_set_histogram()).compareTo(typedOther.is_set_histogram());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_histogram()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.histogram, typedOther.histogram);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
+ org.apache.thrift7.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift7.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 1: // TASK_ID
+ if (field.type == org.apache.thrift7.protocol.TType.I32) {
+ this.task_id = iprot.readI32();
+ set_task_id_isSet(true);
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // COMPONENT_ID
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.component_id = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // GAUGE
+ if (field.type == org.apache.thrift7.protocol.TType.MAP) {
+ {
+ org.apache.thrift7.protocol.TMap _map205 = iprot.readMapBegin();
+ this.gauge = new HashMap(2*_map205.size);
+ for (int _i206 = 0; _i206 < _map205.size; ++_i206)
+ {
+ String _key207; // required
+ double _val208; // required
+ _key207 = iprot.readString();
+ _val208 = iprot.readDouble();
+ this.gauge.put(_key207, _val208);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 4: // COUNTER
+ if (field.type == org.apache.thrift7.protocol.TType.MAP) {
+ {
+ org.apache.thrift7.protocol.TMap _map209 = iprot.readMapBegin();
+ this.counter = new HashMap(2*_map209.size);
+ for (int _i210 = 0; _i210 < _map209.size; ++_i210)
+ {
+ String _key211; // required
+ double _val212; // required
+ _key211 = iprot.readString();
+ _val212 = iprot.readDouble();
+ this.counter.put(_key211, _val212);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 5: // METER
+ if (field.type == org.apache.thrift7.protocol.TType.MAP) {
+ {
+ org.apache.thrift7.protocol.TMap _map213 = iprot.readMapBegin();
+ this.meter = new HashMap(2*_map213.size);
+ for (int _i214 = 0; _i214 < _map213.size; ++_i214)
+ {
+ String _key215; // required
+ double _val216; // required
+ _key215 = iprot.readString();
+ _val216 = iprot.readDouble();
+ this.meter.put(_key215, _val216);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 6: // TIMER
+ if (field.type == org.apache.thrift7.protocol.TType.MAP) {
+ {
+ org.apache.thrift7.protocol.TMap _map217 = iprot.readMapBegin();
+ this.timer = new HashMap(2*_map217.size);
+ for (int _i218 = 0; _i218 < _map217.size; ++_i218)
+ {
+ String _key219; // required
+ double _val220; // required
+ _key219 = iprot.readString();
+ _val220 = iprot.readDouble();
+ this.timer.put(_key219, _val220);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 7: // HISTOGRAM
+ if (field.type == org.apache.thrift7.protocol.TType.MAP) {
+ {
+ org.apache.thrift7.protocol.TMap _map221 = iprot.readMapBegin();
+ this.histogram = new HashMap(2*_map221.size);
+ for (int _i222 = 0; _i222 < _map221.size; ++_i222)
+ {
+ String _key223; // required
+ double _val224; // required
+ _key223 = iprot.readString();
+ _val224 = iprot.readDouble();
+ this.histogram.put(_key223, _val224);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
+ oprot.writeI32(this.task_id);
+ oprot.writeFieldEnd();
+ if (this.component_id != null) {
+ oprot.writeFieldBegin(COMPONENT_ID_FIELD_DESC);
+ oprot.writeString(this.component_id);
+ oprot.writeFieldEnd();
+ }
+ if (this.gauge != null) {
+ oprot.writeFieldBegin(GAUGE_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.DOUBLE, this.gauge.size()));
+ for (Map.Entry _iter225 : this.gauge.entrySet())
+ {
+ oprot.writeString(_iter225.getKey());
+ oprot.writeDouble(_iter225.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.counter != null) {
+ oprot.writeFieldBegin(COUNTER_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.DOUBLE, this.counter.size()));
+ for (Map.Entry _iter226 : this.counter.entrySet())
+ {
+ oprot.writeString(_iter226.getKey());
+ oprot.writeDouble(_iter226.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.meter != null) {
+ oprot.writeFieldBegin(METER_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.DOUBLE, this.meter.size()));
+ for (Map.Entry _iter227 : this.meter.entrySet())
+ {
+ oprot.writeString(_iter227.getKey());
+ oprot.writeDouble(_iter227.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.timer != null) {
+ oprot.writeFieldBegin(TIMER_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.DOUBLE, this.timer.size()));
+ for (Map.Entry _iter228 : this.timer.entrySet())
+ {
+ oprot.writeString(_iter228.getKey());
+ oprot.writeDouble(_iter228.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.histogram != null) {
+ oprot.writeFieldBegin(HISTOGRAM_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.DOUBLE, this.histogram.size()));
+ for (Map.Entry _iter229 : this.histogram.entrySet())
+ {
+ oprot.writeString(_iter229.getKey());
+ oprot.writeDouble(_iter229.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TaskMetricData(");
+ boolean first = true;
+
+ sb.append("task_id:");
+ sb.append(this.task_id);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("component_id:");
+ if (this.component_id == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.component_id);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gauge:");
+ if (this.gauge == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gauge);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("counter:");
+ if (this.counter == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.counter);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("meter:");
+ if (this.meter == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.meter);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("timer:");
+ if (this.timer == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.timer);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("histogram:");
+ if (this.histogram == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.histogram);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift7.TException {
+ // check for required fields
+ if (!is_set_task_id()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'task_id' is unset! Struct:" + toString());
+ }
+
+ if (!is_set_component_id()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'component_id' is unset! Struct:" + toString());
+ }
+
+ if (!is_set_gauge()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'gauge' is unset! Struct:" + toString());
+ }
+
+ if (!is_set_counter()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'counter' is unset! Struct:" + toString());
+ }
+
+ if (!is_set_meter()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'meter' is unset! Struct:" + toString());
+ }
+
+ if (!is_set_timer()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'timer' is unset! Struct:" + toString());
+ }
+
+ if (!is_set_histogram()) {
+ throw new org.apache.thrift7.protocol.TProtocolException("Required field 'histogram' is unset! Struct:" + toString());
+ }
+
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift7.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+}
+
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TaskSummary.java b/jstorm-client/src/main/java/backtype/storm/generated/TaskSummary.java
index 5cc690989..00832fbc0 100644
--- a/jstorm-client/src/main/java/backtype/storm/generated/TaskSummary.java
+++ b/jstorm-client/src/main/java/backtype/storm/generated/TaskSummary.java
@@ -31,6 +31,7 @@ public class TaskSummary implements org.apache.thrift7.TBase errors; // required
private TaskStats stats; // required
+ private String component_type; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
@@ -48,7 +50,8 @@ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
PORT((short)4, "port"),
UPTIME_SECS((short)5, "uptime_secs"),
ERRORS((short)6, "errors"),
- STATS((short)7, "stats");
+ STATS((short)7, "stats"),
+ COMPONENT_TYPE((short)8, "component_type");
private static final Map byName = new HashMap();
@@ -77,6 +80,8 @@ public static _Fields findByThriftId(int fieldId) {
return ERRORS;
case 7: // STATS
return STATS;
+ case 8: // COMPONENT_TYPE
+ return COMPONENT_TYPE;
default:
return null;
}
@@ -140,6 +145,8 @@ public String getFieldName() {
new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, ErrorInfo.class))));
tmpMap.put(_Fields.STATS, new org.apache.thrift7.meta_data.FieldMetaData("stats", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TaskStats.class)));
+ tmpMap.put(_Fields.COMPONENT_TYPE, new org.apache.thrift7.meta_data.FieldMetaData("component_type", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(TaskSummary.class, metaDataMap);
}
@@ -192,6 +199,9 @@ public TaskSummary(TaskSummary other) {
if (other.is_set_stats()) {
this.stats = new TaskStats(other.stats);
}
+ if (other.is_set_component_type()) {
+ this.component_type = other.component_type;
+ }
}
public TaskSummary deepCopy() {
@@ -210,6 +220,7 @@ public void clear() {
this.uptime_secs = 0;
this.errors = null;
this.stats = null;
+ this.component_type = null;
}
public int get_task_id() {
@@ -385,6 +396,29 @@ public void set_stats_isSet(boolean value) {
}
}
+ public String get_component_type() {
+ return this.component_type;
+ }
+
+ public void set_component_type(String component_type) {
+ this.component_type = component_type;
+ }
+
+ public void unset_component_type() {
+ this.component_type = null;
+ }
+
+ /** Returns true if field component_type is set (has been assigned a value) and false otherwise */
+ public boolean is_set_component_type() {
+ return this.component_type != null;
+ }
+
+ public void set_component_type_isSet(boolean value) {
+ if (!value) {
+ this.component_type = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TASK_ID:
@@ -443,6 +477,14 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
+ case COMPONENT_TYPE:
+ if (value == null) {
+ unset_component_type();
+ } else {
+ set_component_type((String)value);
+ }
+ break;
+
}
}
@@ -469,6 +511,9 @@ public Object getFieldValue(_Fields field) {
case STATS:
return get_stats();
+ case COMPONENT_TYPE:
+ return get_component_type();
+
}
throw new IllegalStateException();
}
@@ -494,6 +539,8 @@ public boolean isSet(_Fields field) {
return is_set_errors();
case STATS:
return is_set_stats();
+ case COMPONENT_TYPE:
+ return is_set_component_type();
}
throw new IllegalStateException();
}
@@ -574,6 +621,15 @@ public boolean equals(TaskSummary that) {
return false;
}
+ boolean this_present_component_type = true && this.is_set_component_type();
+ boolean that_present_component_type = true && that.is_set_component_type();
+ if (this_present_component_type || that_present_component_type) {
+ if (!(this_present_component_type && that_present_component_type))
+ return false;
+ if (!this.component_type.equals(that.component_type))
+ return false;
+ }
+
return true;
}
@@ -616,6 +672,11 @@ public int hashCode() {
if (present_stats)
builder.append(stats);
+ boolean present_component_type = true && (is_set_component_type());
+ builder.append(present_component_type);
+ if (present_component_type)
+ builder.append(component_type);
+
return builder.toHashCode();
}
@@ -697,6 +758,16 @@ public int compareTo(TaskSummary other) {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(is_set_component_type()).compareTo(typedOther.is_set_component_type());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (is_set_component_type()) {
+ lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.component_type, typedOther.component_type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -778,6 +849,13 @@ public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
+ case 8: // COMPONENT_TYPE
+ if (field.type == org.apache.thrift7.protocol.TType.STRING) {
+ this.component_type = iprot.readString();
+ } else {
+ org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -829,6 +907,13 @@ public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache
oprot.writeFieldEnd();
}
}
+ if (this.component_type != null) {
+ if (is_set_component_type()) {
+ oprot.writeFieldBegin(COMPONENT_TYPE_FIELD_DESC);
+ oprot.writeString(this.component_type);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -883,6 +968,16 @@ public String toString() {
}
first = false;
}
+ if (is_set_component_type()) {
+ if (!first) sb.append(", ");
+ sb.append("component_type:");
+ if (this.component_type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.component_type);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java b/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java
new file mode 100644
index 000000000..bcfab1d5a
--- /dev/null
+++ b/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java
@@ -0,0 +1,594 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package backtype.storm.generated;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+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 TopologyMetricInfo implements org.apache.thrift7.TBase, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("TopologyMetricInfo");
+
+ private static final org.apache.thrift7.protocol.TField TOPOLOGY_ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("topology_id", org.apache.thrift7.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift7.protocol.TField TASK_METRIC_LIST_FIELD_DESC = new org.apache.thrift7.protocol.TField("task_metric_list", org.apache.thrift7.protocol.TType.LIST, (short)2);
+ private static final org.apache.thrift7.protocol.TField WORKER_METRIC_LIST_FIELD_DESC = new org.apache.thrift7.protocol.TField("worker_metric_list", org.apache.thrift7.protocol.TType.LIST, (short)3);
+
+ private String topology_id; // required
+ private List task_metric_list; // required
+ private List worker_metric_list; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
+ TOPOLOGY_ID((short)1, "topology_id"),
+ TASK_METRIC_LIST((short)2, "task_metric_list"),
+ WORKER_METRIC_LIST((short)3, "worker_metric_list");
+
+ private static final Map byName = new HashMap();
+
+ 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: // TOPOLOGY_ID
+ return TOPOLOGY_ID;
+ case 2: // TASK_METRIC_LIST
+ return TASK_METRIC_LIST;
+ case 3: // WORKER_METRIC_LIST
+ return WORKER_METRIC_LIST;
+ 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
+
+ public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift7.meta_data.FieldMetaData("topology_id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TASK_METRIC_LIST, new org.apache.thrift7.meta_data.FieldMetaData("task_metric_list", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TaskMetricData.class))));
+ tmpMap.put(_Fields.WORKER_METRIC_LIST, new org.apache.thrift7.meta_data.FieldMetaData("worker_metric_list", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
+ new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, WorkerMetricData.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(TopologyMetricInfo.class, metaDataMap);
+ }
+
+ public TopologyMetricInfo() {
+ }
+
+ public TopologyMetricInfo(
+ String topology_id)
+ {
+ this();
+ this.topology_id = topology_id;
+ }
+
+ /**
+ * Performs a deep copy on