Establish Connections
Function
Create a KuduClient object using the KuduClient.KuduClientBuilder(KUDU_MASTERS).build() method. The input parameter KUDU_MASTERS indicates the master address list of the Kudu cluster. If there are multiple master nodes, separate them with commas (,).
Sample Code
The following is a code snippet for establishing a connection:
// Create the Kudu connection object. KuduClient client = new KuduClient.KuduClientBuilder(KUDU_MASTERS).build();
In the sample code, KUDU_MASTERS indicates the masters address list of the Kudu cluster, for example, 192.168.0.100:7051, 192.168.0.101:7051, 192.168.0.102:7051. The format is address:port number. Use commas (,) to separate different addresses. The persistent connection object is recommended for production.
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