You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2019/02/26 22:35:46 UTC

[hadoop] branch trunk updated: HDDS-1174. Freon tests are failing with null pointer exception. Contributed by Shashikant Banerjee.

This is an automated email from the ASF dual-hosted git repository.

aengineer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a5a751b  HDDS-1174. Freon tests are failing with null pointer exception. Contributed by Shashikant Banerjee.
a5a751b is described below

commit a5a751b4187c69a6cda66466a3210d81ef54d929
Author: Anu Engineer <ae...@apache.org>
AuthorDate: Tue Feb 26 14:33:54 2019 -0800

    HDDS-1174. Freon tests are failing with null pointer exception.
    Contributed by Shashikant Banerjee.
---
 .../java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
index 650d253..a255342 100644
--- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
+++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
@@ -215,7 +215,9 @@ public final class RandomKeyGenerator implements Callable<Void> {
     for (FreonOps ops : FreonOps.values()) {
       histograms.add(ops.ordinal(), new Histogram(new UniformReservoir()));
     }
-    freon.startHttpServer();
+    if (freon != null) {
+      freon.startHttpServer();
+    }
   }
 
   @Override
@@ -296,7 +298,9 @@ public final class RandomKeyGenerator implements Callable<Void> {
     Runtime.getRuntime().addShutdownHook(
         new Thread(() -> {
           printStats(System.out);
-          freon.stopHttpServer();
+          if (freon != null) {
+            freon.stopHttpServer();
+          }
         }));
   }
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org