From 4d2db42595de9e5908e33ec4b4c65dabdd35e687 Mon Sep 17 00:00:00 2001 From: Nanda kumar Date: Sat, 15 Sep 2018 02:34:33 +0530 Subject: [PATCH] HDDS-466. Handle null in argv of StorageContainerManager#createSCM. Contributed by Nanda kumar (cherry picked from commit b0a659c8c0500c47f974518ec98ae44c283db9f4) --- .../apache/hadoop/hdds/scm/server/StorageContainerManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java index b3408a4be91..60796c7fec4 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java @@ -376,9 +376,10 @@ public final class StorageContainerManager extends ServiceRuntimeInfoImpl out.println(USAGE + "\n"); } - public static StorageContainerManager createSCM(String[] argv, + public static StorageContainerManager createSCM(String[] args, OzoneConfiguration conf) throws IOException { + String[] argv = (args == null) ? new String[0] : args; if (!HddsUtils.isHddsEnabled(conf)) { System.err.println( "SCM cannot be started in secure mode or when " + OZONE_ENABLED + "" +