Github user abhishekagarwal87 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1484#discussion_r66952161
  
    --- 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();
    +        }
    +
    +        public static class Error implements Serializable {
    +            private String error;
    +            private OpenTsdbMetricDatapoint datapoint;
    +
    +            public Error() {
    +            }
    +
    +            public Error(String error, OpenTsdbMetricDatapoint datapoint) {
    +                this.error = error;
    +                this.datapoint = datapoint;
    +            }
    +
    +            public String getError() {
    +                return error;
    +            }
    +
    +            public OpenTsdbMetricDatapoint getDatapoint() {
    +                return datapoint;
    +            }
    +
    +            @Override
    +            public boolean equals(Object o) {
    +                if (this == o) return true;
    +                if (!(o instanceof Error)) return false;
    +
    +                Error error1 = (Error) o;
    +
    +                if (!error.equals(error1.error)) return false;
    +                return datapoint.equals(error1.datapoint);
    +
    +            }
    +
    +            @Override
    +            public int hashCode() {
    +                int result = error.hashCode();
    +                result = 31 * result + datapoint.hashCode();
    +                return result;
    +            }
    +
    +            @Override
    +            public String toString() {
    +                return "Error{" +
    +                        "error='" + error + '\'' +
    +                        ", datapoints=" + datapoint +
    --- End diff --
    
    typo. datapoint=


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to