Mercurial > stress-tester
changeset 651:108f2ef4809a
removing avro-ipc part 2
author | Devel 1 |
---|---|
date | Thu, 09 Nov 2017 13:00:10 +0100 |
parents | ba6112cc49b8 |
children | 77381d00243a |
files | stress-tester/src/main/java/com/passus/st/Main.java stress-tester/src/main/java/com/passus/st/Main2.java |
diffstat | 2 files changed, 6 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/Main.java Thu Nov 09 12:57:16 2017 +0100 +++ b/stress-tester/src/main/java/com/passus/st/Main.java Thu Nov 09 13:00:10 2017 +0100 @@ -28,7 +28,6 @@ import com.passus.st.metric.ScheduledMetricsCollector; import com.passus.st.metric.SummrizeMetricsCollectionHandler; import com.passus.st.reporter.ReporterClient; -import com.passus.st.reporter.server.AvroRpcReporterClient; import com.passus.st.reporter.trx.SocketReporterClient; import com.passus.st.source.PcapSessionEventSource; import com.passus.st.utils.PeriodFormatter; @@ -169,10 +168,7 @@ .hasArg().argName("ip") .build() ); - options.addOption(option("nrp", "newReporterProto").desc("Enables new reporter protocol.") - .hasArg(false) - .build()); - options.addOption(option("nrt", "newReporterThreads").desc("Number of sending threads. (range 1 - 8, default 2)") + options.addOption(option("nrt", "numReporterThreads").desc("Number of sending threads. (range 1 - 8, default 2)") .hasArg().argName("threads") .build() ); @@ -313,12 +309,8 @@ int port = 11111; InetAddress addr = InetAddress.getByName(cl.getOptionValue("ri")); InetSocketAddress socketAddr = new InetSocketAddress(addr, port); - if (cl.hasOption("nrp")) { - int threads = Integer.parseInt(cl.getOptionValue("nrt", "2")); - reporterClient = new SocketReporterClient(socketAddr, threads); - } else { - reporterClient = new AvroRpcReporterClient(socketAddr); - } + int threads = Integer.parseInt(cl.getOptionValue("nrt", "2")); + reporterClient = new SocketReporterClient(socketAddr, threads); reporterClient.start(); ReporterDestination reporterDestination = new ReporterRemoteDestination(reporterClient);
--- a/stress-tester/src/main/java/com/passus/st/Main2.java Thu Nov 09 12:57:16 2017 +0100 +++ b/stress-tester/src/main/java/com/passus/st/Main2.java Thu Nov 09 13:00:10 2017 +0100 @@ -29,7 +29,6 @@ import com.passus.st.metric.ScheduledMetricsCollector; import com.passus.st.metric.SummrizeMetricsCollectionHandler; import com.passus.st.reporter.ReporterClient; -import com.passus.st.reporter.server.AvroRpcReporterClient; import com.passus.st.reporter.trx.SocketReporterClient; import com.passus.st.source.PcapSessionEventSource; import com.passus.st.utils.PeriodFormatter; @@ -170,10 +169,7 @@ .hasArg().argName("ip") .build() ); - options.addOption(option("nrp", "newReporterProto").desc("Enables new reporter protocol.") - .hasArg(false) - .build()); - options.addOption(option("nrt", "newReporterThreads").desc("Number of sending threads. (range 1 - 8, default 2)") + options.addOption(option("nrt", "numReporterThreads").desc("Number of sending threads. (range 1 - 8, default 2)") .hasArg().argName("threads") .build() ); @@ -314,12 +310,8 @@ int port = 11111; InetAddress addr = InetAddress.getByName(cl.getOptionValue("ri")); InetSocketAddress socketAddr = new InetSocketAddress(addr, port); - if (cl.hasOption("nrp")) { - int threads = Integer.parseInt(cl.getOptionValue("nrt", "2")); - reporterClient = new SocketReporterClient(socketAddr, threads); - } else { - reporterClient = new AvroRpcReporterClient(socketAddr); - } + int threads = Integer.parseInt(cl.getOptionValue("nrt", "2")); + reporterClient = new SocketReporterClient(socketAddr, threads); reporterClient.start(); ReporterDestination reporterDestination = new ReporterRemoteDestination(reporterClient);