Example usage for com.amazonaws.services.elasticmapreduce.model ScriptBootstrapActionConfig setArgs

List of usage examples for com.amazonaws.services.elasticmapreduce.model ScriptBootstrapActionConfig setArgs

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticmapreduce.model ScriptBootstrapActionConfig setArgs.

Prototype


public void setArgs(java.util.Collection<String> args) 

Source Link

Document

A list of command line arguments to pass to the bootstrap action script.

Usage

From source file:org.pentaho.amazon.client.impl.EmrClientImpl.java

License:Apache License

/**
 * Configure a bootstrap action object, given its name, path and arguments.
 *
 * @param path - path for the bootstrap action program in S3
 * @param name - name of the bootstrap action
 * @param args - arguments for the bootstrap action
 * @return configuration data object for one bootstrap action
 *///from  w w  w.j  a  v a2 s  . c om
private static BootstrapActionConfig configureBootstrapAction(String path, String name, List<String> args) {

    ScriptBootstrapActionConfig scriptBootstrapActionConfig = new ScriptBootstrapActionConfig();
    BootstrapActionConfig bootstrapActionConfig = new BootstrapActionConfig();
    scriptBootstrapActionConfig.setPath(path);
    scriptBootstrapActionConfig.setArgs(args);
    bootstrapActionConfig.setName(name);
    bootstrapActionConfig.setScriptBootstrapAction(scriptBootstrapActionConfig);

    return bootstrapActionConfig;
}

From source file:org.pentaho.amazon.client.impl.EmrClientImpl.java

License:Apache License

/**
 * Configure a bootstrap action object, given its name, path and arguments.
 *
 * @param path - path for the bootstrap action program in S3
 * @param name - name of the bootstrap action
 * @param args - arguments for the bootstrap action
 * @return configuration data object for one bootstrap action
 *///from   w w w. j ava 2s .  c o m
private static BootstrapActionConfig createBootstrapAction(String path, String name, List<String> args) {

    ScriptBootstrapActionConfig scriptBootstrapActionConfig = new ScriptBootstrapActionConfig();
    BootstrapActionConfig bootstrapActionConfig = new BootstrapActionConfig();
    if (!path.isEmpty()) {
        scriptBootstrapActionConfig.setPath(path);
        scriptBootstrapActionConfig.setArgs(args);
    }
    bootstrapActionConfig.setName(name);
    bootstrapActionConfig.setScriptBootstrapAction(scriptBootstrapActionConfig);

    return bootstrapActionConfig;
}

From source file:org.pentaho.amazon.hive.job.AmazonHiveJobExecutor.java

License:Apache License

/**
 * Configure a bootstrap action object, given its name, path and arguments.
 * //from   w w w .  java 2s. c  o  m
 * @param path
 *          - path for the bootstrap action program in S3
 * @param name
 *          - name of the bootstrap action
 * @param args
 *          - arguments for the bootstrap action
 * @return configuration data object for one bootstrap action
 * 
 */
BootstrapActionConfig ConfigureBootstrapAction(String path, String name, List<String> args) {

    ScriptBootstrapActionConfig scriptBootstrapActionConfig = new ScriptBootstrapActionConfig();
    BootstrapActionConfig bootstrapActionConfig = new BootstrapActionConfig();
    scriptBootstrapActionConfig.setPath(path);
    scriptBootstrapActionConfig.setArgs(args);
    bootstrapActionConfig.setName(name);
    bootstrapActionConfig.setScriptBootstrapAction(scriptBootstrapActionConfig);

    return bootstrapActionConfig;
}