helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzh...@apache.org
Subject git commit: [HELIX-464] rabbitmq recipe is broken, rb=23099
Date Fri, 27 Jun 2014 00:10:37 GMT
Repository: helix
Updated Branches:
  refs/heads/helix-0.6.x 3cf3de33f -> 7ecee11d6


[HELIX-464] rabbitmq recipe is broken, rb=23099


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

Branch: refs/heads/helix-0.6.x
Commit: 7ecee11d6e4faf84cf994aa4f616c04f766e5205
Parents: 3cf3de3
Author: zzhang <zzhang@apache.org>
Authored: Thu Jun 26 17:10:19 2014 -0700
Committer: zzhang <zzhang@apache.org>
Committed: Thu Jun 26 17:10:19 2014 -0700

----------------------------------------------------------------------
 recipes/rabbitmq-consumer-group/bin/log4j.xml   | 37 --------------------
 .../rabbitmq-consumer-group/bin/send-message.sh | 26 --------------
 .../bin/setup-cluster.sh                        | 26 --------------
 .../bin/start-cluster-manager.sh                | 26 --------------
 .../bin/start-consumer.sh                       | 26 --------------
 recipes/rabbitmq-consumer-group/pom.xml         | 30 +++++++++++++++-
 .../src/main/config/log4j.properties            | 31 ++++++++++++++++
 .../recipes/rabbitmq/SetupConsumerCluster.java  |  3 +-
 8 files changed, 61 insertions(+), 144 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/bin/log4j.xml
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/bin/log4j.xml b/recipes/rabbitmq-consumer-group/bin/log4j.xml
deleted file mode 100644
index d4325e9..0000000
--- a/recipes/rabbitmq-consumer-group/bin/log4j.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-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.
--->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-  
-  <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.err" />
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [perf-test]
%m%n" />
-    </layout>
-  </appender>
-	  
-  <root>
-    <priority value="debug"/>
-    <appender-ref ref="ConsoleAppender"/>
-  </root>
-  
-</log4j:configuration>
-

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/bin/send-message.sh
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/bin/send-message.sh b/recipes/rabbitmq-consumer-group/bin/send-message.sh
deleted file mode 100755
index f3f280a..0000000
--- a/recipes/rabbitmq-consumer-group/bin/send-message.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-script_dir=`dirname $0`
-LIB=$script_dir/../lib
-CLASSPATH=$script_dir/../target/classes:"$LIB"/helix-core-0.6.4-SNAPSHOT.jar:"$LIB"/rabbitmq-client.jar:"$LIB"/commons-cli-1.1.jar:"$LIB"/commons-io-1.2.jar:"$LIB"/commons-math-2.1.jar:"$LIB"/jackson-core-asl-1.8.5.jar:"$LIB"/jackson-mapper-asl-1.8.5.jar:"$LIB"/log4j-1.2.15.jar:"$LIB"/org.restlet-1.1.10.jar:"$LIB"/zkclient-0.1.jar:"$LIB"/zookeeper-3.3.4.jar
-# echo $CLASSPATH
-
-java -cp "$CLASSPATH" org.apache.helix.recipes.rabbitmq.Emitter $@

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/bin/setup-cluster.sh
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/bin/setup-cluster.sh b/recipes/rabbitmq-consumer-group/bin/setup-cluster.sh
deleted file mode 100755
index 0e5c24c..0000000
--- a/recipes/rabbitmq-consumer-group/bin/setup-cluster.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-script_dir=`dirname $0`
-LIB=$script_dir/../lib
-CLASSPATH=$script_dir/../target/classes:"$LIB"/helix-core-0.6.4-SNAPSHOT.jar:"$LIB"/rabbitmq-client.jar:"$LIB"/commons-cli-1.1.jar:"$LIB"/commons-io-1.2.jar:"$LIB"/commons-math-2.1.jar:"$LIB"/jackson-core-asl-1.8.5.jar:"$LIB"/jackson-mapper-asl-1.8.5.jar:"$LIB"/log4j-1.2.15.jar:"$LIB"/org.restlet-1.1.10.jar:"$LIB"/zkclient-0.1.jar:"$LIB"/zookeeper-3.3.4.jar
-# echo $CLASSPATH
-
-java -cp "$CLASSPATH" org.apache.helix.recipes.rabbitmq.SetupConsumerCluster $@

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/bin/start-cluster-manager.sh
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/bin/start-cluster-manager.sh b/recipes/rabbitmq-consumer-group/bin/start-cluster-manager.sh
deleted file mode 100755
index 831a298..0000000
--- a/recipes/rabbitmq-consumer-group/bin/start-cluster-manager.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-script_dir=`dirname $0`
-LIB=$script_dir/../lib
-CLASSPATH=$script_dir/../target/classes:"$LIB"/helix-core-0.6.4-SNAPSHOT.jar:"$LIB"/rabbitmq-client.jar:"$LIB"/commons-cli-1.1.jar:"$LIB"/commons-io-1.2.jar:"$LIB"/commons-math-2.1.jar:"$LIB"/jackson-core-asl-1.8.5.jar:"$LIB"/jackson-mapper-asl-1.8.5.jar:"$LIB"/log4j-1.2.15.jar:"$LIB"/org.restlet-1.1.10.jar:"$LIB"/zkclient-0.1.jar:"$LIB"/zookeeper-3.3.4.jar
-# echo $CLASSPATH
-
-java -cp "$CLASSPATH" org.apache.helix.recipes.rabbitmq.StartClusterManager $@

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/bin/start-consumer.sh
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/bin/start-consumer.sh b/recipes/rabbitmq-consumer-group/bin/start-consumer.sh
deleted file mode 100755
index fa39eac..0000000
--- a/recipes/rabbitmq-consumer-group/bin/start-consumer.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-script_dir=`dirname $0`
-LIB=$script_dir/../lib
-CLASSPATH=$script_dir/../target/classes:"$LIB"/helix-core-0.6.4-SNAPSHOT.jar:"$LIB"/rabbitmq-client.jar:"$LIB"/commons-cli-1.1.jar:"$LIB"/commons-io-1.2.jar:"$LIB"/commons-math-2.1.jar:"$LIB"/jackson-core-asl-1.8.5.jar:"$LIB"/jackson-mapper-asl-1.8.5.jar:"$LIB"/log4j-1.2.15.jar:"$LIB"/org.restlet-1.1.10.jar:"$LIB"/zkclient-0.1.jar:"$LIB"/zookeeper-3.3.4.jar
-# echo $CLASSPATH
-
-java -cp "$CLASSPATH" org.apache.helix.recipes.rabbitmq.Consumer $@

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/pom.xml b/recipes/rabbitmq-consumer-group/pom.xml
index 259219a..7e6066a 100644
--- a/recipes/rabbitmq-consumer-group/pom.xml
+++ b/recipes/rabbitmq-consumer-group/pom.xml
@@ -37,7 +37,7 @@ under the License.
       org.apache.log4j,
       *
     </osgi.import>
-    <osgi.export>org.apache.helix.rabbitmq*;version="${project.version};-noimport:=true</osgi.export>
+    <osgi.export>org.apache.helix.recipes.rabbitmq*;version="${project.version};-noimport:=true</osgi.export>
   </properties>
 
   <dependencies>
@@ -88,4 +88,32 @@ under the License.
       <version>0.1</version>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>appassembler-maven-plugin</artifactId>
+        <configuration>
+          <programs>
+            <program>
+              <mainClass>org.apache.helix.recipes.rabbitmq.SetupConsumerCluster</mainClass>
+              <name>setup-cluster</name>
+            </program>
+            <program>
+              <mainClass>org.apache.helix.recipes.rabbitmq.StartClusterManager</mainClass>
+              <name>start-cluster-manager</name>
+            </program>
+            <program>
+              <mainClass>org.apache.helix.recipes.rabbitmq.Consumer</mainClass>
+              <name>start-consumer</name>
+            </program>
+            <program>
+              <mainClass>org.apache.helix.recipes.rabbitmq.Emitter</mainClass>
+              <name>send-message</name>
+            </program>
+          </programs>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/src/main/config/log4j.properties
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/src/main/config/log4j.properties b/recipes/rabbitmq-consumer-group/src/main/config/log4j.properties
new file mode 100644
index 0000000..4b3dc31
--- /dev/null
+++ b/recipes/rabbitmq-consumer-group/src/main/config/log4j.properties
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=ERROR,A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+
+log4j.logger.org.I0Itec=ERROR
+log4j.logger.org.apache=ERROR

http://git-wip-us.apache.org/repos/asf/helix/blob/7ecee11d/recipes/rabbitmq-consumer-group/src/main/java/org/apache/helix/recipes/rabbitmq/SetupConsumerCluster.java
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/src/main/java/org/apache/helix/recipes/rabbitmq/SetupConsumerCluster.java
b/recipes/rabbitmq-consumer-group/src/main/java/org/apache/helix/recipes/rabbitmq/SetupConsumerCluster.java
index bfc3149..b73aaa9 100644
--- a/recipes/rabbitmq-consumer-group/src/main/java/org/apache/helix/recipes/rabbitmq/SetupConsumerCluster.java
+++ b/recipes/rabbitmq-consumer-group/src/main/java/org/apache/helix/recipes/rabbitmq/SetupConsumerCluster.java
@@ -52,9 +52,8 @@ public class SetupConsumerCluster {
       admin.addCluster(clusterName, true);
 
       // add state model definition
-      StateModelConfigGenerator generator = new StateModelConfigGenerator();
       admin.addStateModelDef(clusterName, DEFAULT_STATE_MODEL,
-          new StateModelDefinition(generator.generateConfigForOnlineOffline()));
+          new StateModelDefinition(StateModelConfigGenerator.generateConfigForOnlineOffline()));
 
       // add resource "topic" which has 6 partitions
       String resourceName = DEFAULT_RESOURCE_NAME;


Mime
View raw message