diff --git a/pom.xml b/pom.xml index e23f75cf5..5b95aa367 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,11 @@ + + com.hpcloud + mon-influxdb + ${mon.common.version} + com.hpcloud mon-model diff --git a/src/main/java/com/hpcloud/mon/MonApiConfiguration.java b/src/main/java/com/hpcloud/mon/MonApiConfiguration.java index b0ccdb4f4..b3b602b54 100644 --- a/src/main/java/com/hpcloud/mon/MonApiConfiguration.java +++ b/src/main/java/com/hpcloud/mon/MonApiConfiguration.java @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.hpcloud.messaging.kafka.KafkaConfiguration; import com.hpcloud.mon.infrastructure.middleware.MiddlewareConfiguration; import com.hpcloud.mon.infrastructure.persistence.DatabaseConfiguration; -import com.hpcloud.mon.infrastructure.persistence.influxdb.InfluxDbConfig; +import com.hpcloud.mon.infrastructure.persistence.influxdb.InfluxDbConfiguration; import io.dropwizard.Configuration; import io.dropwizard.db.DataSourceFactory; @@ -27,6 +27,7 @@ import org.hibernate.validator.constraints.NotEmpty; import javax.validation.Valid; import javax.validation.constraints.NotNull; + public class MonApiConfiguration extends Configuration { @NotEmpty public String region; @@ -52,9 +53,8 @@ public class MonApiConfiguration extends Configuration { @NotNull public MiddlewareConfiguration middleware; @Valid - public InfluxDbConfig influxDB; + public InfluxDbConfiguration influxDB; @Valid - @NotNull @JsonProperty public DatabaseConfiguration databaseConfiguration; diff --git a/src/main/java/com/hpcloud/mon/infrastructure/persistence/influxdb/InfluxDbConfig.java b/src/main/java/com/hpcloud/mon/infrastructure/persistence/influxdb/InfluxDbConfig.java deleted file mode 100644 index 0ba95982c..000000000 --- a/src/main/java/com/hpcloud/mon/infrastructure/persistence/influxdb/InfluxDbConfig.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2014 Hewlett-Packard Development Company, L.P. - * - * Licensed 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 com.hpcloud.mon.infrastructure.persistence.influxdb; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class InfluxDbConfig { - - @JsonProperty - String name; - - public String getName() { - return name; - } - - @JsonProperty - int replicationFactor; - - public int getReplicationFactor() { - return replicationFactor; - } - - @JsonProperty - String url; - - public String getUrl() { - return url; - } - - @JsonProperty - String user; - - public String getUser() { - return user; - } - - @JsonProperty - String password; - - public String getPassword() { - return password; - } - -}