diff --git a/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml b/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml index 52067343ef051799150c65f91643a6475ad68157..ae288ae294a8569d10c5c98b3e82e2833ef4ed68 100644 --- a/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml +++ b/tests/comparisonTest/opentsdb/opentsdbtest/pom.xml @@ -206,16 +206,6 @@ slf4j-api 1.7.25 - - org.slf4j - slf4j-log4j12 - 1.7.21 - - - org.slf4j - log4j-over-slf4j - 1.7.7 - org.apache.logging.log4j diff --git a/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/OpentsdbTest.java b/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/OpentsdbTest.java index e1a20dfb4908182e3471cac834c57b477b124998..4d02922766d6a3424a21b127ebe888b4b582dbab 100644 --- a/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/OpentsdbTest.java +++ b/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/OpentsdbTest.java @@ -1,6 +1,5 @@ import com.stumbleupon.async.Callback; import com.stumbleupon.async.Deferred; -import lombok.extern.slf4j.Slf4j; import net.opentsdb.core.TSDB; import net.opentsdb.uid.NoSuchUniqueName; @@ -40,13 +39,19 @@ import java.util.concurrent.*; import java.math.*; import java.lang.reflect.Method; +import org.apache.log4j.Logger; +import org.apache.log4j.LogManager; +import org.apache.log4j.Level; -public class OpentsdbTest{ +public class OpentsdbTest{ //static { System.setProperty("logback.configurationFile", "/home/ubuntu/fang/opentsdb/opentsdbtest/logback.xml");} static { System.setProperty("logback.configurationFile", "/etc/opentsdb/logback.xml");} public static void main(String args[]) { + + Logger logger = LogManager.getLogger(OpentsdbTest.class); + logger.setLevel(Level.OFF); // begin to parse argument String datadir = "/home/ubuntu/testdata"; String sqlchoice = "q1"; @@ -156,7 +161,7 @@ public class OpentsdbTest{ } switch (sqlchoice) { case "q1": - get_url = "http://192.168.1.114:4242/api/query?"; + get_url = "http://127.0.0.1:4242/api/query?"; /* get_url = get_url + "start=1563249700&m=none:temperature{devgroup="; get_url = get_url + String.valueOf(ig-10) +"}"; diff --git a/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/WriteThread.java b/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/WriteThread.java index f6f9ef69055fd9eee591102b598adb31ea09410c..569925ccc61b304267ac68a4a33d1ba20302c6d7 100644 --- a/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/WriteThread.java +++ b/tests/comparisonTest/opentsdb/opentsdbtest/src/main/java/com/opentsdb/test/WriteThread.java @@ -1,6 +1,5 @@ import com.stumbleupon.async.Callback; import com.stumbleupon.async.Deferred; -import lombok.extern.slf4j.Slf4j; import net.opentsdb.core.TSDB; import net.opentsdb.uid.NoSuchUniqueName; @@ -64,7 +63,7 @@ public class WriteThread extends Thread { public void run() { StringEntity stringEntity; String port = "4242"; - String put_url = "http://192.168.1.114:"+port+"/api/put?summary"; + String put_url = "http://127.0.0.1:"+port+"/api/put?summary"; try (CloseableHttpClient httpclient = HttpClients.createDefault()) { /* httpclient.getHttpConnectionManager().getParams() @@ -152,4 +151,4 @@ public class WriteThread extends Thread { System.out.println("failed to connect"); } }//end run -}//end class \ No newline at end of file +}//end class