HDDS-452. 'ozone scm' with incorrect argument first logs all the STARTUP_MSG. Contributed by Namit Maheshwari.
This commit is contained in:
parent
0c8a43b9ec
commit
446cb8301e
@ -361,8 +361,6 @@ public static void main(String[] argv) throws IOException {
|
|||||||
hParser.printGenericCommandUsage(System.err);
|
hParser.printGenericCommandUsage(System.err);
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
StringUtils.startupShutdownMessage(StorageContainerManager.class, argv,
|
|
||||||
LOG);
|
|
||||||
StorageContainerManager scm = createSCM(hParser.getRemainingArgs(), conf);
|
StorageContainerManager scm = createSCM(hParser.getRemainingArgs(), conf);
|
||||||
if (scm != null) {
|
if (scm != null) {
|
||||||
scm.start();
|
scm.start();
|
||||||
@ -395,9 +393,13 @@ public static StorageContainerManager createSCM(String[] argv,
|
|||||||
}
|
}
|
||||||
switch (startOpt) {
|
switch (startOpt) {
|
||||||
case INIT:
|
case INIT:
|
||||||
|
StringUtils.startupShutdownMessage(StorageContainerManager.class, argv,
|
||||||
|
LOG);
|
||||||
terminate(scmInit(conf) ? 0 : 1);
|
terminate(scmInit(conf) ? 0 : 1);
|
||||||
return null;
|
return null;
|
||||||
case GENCLUSTERID:
|
case GENCLUSTERID:
|
||||||
|
StringUtils.startupShutdownMessage(StorageContainerManager.class, argv,
|
||||||
|
LOG);
|
||||||
System.out.println("Generating new cluster id:");
|
System.out.println("Generating new cluster id:");
|
||||||
System.out.println(StorageInfo.newClusterID());
|
System.out.println(StorageInfo.newClusterID());
|
||||||
terminate(0);
|
terminate(0);
|
||||||
@ -407,6 +409,8 @@ public static StorageContainerManager createSCM(String[] argv,
|
|||||||
terminate(0);
|
terminate(0);
|
||||||
return null;
|
return null;
|
||||||
default:
|
default:
|
||||||
|
StringUtils.startupShutdownMessage(StorageContainerManager.class, argv,
|
||||||
|
LOG);
|
||||||
return new StorageContainerManager(conf);
|
return new StorageContainerManager(conf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user