[
https://issues.apache.org/jira/browse/HDFS-7805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14325555#comment-14325555
]
surendra singh lilhore commented on HDFS-7805:
----------------------------------------------
Thanks [~cmccabe] for comment
You are right, all log should be in log file only.
But I want to print only prompt message where we will wait for user input
For example we are doing in {{ToolRunner.confirmPrompt()}}.
{code}
while (true) {
System.err.print(prompt + " (Y or N) ");
StringBuilder responseBuilder = new StringBuilder();
while (true) {
int c = System.in.read();
if (c == -1 || c == '\r' || c == '\n') {
break;
}
responseBuilder.append((char)c);
}
{code}
here we are waiting for user input using {{System.in.read()}}
If prompt message not printed one console then user not knows what input he
needs to give.
Same I want for {{MetaRecoveryContext.ask()}} prompt message.
Please give your suggestion.
Thanks in advance for your suggestions.
> NameNode recovery prompt should be printed on console
> -----------------------------------------------------
>
> Key: HDFS-7805
> URL: https://issues.apache.org/jira/browse/HDFS-7805
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 2.6.0
> Reporter: surendra singh lilhore
> Assignee: surendra singh lilhore
> Attachments: HDFS-7805.patch
>
>
> In my cluster root logger is not console, so when I run namenode recovery
> tool MetaRecoveryContext.java prompt message is logged in log file.
> Actually is should be display on console.
> Currently it is like this
> {code}
> LOG.info(prompt);
> {code}
> It should be
> {code}
> System.err.print(prompt);
> {code}
> NameNode recovery prompt should be printed on console
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)