/** * Create a new TezClient. Session or non-session execution mode will be * inferred from configuration. * @param name * Name of the client. Used for logging etc. This will also be used * as app master name is session mode * @param tezConf * Configuration for the framework */ public static TezClient create(String name, TezConfiguration tezConf) { return new TezClient(name, tezConf); }
/** * Build the actual instance of the {@link TezClient} * @return an instance of {@link TezClient} */ public TezClient build() { return new TezClient(name, tezConf, isSession, localResourceMap, credentials, servicePluginsDescriptor); } }
/** * Create a new TezClient with AM session mode set explicitly. This overrides * the setting from configuration. * @param name * Name of the client. Used for logging etc. This will also be used * as app master name is session mode * @param tezConf Configuration for the framework * @param isSession The AM will run in session mode or not */ public static TezClient create(String name, TezConfiguration tezConf, boolean isSession) { return new TezClient(name, tezConf, isSession); }
/** * Create a new TezClient with AM session mode set explicitly. This overrides * the setting from configuration. * Set the initial files and security credentials for the App Master. * @param name * Name of the client. Used for logging etc. This will also be used * as app master name is session mode * @param tezConf Configuration for the framework * @param isSession The AM will run in session mode or not * @param localFiles local files for the App Master * @param credentials credentials for the App Master */ public static TezClient create(String name, TezConfiguration tezConf, boolean isSession, @Nullable Map<String, LocalResource> localFiles, @Nullable Credentials credentials) { return new TezClient(name, tezConf, isSession, localFiles, credentials); }
/** * Create a new TezClient. Session or non-session execution mode will be * inferred from configuration. Set the initial resources and security * credentials for the App Master. If app master resources/credentials are * needed then this is the recommended method for session mode execution. * * @param name * Name of the client. Used for logging etc. This will also be used * as app master name is session mode * @param tezConf * Configuration for the framework * @param localFiles * local files for the App Master * @param credentials * Set security credentials to be used inside the app master, if * needed. Tez App Master needs credentials to access the staging * directory and for most HDFS cases these are automatically obtained * by Tez client. If the staging directory is on a file system for * which credentials cannot be obtained or for any credentials needed * by user code running inside the App Master, credentials must be * supplied by the user. These will be used by the App Master for the * next DAG. <br> * In session mode, credentials, if needed, must be set before * calling start() */ public static TezClient create(String name, TezConfiguration tezConf, @Nullable Map<String, LocalResource> localFiles, @Nullable Credentials credentials) { return new TezClient(name, tezConf, localFiles, credentials); }