SASEP-SERVERS.SH Script

Overview of the SASEP-SERVERS.SH Script

The sasep-servers.sh script enables you to perform the following actions.
  • Install or uninstall the SAS Embedded Process and SAS Hadoop MapReduce JAR files on a single node or a group of nodes.
  • Start or stop the SAS Embedded Process on a single node or on a group of nodes.
  • Determine the status of the SAS Embedded Process on a single node or on a group of nodes.
  • Write the installation output to a log file.
  • Pass options to the SAS Embedded Process.
  • Create a HADOOP_JARS.zip file in the local folder. This ZIP file contains all required client JAR files.
Note: The sasep-servers.sh script can be run from any folder on any node in the cluster. You can also add its location to the PATH environment variable.
Note: You must have sudo access to run the sasep-servers.sh script.

SASEP-SERVERS.SH Syntax

sasep-servers.sh
-add | -remove | -start | -stop | -status | -restart
<-mrhome path-to-mr-home>
<-hdfsuser user-id>
<-epuser>epuser-id
<-epgroup>epgroup-id
<-hostfile host-list-filename | -host <">host-list<">>
<-epscript path-to-ep-install-script>
<-mrscript path-to-mr-jar-file-script>
<-options "option-list">
<-log filename>
<-version apache-version-number>
<-getjars>
Arguments

-add

installs the SAS Embedded Process.

Note The -add argument also starts the SAS Embedded Process (same function as -start argument). You are prompted and can choose whether to start the SAS Embedded Process.
Tip You can specify the hosts on which you want to install the SAS Embedded Process by using the -hostfile or -host option. The -hostfile or -host options are mutually exclusive.
See -hostfile and -host option

-remove

removes the SAS Embedded Process.

CAUTION:
If you are using SAS Data Loader’s Cleanse Data in Hadoop directives, you should remove the QKB from the Hadoop nodes before removing the SAS Embedded Process.
The QKB is removed by running the QKBPUSH script. For more information, see the SAS Data Loader for Hadoop: Administrator’s Guide.
Tip You can specify the hosts for which you want to remove the SAS Embedded Process by using the -hostfile or -host option. The -hostfile or -host options are mutually exclusive.
See -hostfile and -host option

-start

starts the SAS Embedded Process.

Tip You can specify the hosts on which you want to start the SAS Embedded Process by using the -hostfile or -host option. The -hostfile or -host options are mutually exclusive.
See -hostfile and -host option

-stop

stops the SAS Embedded Process.

Tip You can specify the hosts on which you want to stop the SAS Embedded Process by using the -hostfile or -host option. The -hostfile or -host options are mutually exclusive.
See -hostfile and -host option

-status

provides the status of the SAS Embedded Process on all hosts or the hosts that you specify with either the -hostfile or -host option.

Tips The status also shows the version and path information for the SAS Embedded Process.
You can specify the hosts for which you want the status of the SAS Embedded Process by using the -hostfile or -host option. The -hostfile or -host options are mutually exclusive.
See -hostfile and -host option

-restart

restarts the SAS Embedded Process.

Tip You can specify the hosts on which you want to restart the SAS Embedded Process by using the -hostfile or -host option. The -hostfile or -host options are mutually exclusive.
See -hostfile and -host option

-mrhome path-to-mr-home

specifies the path to the MapReduce home.

-hdfsuser user-id

specifies the user ID that has Write access to HDFS root directory.

Default hdfs
Note The user ID is used to copy the SAS Embedded Process configuration files to HDFS.

-epuser epuser-name

specifies the name for the SAS Embedded Process user.

Default sasep

-epgroup epgroup-name

specifies the name for the SAS Embedded Process group.

Default sasep

-hostfile host-list-filename

specifies the full path of a file that contains the list of hosts where the SAS Embedded Process is installed, removed, started, stopped, or status is provided.

Default If you do not specify -hostfile, the sasep-servers.sh script will discover the cluster topology and use the retrieved list of data nodes.
Tip You can also assign a host list filename to a UNIX variable, sas_ephosts_file.
export sasep_hosts=/etc/hadoop/conf/slaves
See -hdfsuser user-id
Example
-hostfile /etc/hadoop/conf/slaves

-host <">host-list<">

specifies the target host or host list where the SAS Embedded Process is installed, removed, started, stopped, or status is provided.

Default If you do not specify -host, the sasep-servers.sh script will discover the cluster topology and use the retrieved list of data nodes.
Requirement If you specify more than one host, the hosts must be enclosed in double quotation marks and separated by spaces.
Tip You can also assign a list of hosts to a UNIX variable, sas_ephosts.
export sasep_hosts="server1 server2 server3"
See -hdfsuser user-id
Example
-host "server1 server2 server3"
-host bluesvr

-epscript path-to-ep-install-script

copies and unpacks the SAS Embedded Process install script file to the host.

Restriction Use this option only with the -add option.
Requirement You must specify either the full or relative path of the SAS Embedded Process install script, tkindbsrv-9.42-n_lax.sh file.
Example
-epscript /home/hadoop/image/current/tkindbsrv-9.42-1_lax.sh

-mrscript path-to-mr-jar-file-script

copies and unpacks the SAS Hadoop MapReduce JAR files install script on the hosts.

Restriction Use this option only with the -add option.
Requirement You must specify either the full or relative path of the SAS Hadoop MapReduce JAR file install script, hadoopmrjars-9.42-n_lax.sh file.
Example
-mrscript /home/hadoop/image/current/hadoopmrjars-9.42-1_lax.sh

-options "option-list"

specifies options that are passed directly to the SAS Embedded Process. The following options can be used.

-trace trace-level

specifies what type of trace information is created.

0 no trace log
1 fatal error
2 error with information or data value
3 warning
4 note
5 information as an SQL statement
6 critical and command trace
7 detail trace, lock
8 enter and exit of procedures
9 tedious trace for data types and values
10 trace all information
Default 02
Note The trace log messages are stored in the MapReduce job log.

-port port-number

specifies the TCP port number where the SAS Embedded Process accepts connections.

Default 9261
Requirement The options in the list must be separated by spaces, and the list must be enclosed in double quotation marks.

-log filename

writes the installation output to the specified filename.

-version apache-version-number

specifies the Hadoop version of the JAR file that you want to install on the cluster. The apache-version-number can be one of the following values.

0.23

installs the SAS Hadoop MapReduce JAR files that are built from Apache Hadoop 0.23 (sas.hadoop.ep.apache023.jar and sas.hadoop.ep.apache023.nls.jar).

1.2

installs the SAS Hadoop MapReduce JAR files that are built from Apache Hadoop 1.2.1 (sas.hadoop.ep.apache121.jar and sas.hadoop.ep.apache121.nls.jar).

2.0

installs the SAS Hadoop MapReduce JAR files that are built from Apache Hadoop 0.2.3 (sas.hadoop.ep.apache023.jar and sas.hadoop.ep.apache023.nls.jar).

2.1

installs the SAS Hadoop MapReduce JAR files that are built from Apache Hadoop 2.0.5 (sas.hadoop.ep.apache205.jar and sas.hadoop.ep.apache205.nls.jar).

Default If you do not specify the -version option, the sasep.servers.sh script will detect the version of Hadoop that is in use and install the JAR files associated with that version. For more information, see Installing the SAS Embedded Process and SAS Hadoop MapReduce JAR Files.
Interaction The -version option overrides the version that is automatically detected by the sasep.servers.sh script.

-getjars

creates a HADOOP_JARS.zip file in the local folder. This ZIP file contains all required client JAR files.

You need to move this ZIP file to your client machine and unpack it. If you want to replace the existing JAR files, move it to the same directory where you previously unpacked the existing JAR files.
See For more information, see Copying Hadoop JAR Files to the Client Machine.

Starting the SAS Embedded Process

There are three ways to manually start the SAS Embedded Process.
Note: Root authority is required to run the sasep-servers.sh script.
  • Run the sasep-servers.sh script with the -start option on the master node.
    This starts the SAS Embedded Process on all nodes. For more information about running the sasep-servers.sh script, see SASEP-SERVERS.SH Syntax.
  • Run sasep-server-start.sh on a node.
    This starts the SAS Embedded Process on the local node only. The sasep-server-start.sh script is located in the SASEPHome/SAS/SASTKInDatabaseServerForHadoop/9.42/bin/ directory. For more information, see Installing the SAS Embedded Process and SAS Hadoop MapReduce JAR Files.
  • Run the UNIX service command on a node.
    This starts the SAS Embedded Process on the local node only. The service command calls the init script that is located in the /etc/init.d directory. A symbolic link to the init script is created in the /etc/rc3.d and /etc/rc5.d directories, where 3 and 5 are the run level at which you want the script to be executed.
    Because the SAS Embedded Process init script is registered as a service, the SAS Embedded Process is started automatically when the node is rebooted.

Stopping the SAS Embedded Process

The SAS Embedded Process continues to run until it is manually stopped. The ability to control the SAS Embedded Process on individual nodes could be useful when performing maintenance on an individual node.
There are three ways to stop the SAS Embedded Process.
Note: Root authority is required to run the sasep-servers.sh script.
  • Run the sasep-servers.sh script with the -stop option from the master node.
    This stops the SAS Embedded Process on all nodes. For more information about running the sasep-servers.sh script, see SASEP-SERVERS.SH Syntax.
  • Run sasep-server-stop.sh on a node.
    This stops the SAS Embedded Process on the local node only. The sasep-server-stop.sh script is located in the SASEPHome/SAS/SASTKInDatabaseServerForHadoop/9.42/bin/ directory. For more information, see Installing the SAS Embedded Process and SAS Hadoop MapReduce JAR Files.
  • Run the UNIX service command on a node.
    This stops the SAS Embedded Process on the local node only.

Determining the Status of the SAS Embedded Process

You can display the status of the SAS Embedded Process on one node or all nodes. There are three ways to display the status of the SAS Embedded Process.
Note: Root authority is required to run the sasep-servers.sh script.
  • Run the sasep-servers.sh script with the -status option from the master node.
    This displays the status of the SAS Embedded Process on all nodes. For more information about running the sasep-servers.sh script, see SASEP-SERVERS.SH Syntax.
  • Run sasep-server-status.sh from a node.
    This displays the status of the SAS Embedded Process on the local node only. The sasep-server-status.sh script is located in the SASEPHome/SAS/SASTKInDatabaseServerForHadoop/9.42/bin/ directory. For more information, see Installing the SAS Embedded Process and SAS Hadoop MapReduce JAR Files.
  • Run the UNIX service command on a node.
    This displays the status of the SAS Embedded Process on the local node only.