Configuring log location and naming using the command line
Follow these steps only when you want to register a new MapReduce application.
Procedure
- Find the application profile located under $PMR_HOME/version/os_type/profile/.
- Open your application profile with an XML editor. You can also use the cluster management console to change your application profile to configure parameters for log retrieval.
- In the service section, define the logDirectory, subDirectory, and fileNamePattern parameters.
<Consumer applicationName="myApp" ... <Service description="My own service" name="myService" deploymentTimeout="300" packageName="myService"> <osTypes> <osType name="LINUX86_64" startCmd="${SOAM_DEPLOY_DIR}/myService" logDirectory="${SOAM_HOME}/mapreduce/logs/tasklogs" subDirectory="%sessionId%" fileNamePattern="_%taskId%"> </osType> </osType> </Service>
- Save your application profile.
- Re-register your application profile to update your application profile in the system using the soamreg command or the cluster management console.
- Run your client application so that the service can create logs in the log directories.