Skip to content

Run Demo & local development setup with IntelliJ IDEA

Marius Rugan edited this page Mar 1, 2015 · 23 revisions

As an alternative to the dockerized run, here's a way how to setup your project with Intellij IDEA using external services you may already have installed.

Prerequisites:

  • Cassandra is running at cassandraserver (tested with v. 2.1.3) create keyspace text here

  • MongoDB is running at mongoserver (tested with v. 2.6.7)

  • Zookeeper is running at zkserver (tested with v. 3.4.6)

  • Kafka is running at kafkaserver (tested with v. 2.10-0.8.1.1)

Local /etc/hosts setup (assuming your services run at 192.168.0.1)

192.168.0.1 zkserver

192.168.0.1 mongoserver

192.168.0.1 kafkaserver

192.168.0.1 cassandraserver

Notes

YOUR_LOCAL_IP = your local machine's ip PATH_TO = full path to the app

Replay App - Application Run Configuration - name : 01 - replay

Main class: com.ebay.jetstream.application.JetstreamApplication

VM options: -Dpulsar.runtime.kafka.brokers=kafkaserver:9092 -Dpulsar.runtime.kafka.zk=kafkaserver:2181 -Djetstream.runtime.zkserver.host=zkserver -Djetstream.runtime.zkserver.port=2181 -Djetstream.runtime.netmask=YOUR_LOCAL_IP/24

Program arguments: -p 8001 -n "replay pulsar app" -cv "1.0"

Working directory: PATH_TO/realtime-analytics/replay

Environment variables:

JETSTREAM_HOME = PATH_TO/realtime-analytics/replay/buildsrc

MONGO_HOME = mongo://mongoserver:27017/config

Use classpath of module: replay

Collector App - Application Run Configuration - name : 02 - collector

Main class: com.ebay.jetstream.application.JetstreamApplication

VM options: -Dpulsar.runtime.kafka.brokers=kafkaserver:9092 -Djetstream.runtime.zkserver.host=zkserver -Djetstream.runtime.zkserver.port=2181 -Djetstream.runtime.netmask=YOUR_LOCAL_IP/24

Program arguments: -p 8002 -n "collector app" -cv "1.0"

Working directory: PATH_TO/realtime-analytics/collector

Environment variables:

JETSTREAM_HOME = PATH_TO/realtime-analytics/collector/buildsrc

Use classpath of module: collector

Sessionizer App - Application Run Configuration - name : 03 - sessionizer

Main class: com.ebay.jetstream.application.JetstreamApplication

VM options: -Dpulsar.runtime.kafka.brokers=kafkaserver:9092 -Djetstream.runtime.zkserver.host=zkserver -Djetstream.runtime.zkserver.port=2181 -Djetstream.runtime.netmask=YOUR_LOCAL_IP/24

Program arguments: -p 8003 -n "sessionizer app" -cv "1.0"

Working directory: PATH_TO/realtime-analytics/sessionizer

Environment variables:

JETSTREAM_HOME = PATH_TO/realtime-analytics/sessionizer/buildsrc

MONGO_HOME = mongo://mongoserver:27017/config

Use classpath of module: sessionizer

Distributor App - Application Run Configuration - name : 04 - distributor

Main class: com.ebay.jetstream.application.JetstreamApplication

VM options: -Dpulsar.runtime.kafka.brokers=kafkaserver:9092 -Djetstream.runtime.zkserver.host=zkserver -Djetstream.runtime.zkserver.port=2181 -Djetstream.runtime.netmask=YOUR_LOCAL_IP/24

Program arguments: -p 8004 -n "distributor app" -cv "1.0"

Working directory: PATH_TO/realtime-analytics/distributor

Environment variables:

JETSTREAM_HOME = PATH_TO/realtime-analytics/distributor/buildsrc

MONGO_HOME = mongo://mongoserver:27017/config

Use classpath of module: distributor

Metriccalculator App - Application Run Configuration - name : 05 - metriccalculator

Main class: com.ebay.jetstream.application.JetstreamApplication

VM options: -Dpulsar.runtime.kafka.brokers=kafkaserver:9092 -Dpulsar.runtime.cassandra=cassandraserver -Djetstream.runtime.zkserver.host=zkserver -Djetstream.runtime.zkserver.port=2181 -Djetstream.runtime.netmask=YOUR_LOCAL_IP/24

Program arguments: -p 8005 -n "metriccalculator app" -cv "1.0"

Working directory: PATH_TO/realtime-analytics/metriccalculator

Environment variables:

JETSTREAM_HOME = PATH_TO/realtime-analytics/metriccalculator/buildsrc

MONGO_HOME = mongo://mongoserver:27017/config

Use classpath of module: metriccalculator