hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1958) Format confirmation prompt should be more lenient of its input
Date Thu, 19 May 2011 00:45:47 GMT

    [ https://issues.apache.org/jira/browse/HDFS-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035898#comment-13035898

Todd Lipcon commented on HDFS-1958:

well, fsck for example supports either 'y' or 'Y' for yes, and 'n' or 'N' for no.

fsck also does the following which we can't replicate in Java:
        tcgetattr (0, &termios);
        tmp = termios;
        tmp.c_lflag &= ~(ICANON | ECHO);
        tmp.c_cc[VMIN] = 1;
        tmp.c_cc[VTIME] = 0;
        tcsetattr (0, TCSANOW, &tmp);
so that it can do an unbuffered read of a single keypress from stdin. Thus if you start to
type "yes" or "no" it will see the "y" or "n" and act as expected.

Since we can't do that, accepting "yes" or "no" seems like a good idea!

[to satisfy Allen's inevitable gripe, I'm referring to the Linux-specific e2fsck behavior

> Format confirmation prompt should be more lenient of its input
> --------------------------------------------------------------
>                 Key: HDFS-1958
>                 URL: https://issues.apache.org/jira/browse/HDFS-1958
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: 0.22.0
>         Attachments: hdfs-1958.txt
> As reported on the mailing list, the namenode format prompt only accepts 'Y'. We should
also accept 'y' and 'yes' (non-case-sensitive).

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message