Importing and Configuring Storm Sample Projects
Background
The installation directory of the Storm client contains a Storm development sample project. Import the sample project to Eclipse and start to learn the sample project.
Prerequisites
Ensure that the difference between the local PC time and the FusionInsight cluster time is less than 5 minutes. If the time difference cannot be determined, contact the system administrator. You can view time of the MRS cluster in the upper right corner on the MRS Manager page.
Procedure
- In the root directory of the Storm sample project, run the mvn install command to perform compilation.
- In the root directory of the Storm sample project, run the mvn eclipse:eclipse command to create an Eclipse project.
- In the application development environment, import the sample project to the Eclipse development environment.
- Choose File > Import > General > Existing Projects into Workspace > Next > Browse.
The Browse Folder dialog box is displayed.
- Select the sample project folder, and click Finish.
- Choose File > Import > General > Existing Projects into Workspace > Next > Browse.
- Set an Eclipse text file encoding format to prevent garbled characters.
- On the Eclipse menu bar, choose Window > Preferences.
The Preferences window is displayed.
- In the navigation tree, choose General > Workspace. In the Text file encoding area, select Other and set the value to UTF-8. Click Apply and then OK. Figure 1 shows the settings.
- On the Eclipse menu bar, choose Window > Preferences.
- If you submit a task to a cluster in the Windows environment, you need to map the cluster IP address to the local host file. Take Windows 7 as an example, the path is C:\Windows\System32\drivers\etc\hosts.
Assume that the cluster has three nodes: 10.1.131.131, 10.1.131.132, and 10.1.131.133.
Check whether the following information is configured in the hosts file.10.1.131.131 10-1-131-131 10.1.131.132 10-1-131-132 10.1.131.133 10-1-131-133
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