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

Brahma Reddy Battula commented on HDFS-7452:
--------------------------------------------

{code}
public String getCorruptFiles()
  {
    List list = new ArrayList();
    try
    {
      Collection corruptFileBlocks = listCorruptFileBlocks("/", null);
      int corruptFileCount = corruptFileBlocks.size();
      if (corruptFileCount != 0)
        for (CorruptFileBlockInfo c : corruptFileBlocks)
          list.add(c.toString());
    }
    catch (IOException e)
    {
      LOG.warn(new StringBuilder().append("Get corrupt file blocks returned 
error: ").append(e.getMessage()).toString());
    }
    return JSON.toString(list);
  }

{code}

 want to add inActiveState() in above code..

> Can we skip getCorruptFiles() call for standby NameNode..?
> ----------------------------------------------------------
>
>                 Key: HDFS-7452
>                 URL: https://issues.apache.org/jira/browse/HDFS-7452
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>
> Seen following warns logs from StandBy Namenode logs ..
> {noformat}
> 2014-11-27 17:50:32,497 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:50:42,557 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:50:52,617 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:00,058 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:00,117 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:02,678 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:12,738 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:22,798 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:30,058 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> 2014-11-27 17:51:30,119 | WARN  | 512264920@qtp-429668078-606 | Get corrupt 
> file blocks returned error: Operation category READ is not supported in state 
> standby | 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getCorruptFiles(FSNamesystem.java:6916)
> {noformat}
> do we need to call for SNN..? I feel, it might not be required.can we 
> maintain state wide..Please let me know, If I am wrong..



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

Reply via email to