Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-1080

Improve help message for $ yarn logs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.1-beta
    • client
    • None
    • Reviewed

    Description

      There are 2 parts I am proposing in this jira. They can be fixed together in one patch.

      1. Standardize help message for required parameter of $ yarn logs
      YARN CLI has a command "logs" ($ yarn logs). The command always requires a parameter of "-applicationId <arg>". However, help message of the command does not make it clear. It lists -applicationId as optional parameter. If I don't set it, YARN CLI will complain this is missing. It is better to use standard required notation used in other Linux command for help message. Any user familiar to the command can understand that this parameter is needed more easily.

      current help message
      -bash-4.1$ yarn logs
      usage: general options are:
       -applicationId <arg>   ApplicationId (required)
       -appOwner <arg>        AppOwner (assumed to be current user if not
                              specified)
       -containerId <arg>     ContainerId (must be specified if node address is
                              specified)
       -nodeAddress <arg>     NodeAddress in the format nodename:port (must be
                              specified if container id is specified)
      
      proposed help message
      -bash-4.1$ yarn logs
      usage: yarn logs -applicationId <application ID> [OPTIONS]
      general options are:
       -appOwner <arg>        AppOwner (assumed to be current user if not
                              specified)
       -containerId <arg>     ContainerId (must be specified if node address is
                              specified)
       -nodeAddress <arg>     NodeAddress in the format nodename:port (must be
                              specified if container id is specified)
      

      2. Add description for help command. As far as I know, a user cannot get logs for running job. Since I spent some time trying to get logs of running applications, it should be nice to say this in command description.

      proposed help
      Retrieve logs for completed/killed YARN application
      usage: general options are...
      

      Attachments

        1. YARN-1080.1.patch
          3 kB
          Xuan Gong
        2. YARN-1080.2.patch
          6 kB
          Xuan Gong

        Activity

          People

            xgong Xuan Gong
            tassapola Tassapol Athiapinya
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: