Fixing stylecheck problems with storm-core

Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/fc1cf09b
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/fc1cf09b
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/fc1cf09b

Branch: refs/heads/master
Commit: fc1cf09b05c86dc5d1802049e7b650ceb52e54d4
Parents: f1c0bcb
Author: Kishor Patil <[email protected]>
Authored: Sun Apr 22 21:12:29 2018 -0400
Committer: Kishor Patil <[email protected]>
Committed: Mon Apr 23 00:04:03 2018 -0400

----------------------------------------------------------------------
 storm-core/pom.xml                              |   2 +-
 .../jvm/org/apache/storm/command/Activate.java  |  32 +-
 .../org/apache/storm/command/AdminCommands.java |  39 +--
 .../apache/storm/command/BasicDrpcClient.java   |  30 +-
 .../jvm/org/apache/storm/command/Blobstore.java |  85 +++---
 .../src/jvm/org/apache/storm/command/CLI.java   | 303 +++++++++----------
 .../org/apache/storm/command/ConfigValue.java   |  26 +-
 .../org/apache/storm/command/Deactivate.java    |  32 +-
 .../org/apache/storm/command/DevZookeeper.java  |  20 +-
 .../jvm/org/apache/storm/command/GetErrors.java |  28 +-
 .../org/apache/storm/command/HealthCheck.java   |  20 +-
 .../org/apache/storm/command/Heartbeats.java    |  23 +-
 .../org/apache/storm/command/KillTopology.java  |  39 +--
 .../org/apache/storm/command/KillWorkers.java   |  24 +-
 .../apache/storm/command/ListTopologies.java    |  55 ++--
 .../jvm/org/apache/storm/command/Monitor.java   |  31 +-
 .../jvm/org/apache/storm/command/Rebalance.java |  39 +--
 .../org/apache/storm/command/SetLogLevel.java   |  32 +-
 .../apache/storm/command/UploadCredentials.java |  40 ++-
 .../org/apache/storm/planner/CompoundSpout.java |  21 +-
 .../org/apache/storm/planner/CompoundTask.java  |  21 +-
 .../org/apache/storm/planner/TaskBundle.java    |  25 +-
 .../apache/storm/testing/MockLeaderElector.java |  23 +-
 .../staticmocking/MockedClientZookeeper.java    |   1 +
 .../testing/staticmocking/MockedCluster.java    |  20 +-
 .../staticmocking/MockedSupervisorUtils.java    |  18 +-
 .../testing/staticmocking/MockedZookeeper.java  |  18 +-
 .../apache/storm/ui/FilterConfiguration.java    |  19 +-
 .../jvm/org/apache/storm/ui/IConfigurator.java  |  19 +-
 .../storm/ui/InvalidRequestException.java       |   1 +
 .../src/jvm/org/apache/storm/ui/UIHelpers.java  |  70 ++---
 .../apache/storm/utils/ClojureTimerTask.java    |  25 +-
 .../src/jvm/org/apache/storm/utils/Monitor.java | 185 +++++------
 .../apache/storm/utils/TopologySpoutLag.java    |  75 +++--
 .../test/jvm/org/apache/storm/MockAutoCred.java |  25 +-
 .../org/apache/storm/command/RebalanceTest.java |  21 +-
 .../apache/storm/command/SetLogLevelTest.java   |  21 +-
 .../jvm/org/apache/storm/command/TestCLI.java   |  48 ++-
 .../apache/storm/metric/FakeMetricConsumer.java |  41 ++-
 .../nimbus/InMemoryTopologyActionNotifier.java  |  27 +-
 .../storm/serialization/SerializationTest.java  |  10 +-
 .../org/apache/storm/stats/TestStatsUtil.java   |  64 ++--
 .../staticmocking/ConfigUtilsInstaller.java     |   3 +-
 .../staticmocking/ReflectionUtilsInstaller.java |   3 +-
 .../ServerConfigUtilsInstaller.java             |   3 +-
 .../utils/staticmocking/UtilsInstaller.java     |   3 +-
 .../storm/utils/staticmocking/package-info.java |  66 +++-
 47 files changed, 807 insertions(+), 969 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/pom.xml
----------------------------------------------------------------------
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index 88074b8..26109f9 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -449,7 +449,7 @@
                 <artifactId>maven-checkstyle-plugin</artifactId>
                 <!--Note - the version would be inherited-->
                 <configuration>
-                    <maxAllowedViolations>254</maxAllowedViolations>
+                    <maxAllowedViolations>73</maxAllowedViolations>
                 </configuration>
             </plugin>
             <plugin>

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/Activate.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/Activate.java 
b/storm-core/src/jvm/org/apache/storm/command/Activate.java
index 45d4a99..73ad4f5 100644
--- a/storm-core/src/jvm/org/apache/storm/command/Activate.java
+++ b/storm-core/src/jvm/org/apache/storm/command/Activate.java
@@ -1,40 +1,34 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.utils.NimbusClient;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class Activate {
     private static final Logger LOG = LoggerFactory.getLogger(Activate.class);
 
-    public static void main(String [] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         final String name = args[0];
 
         NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() {
-          @Override
-          public void run(Nimbus.Iface nimbus) throws Exception {
-            nimbus.activate(name);
-            LOG.info("Activated topology: {}", name);
-          }
+            @Override
+            public void run(Nimbus.Iface nimbus) throws Exception {
+                nimbus.activate(name);
+                LOG.info("Activated topology: {}", name);
+            }
         });
     }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/AdminCommands.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/AdminCommands.java 
b/storm-core/src/jvm/org/apache/storm/command/AdminCommands.java
index 8d66a61..7ae7dbc 100644
--- a/storm-core/src/jvm/org/apache/storm/command/AdminCommands.java
+++ b/storm-core/src/jvm/org/apache/storm/command/AdminCommands.java
@@ -1,19 +1,13 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
 
 package org.apache.storm.command;
@@ -21,7 +15,6 @@ package org.apache.storm.command;
 import com.google.common.collect.Sets;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import org.apache.storm.blobstore.BlobStore;
@@ -45,7 +38,7 @@ public class AdminCommands {
     private static IStormClusterState stormClusterState;
     private static Map<String, Object> conf;
 
-    public static void main(String [] args) {
+    public static void main(String[] args) {
 
         if (args.length == 0) {
             throw new IllegalArgumentException("Missing command. Supported 
command is remove_corrupt_topologies");
@@ -58,7 +51,7 @@ public class AdminCommands {
                 removeCorruptTopologies();
                 break;
             default:
-                LOG.error("****** "+ command + " is not supported. Supported 
Admin command - \"remove_corrupt_topologies\" ******");
+                LOG.error("****** " + command + " is not supported. Supported 
Admin command - \"remove_corrupt_topologies\" ******");
                 throw new UnsupportedOperationException(command + " is not a 
supported admin command.");
         }
 
@@ -66,7 +59,7 @@ public class AdminCommands {
 
     private static void initialize() {
         conf = Utils.readStormConfig();
-        nimbusBlobStore = ServerUtils.getNimbusBlobStore (conf, 
NimbusInfo.fromConf(conf));
+        nimbusBlobStore = ServerUtils.getNimbusBlobStore(conf, 
NimbusInfo.fromConf(conf));
         try {
             stormClusterState = ClusterUtils.mkStormClusterState(conf, new 
ClusterStateContext(DaemonType.NIMBUS, conf));
         } catch (Exception e) {
@@ -75,24 +68,24 @@ public class AdminCommands {
         }
     }
 
-    private static Set<String> getKeyListFromId( String corruptId) {
+    private static Set<String> getKeyListFromId(String corruptId) {
         Set<String> keyLists = new HashSet<>();
         keyLists.add(ConfigUtils.masterStormCodeKey(corruptId));
         keyLists.add(ConfigUtils.masterStormConfKey(corruptId));
-        if(!ConfigUtils.isLocalMode(conf)) {
+        if (!ConfigUtils.isLocalMode(conf)) {
             ConfigUtils.masterStormJarKey(corruptId);
         }
         return keyLists;
     }
 
-    private static void removeCorruptTopologies( ) {
+    private static void removeCorruptTopologies() {
         Iterator<String> corruptTopologies = listCorruptTopologies();
-        while(corruptTopologies.hasNext()) {
+        while (corruptTopologies.hasNext()) {
             String corruptId = corruptTopologies.next();
             stormClusterState.removeStorm(corruptId);
-            if(nimbusBlobStore instanceof LocalFsBlobStore) {
+            if (nimbusBlobStore instanceof LocalFsBlobStore) {
                 Iterator<String> blobKeys = 
getKeyListFromId(corruptId).iterator();
-                while(blobKeys.hasNext()) {
+                while (blobKeys.hasNext()) {
                     stormClusterState.removeBlobstoreKey(blobKeys.next());
                 }
             }
@@ -109,7 +102,7 @@ public class AdminCommands {
         Set<String> activeTopologyIds = new 
HashSet<>(stormClusterState.activeStorms());
         Sets.SetView<String> diffTopology = Sets.difference(activeTopologyIds, 
blobStoreTopologyIds);
         LOG.info("active-topology-ids [{}] blob-topology-ids [{}] 
diff-topology [{}]",
-                activeTopologyIds.toString(), 
blobStoreTopologyIds.toString(),diffTopology.toString());
+                 activeTopologyIds.toString(), 
blobStoreTopologyIds.toString(), diffTopology.toString());
         return diffTopology.iterator();
     }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/BasicDrpcClient.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/BasicDrpcClient.java 
b/storm-core/src/jvm/org/apache/storm/command/BasicDrpcClient.java
index 97fb9d2..eab77c9 100644
--- a/storm-core/src/jvm/org/apache/storm/command/BasicDrpcClient.java
+++ b/storm-core/src/jvm/org/apache/storm/command/BasicDrpcClient.java
@@ -1,29 +1,21 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
 
 package org.apache.storm.command;
 
 import java.util.List;
 import java.util.Map;
-
 import org.apache.storm.Config;
 import org.apache.storm.utils.DRPCClient;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -45,10 +37,10 @@ public class BasicDrpcClient {
      */
     public static void main(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("f", "function", null, CLI.AS_STRING)
-            .arg("FUNC_AND_ARGS", CLI.INTO_LIST)
-            .parse(args);
-        final List<String> funcAndArgs = (List<String>)cl.get("FUNC_AND_ARGS");
-        final String function = (String)cl.get("f");
+                                    .arg("FUNC_AND_ARGS", CLI.INTO_LIST)
+                                    .parse(args);
+        final List<String> funcAndArgs = (List<String>) 
cl.get("FUNC_AND_ARGS");
+        final String function = (String) cl.get("f");
         Config conf = new Config();
         try (DRPCClient drpc = DRPCClient.getConfiguredClient(conf)) {
             if (function == null) {
@@ -62,7 +54,7 @@ public class BasicDrpcClient {
                     runAndPrint(drpc, func, arg);
                 }
             } else {
-                for (String arg: funcAndArgs) {
+                for (String arg : funcAndArgs) {
                     runAndPrint(drpc, function, arg);
                 }
             }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/Blobstore.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/Blobstore.java 
b/storm-core/src/jvm/org/apache/storm/command/Blobstore.java
index c6de51c..d5be3c8 100644
--- a/storm-core/src/jvm/org/apache/storm/command/Blobstore.java
+++ b/storm-core/src/jvm/org/apache/storm/command/Blobstore.java
@@ -1,33 +1,16 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
-package org.apache.storm.command;
 
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.storm.blobstore.*;
-import org.apache.storm.generated.AccessControl;
-import org.apache.storm.generated.AuthorizationException;
-import org.apache.storm.generated.KeyNotFoundException;
-import org.apache.storm.generated.ReadableBlobMeta;
-import org.apache.storm.generated.SettableBlobMeta;
-import org.apache.storm.utils.ServerUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+package org.apache.storm.command;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
@@ -42,6 +25,20 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.storm.blobstore.AtomicOutputStream;
+import org.apache.storm.blobstore.BlobStore;
+import org.apache.storm.blobstore.BlobStoreAclHandler;
+import org.apache.storm.blobstore.ClientBlobStore;
+import org.apache.storm.blobstore.InputStreamWithMeta;
+import org.apache.storm.generated.AccessControl;
+import org.apache.storm.generated.AuthorizationException;
+import org.apache.storm.generated.KeyNotFoundException;
+import org.apache.storm.generated.ReadableBlobMeta;
+import org.apache.storm.generated.SettableBlobMeta;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Blobstore {
     private static final Logger LOG = LoggerFactory.getLogger(Blobstore.class);
@@ -90,8 +87,8 @@ public class Blobstore {
 
     private static void readCli(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("f", "file", null, CLI.AS_STRING)
-                .arg("key", CLI.FIRST_WINS)
-                .parse(args);
+                                    .arg("key", CLI.FIRST_WINS)
+                                    .parse(args);
         final String key = (String) cl.get("key");
         final String file = (String) cl.get("f");
 
@@ -106,10 +103,10 @@ public class Blobstore {
 
     private static void createCli(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("f", "file", null, CLI.AS_STRING)
-                .opt("a", "acl", Collections.emptyList(), new AsAclParser())
-                .opt("r", "replication-factor", -1, CLI.AS_INT)
-                .arg("key", CLI.FIRST_WINS)
-                .parse(args);
+                                    .opt("a", "acl", Collections.emptyList(), 
new AsAclParser())
+                                    .opt("r", "replication-factor", -1, 
CLI.AS_INT)
+                                    .arg("key", CLI.FIRST_WINS)
+                                    .parse(args);
 
         final String key = (String) cl.get("key");
         final String file = (String) cl.get("f");
@@ -136,8 +133,8 @@ public class Blobstore {
 
     private static void updateCli(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("f", "file", null, CLI.AS_STRING)
-                .arg("key", CLI.FIRST_WINS)
-                .parse(args);
+                                    .arg("key", CLI.FIRST_WINS)
+                                    .parse(args);
 
         final String key = (String) cl.get("key");
         final String file = (String) cl.get("f");
@@ -203,8 +200,8 @@ public class Blobstore {
 
     private static void setAclCli(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("s", "set", Collections.emptyList(), 
new AsAclParser())
-                .arg("key", CLI.FIRST_WINS)
-                .parse(args);
+                                    .arg("key", CLI.FIRST_WINS)
+                                    .parse(args);
 
         final String key = (String) cl.get("key");
         final List<AccessControl> setAcl = (List<AccessControl>) cl.get("s");
@@ -260,8 +257,8 @@ public class Blobstore {
 
             private void updateReplicationFactor(ClientBlobStore blobStore, 
String[] args) throws Exception {
                 Map<String, Object> cl = CLI.opt("r", "replication-factor", 
null, CLI.AS_INT)
-                        .arg("key", CLI.FIRST_WINS)
-                        .parse(args);
+                                            .arg("key", CLI.FIRST_WINS)
+                                            .parse(args);
 
                 final String key = (String) cl.get("key");
                 final Integer replicationFactor = (Integer) cl.get("r");
@@ -276,6 +273,14 @@ public class Blobstore {
         });
     }
 
+    private static List<String> generateAccessControlsInfo(List<AccessControl> 
acl) {
+        List<String> accessControlStrings = new ArrayList<>();
+        for (AccessControl ac : acl) {
+            
accessControlStrings.add(BlobStoreAclHandler.accessControlToString(ac));
+        }
+        return accessControlStrings;
+    }
+
     private static final class BlobStoreSupport {
         static void readBlob(final String key, final OutputStream os) throws 
Exception {
             ClientBlobStore.withConfiguredClient(new 
ClientBlobStore.WithBlobstore() {
@@ -319,14 +324,6 @@ public class Blobstore {
         }
     }
 
-    private static List<String> generateAccessControlsInfo(List<AccessControl> 
acl) {
-        List<String> accessControlStrings = new ArrayList<>();
-        for (AccessControl ac : acl) {
-            
accessControlStrings.add(BlobStoreAclHandler.accessControlToString(ac));
-        }
-        return accessControlStrings;
-    }
-
     private static final class AsAclParser implements CLI.Parse {
         @Override
         public Object parse(String value) {

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/CLI.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/CLI.java 
b/storm-core/src/jvm/org/apache/storm/command/CLI.java
index b2afc78..eb62306 100644
--- a/storm-core/src/jvm/org/apache/storm/command/CLI.java
+++ b/storm-core/src/jvm/org/apache/storm/command/CLI.java
@@ -1,22 +1,21 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.DefaultParser;
 import org.apache.commons.cli.Option;
@@ -24,56 +23,7 @@ import org.apache.commons.cli.Options;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 public class CLI {
-    private static final Logger LOG = LoggerFactory.getLogger(CLI.class);
-    private static class Opt {
-        final String shortName;
-        final String longName;
-        final Object defaultValue;
-        final Parse parse;
-        final Assoc assoc;
-        public Opt(String shortName, String longName, Object defaultValue, 
Parse parse, Assoc assoc) {
-            this.shortName = shortName;
-            this.longName = longName;
-            this.defaultValue = defaultValue;
-            this.parse = parse == null ? AS_STRING : parse;
-            this.assoc = assoc == null ? LAST_WINS : assoc;
-        }
-
-        public Object process(Object current, String value) {
-            return assoc.assoc(current, parse.parse(value));
-        }
-    }
-
-    private static class Arg {
-        final String name;
-        final Parse parse;
-        final Assoc assoc;
-        public Arg(String name, Parse parse, Assoc assoc) {
-            this.name = name;
-            this.parse = parse == null ? AS_STRING : parse;
-            this.assoc = assoc == null ? INTO_LIST : assoc;
-        }
-
-        public Object process(Object current, String value) {
-            return assoc.assoc(current, parse.parse(value));
-        }
-    }
-
-    public interface Parse {
-        /**
-         * Parse a String to the type you want it to be.
-         * @param value the String to parse
-         * @return the parsed value
-         */
-        public Object parse(String value);
-    }
-
     /**
      * Parse function to return an Integer
      */
@@ -83,7 +33,6 @@ public class CLI {
             return Integer.valueOf(value);
         }
     };
-
     /**
      * Noop parse function, returns the String.
      */
@@ -93,17 +42,6 @@ public class CLI {
             return value;
         }
     };
-
-    public interface Assoc {
-        /**
-         * Associate a value into somthing else
-         * @param current what to put value into, will be null if no values 
have been added yet.
-         * @param value what to add
-         * @return the result of combining the two
-         */
-        public Object assoc(Object current, Object value);
-    }
-
     /**
      * Last occurance on the command line is the resulting value.
      */
@@ -113,7 +51,6 @@ public class CLI {
             return value;
         }
     };
-
     /**
      * First occurance on the command line is the resulting value.
      */
@@ -123,7 +60,6 @@ public class CLI {
             return current == null ? value : current;
         }
     };
-
     /**
      * All values are returned as a List.
      */
@@ -133,11 +69,10 @@ public class CLI {
             if (current == null) {
                 current = new ArrayList<Object>();
             }
-            ((List<Object>)current).add(value);
+            ((List<Object>) current).add(value);
             return current;
         }
     };
-
     /**
      * All values are returned as a map
      */
@@ -151,6 +86,138 @@ public class CLI {
             return current;
         }
     };
+    private static final Logger LOG = LoggerFactory.getLogger(CLI.class);
+
+    /**
+     * Add an option to be parsed
+     * @param shortName the short single character name of the option (no `-` 
character proceeds it).
+     * @param longName the multi character name of the option (no `--` 
characters proceed it).
+     * @param defaultValue the value that will be returned of the command if 
none is given. null if none is given.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public static CLIBuilder opt(String shortName, String longName, Object 
defaultValue) {
+        return new CLIBuilder().opt(shortName, longName, defaultValue);
+    }
+
+    /**
+     * Add an option to be parsed
+     * @param shortName the short single character name of the option (no `-` 
character proceeds it).
+     * @param longName the multi character name of the option (no `--` 
characters proceed it).
+     * @param defaultValue the value that will be returned of the command if 
none is given. null if none is given.
+     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public static CLIBuilder opt(String shortName, String longName, Object 
defaultValue, Parse parse) {
+        return new CLIBuilder().opt(shortName, longName, defaultValue, parse);
+    }
+
+    /**
+     * Add an option to be parsed
+     * @param shortName the short single character name of the option (no `-` 
character proceeds it).
+     * @param longName the multi character name of the option (no `--` 
characters proceed it).
+     * @param defaultValue the value that will be returned of the command if 
none is given. null if none is given.
+     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
+     * @param assoc an association command to decide what to do if the option 
appears multiple times.  If null LAST_WINS is used.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public static CLIBuilder opt(String shortName, String longName, Object 
defaultValue, Parse parse, Assoc assoc) {
+        return new CLIBuilder().opt(shortName, longName, defaultValue, parse, 
assoc);
+    }
+
+    /**
+     * Add a named argument.
+     * @param name the name of the argument.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public CLIBuilder arg(String name) {
+        return new CLIBuilder().arg(name);
+    }
+
+    /**
+     * Add a named argument.
+     * @param name the name of the argument.
+     * @param assoc an association command to decide what to do if the 
argument appears multiple times.  If null INTO_LIST is used.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public CLIBuilder arg(String name, Assoc assoc) {
+        return new CLIBuilder().arg(name, assoc);
+    }
+
+    /**
+     * Add a named argument.
+     * @param name the name of the argument.
+     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public CLIBuilder arg(String name, Parse parse) {
+        return new CLIBuilder().arg(name, parse);
+    }
+
+    /**
+     * Add a named argument.
+     * @param name the name of the argument.
+     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
+     * @param assoc an association command to decide what to do if the 
argument appears multiple times.  If null INTO_LIST is used.
+     * @return a builder to be used to continue creating the command line.
+     */
+    public CLIBuilder arg(String name, Parse parse, Assoc assoc) {
+        return new CLIBuilder().arg(name, parse, assoc);
+    }
+
+    public interface Parse {
+        /**
+         * Parse a String to the type you want it to be.
+         * @param value the String to parse
+         * @return the parsed value
+         */
+        public Object parse(String value);
+    }
+
+    public interface Assoc {
+        /**
+         * Associate a value into somthing else
+         * @param current what to put value into, will be null if no values 
have been added yet.
+         * @param value what to add
+         * @return the result of combining the two
+         */
+        public Object assoc(Object current, Object value);
+    }
+
+    private static class Opt {
+        final String shortName;
+        final String longName;
+        final Object defaultValue;
+        final Parse parse;
+        final Assoc assoc;
+
+        public Opt(String shortName, String longName, Object defaultValue, 
Parse parse, Assoc assoc) {
+            this.shortName = shortName;
+            this.longName = longName;
+            this.defaultValue = defaultValue;
+            this.parse = parse == null ? AS_STRING : parse;
+            this.assoc = assoc == null ? LAST_WINS : assoc;
+        }
+
+        public Object process(Object current, String value) {
+            return assoc.assoc(current, parse.parse(value));
+        }
+    }
+
+    private static class Arg {
+        final String name;
+        final Parse parse;
+        final Assoc assoc;
+
+        public Arg(String name, Parse parse, Assoc assoc) {
+            this.name = name;
+            this.parse = parse == null ? AS_STRING : parse;
+            this.assoc = assoc == null ? INTO_LIST : assoc;
+        }
+
+        public Object process(Object current, String value) {
+            return assoc.assoc(current, parse.parse(value));
+        }
+    }
 
     public static class CLIBuilder {
         private final ArrayList<Opt> opts = new ArrayList<>();
@@ -243,9 +310,9 @@ public class CLI {
          * args will be stored under the argument name, unless no arguments 
are configured, and then they will be stored under "ARGS".
          * The last argument comnfigured is greedy and is used to process all 
remaining command line arguments.
          */
-        public Map<String, Object> parse(String ... rawArgs) throws Exception {
+        public Map<String, Object> parse(String... rawArgs) throws Exception {
             Options options = new Options();
-            for (Opt opt: opts) {
+            for (Opt opt : opts) {
                 
options.addOption(Option.builder(opt.shortName).longOpt(opt.longName).hasArg().build());
             }
             DefaultParser parser = new DefaultParser();
@@ -278,7 +345,7 @@ public class CLI {
                     boolean isLastArg = (argIndex == (args.size() - 1));
                     Object current = null;
                     int maxStringIndex = isLastArg ? stringArgs.size() : 
(stringArgIndex + 1);
-                    for (;stringArgIndex < maxStringIndex; stringArgIndex++) {
+                    for (; stringArgIndex < maxStringIndex; stringArgIndex++) {
                         current = arg.process(current, 
stringArgs.get(stringArgIndex));
                     }
                     ret.put(arg.name, current);
@@ -290,80 +357,4 @@ public class CLI {
             return ret;
         }
     }
-
-    /**
-     * Add an option to be parsed
-     * @param shortName the short single character name of the option (no `-` 
character proceeds it).
-     * @param longName the multi character name of the option (no `--` 
characters proceed it).
-     * @param defaultValue the value that will be returned of the command if 
none is given. null if none is given.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public static CLIBuilder opt(String shortName, String longName, Object 
defaultValue) {
-        return new CLIBuilder().opt(shortName, longName, defaultValue);
-    }
-
-    /**
-     * Add an option to be parsed
-     * @param shortName the short single character name of the option (no `-` 
character proceeds it).
-     * @param longName the multi character name of the option (no `--` 
characters proceed it).
-     * @param defaultValue the value that will be returned of the command if 
none is given. null if none is given.
-     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public static CLIBuilder opt(String shortName, String longName, Object 
defaultValue, Parse parse) {
-        return new CLIBuilder().opt(shortName, longName, defaultValue, parse);
-    }
-
-    /**
-     * Add an option to be parsed
-     * @param shortName the short single character name of the option (no `-` 
character proceeds it).
-     * @param longName the multi character name of the option (no `--` 
characters proceed it).
-     * @param defaultValue the value that will be returned of the command if 
none is given. null if none is given.
-     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
-     * @param assoc an association command to decide what to do if the option 
appears multiple times.  If null LAST_WINS is used.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public static CLIBuilder opt(String shortName, String longName, Object 
defaultValue, Parse parse, Assoc assoc) {
-        return new CLIBuilder().opt(shortName, longName, defaultValue, parse, 
assoc);
-    }
-
-    /**
-     * Add a named argument.
-     * @param name the name of the argument.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public CLIBuilder arg(String name) {
-        return new CLIBuilder().arg(name);
-    }
-
-    /**
-     * Add a named argument.
-     * @param name the name of the argument.
-     * @param assoc an association command to decide what to do if the 
argument appears multiple times.  If null INTO_LIST is used.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public CLIBuilder arg(String name, Assoc assoc) {
-        return new CLIBuilder().arg(name, assoc);
-    }
-
-    /**
-     * Add a named argument.
-     * @param name the name of the argument.
-     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public CLIBuilder arg(String name, Parse parse) {
-        return new CLIBuilder().arg(name, parse);
-    }
-
-    /**
-     * Add a named argument.
-     * @param name the name of the argument.
-     * @param parse an optional function to transform the string to something 
else. If null a NOOP is used.
-     * @param assoc an association command to decide what to do if the 
argument appears multiple times.  If null INTO_LIST is used.
-     * @return a builder to be used to continue creating the command line.
-     */
-    public CLIBuilder arg(String name, Parse parse, Assoc assoc) {
-        return new CLIBuilder().arg(name, parse, assoc);
-    }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/ConfigValue.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/ConfigValue.java 
b/storm-core/src/jvm/org/apache/storm/command/ConfigValue.java
index 6b0ac46..eb6e451 100644
--- a/storm-core/src/jvm/org/apache/storm/command/ConfigValue.java
+++ b/storm-core/src/jvm/org/apache/storm/command/ConfigValue.java
@@ -1,26 +1,20 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
-
 import org.apache.storm.utils.ObjectReader;
 import org.apache.storm.utils.Utils;
 
@@ -45,9 +39,9 @@ public final class ConfigValue {
         Object value = conf.get(name);
         if (value instanceof List) {
             List<String> stringValues = ((List<?>) value)
-                    .stream()
-                    .map(ObjectReader::getString)
-                    .collect(Collectors.toList());
+                .stream()
+                .map(ObjectReader::getString)
+                .collect(Collectors.toList());
             value = String.join(" ", stringValues);
         }
         System.out.println("VALUE: " + value);

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/Deactivate.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/Deactivate.java 
b/storm-core/src/jvm/org/apache/storm/command/Deactivate.java
index 4eafb83..d56f6ff 100644
--- a/storm-core/src/jvm/org/apache/storm/command/Deactivate.java
+++ b/storm-core/src/jvm/org/apache/storm/command/Deactivate.java
@@ -1,40 +1,34 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.utils.NimbusClient;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class Deactivate {
     private static final Logger LOG = 
LoggerFactory.getLogger(Deactivate.class);
 
-    public static void main(String [] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         final String name = args[0];
 
         NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() {
-          @Override
-          public void run(Nimbus.Iface nimbus) throws Exception {
-            nimbus.deactivate(name);
-            LOG.info("Deactivated topology: {}", name);
-          }
+            @Override
+            public void run(Nimbus.Iface nimbus) throws Exception {
+                nimbus.deactivate(name);
+                LOG.info("Deactivated topology: {}", name);
+            }
         });
     }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/DevZookeeper.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/DevZookeeper.java 
b/storm-core/src/jvm/org/apache/storm/command/DevZookeeper.java
index ef53170..7e98e0d 100644
--- a/storm-core/src/jvm/org/apache/storm/command/DevZookeeper.java
+++ b/storm-core/src/jvm/org/apache/storm/command/DevZookeeper.java
@@ -1,24 +1,18 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import java.util.Map;
-
 import org.apache.storm.Config;
 import org.apache.storm.DaemonConfig;
 import org.apache.storm.utils.ObjectReader;

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/GetErrors.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/GetErrors.java 
b/storm-core/src/jvm/org/apache/storm/command/GetErrors.java
index 05c0ee4..dafd2cb 100644
--- a/storm-core/src/jvm/org/apache/storm/command/GetErrors.java
+++ b/storm-core/src/jvm/org/apache/storm/command/GetErrors.java
@@ -1,35 +1,29 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import org.apache.storm.generated.ErrorInfo;
 import org.apache.storm.generated.GetInfoOptions;
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.generated.NumErrorsChoice;
 import org.apache.storm.generated.TopologyInfo;
-import org.apache.storm.utils.Utils;
 import org.apache.storm.utils.NimbusClient;
+import org.apache.storm.utils.Utils;
 import org.json.simple.JSONValue;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 public class GetErrors {
     public static void main(String[] args) throws Exception {
         if (args.length == 0) {

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/HealthCheck.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/HealthCheck.java 
b/storm-core/src/jvm/org/apache/storm/command/HealthCheck.java
index 6cfde2c..ce7f53e 100644
--- a/storm-core/src/jvm/org/apache/storm/command/HealthCheck.java
+++ b/storm-core/src/jvm/org/apache/storm/command/HealthCheck.java
@@ -1,24 +1,18 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import java.util.Map;
-
 import org.apache.storm.healthcheck.HealthChecker;
 import org.apache.storm.utils.Utils;
 

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/Heartbeats.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/Heartbeats.java 
b/storm-core/src/jvm/org/apache/storm/command/Heartbeats.java
index 04dc954..4236d4d 100644
--- a/storm-core/src/jvm/org/apache/storm/command/Heartbeats.java
+++ b/storm-core/src/jvm/org/apache/storm/command/Heartbeats.java
@@ -1,24 +1,19 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
+import com.google.common.base.Joiner;
 import java.util.Map;
-
 import org.apache.storm.cluster.ClusterStateContext;
 import org.apache.storm.cluster.ClusterUtils;
 import org.apache.storm.cluster.IStateStorage;
@@ -29,8 +24,6 @@ import org.json.simple.JSONValue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Joiner;
-
 public class Heartbeats {
     private static final Logger LOG = 
LoggerFactory.getLogger(Heartbeats.class);
 

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/KillTopology.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/KillTopology.java 
b/storm-core/src/jvm/org/apache/storm/command/KillTopology.java
index b8f9a91..696c199 100644
--- a/storm-core/src/jvm/org/apache/storm/command/KillTopology.java
+++ b/storm-core/src/jvm/org/apache/storm/command/KillTopology.java
@@ -1,54 +1,47 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import java.util.List;
 import java.util.Map;
-
 import org.apache.storm.generated.KillOptions;
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.utils.NimbusClient;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class KillTopology {
     private static final Logger LOG = 
LoggerFactory.getLogger(KillTopology.class);
 
-    public static void main(String [] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("w", "wait", null, CLI.AS_INT)
                                     .arg("TOPO", CLI.INTO_LIST)
                                     .parse(args);
-        final List<String> names = (List<String>)cl.get("TOPO");
-        Integer wait = (Integer)cl.get("w");
+        final List<String> names = (List<String>) cl.get("TOPO");
+        Integer wait = (Integer) cl.get("w");
 
         final KillOptions opts = new KillOptions();
         if (wait != null) {
             opts.set_wait_secs(wait);
         }
         NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() {
-          @Override
-          public void run(Nimbus.Iface nimbus) throws Exception {
-            for (String name: names) {
-              nimbus.killTopologyWithOpts(name, opts);
-              LOG.info("Killed topology: {}", name);
+            @Override
+            public void run(Nimbus.Iface nimbus) throws Exception {
+                for (String name : names) {
+                    nimbus.killTopologyWithOpts(name, opts);
+                    LOG.info("Killed topology: {}", name);
+                }
             }
-          }
         });
     }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/KillWorkers.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/KillWorkers.java 
b/storm-core/src/jvm/org/apache/storm/command/KillWorkers.java
index 5dc8402..c417ace 100644
--- a/storm-core/src/jvm/org/apache/storm/command/KillWorkers.java
+++ b/storm-core/src/jvm/org/apache/storm/command/KillWorkers.java
@@ -1,34 +1,28 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
 import java.io.File;
 import java.util.Map;
-
 import org.apache.storm.Config;
 import org.apache.storm.daemon.supervisor.StandaloneSupervisor;
 import org.apache.storm.daemon.supervisor.Supervisor;
 import org.apache.storm.utils.Utils;
 
 public class KillWorkers {
-    public static void main(String [] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         Map<String, Object> conf = Utils.readStormConfig();
-        conf.put(Config.STORM_LOCAL_DIR, new 
File((String)conf.get(Config.STORM_LOCAL_DIR)).getCanonicalPath());
+        conf.put(Config.STORM_LOCAL_DIR, new File((String) 
conf.get(Config.STORM_LOCAL_DIR)).getCanonicalPath());
         try (Supervisor supervisor = new Supervisor(conf, null, new 
StandaloneSupervisor())) {
             supervisor.shutdownAllWorkers(null, null);
         }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/ListTopologies.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/ListTopologies.java 
b/storm-core/src/jvm/org/apache/storm/command/ListTopologies.java
index 20d5b6f..4fe2982 100644
--- a/storm-core/src/jvm/org/apache/storm/command/ListTopologies.java
+++ b/storm-core/src/jvm/org/apache/storm/command/ListTopologies.java
@@ -1,52 +1,45 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.command;
 
+import java.util.List;
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.generated.TopologySummary;
 import org.apache.storm.utils.NimbusClient;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.List;
-
 public class ListTopologies {
     private static final Logger LOG = 
LoggerFactory.getLogger(ListTopologies.class);
     private static final String MSG_FORMAT = "%-20s %-10s %-10s %-12s %-12s 
%-20s\n";
 
-    public static void main(String [] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() {
-          @Override
-          public void run(Nimbus.Iface nimbus) throws Exception {
-              List<TopologySummary> topologies = 
nimbus.getClusterInfo().get_topologies();
-              if (topologies == null || topologies.isEmpty()) {
-                  System.out.println("No topologies running.");
-              } else {
-                  System.out.printf(MSG_FORMAT, "Topology_name", "Status", 
"Num_tasks", "Num_workers", "Uptime_secs", "Topology_Id");
-                  
System.out.println("----------------------------------------------------------------------------------------");
-                  for (TopologySummary topology: topologies) {
-                      System.out.printf(MSG_FORMAT, topology.get_name(), 
topology.get_status(),
-                                        topology.get_num_tasks(), 
topology.get_num_workers(),
-                                        topology.get_uptime_secs(), 
topology.get_id());
-                  }
-              }
-          }
+            @Override
+            public void run(Nimbus.Iface nimbus) throws Exception {
+                List<TopologySummary> topologies = 
nimbus.getClusterInfo().get_topologies();
+                if (topologies == null || topologies.isEmpty()) {
+                    System.out.println("No topologies running.");
+                } else {
+                    System.out.printf(MSG_FORMAT, "Topology_name", "Status", 
"Num_tasks", "Num_workers", "Uptime_secs", "Topology_Id");
+                    
System.out.println("----------------------------------------------------------------------------------------");
+                    for (TopologySummary topology : topologies) {
+                        System.out.printf(MSG_FORMAT, topology.get_name(), 
topology.get_status(),
+                                          topology.get_num_tasks(), 
topology.get_num_workers(),
+                                          topology.get_uptime_secs(), 
topology.get_id());
+                    }
+                }
+            }
         });
     }
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/Monitor.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/Monitor.java 
b/storm-core/src/jvm/org/apache/storm/command/Monitor.java
index c4da6c8..7ade55e 100644
--- a/storm-core/src/jvm/org/apache/storm/command/Monitor.java
+++ b/storm-core/src/jvm/org/apache/storm/command/Monitor.java
@@ -1,37 +1,30 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
 
 package org.apache.storm.command;
 
+import java.util.Map;
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.utils.NimbusClient;
 
-import java.util.Map;
-
 public class Monitor {
 
     public static void main(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("i", "interval", 4, CLI.AS_INT)
-            .opt("m", "component", null)
-            .opt("s", "stream", "default")
-            .opt("w", "watch", "emitted")
-            .arg("topologyName", CLI.FIRST_WINS)
-            .parse(args);
+                                    .opt("m", "component", null)
+                                    .opt("s", "stream", "default")
+                                    .opt("w", "watch", "emitted")
+                                    .arg("topologyName", CLI.FIRST_WINS)
+                                    .parse(args);
         final org.apache.storm.utils.Monitor monitor = new 
org.apache.storm.utils.Monitor();
         Integer interval = (Integer) cl.get("i");
         String component = (String) cl.get("m");

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/Rebalance.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/Rebalance.java 
b/storm-core/src/jvm/org/apache/storm/command/Rebalance.java
index ec34798..4ecf4c9 100644
--- a/storm-core/src/jvm/org/apache/storm/command/Rebalance.java
+++ b/storm-core/src/jvm/org/apache/storm/command/Rebalance.java
@@ -1,23 +1,19 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
 
 package org.apache.storm.command;
 
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.storm.generated.Nimbus;
 import org.apache.storm.generated.RebalanceOptions;
 import org.apache.storm.utils.NimbusClient;
@@ -26,9 +22,6 @@ import org.json.simple.JSONValue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import static java.lang.String.format;
 
 public class Rebalance {
@@ -37,12 +30,12 @@ public class Rebalance {
 
     public static void main(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("w", "wait", null, CLI.AS_INT)
-            .opt("n", "num-workers", null, CLI.AS_INT)
-            .opt("e", "executor", null, new ExecutorParser(), CLI.INTO_MAP)
-            .opt("r", "resources", null, new ResourcesParser(), CLI.INTO_MAP)
-            .opt("t", "topology-conf", null, new ConfParser(), CLI.INTO_MAP)
-            .arg("topologyName", CLI.FIRST_WINS)
-            .parse(args);
+                                    .opt("n", "num-workers", null, CLI.AS_INT)
+                                    .opt("e", "executor", null, new 
ExecutorParser(), CLI.INTO_MAP)
+                                    .opt("r", "resources", null, new 
ResourcesParser(), CLI.INTO_MAP)
+                                    .opt("t", "topology-conf", null, new 
ConfParser(), CLI.INTO_MAP)
+                                    .arg("topologyName", CLI.FIRST_WINS)
+                                    .parse(args);
         final String name = (String) cl.get("topologyName");
         final RebalanceOptions rebalanceOptions = new RebalanceOptions();
         Integer wait = (Integer) cl.get("w");
@@ -104,11 +97,11 @@ public class Rebalance {
                 // But because value is coming from JSON it is going to be a 
Number, and we want it to be a Double.
                 // So the goal is to go through each entry and update it 
accordingly
                 Map<String, Map<String, Double>> ret = new HashMap<>();
-                for (Map.Entry<String, Object> compEntry: 
Utils.parseJson(value).entrySet()) {
+                for (Map.Entry<String, Object> compEntry : 
Utils.parseJson(value).entrySet()) {
                     String comp = compEntry.getKey();
                     Map<String, Number> numResources = (Map<String, Number>) 
compEntry.getValue();
                     Map<String, Double> doubleResource = new HashMap<>();
-                    for (Map.Entry<String, Number> entry: 
numResources.entrySet()) {
+                    for (Map.Entry<String, Number> entry : 
numResources.entrySet()) {
                         doubleResource.put(entry.getKey(), 
entry.getValue().doubleValue());
                     }
                     ret.put(comp, doubleResource);

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/SetLogLevel.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/SetLogLevel.java 
b/storm-core/src/jvm/org/apache/storm/command/SetLogLevel.java
index 75708a8..24f04e1 100644
--- a/storm-core/src/jvm/org/apache/storm/command/SetLogLevel.java
+++ b/storm-core/src/jvm/org/apache/storm/command/SetLogLevel.java
@@ -1,47 +1,39 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
 
 package org.apache.storm.command;
 
 import com.google.common.base.Preconditions;
-
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.logging.log4j.Level;
 import org.apache.storm.generated.LogConfig;
 import org.apache.storm.generated.LogLevel;
 import org.apache.storm.generated.LogLevelAction;
 import org.apache.storm.generated.Nimbus;
-import org.apache.storm.utils.Utils;
 import org.apache.storm.utils.NimbusClient;
+import org.apache.storm.utils.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.HashMap;
-import java.util.Map;
-
 public class SetLogLevel {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(SetLogLevel.class);
 
     public static void main(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("l", "log-setting", null, new 
LogLevelsParser(LogLevelAction.UPDATE), CLI.INTO_MAP)
-            .opt("r", "remove-log-setting", null, new 
LogLevelsParser(LogLevelAction.REMOVE), CLI.INTO_MAP)
-            .arg("topologyName", CLI.FIRST_WINS)
-            .parse(args);
+                                    .opt("r", "remove-log-setting", null, new 
LogLevelsParser(LogLevelAction.REMOVE), CLI.INTO_MAP)
+                                    .arg("topologyName", CLI.FIRST_WINS)
+                                    .parse(args);
         final String topologyName = (String) cl.get("topologyName");
         final LogConfig logConfig = new LogConfig();
         Map<String, LogLevel> logLevelMap = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/command/UploadCredentials.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/command/UploadCredentials.java 
b/storm-core/src/jvm/org/apache/storm/command/UploadCredentials.java
index a72039b..9a71fac 100644
--- a/storm-core/src/jvm/org/apache/storm/command/UploadCredentials.java
+++ b/storm-core/src/jvm/org/apache/storm/command/UploadCredentials.java
@@ -1,31 +1,25 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
-package org.apache.storm.command;
 
-import org.apache.storm.StormSubmitter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+package org.apache.storm.command;
 
 import java.io.FileReader;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import org.apache.storm.StormSubmitter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UploadCredentials {
 
@@ -33,9 +27,9 @@ public class UploadCredentials {
 
     public static void main(String[] args) throws Exception {
         Map<String, Object> cl = CLI.opt("f", "file", null)
-            .arg("topologyName", CLI.FIRST_WINS)
-            .arg("rawCredentials", CLI.INTO_LIST)
-            .parse(args);
+                                    .arg("topologyName", CLI.FIRST_WINS)
+                                    .arg("rawCredentials", CLI.INTO_LIST)
+                                    .parse(args);
 
         String credentialFile = (String) cl.get("f");
         List<String> rawCredentials = (List<String>) cl.get("rawCredentials");
@@ -44,13 +38,13 @@ public class UploadCredentials {
         if (null != rawCredentials && ((rawCredentials.size() % 2) != 0)) {
             throw new RuntimeException("Need an even number of arguments to 
make a map");
         }
-        Map<String,String> credentialsMap = new HashMap<>();
+        Map<String, String> credentialsMap = new HashMap<>();
         if (null != credentialFile) {
             Properties credentialProps = new Properties();
             credentialProps.load(new FileReader(credentialFile));
-            for(Map.Entry<Object, Object> credentialProp : 
credentialProps.entrySet()) {
-                credentialsMap.put((String)credentialProp.getKey(),
-                        (String)credentialProp.getValue());
+            for (Map.Entry<Object, Object> credentialProp : 
credentialProps.entrySet()) {
+                credentialsMap.put((String) credentialProp.getKey(),
+                                   (String) credentialProp.getValue());
             }
         }
         if (null != rawCredentials) {

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/planner/CompoundSpout.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/planner/CompoundSpout.java 
b/storm-core/src/jvm/org/apache/storm/planner/CompoundSpout.java
index 65d546e..2a46f27 100644
--- a/storm-core/src/jvm/org/apache/storm/planner/CompoundSpout.java
+++ b/storm-core/src/jvm/org/apache/storm/planner/CompoundSpout.java
@@ -1,25 +1,20 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.planner;
 
 
 public class CompoundSpout
-        //implements ISpout
+    //implements ISpout
 {
 
 }

http://git-wip-us.apache.org/repos/asf/storm/blob/fc1cf09b/storm-core/src/jvm/org/apache/storm/planner/CompoundTask.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/planner/CompoundTask.java 
b/storm-core/src/jvm/org/apache/storm/planner/CompoundTask.java
index 13bcfb5..c9fe535 100644
--- a/storm-core/src/jvm/org/apache/storm/planner/CompoundTask.java
+++ b/storm-core/src/jvm/org/apache/storm/planner/CompoundTask.java
@@ -1,25 +1,20 @@
 /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The 
ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance with 
the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions
+ * and limitations under the License.
  */
+
 package org.apache.storm.planner;
 
 
 public class CompoundTask
-//        implements IBolt
+    //        implements IBolt
 {
 
 }

Reply via email to