Return-Path: X-Original-To: apmail-helix-commits-archive@minotaur.apache.org Delivered-To: apmail-helix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5D4411971 for ; Fri, 27 Jun 2014 00:10:37 +0000 (UTC) Received: (qmail 18616 invoked by uid 500); 27 Jun 2014 00:10:37 -0000 Delivered-To: apmail-helix-commits-archive@helix.apache.org Received: (qmail 18580 invoked by uid 500); 27 Jun 2014 00:10:37 -0000 Mailing-List: contact commits-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.apache.org Delivered-To: mailing list commits@helix.apache.org Received: (qmail 18571 invoked by uid 99); 27 Jun 2014 00:10:37 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 00:10:37 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6814A918ADC; Fri, 27 Jun 2014 00:10:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zzhang@apache.org To: commits@helix.apache.org Message-Id: <90891dd47fe347c2a3aaf69ad9493030@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: [HELIX-464] rabbitmq recipe is broken, rb=23099 Date: Fri, 27 Jun 2014 00:10:37 +0000 (UTC) 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 Authored: Thu Jun 26 17:10:19 2014 -0700 Committer: zzhang 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 @@ - - - - - - - - - - - - - - - - - - - - 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, * - org.apache.helix.rabbitmq*;version="${project.version};-noimport:=true + org.apache.helix.recipes.rabbitmq*;version="${project.version};-noimport:=true @@ -88,4 +88,32 @@ under the License. 0.1 + + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.apache.helix.recipes.rabbitmq.SetupConsumerCluster + setup-cluster + + + org.apache.helix.recipes.rabbitmq.StartClusterManager + start-cluster-manager + + + org.apache.helix.recipes.rabbitmq.Consumer + start-consumer + + + org.apache.helix.recipes.rabbitmq.Emitter + send-message + + + + + + 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;