Package org.apache.hadoop.tools.dynamometer
Class ApplicationMaster
java.lang.Object
org.apache.hadoop.tools.dynamometer.ApplicationMaster
The ApplicationMaster for Dynamometer. This will launch DataNodes in YARN
containers. If the RPC address of a NameNode is specified, it will configure
the DataNodes to talk to that NameNode. Else, a NameNode will be launched as
part of this YARN application. This does not implement any retry/failure
handling.
TODO: Add proper retry/failure handling
The AM will persist until it has run for a period of time equal to the timeout specified or until the application is killed.
If the NameNode is launched internally, it will upload some information
onto the remote HDFS instance (i.e., the default FileSystem) about its
hostname and ports. This is in the location determined by the
DynoConstants.DYNAMOMETER_STORAGE_DIR and
DynoConstants.NN_INFO_FILE_NAME constants and is in the
Properties file format. This is consumed by this AM as well as the
Client to determine how to contact the NameNode.
Information about the location of the DataNodes is logged by the AM.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ApplicationMaster
public ApplicationMaster()
-
-
Method Details
-
main
- Parameters:
args- Command line args
-
init
Parse command line options.- Parameters:
args- Command line args- Returns:
- Whether init successful and run should be invoked
- Throws:
org.apache.commons.cli.ParseException- on error while parsing options
-
run
Main run function for the application master.- Returns:
- True if the application completed successfully; false if if exited unexpectedly, failed, was killed, etc.
- Throws:
YarnException- for issues while contacting YARN daemonsIOException- for other issuesInterruptedException- when the thread is interrupted
-