Updated on 2022-08-16 GMT+08:00

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

  1. 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 Storm 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.)
  2. 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.