Preparing a Hive HCatalog Development Environment
To run the HCatalog API sample code of Hive, you need to perform the following operations.
The following example develops an application that uses HCatalog to connect to Hive in the Windows environment.
Procedure
- Obtain the Hive sample project by referring to Obtaining the MRS Application Development Sample Project.
- In the root directory of the Hive sample project, run the mvn install command to perform compilation.
- In the root directory of the Hive 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.
- After downloading the project, select the hive-examples folder, as shown in Figure 1. On Windows, the folder path cannot contain any space.
Click Finish.
After successful import, the HCatalogExample class in com.huawei.bigdata.hive.example is the HCatalog API sample code.
- 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 2 shows the settings.
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