Hadoop Common
  1. Hadoop Common
  2. HADOOP-662

dfs -ls sometime prints "Found xxx items"; sometimes it does not print that string

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.7.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I get a different response from dfs -ls depending on whether or not the
      ls contained a directory or a wildcard. The wild card misses the
      response that tells me how many files.

      It did indeed cause a problem with my scripts. It was easy to filter
      out. If it's a desired action to do it sometimes and others then that's
      it's ok. It doesn't seem like this is really the intention so I pointed
      it out. My script is now happy with both forms. I do really on the fact
      that the 3 column of the output is the file size. Perhaps I shouldn't be
      doing this but I am writing some automated scripts in python to drive
      hadoop so it is useful to check file sizes. If you were to provide a
      format string that would allow me to place the items in a specific
      format then you would be free to change it, whenever, however, you wanted.
      -Richard

        Activity

        Hide
        Jiang Lei added a comment -

        Oh, I understand exactly what you mean. There are two virables( !recursive && printHeader) to control wheather print the "Found xxx items". I'll mail the author: Mike Cafarella for detail.
        -Jianglei

        Show
        Jiang Lei added a comment - Oh, I understand exactly what you mean. There are two virables( !recursive && printHeader) to control wheather print the "Found xxx items". I'll mail the author: Mike Cafarella for detail. -Jianglei
        Hide
        Jiang Lei added a comment -

        In my opinion, we should provide a format option(for example: -v), then the output show some detail info in some format.
        Can you give your suggestion about the detail format you want? We can discuss about the format.

        Show
        Jiang Lei added a comment - In my opinion, we should provide a format option(for example: -v), then the output show some detail info in some format. Can you give your suggestion about the detail format you want? We can discuss about the format.
        Hide
        dhruba borthakur added a comment -

        I think the user was complaining that the output format was different in the case of of a directory vs that of a file. When we do a ls -l of a directory, it prints "Found xx items". When we do ls -l of a file, the "Found xxx items" is not printed. The user was asking that both these formats be same. He was not tto concerned about what the exact format it.

        I think the current format that we got is appropriate.

        If we look at linux/unix ls command, it too prints out different format based on whether it is a directory or a file.

        Show
        dhruba borthakur added a comment - I think the user was complaining that the output format was different in the case of of a directory vs that of a file. When we do a ls -l of a directory, it prints "Found xx items". When we do ls -l of a file, the "Found xxx items" is not printed. The user was asking that both these formats be same. He was not tto concerned about what the exact format it. I think the current format that we got is appropriate. If we look at linux/unix ls command, it too prints out different format based on whether it is a directory or a file.
        Hide
        Jiang Lei added a comment -

        Yes, the ls command of unix print different format depends on the type of target.
        But I think if we can provide some option to fit the requirement of this user(if this kind of requirement is general).
        If all think this is unnecessary, we can close the bug? thx.

        Show
        Jiang Lei added a comment - Yes, the ls command of unix print different format depends on the type of target. But I think if we can provide some option to fit the requirement of this user(if this kind of requirement is general). If all think this is unnecessary, we can close the bug? thx.
        Hide
        Hairong Kuang added a comment -

        This feature is no longer required by the reporter.

        Show
        Hairong Kuang added a comment - This feature is no longer required by the reporter.

          People

          • Assignee:
            Jiang Lei
            Reporter:
            dhruba borthakur
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development