You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2017/04/12 08:29:16 UTC

[08/10] storm git commit: Merge branch 'apache-master' into STORM-2447

Merge branch 'apache-master' into STORM-2447


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

Branch: refs/heads/master
Commit: 71dc2e019d84580fbcdd5eabf267016393324872
Parents: 9eced53 1850dd5
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Fri Apr 7 08:31:56 2017 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Fri Apr 7 08:31:56 2017 -0500

----------------------------------------------------------------------
 CHANGELOG.md                                    |  2 +
 docs/storm-hbase.md                             | 46 +++++++++++++++++---
 external/storm-hbase/README.md                  | 38 +++++++++++-----
 .../storm/kafka/spout/KafkaSpoutConfig.java     |  2 +-
 4 files changed, 69 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/71dc2e01/docs/storm-hbase.md
----------------------------------------------------------------------
diff --cc docs/storm-hbase.md
index 7f71346,e873f31..1710e1b
--- a/docs/storm-hbase.md
+++ b/docs/storm-hbase.md
@@@ -223,12 -248,25 +248,21 @@@ public class PersistentWordCount 
          builder.setBolt(COUNT_BOLT, bolt, 1).shuffleGrouping(WORD_SPOUT);
          builder.setBolt(HBASE_BOLT, hbase, 1).fieldsGrouping(COUNT_BOLT, new Fields("word"));
  
 -
 -        if (args.length == 1) {
 -            try (LocalCluster cluster = new LocalCluster();
 -                 LocalTopology topo = cluster.submitTopology("test", config, builder.createTopology());) {
 -                Thread.sleep(30000);
 -            }
 -            System.exit(0);
 -        } else if (args.length == 2) {
 -            StormSubmitter.submitTopology(args[1], config, builder.createTopology());
 -        } else if (args.length == 4) {
 +        String topoName = "test";
-         if (args.length > 0) {
-             topoName = args[0];
++        if (args.length > 1) {
++            topoName = args[1];
++        }
++        if (args.length == 4) {
+             System.out.println("hdfs url: " + args[0] + ", keytab file: " + args[2] + 
 -                ", principal name: " + args[3] + ", toplogy name: " + args[1]);
++                ", principal name: " + args[3] + ", toplogy name: " + topoName);
+             hbConf.put(HBaseSecurityUtil.STORM_KEYTAB_FILE_KEY, args[2]);
+             hbConf.put(HBaseSecurityUtil.STORM_USER_NAME_KEY, args[3]);
 -            config.setNumWorkers(3);
 -            StormSubmitter.submitTopology(args[1], config, builder.createTopology());
 -        } else {
++        } else if (args.length == 3 || args.length > 4) {
+             System.out.println("Usage: PersistentWordCount <hbase.rootdir> [topology name] [keytab file] [principal name]");
++            return;
          }
 +        config.setNumWorkers(3);
 +        StormSubmitter.submitTopology(topoName, config, builder.createTopology());
      }
  }
  ```