Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-5468

CacheAdmin help command does not recognize commands

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0, 3.0.0-alpha1
    • 2.3.0
    • tools
    • None

    Description

      Currently, the hdfs cacheadmin -help command will not recognize correct command inputs:

      [hdfs@hdfs-cache ~]# hdfs cacheadmin -help listPools
      Sorry, I don't know the command 'listPools'.
      Valid command names are:
      -addDirective, -removeDirective, -removeDirectives, -listDirectives, -addPool, -modifyPool, -removePool, -listPools, -help
      [hdfs@hdfs-cache ~]# hdfs cacheadmin -help -listPools
      Sorry, I don't know the command 'listPools'.
      Valid command names are:
      -addDirective, -removeDirective, -removeDirectives, -listDirectives, -addPool, -modifyPool, -removePool, -listPools, -help
      

      In the code, we strip the input command of leading hyphens, but then compare it to the command names, which are all prefixed by a hyphen.

      Also, cacheadmin -removeDirectives requires specifying a path with -path but -path is not shown in the usage. We should fix this as well.

      Attachments

        1. HDFS-5468.patch
          2 kB
          Stephen Chu

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            schu Stephen Chu
            schu Stephen Chu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment