Help Center/
MapReduce Service/
Developer Guide (Normal_Earlier Than 3.x)/
Spark Development Guide/
FAQs About Spark Application Development/
How Do I Add a Dependency Package with Customized Codes?
Updated on 2024-08-16 GMT+08:00
How Do I Add a Dependency Package with Customized Codes?
Question
When developing Spark applications, I can add customized dependency packages except for the sample application. How do I use the IDEA to add the dependency package with customized codes to the project?
Answer
- On the IDEA homepage, choose Project Structure page. to go to the
- Click the Libraries tab. On the page that is displayed, click + to add a local dependency package.
Figure 1 Adding the dependency package.
- Click Apply to load the dependency package and click OK.
- Because there is no custom dependency package in the running environment, you also need to add this dependency package when compiling the package, so that the generated JAR file contains the custom dependency package, ensuring that the Spark application can run properly.
- On the Project Structure page, click the Artifacts tab.
- In the pane on the right, click + and choose Library Files to add a dependency package.
Figure 2 Adding library files
- Select the dependency package that you want to add and click OK.
Figure 3 Choosing the library
- Click Apply to load the dependency package and click OK.
Parent topic: FAQs About Spark Application Development
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot