MAPREDUCE服务 MRS-调测OpenTSDB应用:操作步骤

时间:2024-06-19 16:04:41

操作步骤

  1. 登录linux环境,创建运行OpenTSDB样例的工作目录,比如“/opt/opentsdb-example”,配置文件存放目录,比如“/opt/opentsdb-example/conf”,并编辑配置文件“/opt/opentsdb-example/conf/opentsdb.properties”使其对应于实际环境中的信息。

    mkdir -p /opt/opentsdb-example/conf
    [root@node-master1rLqO ~]# cat /opt/opentsdb-example/conf/opentsdb.properties
    tsd_hostname = node-ana-corejnWt
    tsd_port = 4242
    tsd_protocol = https

  2. 执行mvn package生成jar包,在工程目录target目录下获取,比如:opentsdb-examples-mrs-xxx-jar-with-dependencies.jar,其中mrs-xxx表示 MRS 的版本号,将获取的包上传到“/opt/opentsdb-example”目录下。
  3. 执行Jar包。

    加载环境变量。

    source /opt/client/bigdata_env

    认证集群用户(未启用kerberos的集群可跳过此步骤)。

    人机用户:kinit kerberos用户

    机机用户: kinit -kt 认证文件路径 kerberos用户

    运行opentsdb样例程序。
    java -cp /opt/opentsdb-example/conf:/opt/opentsdb-example/opentsdb-examples-mrs-xxx-jar-with-dependencies.jar com.huawei.bigdata.opentsdb.examples.OpentsdbExample

support.huaweicloud.com/devg-mrs/mrs_06_0376.html