Commissioning Applications on Windows
- Run the sample project.
After importing and modifying the sample, right-click ExampleMain.java in the development environment and choose ExampleMain.main() to run the corresponding application project.
You can use either of the following method to access an MRS cluster to operate Impala on Windows.
Method 1: Apply for a Windows ECS to access the MRS cluster to operate Impala. Run the sample code after the development environment is installed.
- On the Active Clusters page, click the name of an existing cluster.
On the cluster details page, record the AZ, VPC, and Default Security Group of the Master node.
- On the ECS management console, create a ECS.
The AZ, VPC, and security group of ECS must be the same as those of the cluster to be accessed.
Select a Windows public image.
For details about other configuration parameters, see Purchasing an ECS.
Method 2: Use the local host to access the MRS cluster to operate Impala. After installing the development environment and completing the following steps, run the sample code.
Bind an EIP address to any Core node. Then, configure the IP address in the impala-server configuration item in the client.properties file of the development sample to access the Impala service and submit SQL statements.- On the ECS page, apply for an EIP and bind it to the ECS. For details, see Assigning an EIP and Binding It to an ECS.
- Open security group rules for the MRS cluster. Add security group rules to the security groups of Master and Core nodes in the cluster so that the ECS can access the cluster. For details, see Configuring Security Group Rules.
The client.properties configuration in the sample is as follows:
impala-server = XX.XX.XX.XX:21050 ## Specifies the service address bound to the Core node where the Impalad instance to be connected is located. If method 2 is used, enter the EIP bound in step 1.
- On the Active Clusters page, click the name of an existing cluster.
- View the execution result.
View the Impala SQL query results in the sample code. If the following information is displayed, the execution is successful.
Running ExampleMain and viewing resultsCreate table success! _c0 0 Delete table success!
If the sample running fails, the following information is displayed:
Error running 'ExampleMain': Command line is too long. Shorten command line for ServiceStarter or also for Application default configuration.
Solution:
In Intellij, set shorten command line in Edit Configurations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.