Package org.apache.hadoop.tools.dynamometer

Class ApplicationMaster

java.lang.Object
org.apache.hadoop.tools.dynamometer.ApplicationMaster

@Public @Unstable public class ApplicationMaster extends Object
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 Details

    • ApplicationMaster

      public ApplicationMaster()
  • Method Details

    • main

      public static void main(String[] args)
      Parameters:
      args - Command line args
    • init

      public boolean init(String[] args) throws org.apache.commons.cli.ParseException
      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

      public boolean run() throws YarnException, IOException, InterruptedException
      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 daemons
      IOException - for other issues
      InterruptedException - when the thread is interrupted