Submitting a Topology When a Client Is Installed on a Linux OS
Scenario
You can use storm commands to submit topologies in a Linux environment.
Prerequisites
- You have installed the Storm client.
- If the host where the client is installed is not a node in the cluster, set the mapping between the host name and the IP address in the hostsfile on the node where the client locates. The host name and IP address must be in one-to-one mapping.
- Packaging Services has been performed and source.jar has been generated.
Procedure
- In security mode, perform security authentication first.
- Initialize client environment variables.
Go to the installation directory /opt/Storm_client, and run the following command to import environment variables:
source bigdata_env
- Use the developer account created in Preparing the Developer Account section for secure login.
Run the kinit command to log in with security mode as a human-machine user.
kinit Username
For example, run the following command:
kinit developuser
Enter a password as prompted. If no error message appears, the Kerberos authentication is completed for the user.
- Initialize client environment variables.
- Submit a topology. (Wordcount is used as an example. For details about other topologies, see related development guide.) Go to the Storm/storm-1.2.1/bin directory on the Streaming client, and run the storm jar /opt/jartarget/source.jar com.huawei.storm.example.wordcount.WordCountTopology command to submit the generated source.jar package. (If the package is generated on a Windows OS, upload the source.jar package to a specified directory on the Linux server, such as /opt/jartarget.)
- Run the storm list command to view the submitted applications. If the word-count application can be viewed, the task is submitted successfully.
If a service is set to the local mode and is submitted by using commands, ensure that the submitting environment is a normal one. Currently, services in local mode cannot be submitted by using commands in a security environment.
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