Use InfluxDbConfiguration from mon-influxdb.
Change-Id: Idb4982677192b6db89621e05d230b96929f3e792
This commit is contained in:
parent
c8cb99bf8f
commit
76ddef1b77
5
pom.xml
5
pom.xml
|
@ -60,6 +60,11 @@
|
|||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hpcloud</groupId>
|
||||
<artifactId>mon-influxdb</artifactId>
|
||||
<version>${mon.common.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hpcloud</groupId>
|
||||
<artifactId>mon-model</artifactId>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue