helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinoth Chandar <vin...@uber.com>
Subject Re: Helix maven archetype
Date Sat, 22 Aug 2015 19:40:15 GMT
+1 pretty nice 

Thanks,
Vinoth




On Sat, Aug 22, 2015 at 11:58 AM -0700, "Greg Brandt" <brandt.greg@gmail.com> wrote:










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