You are viewing a plain text version of this content. The canonical link for it is here.
Posted to s4-commits@incubator.apache.org by ki...@apache.org on 2012/12/20 19:06:49 UTC

[11/19] git commit: Changing the command line options in tools

Changing the command line options in tools


Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/1faa1112
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/1faa1112
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/1faa1112

Branch: refs/heads/S4-110
Commit: 1faa11128679e7d644276afcbc7fa4bb98e00796
Parents: 9fddde7
Author: Kishore Gopalakrishna <g....@gmail.com>
Authored: Wed Nov 28 17:18:46 2012 -0800
Committer: Kishore Gopalakrishna <g....@gmail.com>
Committed: Wed Nov 28 17:18:46 2012 -0800

----------------------------------------------------------------------
 build.gradle                                       |    1 +
 .../java/org/apache/s4/tools/DefineCluster.java    |    7 +++++--
 .../org/apache/s4/tools/GenericEventAdapter.java   |    2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1faa1112/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 0e0c345..ffbf2e3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -114,6 +114,7 @@ subprojects {
         exclude group: 'com.sun.jdmk', module: 'jmxtools'
         exclude group: 'com.sun.jmx', module: 'jmxri'
         exclude group: 'javax.jms', module: 'jms'
+        exclude group: 'javax.mail', module: 'mail'
     }
 
     dependencies {

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1faa1112/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
index bd0deec..f8a24ff 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/DefineCluster.java
@@ -39,7 +39,7 @@ public class DefineCluster {
 
             TaskSetup taskSetup = new TaskSetup(clusterArgs.zkConnectionString);
             taskSetup.clean(clusterArgs.clusterName);
-            taskSetup.setup(clusterArgs.clusterName, clusterArgs.nbTasks, clusterArgs.firstListeningPort);
+            taskSetup.setup(clusterArgs.clusterName, clusterArgs.nbNodes, clusterArgs.firstListeningPort);
             logger.info("New cluster configuration uploaded into zookeeper");
         } catch (Exception e) {
             logger.error("Cannot initialize zookeeper with specified configuration", e);
@@ -53,9 +53,12 @@ public class DefineCluster {
         @Parameter(names = { "-c", "-cluster" }, description = "S4 cluster name", required = true)
         String clusterName = "s4-test-cluster";
 
-        @Parameter(names = "-nbTasks", description = "number of tasks for the cluster", required = true)
+        @Parameter(names = "-nbTasks", description = "number of tasks for the cluster", required = false)
         int nbTasks = 1;
 
+        @Parameter(names = "-nbNodes", description = "number of S4 nodes for the cluster", required = true)
+        int nbNodes = 1;
+
         @Parameter(names = "-zk", description = "Zookeeper connection string")
         String zkConnectionString = "localhost:2181";
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1faa1112/subprojects/s4-tools/src/main/java/org/apache/s4/tools/GenericEventAdapter.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/GenericEventAdapter.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/GenericEventAdapter.java
index b39bbc1..b54187f 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/GenericEventAdapter.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/GenericEventAdapter.java
@@ -48,7 +48,7 @@ public class GenericEventAdapter
         int partitionId = ((int) (Math.random() * 1000))
             % idealstate.getNumPartitions();
         Event event = new Event();
-        event.put(adapterArgs.streamName, String.class,
+        event.put("name", String.class,
             "Hello world to partition:" + partitionId);
         KryoSerDeser serializer = new KryoSerDeser();
         EventMessage message = new EventMessage("-1", adapterArgs.streamName,