Skip to content

Debugging with intellij

Debugging PML

Configuration additional jars

File > Project Structure > Modules then choose punchplatorm-analytics-client.

Select tab Dependencies, then add (+) > Jars or directories and select where Spark jars are available.

<your-standalone>/punchplatform-standalone-5.2.0/external/spark-2.4.0-bin-hadoop2.7/jars.

Run an application

Run > Edit Configuration > + > Application

Name

Choose a name for example: PML foreground.

Main Class

org.thales.punch.ml.client.ClientMain

VM options

1
2
3
4
-Dpunchplatform.configurationFile=<your-standalone>/punchplatform-standalone-5.2.0/conf/punchplatform.properties \
-Dlog4j.configurationFile=<your-standalone>/punchplatform-standalone-5.2.0/external/punchplatform-operator-environment-dataanalytics-5.2.0/bin/log4j2.xml \
-Dlogfile.name=punchplatform-analytics \
-Dpunchplatform.log.dir=/tmp/logs 

Program arguments

1
2
3
4
5
6
7
8
9
--verbose --job \
--app-resource-jar <your-standalone>/punchplatform-standalone-5.2.0/external/spark-2.4.0-bin-hadoop2.7/punchplatform/analytics/job/app_resource/punchplatform-analytics-job-5.2.0.jar \
--app-resource-main org.thales.punch.ml.job.SparkMain \
--additional-jars <your-standalone>/punchplatform-standalone-5.2.0/external/spark-2.4.0-bin-hadoop2.7/punchplatform/analytics/job/app_resource/punchplatform-analytics-job-5.2.0.jar:/home/romain/Documents/punchplatform/craig/standalone/latest/punchplatform-standalone-5.2.0/external/spark-2.4.0-bin-hadoop2.7/punchplatform/analytics/job/additional_jars/* \
--deploy-mode foreground \
--name pml \
--tenant mytenant \
--job <your-pml-path> \
--verbose-data 

Environment variables

Add your PUNCHPLATFORM environment variables

1
2
3
PUNCHPLATFORM_CONF_URL=localhost:2181/punchplatform-primary
#PUNCHPLATFORM_CONF_DIR=<your-path>/punchplatform-standalone-5.2.0/conf
PUNCHPLATFORM_LOG_DIR=/tmp/log

Use classpath of module

  • Select punchplatform-analytics-client

  • Check Include dependencies with "Provided" scope

Debugging puncher

Run an application

Run > Edit Configuration > + > Application

Name

Choose a name for example: PML foreground.

Main Class

com.thales.services.cloudomc.punchplatform.punch.core.Puncher

VM options

1
2
3
4
-Dpunchplatform.configurationFile=<your-standalone>/punchplatform-standalone-5.2.0/conf/punchplatform.properties \
-Dlog4j.configurationFile=<your-standalone>/punchplatform-standalone-5.2.0/external/punchplatform-operator-environment-dataanalytics-5.2.0/bin/log4j2.xml \
-Dlogfile.name=punchplatform-puncher \
-Dpunchplatform.log.dir=/tmp/logs 

Program arguments

1
2
-gi  "Jan 2 06:25:43 mailserver14 postfix/\"cleanup[21403]: EF25A72965: message-id=<toto@mailserver14.example.com>" \
-gp "%{GREEDYDATA:syslog_message}"

Environment variables

Add your PUNCHPLATFORM environment variables

1
2
3
PUNCHPLATFORM_CONF_URL=localhost:2181/punchplatform-primary
#PUNCHPLATFORM_CONF_DIR=<your-path>/punchplatform-standalone-5.2.0/conf
PUNCHPLATFORM_LOG_DIR=/tmp/log

Use classpath of module

  • Select punchplatform-analytics-client

  • Check Include dependencies with "Provided" scope