Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacheliu3 committed Feb 12, 2020
1 parent b7d9d1d commit 2209241
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions shell/src/main/java/alluxio/cli/bundler/CollectInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public Set<String> getHosts() {
}

/**
* Main method, starts a new CollectInfoAll shell.
* CollectInfoAll will SSH to all hosts and invoke {@link CollectInfo}.
* Main method, starts a new CollectInfo shell.
* CollectInfo will SSH to all hosts and invoke {@link CollectInfo} with --local option.
* Then collect the tarballs generated on each of the hosts to the localhost.
* And tarball all results into one final tarball.
*
Expand Down Expand Up @@ -161,7 +161,16 @@ public static void main(String[] argv) throws IOException {
System.exit(ret);
}

public int collectInfoRemote(CommandLine cmdLine) throws IOException {
/**
* Finds all nodes in the cluster.
* Then invokes collectInfo with --local option on each of them locally.
* Collects the generated tarball from each node.
* And generates a final tarball as the result.
*
* @param cmdLine the parsed CommandLine
* @return exit code
* */
private int collectInfoRemote(CommandLine cmdLine) throws IOException {
int ret = 0;
String[] args = cmdLine.getArgs();
String targetDir = args[1];
Expand Down Expand Up @@ -274,7 +283,14 @@ public int collectInfoRemote(CommandLine cmdLine) throws IOException {
return ret;
}

public int collectInfoLocal(CommandLine cmdLine) throws IOException {
/**
* Executes collectInfo command locally.
* And generates a tarball with all the information collected.
*
* @param cmdLine the parsed CommandLine
* @return exit code
* */
private int collectInfoLocal(CommandLine cmdLine) throws IOException {
int ret = 0;
String[] args = cmdLine.getArgs();

Expand Down Expand Up @@ -423,7 +439,7 @@ public static <T> CompletableFuture<List<T>> collectAllFutures(

@Override
protected String getShellName() {
return "collectInfoAll";
return "collectInfo";
}

@Override
Expand Down

0 comments on commit 2209241

Please sign in to comment.