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

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

Introduction

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

Prototype


public void setPath(String path) 

Source Link

Document

Location of the script to run during a bootstrap action.

Usage

From source file:org.finra.dm.dao.impl.EmrDaoImpl.java

License:Apache License

/**
 * Create the BootstrapActionConfig object from the bootstrap script.
 *
 * @param scriptDescription bootstrap script name to be displayed.
 * @param bootstrapScript location of the bootstrap script.
 *
 * @return bootstrap action configuration that contains all the bootstrap actions for the given configuration.
 *//*from   ww  w .  ja va  2  s.c o  m*/
private BootstrapActionConfig getBootstrapActionConfig(String scriptDescription, String bootstrapScript) {
    // Create the BootstrapActionConfig object
    BootstrapActionConfig bootstrapConfig = new BootstrapActionConfig();
    ScriptBootstrapActionConfig bootstrapConfigScript = new ScriptBootstrapActionConfig();

    // Set the bootstrapScript
    bootstrapConfig.setName(scriptDescription);
    bootstrapConfigScript.setPath(bootstrapScript);
    bootstrapConfig.setScriptBootstrapAction(bootstrapConfigScript);

    // Return the object
    return bootstrapConfig;
}

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
 *///  w  w  w  . ja  v a 2s . com
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. ja  v  a  2 s  . 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.
 * //w w w .  j a  v a 2 s  . c om
 * @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;
}