[ 
https://issues.apache.org/jira/browse/HADOOP-13079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Zhuge updated HADOOP-13079:
--------------------------------
    Attachment: HDFS-13079.002.patch

Please review patch 002:
* Change {{PrintableString}} implementation to cover 1 more category of 
non-printable characters: standalone surrogate characters
* Add unit tests to verify printable characters including unicode scripts from 
different BMP and SMP blocks are preserved
* Update documentation FileSystemShell.md
* Much more javadoc
* Add 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/package-info.java
 to quiet checkstyle

Welcome to the wonderful world of Unicode. Some references:
* https://en.wikipedia.org/wiki/Universal_Character_Set_characters
* Java Character class doc

> Add dfs -ls -q to print ? instead of non-printable characters
> -------------------------------------------------------------
>
>                 Key: HADOOP-13079
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13079
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>         Attachments: HDFS-13079.001.patch, HDFS-13079.002.patch
>
>
> Add option {{-q}} to "hdfs dfs -ls" to print non-printable characters as "?". 
> Non-printable characters are defined by 
> [isprint(3)|http://linux.die.net/man/3/isprint] according to the current 
> locale.
> Default to {{-q}} behavior on terminal; otherwise, print raw characters. See 
> the difference in these 2 command lines:
> * {{hadoop fs -ls /dir}}
> * {{hadoop fs -ls /dir | od -c}}
> In C, {{isatty(STDOUT_FILENO)}} is used to find out whether the output is a 
> terminal. Since Java doesn't have {{isatty}}, I will use JNI to call C 
> {{isatty()}} because the closest test {{System.console() == null}} does not 
> work in some cases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to