public static String buildCommand ( YarnContainerType containerType , Map < String , String > args ) { CommandBuilder commandBuilder = new CommandBuilder ( "./" + ALLUXIO_SETUP_SCRIPT ) . addArg ( containerType . getName ( ) ) ; for ( Entry < String , String > argsEntry : args . entrySet ( ) ) { commandBuilder . addArg ( argsEntry . getKey ( ) , argsEntry . getValue ( ) ) ; } // Redirect stdout and stderr to yarn log files commandBuilder . addArg ( "1>" + ApplicationConstants . LOG_DIR_EXPANSION_VAR + "/stdout" ) ; commandBuilder . addArg ( "2>" + ApplicationConstants . LOG_DIR_EXPANSION_VAR + "/stderr" ) ; return commandBuilder . toString ( ) ; }
Creates a command string for running the Alluxio yarn setup script for the given type of yarn container .