hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2941) Add an administrative command to download a copy of the fsimage from the NN
Date Mon, 26 Mar 2012 02:08:27 GMT

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

Todd Lipcon commented on HDFS-2941:

Looks pretty good. A few more small comments:
- I'd rather see the HADOOP_FSIMAGE_HEADER header be added in all cases -- not just when it's
the latest -- just for consistency.
- Given that, I think the code in TransferFsImage will make a little more sense. Right now,
the "localPaths" variable is either a file (when not getting latest) or a directory (when
getting latest) which seems inconsistent. If you send the header in all cases, then the code
can change to something like:
String fsImageName = connection.getHeaderField(HADOOP_FSIMAGE_HEADER);
// If the local paths refer to directories, use the server-provided header
// as the filename within that directory
List<File> newLocalPaths = new ArrayList<File>();
for (File localPath : localPaths) {
  if (localPath.isDirectory()) {
    if (fsImageName == null) {
      throw new IOException("No filename header provided by server");
    newLocalPaths.add(new File(localPath, fsImageName));
  } else {
localPaths = newLocalPaths;

> Add an administrative command to download a copy of the fsimage from the NN
> ---------------------------------------------------------------------------
>                 Key: HDFS-2941
>                 URL: https://issues.apache.org/jira/browse/HDFS-2941
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: hdfs client, name-node
>    Affects Versions: 0.24.0
>            Reporter: Aaron T. Myers
>            Assignee: Aaron T. Myers
>         Attachments: HDFS-2941.patch, HDFS-2941.patch
> It would be nice to be able to download a copy of the fsimage from the NN, e.g. for backup

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message