helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brandt <brandt.g...@gmail.com>
Subject Helix maven archetype
Date Sat, 22 Aug 2015 18:57:33 GMT
Hey,

I put together a Helix archetype that new users can use to get started (or
old users who don't want to remember everything when starting a new
application...)

It's available here: https://github.com/brandtg/helix-archetype

You can generate like this:

mvn archetype:generate \
  -DarchetypeGroupId=org.apache.helix \
  -DarchetypeArtifactId=helix-archetype \
  -DarchetypeVersion=1.0-SNAPSHOT \
  -DgroupId=com.example \
  -DartifactId=my-app \
  -Dname=MyApp \
  -DinteractiveMode=false

Then you'll get a project structure like this:

>> tree
.
├── pom.xml
└── src
    └── main
        ├── java
        │   ├── MyAppMain.java
        │   ├── participant
        │   │   ├── MyAppParticipant.java
        │   │   ├── MyAppStateTransitionHandler.java
        │   │   └── MyAppStateTransitionHandlerFactory.java
        │   └── spectator
        │       └── MyAppSpectator.java
        └── resources
            └── log4j.xml

And an executable that contains all your cluster roles, and wraps
ClusterSetup:

>> java -jar target/my-app-1.0-SNAPSHOT.jar
usage: <mode> args...

Modes are: participant, controller, zookeeper, setup.

Let me know what you all think. If this is good, we could put it in trunk.

Thanks,
-Greg

Mime
View raw message