hadoop_add_array_paramhadoop_add_array_param envvar appendstring
Add the appendstring if checkstring is not present in the given array
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_classpathhadoop_add_classpath object [before|after]
Add a file system object (directory, file, wildcard, …) to the classpath. Optionally provide a hint as to where in the classpath it should go.
0 = success (added or duplicate) 1 = failure (doesn’t exist or some other reason)
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_client_optshadoop_add_client_opts
Adds the HADOOP_CLIENT_OPTS variable to HADOOP_OPTS if HADOOP_SUBCMD_SUPPORTDAEMONIZATION is false
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_colonpathhadoop_add_colonpath envvar object [before|after]
Add a file system object (directory, file, wildcard, …) to the colonpath. Optionally provide a hint as to where in the colonpath it should go. Prior to adding, objects are checked for duplication and check for existence. Many other functions use this function as their base implementation including hadoop_add_javalibpath and hadoop_add_ldlibpath.
0 = success (added or duplicate) 1 = failure (doesn’t exist or some other reason)
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_javalibpathhadoop_add_javalibpath object [before|after]
Add a file system object (directory, file, wildcard, …) to the Java JNI path. Optionally provide a hint as to where in the Java JNI path it should go.
0 = success (added or duplicate) 1 = failure (doesn’t exist or some other reason)
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_ldlibpathhadoop_add_ldlibpath object [before|after]
Add a file system object (directory, file, wildcard, …) to the LD_LIBRARY_PATH. Optionally provide a hint as to where in the LD_LIBRARY_PATH it should go.
0 = success (added or duplicate) 1 = failure (doesn’t exist or some other reason)
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_paramhadoop_add_param envvar checkstring appendstring
Append the appendstring if checkstring is not present in the given envvar
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_add_profilehadoop_add_profile shellprofile
Register the given shellprofile to the Hadoop shell subsystem
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_array_containshadoop_array_contains element array
Check if an array has a given value
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_build_custom_subcmd_varhadoop_build_custom_subcmd_var command subcommand customid
Build custom subcommand var
string
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_deprecate_envvarhadoop_deprecate_envvar oldvar newvar
Replace oldvar with newvar if oldvar exists.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_detect_priv_subcmdhadoop_detect_priv_subcmd command subcommand
autodetect whether this is a priv subcmd by whether or not a priv user var exists and if HADOOP_SECURE_CLASSNAME is defined
1 = not priv 0 = priv
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_java_exechadoop_java_exec command class [options]
Execute the Java class, passing along any options. Additionally, set the Java property -Dproc_command.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_java_setuphadoop_java_setup
Configure/verify ${JAVA_HOME}
may exit on failure conditions
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_mkdirhadoop_mkdir dir
Create the directory ‘dir’.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_need_reexechadoop_need_reexec subcommand
Verify that ${USER} is allowed to execute the given subcommand.
1 on no re-exec needed 0 on need to re-exec
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_os_trickshadoop_os_tricks
Routine to configure any OS-specific settings.
may exit on failure conditions
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_sort_arrayhadoop_sort_array arrayvar
Sort an array (must not contain regexps) present in the given array
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_status_daemonhadoop_status_daemon pidfile
Determine the status of the daemon referenced by pidfile
(mostly) LSB 4.1.0 compatible status
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_stop_daemonhadoop_stop_daemon command pidfile
Stop the non-privileged command daemon with that that is running at pidfile.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_stop_secure_daemonhadoop_stop_secure_daemon command daemonpidfile wrapperpidfile
Stop the privileged command daemon with that that is running at daemonpidfile and launched with the wrapper at wrapperpidfile.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_subcommand_secure_optshadoop_subcommand_secure_opts program subcommand
Add custom (program)_(command)_SECURE_EXTRA_OPTS to HADOOP_OPTS. This does not handle the pre-3.x deprecated cases
will exit on failure conditions
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_translate_cygwin_pathhadoop_translate_cygwin_path varnameref [true]
Converts the contents of the variable name varnameref into the equivalent Windows path. If the second parameter is true, then varnameref is treated as though it was a path list.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_using_envvarhadoop_using_envvar var
Declare var being used and print its value.
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_validate_classnamehadoop_validate_classname classname
Verify that a shell command was passed a valid class name
0 = success 1 = failure w/user message
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_verify_confdirhadoop_verify_confdir
Validate ${HADOOP_CONF_DIR}
will exit on failure conditions
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_verify_user_permhadoop_verify_user_perm command subcommand
Verify that ${USER} is allowed to execute the given subcommand.
return 0 on success exit 1 on failure
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_verify_user_resolveshadoop_verify_user_resolves userstring
Verify that username in a var converts to user id
0 for success 1 for failure
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | True |
hadoop_abshadoop_abs fsobj
Given a filename or dir, return the absolute version of it This works as an alternative to readlink, which isn’t portable.
0 success 1 failure stdout abspath
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_add_entryhadoop_add_entry
Given variable $1 add $2 to it
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_debughadoop_debug string
Print a message to stderr if –debug is turned on
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_delete_entryhadoop_delete_entry
Given variable $1 delete $2 from it
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_errorhadoop_error string
Print a message to stderr
Nothing
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_exit_with_usagehadoop_exit_with_usage exitcode
Print usage information and exit with the passed exitcode
This function will always exit.
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_populate_workers_filehadoop_populate_workers_file filename
Set the worker support information to the contents of filename
will exit if file does not exist
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_rotate_loghadoop_rotate_log filename [number]
Rotates the given file until number of files exist.
$? will contain last mv’s return value
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_verify_entryhadoop_verify_entry
Given variable $1 determine if $2 is in it
0 = yes, 1 = no
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Stable |
| Replaceable | False |
hadoop_subcommand_optshadoop_subcommand_opts program subcommand
Add custom (program)_(command)_OPTS to HADOOP_OPTS. Also handles the deprecated cases from pre-3.x.
will exit on failure conditions
| Classification | Level |
|---|---|
| Audience | Public |
| Stability | Evolving |
| Replaceable | True |
hadoop_actual_sshhadoop_actual_ssh hostname command [...]
Via ssh, log into hostname and run command
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_add_common_to_classpathhadoop_add_common_to_classpath
Add the common/core Hadoop components to the environment
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_add_to_classpath_toolshadoop_add_to_classpath_tools module
Run libexec/tools/module.sh to add to the classpath environment
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_add_to_classpath_userpathhadoop_add_to_classpath_userpath
Add the user’s custom classpath settings to the environment
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_common_worker_mode_executehadoop_common_worker_mode_execute commandarray
Utility routine to handle –workers mode
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_connect_to_hostshadoop_connect_to_hosts command [...]
Connect to ${HADOOP_WORKERS} or ${HADOOP_WORKER_NAMES} and execute command.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_connect_to_hosts_without_pdshhadoop_connect_to_hosts_without_pdsh command [...]
Connect to ${HADOOP_WORKER_NAMES} and execute command under the environment which does not support pdsh.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_daemon_handlerhadoop_daemon_handler [start|stop|status|default] command class daemonpidfile daemonoutfile [options]
Manage a non-privileged daemon.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_do_classpath_subcommandhadoop_do_classpath_subcommand [parameters]
Perform the ‘hadoop classpath’, etc subcommand with the given parameters
will print & exit with no params
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_exec_hadooprchadoop_exec_hadooprc
Read the user’s settings. This provides for users to run Hadoop Shell API after system bootstrap
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_exec_user_hadoopenvhadoop_exec_user_hadoopenv
Read the user’s settings. This provides for users to override and/or append hadoop-env.sh. It is not meant as a complete system override.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_finalizehadoop_finalize
Finish all the remaining environment settings prior to executing Java. This is a wrapper that calls the other finalize routines.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_finalize_classpathhadoop_finalize_classpath
Finish Java classpath prior to execution
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_finalize_hadoop_heaphadoop_finalize_hadoop_heap
Finish Java heap parameters prior to execution
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_finalize_hadoop_optshadoop_finalize_hadoop_opts
Finish configuring Hadoop specific system properties prior to executing Java
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_finalize_libpathshadoop_finalize_libpaths
Finish Java JNI paths prior to execution
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_generic_java_subcmd_handlerhadoop_generic_java_subcmd_handler
Handle subcommands from main program entries
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_import_shellprofileshadoop_import_shellprofiles
Import shellprofile.d content
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_parse_argshadoop_parse_args [parameters, typically "$@"]
generic shell script option parser. sets HADOOP_PARSE_COUNTER to set number the caller should shift
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_privilege_checkhadoop_privilege_check
Check if we are running with priv by default, this implementation looks for EUID=0. For OSes that have true priv separation, this should be something more complex
1 = no priv 0 = priv
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_secure_daemon_handlerhadoop_secure_daemon_handler [start|stop|status|default] command class daemonpidfile daemonoutfile wrapperpidfile wrapperoutfile wrappererrfile [options]
Manage a privileged daemon.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_setup_secure_servicehadoop_setup_secure_service
Description
Returns
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_shellprofiles_classpathhadoop_shellprofiles_classpath
Apply the shell profile classpath additions
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_shellprofiles_finalizehadoop_shellprofiles_finalize
Apply the shell profile final configuration
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_shellprofiles_inithadoop_shellprofiles_init
Initialize the registered shell profiles
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_shellprofiles_nativelibhadoop_shellprofiles_nativelib
Apply the shell profile native library additions
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_start_daemonhadoop_start_daemon command class pidfile [options]
Start a non-privileged daemon in the foreground.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_start_daemon_wrapperhadoop_start_daemon_wrapper command class pidfile outfile [options]
Start a non-privileged daemon in the background.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_start_secure_daemonhadoop_start_secure_daemon command class daemonpidfile daemonoutfile daemonerrfile wrapperpidfile [options]
Start a privileged daemon in the foreground.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_start_secure_daemon_wrapperhadoop_start_secure_daemon_wrapper command class daemonpidfile daemonoutfile wrapperpidfile warpperoutfile daemonerrfile [options]
Start a privileged daemon in the background.
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_sudohadoop_sudo user commandstring
Execute a command via sudo when running as root if the given user is found or exit with failure if not. otherwise just run it. (This is intended to be used by the start-/stop- scripts.)
exitstatus
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_verify_logdirhadoop_verify_logdir
Description
Returns
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_verify_piddirhadoop_verify_piddir
Description
Returns
Nothing
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |
hadoop_verify_secure_prereqhadoop_verify_secure_prereq
Verify that prerequisites have been met prior to excuting a privileged program.
This routine may exit.
| Classification | Level |
|---|---|
| Audience | Private |
| Stability | Evolving |
| Replaceable | True |