Preparing a MapReduce Application Running Environment
The operating environment of MapReduce can be deployed in Linux. Perform the following operations to prepare the operating environment.
Procedure
- Ensure that the YARN and MapReduce components on the server have been installed and are running properly.
- The JDK 1.7 or 1.8 has been installed on the client.
- Ensure that the time difference between the client and the Hadoop cluster is less than 5 minutes.
You can query the MRS cluster time by logging in to the active management node that corresponds to the cluster management IP address to run the date command.
- Download the MapReduce client program to the local computer.
- Log in to MRS Manager.
Enter the address in the address box of your browser. The address format is https://Floating IP address of WebService of MRS Manager:8080/web. For example, enter https://10.10.10.172:8080/web.
- Choose Service > Download Client to download the client program to the local PC.
- Log in to MRS Manager.
- Decompress the MRS_Services_Client.tar client program package. Because the installation package is in .tar format, run the following commands to decompress the package twice:
tar -xvf /opt/MRS_Services_Client.tar
tar -xvf /opt/MRS_Service_ClientConfig.tar
- Set environment variables for the operating environment. Assume that the installation package is decompressed in MRS_Services_ClientConfig/.
Go to the decompressed folder and run the following command to install the client:
sh install.sh {client_install_home}
- Go the client installation directory and run the following command to initialize the environment variables:
source bigdata_env
- Copy the user.keytab and krb5.conf files downloaded in Preparing a MapReduce Application Development User to the Linux environment, for example, /opt/conf. For details, see Compiling and Running a MapReduce Application.
During the secondary development, the username used by PRINCIPAL must contain the domain name. For example, if you create a user named test and the domain name is HADOOP.COM, the username of PRINCIPAL is test@HADOOP.COM. The following is sample code.
conf.set(PRINCIPAL, "test@HADOOP.COM");
- Run the kinit -kt /opt/conf/user.keytab test command.
The path of the user.keytab file is the path for storing the configuration file on the Linux host. The test username can be changed to the name of the new user created in Preparing a MapReduce Application Development User.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot