Start the Jobs

This section provides the information on starting the jobs from active master node that were , stopped in section: Stop the Running Jobs.

To identify the active master node perform the following steps:

  1. Log in to the master node using SSH.

  2. Run the following command:

# hdfs haadmin -getServiceState `hostname -f`

The sample output may resemble as follows:

active

To start the jobs follow these steps in specified order on the active master node:

Clear the checkpoint

Run the following commands to clear the checkpoint value from the active name node:

hdfs dfs -rm -r -skipTrash /data/ddj/checkpoint
hdfs dfs -rm -r -skipTrash /data/ddj2/checkpoint

Run the Master Job

  1. Run master jobs from the active name node:

    nohup sh \
    /root/jobs/streaming_jobs/master_http_wrapper.sh \
    > /var/log/mural_logs/master-http.log &
    nohup sh \
    /root/jobs/streaming_jobs/master_nonhttp_wrapper.sh \
    > /var/log/mural_logs/master-nonhttp.log &
  2. Check the logs in the following files, and wait for zero counter to be displayed.

    • /var/log/mural_logs/master-http.log

    • /var/log/mural_logs/master-nonhttp.log

  3. Start the input data flow, that was stopped in section: Stop the Running Jobs.

Run the Talend Job

nohup sh \
/root/jobs/ingestion_jobs/run-talend-nonhttp-job.sh \
> /var/log/mural_logs/talend-nonhttp.log &

nohup sh \
/root/jobs/ingestion_jobs/run-talend-http-job.sh \
> /var/log/mural_logs/talend-http.log &

Run the Aggregation Job

Remove ts file

hdfs dfs -rm -r -skipTrash /data/streaming/*-ts

Run the 5-minute aggregation Job

nohup sh \
/root/jobs/aggregation_jobs/run-5min-agg-mgr_sh.sh \
> /var/log/mural_logs/5min-agg-mgr.log &

Run the following command to verify if the db password is updated correctly or not:

grep -A1 "postgres_fb.xml" /var/log/mural_logs/5min-agg-mgr.log

The sample logs generated may resemble as follows:

INFO FlexiBinLogger: FlexiBinMetaDataService initialising with config xml : /data/streaming/postgres_fb.xml
INFO execution.SparkSqlParser: Parsing command: show tables in kafkaconnectdb

If not updated correctly, the sample error message may resemble as follows:

INFO FlexiBinLogger: FlexiBinMetaDataService initialising with config xml : /data/streaming/postgres_fb.xml
Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from an empty string

Note: To resolve this error, re-run the section Generate the encrypted password.

Run the Hourly Aggregation Job

nohup sh \
/root/jobs/aggregation_jobs/run-hourly-agg-mgr_sh.sh \
> /var/log/mural_logs/hourly-agg-mgr.log &

Run the Daily Aggregation Job

nohup sh \
/root/jobs/aggregation_jobs/run-daily-agg-weekReport_sh.sh \
> /var/log/mural_logs/run-daily-agg-weekReport.log &

Run the Monthly Aggregation Job

nohup sh \
/root/jobs/aggregation_jobs/run-monthlyagg-monthlyReport.sh \
> /var/log/mural_logs/monthlyagg-monthlyReport.log &

Run the Cleanup Job

  1. Run the following command to verify cleanup_config.xml for correct table names and regex:

    vi /opt/sample_jobs/cleanup_job/cleanup_config.xml
  2. Run the following command to run the clean up job:

    nohup sh \
    /root/jobs/misc_jobs/run_cleanup_job.sh \
    > /var/log/mural_logs/cleanup.log &