[jira] [Updated] (HDFS-9351) No checkNNStartup() is called when fsck calls FSNamesystem.getSnapshottableDirs()

2015-10-30 Thread Yongjun Zhang (JIRA)

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

Yongjun Zhang updated HDFS-9351:

Description: 
I looked further at HDFS-9231 change I reviewed earlier, and realize I missed 
one thing.

The patch changed
{code}
  if (snapshottableDirs != null) {
SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
.getSnapshottableDirListing();
if (snapshotDirs != null) {
  for (SnapshottableDirectoryStatus dir : snapshotDirs) {
snapshottableDirs.add(dir.getFullPath().toString());
  }
}
  }
{code}
to
{code}
  if (snapshottableDirs != null) {
snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
  }
{code}

In old code, namenode.getRpcServer().getSnapshottableDirListing() calls 
checkNNStartup(), however, this is not done with the new code. This is a hole 
of the earlier HDFS-9231 patch.

Create this jira to fix the hole. Suggest to revert this portion of the change, 
and add code to do what we need at NamenodeFsck.

Sorry for missing this in my earlier review of HDFS-9231.

Thanks.



  was:
I looked further at HDFS-9231 change I reviewed earlier, and realize I missed 
one thing.

The patch changed
{code}
  if (snapshottableDirs != null) {
SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
.getSnapshottableDirListing();
if (snapshotDirs != null) {
  for (SnapshottableDirectoryStatus dir : snapshotDirs) {
snapshottableDirs.add(dir.getFullPath().toString());
  }
}
  }
{code}
to
{code}
  if (snapshottableDirs != null) {
snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
  }
{code}

In old code, namenode.getRpcServer().getSnapshottableDirListing() calls 
checkNNStartup(), however, this is not done with the new code. This is a hole 
of the earlier HDFS-9231 patch.

Create this jira to fix the hole. Suggest to revert this portion of the change, 
and add code to do what we need at NamenodeFsck.

Thanks.




> No checkNNStartup() is called when fsck calls 
> FSNamesystem.getSnapshottableDirs()
> -
>
> Key: HDFS-9351
> URL: https://issues.apache.org/jira/browse/HDFS-9351
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: HDFS
>Reporter: Yongjun Zhang
>Assignee: Xiao Chen
>
> I looked further at HDFS-9231 change I reviewed earlier, and realize I missed 
> one thing.
> The patch changed
> {code}
>   if (snapshottableDirs != null) {
> SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
> .getSnapshottableDirListing();
> if (snapshotDirs != null) {
>   for (SnapshottableDirectoryStatus dir : snapshotDirs) {
> snapshottableDirs.add(dir.getFullPath().toString());
>   }
> }
>   }
> {code}
> to
> {code}
>   if (snapshottableDirs != null) {
> snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
>   }
> {code}
> In old code, namenode.getRpcServer().getSnapshottableDirListing() calls 
> checkNNStartup(), however, this is not done with the new code. This is a hole 
> of the earlier HDFS-9231 patch.
> Create this jira to fix the hole. Suggest to revert this portion of the 
> change, and add code to do what we need at NamenodeFsck.
> Sorry for missing this in my earlier review of HDFS-9231.
> Thanks.



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


[jira] [Updated] (HDFS-9351) No checkNNStartup() is called when fsck calls FSNamesystem.getSnapshottableDirs()

2015-10-30 Thread Xiao Chen (JIRA)

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

Xiao Chen updated HDFS-9351:

Attachment: HDFS-9351.patch

Thanks very much for the additional review and creating this JIRA. Good catch!
I extracted that logic to {{FSNamesystem#getSnapshottableDirs}} method 
initially, but after some revs (patch004 in HDF-9231) that method is only 
called once and I should have reverted it anyways. My apologies for not doing 
so on the initial JIRA. Attached a patch to do this.

> No checkNNStartup() is called when fsck calls 
> FSNamesystem.getSnapshottableDirs()
> -
>
> Key: HDFS-9351
> URL: https://issues.apache.org/jira/browse/HDFS-9351
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: HDFS
>Reporter: Yongjun Zhang
>Assignee: Xiao Chen
> Attachments: HDFS-9351.patch
>
>
> I looked further at HDFS-9231 change I reviewed earlier, and realize I missed 
> one thing.
> The patch changed
> {code}
>   if (snapshottableDirs != null) {
> SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
> .getSnapshottableDirListing();
> if (snapshotDirs != null) {
>   for (SnapshottableDirectoryStatus dir : snapshotDirs) {
> snapshottableDirs.add(dir.getFullPath().toString());
>   }
> }
>   }
> {code}
> to
> {code}
>   if (snapshottableDirs != null) {
> snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
>   }
> {code}
> In old code, namenode.getRpcServer().getSnapshottableDirListing() calls 
> checkNNStartup(), however, this is not done with the new code. This is a hole 
> of the earlier HDFS-9231 patch.
> Create this jira to fix the hole. Suggest to revert this portion of the 
> change, and add code to do what we need at NamenodeFsck.
> Sorry for missing this in my earlier review of HDFS-9231.
> Thanks.



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


[jira] [Updated] (HDFS-9351) No checkNNStartup() is called when fsck calls FSNamesystem.getSnapshottableDirs()

2015-10-30 Thread Xiao Chen (JIRA)

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

Xiao Chen updated HDFS-9351:

Status: Patch Available  (was: Open)

> No checkNNStartup() is called when fsck calls 
> FSNamesystem.getSnapshottableDirs()
> -
>
> Key: HDFS-9351
> URL: https://issues.apache.org/jira/browse/HDFS-9351
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: HDFS
>Reporter: Yongjun Zhang
>Assignee: Xiao Chen
> Attachments: HDFS-9351.patch
>
>
> I looked further at HDFS-9231 change I reviewed earlier, and realize I missed 
> one thing.
> The patch changed
> {code}
>   if (snapshottableDirs != null) {
> SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
> .getSnapshottableDirListing();
> if (snapshotDirs != null) {
>   for (SnapshottableDirectoryStatus dir : snapshotDirs) {
> snapshottableDirs.add(dir.getFullPath().toString());
>   }
> }
>   }
> {code}
> to
> {code}
>   if (snapshottableDirs != null) {
> snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
>   }
> {code}
> In old code, namenode.getRpcServer().getSnapshottableDirListing() calls 
> checkNNStartup(), however, this is not done with the new code. This is a hole 
> of the earlier HDFS-9231 patch.
> Create this jira to fix the hole. Suggest to revert this portion of the 
> change, and add code to do what we need at NamenodeFsck.
> Sorry for missing this in my earlier review of HDFS-9231.
> Thanks.



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