Configuring and Importing a Sample Projects
Scenario
To run the JDBC API sample code of Impala, you need to perform the following operations.
The following example develops an application that uses JDBC to connect to Impala in the Windows environment.
Procedure
- Obtain the Impala sample project. For details, see Obtaining the MRS Application Development Sample Project.
- In the impala-examples-normal folder of the root directory of the Impala example project, open the cmd window and run the mvn install command to perform compilation.
- In the impala-examples-normal folder of the root directory of the Impala example project, open the cmd window and run the mvn idea:idea command to create an IntelliJ IDEA project.
- Import the sample project to the IntelliJ IDEA development environment.
- Run IntelliJ IDEA and choose File > Open.
- In the Open File or Project dialog box, select the Impala sample project folder and click OK.
After the folder is imported, the JDBCExample class in the com.huawei.bigdata.impala.example folder is the JDBC API sample code.
- Set the IntelliJ IDEA text file coding format to prevent garbled characters.
- On the IntelliJ IDEA menu bar, choose File > Settings.
- Choose Editor > File Encodings from the navigation tree of the Settings window. In the "Global Encoding" and "Project Encodings" area, set the value to UTF-8, click Apply, and click OK, as shown in Figure 1.
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