Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1677#discussion_r79897811
  
    --- Diff: storm-core/src/jvm/org/apache/storm/command/AdminCommands.java ---
    @@ -0,0 +1,133 @@
    +/**
    + * 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.
    + */
    +package org.apache.storm.command;
    +
    +import com.google.common.base.Joiner;
    +import com.google.common.collect.Sets;
    +import org.apache.curator.framework.CuratorFramework;
    +import org.apache.storm.Config;
    +import org.apache.storm.blobstore.BlobStore;
    +import org.apache.storm.blobstore.ClientBlobStore;
    +import org.apache.storm.blobstore.KeyFilter;
    +import org.apache.storm.blobstore.LocalFsBlobStore;
    +import org.apache.storm.callback.DefaultWatcherCallBack;
    +import org.apache.storm.cluster.ClusterStateContext;
    +import org.apache.storm.cluster.ClusterUtils;
    +import org.apache.storm.cluster.DaemonType;
    +import org.apache.storm.cluster.IStormClusterState;
    +import org.apache.storm.nimbus.NimbusInfo;
    +import org.apache.storm.utils.Utils;
    +import org.apache.storm.zookeeper.Zookeeper;
    +import org.apache.zookeeper.ZooDefs;
    +import org.apache.zookeeper.data.ACL;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import org.apache.storm.utils.ConfigUtils;
    +
    +import java.util.*;
    +
    +public class AdminCommands {
    +
    +    private static final Logger LOG = 
LoggerFactory.getLogger(Deactivate.class);
    +    private static BlobStore nimbusBlobStore;
    +    private static IStormClusterState stormClusterState;
    +    private static CuratorFramework zk;
    +    private static Map conf;
    +
    +    public static void main(String [] args) throws Exception {
    +
    +        if (args.length == 0) {
    +            throw new IllegalArgumentException("Missing command.");
    +        }
    +        initialize();
    +        String command = args[0];
    +        String[] newArgs = Arrays.copyOfRange(args, 1, args.length);
    +        switch (command) {
    +            case "remove_corrupt_topologies":
    +                removeCorruptTopologies();
    +                break;
    +            default:
    --- End diff --
    
    Can we list the sub commands here before throwing the exception.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to