Commissioning an OpenTSDB Application
Scenario
You can run applications in the Windows development environment after application code is developed.
Procedure
- Configure a mapping between the cluster IP address and host name on Windows. Log in to the cluster background, run the cat /etc/hosts command, and copy the mapping between IP addresses and host names in the hosts file to C:\Windows\System32\drivers\etc\hosts.
xx.xx.xx.xx node-ana-corejnWt xx.xx.xx.xx node-ana-coreddlI
You can use either of the following method to access an MRS cluster to operate OpenTSDB on Windows.
- Apply for a Windows ECS to access the MRS cluster to operate OpenTSDB. Run the sample code after the development environment is installed. To apply for ECS to access the MRS cluster, perform the following steps:
- On the Active Clusters page, click the name of an existing cluster.
On the cluster details page, record the AZ, VPC, Cluster Manager IP Address of the cluster, and Default Security Group of the Master node.
- On the ECS management console, create a new 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 Elastic Cloud Server > Quick Start > Purchasing and Logging In to a Windows ECS.
- On the Active Clusters page, click the name of an existing cluster.
- Use the local host to access the MRS cluster to operate OpenTSDB. Bind an EIP to the TSD instance that OpenTSDB in the MRS cluster accesses. When configuring the mapping between the IP address and host name of the cluster on the local Windows host, replace the IP address with the EIP corresponding to the host name. Run the sample code. To bind an EIP, perform the following steps:
- Apply for a Windows ECS to access the MRS cluster to operate OpenTSDB. Run the sample code after the development environment is installed. To apply for ECS to access the MRS cluster, perform the following steps:
- Copy the /opt/Bigdata/jdk1.8.0_212/jre/lib/security/cacerts file on the master node in the cluster to the JDK directory on Windows, for example, C:\Program Files\Java\jdk1.8.0_73\jre\lib\security.
- Modify related configurations. Modify the opentsdb.properties file in the resources directory of the sample project and configure the OpenTSDB properties.
tsd_hostname = node-ana-corejnWt tsd_port = 4242 tsd_protocol = https
- tsd_hostname: name of the connected TSD instance host for accessing OpenTSDB
- tsd_port: port for accessing OpenTSDB. The default port number is 4242.
- tsd_protocol: request protocol for accessing OpenTSDB. The default value is https.
- Run the sample project.
In the development environment (for example, Eclipse), right-click OpentsdbExample.java and choose
from the shortcut menu to run the corresponding application project.
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