Skip to content
Permalink
Browse files
[HELIX-464] rabbitmq recipe is broken, rb=23099
  • Loading branch information
zzhang5 committed Jun 27, 2014
1 parent 3cf3de3 commit 7ecee11d6e4faf84cf994aa4f616c04f766e5205
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 124 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -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>
@@ -1,4 +1,3 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -18,9 +17,15 @@
# 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
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ERROR,A1

java -cp "$CLASSPATH" org.apache.helix.recipes.rabbitmq.Emitter $@
# 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
@@ -52,9 +52,8 @@ public static void main(String[] args) {
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;

0 comments on commit 7ecee11

Please sign in to comment.