Updated on 2022-06-01 GMT+08:00

Submitting a Topology When a Client Is Installed on a Linux OS

Scenario

Storm applications can run only on Linux, but not on Windows.

You can use storm commands to submit topologies in a Linux environment.

Prerequisites

  • You have installed a Storm client.
  • If the host where the client is installed is not a node in the cluster, the mapping between the host name and the IP address must be set in the hosts file on the node where the client locates. The host names and IP addresses must be mapped one by one.
  • Generate the JAR Package of the Sample Code has been performed and storm-examples-1.0.jar has been generated and stored in /opt/jartarget/.

Procedure

  1. Perform security authentication in security mode. For details, see Preparing the Linux Client.
  2. Submit a topology. (Wordcount is used as an example. For details about other topologies, see the related development guidelines.) Go to the storm-0.10.0/bin directory on the Storm client, and run the storm jar /opt/jartarget/storm-examples-1.0.jar com.huawei.storm.example.wordcount.WordCountTopology command.
  3. 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.