diff options
author | Ola Aunrønning <olaa@yahoo-inc.com> | 2017-08-10 09:16:14 +0200 |
---|---|---|
committer | Ola Aunrønning <olaa@yahoo-inc.com> | 2017-08-15 12:29:41 +0200 |
commit | 03a28079b42fed21621af79323eb4dd06194ca25 (patch) | |
tree | 7af2e07cc9ef54fc8323ba2721f21f288bb841ba /node-maintainer | |
parent | 6ddaee021de0021b1b46822019e3a1f4450546de (diff) |
Report is printed to std out
Diffstat (limited to 'node-maintainer')
-rw-r--r-- | node-maintainer/pom.xml | 5 | ||||
-rw-r--r-- | node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/ReportSender.java | 21 |
2 files changed, 2 insertions, 24 deletions
diff --git a/node-maintainer/pom.xml b/node-maintainer/pom.xml index 03ed8a77f7d..d56e12d92c6 100644 --- a/node-maintainer/pom.xml +++ b/node-maintainer/pom.xml @@ -33,11 +33,6 @@ <version>${project.version}</version> </dependency> <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>application</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> diff --git a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/ReportSender.java b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/ReportSender.java index d058c4c263e..8b26a5cce37 100644 --- a/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/ReportSender.java +++ b/node-maintainer/src/main/java/com/yahoo/vespa/hosted/node/verification/commons/ReportSender.java @@ -7,17 +7,10 @@ import com.yahoo.vespa.hosted.node.verification.commons.noderepo.NodeRepoJsonMod import com.yahoo.vespa.hosted.node.verification.commons.report.BenchmarkReport; import com.yahoo.vespa.hosted.node.verification.commons.report.HardwareDivergenceReport; import com.yahoo.vespa.hosted.node.verification.commons.report.SpecVerificationReport; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpPatch; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; import java.io.IOException; import java.net.URL; import java.util.ArrayList; -import java.util.logging.Level; import java.util.logging.Logger; public class ReportSender { @@ -31,19 +24,9 @@ public class ReportSender { report = "{\"hardwareDivergence\": null}"; } else { - report = "{\"hardwareDivergence\": " + om.writeValueAsString(hardwareDivergenceReport) + "}"; + report = "{\"hardwareDivergence\": \"" + om.writeValueAsString(hardwareDivergenceReport) + "\"}"; } - HttpPatch httpPatch = new HttpPatch(nodeInfoUrls.get(0).toString()); - httpPatch.setEntity(new StringEntity(report)); - CloseableHttpClient httpClient = HttpClients.createDefault(); - try { - CloseableHttpResponse httpResponse = httpClient.execute(httpPatch); - logger.log(Level.INFO, "Response code: " + httpResponse.getStatusLine().getStatusCode()); - - } catch (ClientProtocolException e) { - System.out.println("Failed to patch node repo - Invalid URL"); - } - httpClient.close(); + System.out.println(om.writeValueAsString(report)); } public static void reportBenchmarkResults(BenchmarkReport benchmarkReport, ArrayList<URL> nodeInfoUrls) throws IOException { |