From b0a659c8c0500c47f974518ec98ae44c283db9f4 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 --- .../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 b3408a4be9..60796c7fec 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 @@ private static void printUsage(PrintStream out) { 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 + "" +