job linklogs

Creates symbolic links to all the logs relating to the activity of a specific job.

The maprcli job linklogs command works with the Centralized Logging to provide a job-centric view or an application-centric view of all log files generated during job or application execution.

The output of job linklogs is a directory populated with symbolic links to all log files related to the specified job(s) or to the application. The command can be performed during or after a job or application is processed.

Syntax

CLI
maprcli job linklogs
    -jobid <jobPattern>
    -todir <desinationDirectory>
    [-jobconf <pathToJobXml>]
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/job/linklogs?<parameters> 

Parameters

Parameter Description
jobid For MapReduce version 2, specify the application ID.

todir

The target directory for the symbolic links to the log files.
jobconf For MapReduce version 2, this parameter is not applicable.

Output

For MapReduce version 2, the following directory will be created in the location specified by todir for the application ID that you specify for the jobid parameter:

  • <applicationId>/hosts/<host>/ contains symbolic links to log directories of tasks executed for <applicationId> on <host>

Examples

Link logs for all jobs named "wordcount1" and dump output to /myvolume/joblogviewdir:
CLI
maprcli job linklogs -jobid job_*_wordcount1 -todir /myvolume/joblogviewdir 
REST
https://abc.sj.us:8443/rest/job/linklogs?jobid=job_*_wordcount1&todir=/myvolume/joblogviewdir