paul-rogers commented on a change in pull request #1888: DRILL-5956: Add 
Storage Plugin for Apache Druid
URL: https://github.com/apache/drill/pull/1888#discussion_r352263337
 
 

 ##########
 File path: 
contrib/storage-druid/src/main/java/org/apache/drill/exec/store/druid/DruidStoragePluginConfig.java
 ##########
 @@ -0,0 +1,76 @@
+/*
+ * 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.drill.exec.store.druid;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import org.apache.drill.common.logical.StoragePluginConfigBase;
+
+@JsonTypeName(DruidStoragePluginConfig.NAME)
+public class DruidStoragePluginConfig extends StoragePluginConfigBase {
+
+    private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(DruidStoragePluginConfig.class);
+
+    public static final String NAME = "druid";
+
+    @JsonProperty
+    private final String brokerAddress;
+
+    @JsonProperty
+    private final String coordinatorAddress;
+
+    @JsonCreator
+    public DruidStoragePluginConfig(
+            @JsonProperty("brokerAddress") String brokerAddress,
+            @JsonProperty("coordinatorAddress") String coordinatorAddress) {
+
+        this.brokerAddress = brokerAddress;
+        this.coordinatorAddress = coordinatorAddress;
+        logger.info("Broker Address - {}, Coordinator Address - {}", 
brokerAddress, coordinatorAddress);
+        //TODO Make this configurable.
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        } else if (that == null || getClass() != that.getClass()) {
+            return false;
+        }
+        DruidStoragePluginConfig thatConfig = (DruidStoragePluginConfig) that;
+        return
+                (this.brokerAddress.equals(thatConfig.brokerAddress)
+                        && 
this.coordinatorAddress.equals(thatConfig.coordinatorAddress));
+    }
+
+    @Override
+    public int hashCode() {
+        int brokerAddressHashCode = this.brokerAddress != null ? 
this.brokerAddress.hashCode() : 0;
+        int coordinatorAddressHashCode = this.coordinatorAddress != null ? 
this.coordinatorAddress.hashCode() : 0;
+        return brokerAddressHashCode ^ coordinatorAddressHashCode;
+    }
+
+    public String GetCoordinatorURI() {
 
 Review comment:
   Drill prefers Java style: `getCoordinatorURI`. Jackson will use that as the 
accesor for this property.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to