hanicz commented on code in PR #940:
URL: https://github.com/apache/knox/pull/940#discussion_r1808330808
##########
gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java:
##########
@@ -701,31 +717,34 @@ protected RemoteConfigurationRegistryClientService
getRemoteConfigRegistryClient
private class AliasListCommand extends Command {
- public static final String USAGE = "list-alias [--cluster clustername]";
+ public static final String USAGE = "list-alias [--cluster
cluster1:clusterN]";
public static final String DESC = "The list-alias command lists all of the
aliases\n" +
- "for the given hadoop --cluster. The
default\n" +
+ "for the given hadoop --cluster(s). The
default\n" +
"--cluster being the gateway itself.";
@Override
public void execute() throws Exception {
AliasService as = getAliasService();
- KeystoreService keystoreService = getKeystoreService();
+ KeystoreService keystoreService = getKeystoreService();
if (cluster == null) {
cluster = "__gateway";
}
- boolean credentialStoreForClusterAvailable =
- keystoreService.isCredentialStoreForClusterAvailable(cluster);
- if (credentialStoreForClusterAvailable) {
- out.println("Listing aliases for: " + cluster);
- List<String> aliases = as.getAliasesForCluster(cluster);
- for (String alias : aliases) {
- out.println(alias);
- }
- out.println("\n" + aliases.size() + " items.");
- } else {
- out.println("Invalid cluster name provided: " + cluster);
- }
+ String[] clusters = cluster.split(":");
Review Comment:
Yes, it makes more sense to use `,`. I also added it as a constant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]