From 2626d3751ef2e2333b33edaa050ca5fce27102d7 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Mon, 3 Mar 2014 16:40:25 +0000 Subject: [PATCH] HADOOP-10314. The ls command help still shows outdated 0.16 format. Contributed by Rushabh S Shah. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1573604 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/fs/shell/Ls.java | 24 +++++++++---------- .../src/test/resources/testConf.xml | 16 ++++--------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 333f179def6..8142ab5948b 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -352,6 +352,9 @@ Release 2.4.0 - UNRELEASED HADOOP-10285. Admin interface to swap callqueue at runtime. (Chris Li via Arpit Agarwal) + HADOOP-10314. The ls command help still shows outdated 0.16 format. + (Rushabh S Shah via kihwal) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java index a41be7ef2a3..eecd3b03ad1 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java @@ -51,18 +51,18 @@ class Ls extends FsCommand { public static final String NAME = "ls"; public static final String USAGE = "[-d] [-h] [-R] [ ...]"; public static final String DESCRIPTION = - "List the contents that match the specified file pattern. If\n" + - "path is not specified, the contents of /user/\n" + - "will be listed. Directory entries are of the form \n" + - "\tdirName (full path) \n" + - "and file entries are of the form \n" + - "\tfileName(full path) size \n" + - "where n is the number of replicas specified for the file \n" + - "and size is the size of the file, in bytes.\n" + - " -d Directories are listed as plain files.\n" + - " -h Formats the sizes of files in a human-readable fashion\n" + - " rather than a number of bytes.\n" + - " -R Recursively list the contents of directories."; + "List the contents that match the specified file pattern. If\n" + + "path is not specified, the contents of /user/\n" + + "will be listed. Directory entries are of the form \n" + + "\tpermissions - userid groupid size_of_directory(in bytes) modification_date(yyyy-MM-dd HH:mm) directoryName \n" + + "and file entries are of the form \n" + + "\tpermissions number_of_replicas userid groupid size_of_file(in bytes) modification_date(yyyy-MM-dd HH:mm) fileName \n" + + " -d Directories are listed as plain files.\n" + + " -h Formats the sizes of files in a human-readable fashion\n" + + " rather than a number of bytes.\n" + + " -R Recursively list the contents of directories."; + + protected static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); diff --git a/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml b/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml index 544494d01b8..2f310bdb9b2 100644 --- a/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml +++ b/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml @@ -70,23 +70,15 @@ RegexpComparator - ^( |\t)*dirName \(full path\) <dir>( )* + ^( |\t)*permissions - userid groupid size_of_directory\(in bytes\) modification_date\(yyyy-MM-dd HH:mm\) directoryName( )* - + RegexpComparator ^( |\t)*and file entries are of the form( )* - + RegexpComparator - ^( |\t)*fileName\(full path\) <r n> size( )* - - - RegexpComparator - ^( |\t)*where n is the number of replicas specified for the file( )* - - - RegexpComparator - ^( |\t)*and size is the size of the file, in bytes.( )* + ^( |\t)*permissions number_of_replicas userid groupid size_of_file\(in bytes\) modification_date\(yyyy-MM-dd HH:mm\) fileName( )* RegexpComparator