Configuring log location and naming using the command line

Follow these steps only when you want to register a new MapReduce application.

Procedure

  1. Find the application profile located under $PMR_HOME/version/os_type/profile/.
  2. 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.
  3. 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>
    
  4. Save your application profile.
  5. Re-register your application profile to update your application profile in the system using the soamreg command or the cluster management console.
  6. Run your client application so that the service can create logs in the log directories.