[
https://issues.apache.org/jira/browse/STORM-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15329342#comment-15329342
]
ASF GitHub Bot commented on STORM-1893:
---------------------------------------
Github user abhishekagarwal87 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1484#discussion_r66952076
--- Diff:
external/storm-opentsdb/src/main/java/org/apache/stom/opentsdb/client/ClientResponse.java
---
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stom.opentsdb.client;
+
+import org.apache.stom.opentsdb.OpenTsdbMetricDatapoint;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * This class represents the response from OpenTsdb for a request sent.
+ */
+public interface ClientResponse extends Serializable {
+
+
+ public class Summary implements ClientResponse {
+ private int failed;
+ private int success;
+
+ public Summary() {
+ }
+
+ public Summary(int failed, int success) {
+ this.failed = failed;
+ this.success = success;
+ }
+
+ public int getFailed() {
+ return failed;
+ }
+
+ public int getSuccess() {
+ return success;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Summary)) return false;
+
+ Summary summary = (Summary) o;
+
+ if (failed != summary.failed) return false;
+ return success == summary.success;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = failed;
+ result = 31 * result + success;
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "Summary{" +
+ "failed=" + failed +
+ ", success=" + success +
+ '}';
+ }
+ }
+
+ public class Details extends Summary {
+ private List<Error> errors;
+
+ public Details() {
+ }
+
+ public Details(int failed, int success, List<Error> errors) {
+ super(failed, success);
+ this.errors = errors;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof Details)) return false;
+ if (!super.equals(o)) return false;
+
+ Details details = (Details) o;
+
+ return errors.equals(details.errors);
+
+ }
+
+ public List<Error> getErrors() {
+ return errors;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = super.hashCode();
+ result = 31 * result + errors.hashCode();
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "Details{" +
+ "errors=" + errors +
+ '}'+super.toString();
--- End diff --
minor. '}' can be after super.toString()
> Support OpenTSDB for storing timeseries data.
> ---------------------------------------------
>
> Key: STORM-1893
> URL: https://issues.apache.org/jira/browse/STORM-1893
> Project: Apache Storm
> Issue Type: New Feature
> Reporter: Satish Duggana
> Assignee: Satish Duggana
>
> - Implement openTSDB bolt to store timeseries data.
> - Trident implementation to store timeseries data in openTSDB.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)