Ethanlm commented on a change in pull request #3247: [STORM-3619] Add null
check for topology name
URL: https://github.com/apache/storm/pull/3247#discussion_r405817261
##########
File path: storm-client/src/jvm/org/apache/storm/StormSubmitter.java
##########
@@ -248,11 +252,8 @@ public static void submitTopologyAs(String name,
Map<String, Object> topoConf, S
try {
String serConf = JSONValue.toJSONString(topoConf);
try (NimbusClient client =
NimbusClient.getConfiguredClientAs(conf, asUser)) {
- if (topologyNameExists(name, client)) {
- throw new RuntimeException("Topology with name `" + name +
"` already exists on cluster");
- }
- if (!Utils.isValidKey(name)) {
Review comment:
There are two reasons:
1. Moved the name check to the very beginning of this submit function.
2. Replace it with `Utils.validateTopologyName(name);` so we have the same
check on client and server side.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services