You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ka...@apache.org on 2014/07/11 21:58:12 UTC

[17/17] git commit: [HELIX-464] rabbitmq recipe is broken, rb=23099

[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/63f084bd
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/63f084bd
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/63f084bd

Branch: refs/heads/master
Commit: 63f084bd2d1ebb06d41edc1aa74754410998878b
Parents: 28a8f20
Author: zzhang <zz...@apache.org>
Authored: Thu Jun 26 17:10:19 2014 -0700
Committer: Kanak Biscuitwala <ka...@apache.org>
Committed: Fri Jul 11 12:56:56 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 ++++++++++++++++
 7 files changed, 60 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/63f084bd/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/63f084bd/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 2ad6a2c..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.1-SNAPSHOT-incubating.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/63f084bd/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 ab5bff1..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.1-SNAPSHOT-incubating.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/63f084bd/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 5b4ac2c..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.1-SNAPSHOT-incubating.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/63f084bd/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 e93707b..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.1-SNAPSHOT-incubating.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/63f084bd/recipes/rabbitmq-consumer-group/pom.xml
----------------------------------------------------------------------
diff --git a/recipes/rabbitmq-consumer-group/pom.xml b/recipes/rabbitmq-consumer-group/pom.xml
index a70947d..9b749bb 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/63f084bd/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