public int saveNamespace(String[] argv, int idx) throws IOException {
    int exitCode = -1;

    DistributedFileSystem dfs = getDFS();
    if (dfs == null) {
      System.err.println("FileSystem is " + getFS().getUri());
      return exitCode;
    }

    boolean force = false;
    boolean uncompressed = false;
    for( ; idx < argv.length; idx++) {
      if (argv[idx].equals("force")) {
        force = true;
      } else if (argv[idx].equals("uncompressed")) {
        uncompressed = true;
      } else {
        printUsage("saveNamespace");
        return exitCode;
      }
    }
    dfs.saveNamespace(force, uncompressed);
    return 0;
  }
public int saveNamespace ( String [ ] argv , int idx ) throws IOException { int exitCode = - 1 ; DistributedFileSystem dfs = getDFS ( ) ; if ( dfs == null ) { System . err . println ( "FileSystem is " + getFS ( ) . getUri ( ) ) ; return exitCode ; } boolean force = false ; boolean uncompressed = false ; for ( ; idx < argv . length ; idx ++ ) { if ( argv [ idx ] . equals ( "force" ) ) { force = true ; } else if ( argv [ idx ] . equals ( "uncompressed" ) ) { uncompressed = true ; } else { printUsage ( "saveNamespace" ) ; return exitCode ; } } dfs . saveNamespace ( force , uncompressed ) ; return 0 ; }
Command to ask the namenode to save the namespace.
Usage: java DFSAdmin -saveNamespace [force] [uncompressed]

@param argv List of of command line parameters.
@param idx The index of the command that is being processed.
@exception IOException