public int rollEdits() throws IOException { DistributedFileSystem dfs = getDFS(); long txid = dfs.rollEdits(); System.out.println("Successfully rolled edit logs."); System.out.println("New segment starts at txid " + txid); return 0; }
DistributedFileSystem dfs = getDFS(); final DatanodeInfo[] report = dfs.getDataNodeStats();
DistributedFileSystem dfs = getDFS(); RemoteIterator<OpenFileEntry> openFilesRemoteIterator; try{
DistributedFileSystem dfs = getDFS(); Configuration dfsConf = dfs.getConf(); URI dfsUri = dfs.getUri();
int exitCode = -1; DistributedFileSystem dfs = getDFS(); Configuration dfsConf = dfs.getConf(); URI dfsUri = dfs.getUri();
final DistributedFileSystem dfs = getDFS(); final Configuration dfsConf = dfs.getConf();
/** * Download the most recent fsimage from the name node, and save it to a local * file in the given directory. * * @param argv * List of of command line parameters. * @param idx * The index of the command that is being processed. * @return an exit code indicating success or failure. * @throws IOException */ public int fetchImage(final String[] argv, final int idx) throws IOException { Configuration conf = getConf(); final URL infoServer = DFSUtil.getInfoServer( HAUtil.getAddressOfActive(getDFS()), conf, DFSUtil.getHttpClientScheme(conf)).toURL(); SecurityUtil.doAsCurrentUser(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { TransferFsImage.downloadMostRecentImageToDirectory(infoServer, new File(argv[idx])); return null; } }); return 0; }
DistributedFileSystem dfs = getDFS();
DistributedFileSystem dfs = getDFS(); Configuration dfsConf = dfs.getConf(); URI dfsUri = dfs.getUri();
conf.get(DFSConfigKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY, "")); DistributedFileSystem dfs = getDFS(); URI dfsUri = dfs.getUri(); boolean isHaEnabled = HAUtilClient.isLogicalUri(conf, dfsUri);
DistributedFileSystem dfs = getDFS();
DistributedFileSystem dfs = getDFS(); Configuration dfsConf = dfs.getConf(); URI dfsUri = dfs.getUri();
conf.get(DFSConfigKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY, "")); DistributedFileSystem dfs = getDFS(); URI dfsUri = dfs.getUri(); boolean isHaEnabled = HAUtilClient.isLogicalUri(conf, dfsUri);
conf.get(DFSConfigKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY, "")); DistributedFileSystem dfs = getDFS(); URI dfsUri = dfs.getUri(); boolean isHaEnabled = HAUtilClient.isLogicalUri(conf, dfsUri);
conf.get(DFSConfigKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY, "")); DistributedFileSystem dfs = getDFS(); URI dfsUri = dfs.getUri(); boolean isHaEnabled = HAUtilClient.isLogicalUri(conf, dfsUri);
DistributedFileSystem dfs = getDFS(); FsStatus ds = dfs.getStatus(); long capacity = ds.getCapacity();
exitCode = finalizeUpgrade(); } else if (RollingUpgradeCommand.matches(cmd)) { exitCode = RollingUpgradeCommand.run(getDFS(), argv, i); } else if ("-upgrade".equals(cmd)) { exitCode = upgrade(argv[i]);
public int rollEdits() throws IOException { DistributedFileSystem dfs = getDFS(); long txid = dfs.rollEdits(); System.out.println("Successfully rolled edit logs."); System.out.println("New segment starts at txid " + txid); return 0; }
public int rollEdits() throws IOException { DistributedFileSystem dfs = getDFS(); long txid = dfs.rollEdits(); System.out.println("Successfully rolled edit logs."); System.out.println("New segment starts at txid " + txid); return 0; }
/** * Allow snapshot on a directory. * Usage: hdfs dfsadmin -allowSnapshot snapshotDir * @param argv List of of command line parameters. * @exception IOException */ public void allowSnapshot(String[] argv) throws IOException { DistributedFileSystem dfs = getDFS(); try { dfs.allowSnapshot(new Path(argv[1])); } catch (SnapshotException e) { throw new RemoteException(e.getClass().getName(), e.getMessage()); } System.out.println("Allowing snaphot on " + argv[1] + " succeeded"); }