Cloudera Parcel:Stoprunner没有执行

时间:2015-02-26 10:24:55

标签: cloudera cloudera-cdh cloudera-manager

我已经构建了一个parcel和一个csd,它们在部署到集群时可以很好地工作。

但是,当我停止服务时,启动脚本启动的子进程会继续在后台运行。

我尝试过很多东西,但我回到了更“野蛮”的东西。

CSD摘录

 "startRunner" : {
         "program" : "scripts/rexster.sh",
         "args" : [ "start" ],
         "environmentVariables" : {
                    "CONF_FILE" : "${conf_file}",
                    "REXSTER_PORT" : "${rexster_port}",
                    "HBASE_ZK" : "${hbase_zk_quorum}",
                    "REXSTER_SHUTDOWN_PORT" : "${rexster_shutdown_port}",
                    "HBASE_TABLE_NAME" : "${hbase_tablename}",
                    "MEM_XMX" : "${memory_xmx}",
                    "MEM_XMS" : "${memory_xms}"
                  }
        },

       "stopRunner" : {
          "relevantRoleTypes" : ["TITAN_REXTER_SERVER"],
          "runner" : {
            "program" : "scripts/rexster.sh",
            "args" : [ "stop" ]
            }
          }
      }

scripts / rexster.sh extract

...
    ;;
  (stop)
    echo "Stopping rexster"
    exec kill -9 `ps aux | grep java | grep titan | awk '{print $2}'`
#    exec stopRexster.sh $TITAN_HOME
    ;;
  (*)
    echo "Don't understand [$CMD]"
    ;;
esac

但是这个过程一直在后台运行:

usr/java/jdk1.7.0_67-cloudera/bin/java -server -Xms128m -Xmx512m -Dtitan.logdir=../log com.tinkerpop.rexster.Application -s -c /opt/cloudera/parcels/TITAN-1.0/lib/titan-0.5.2-hadoop2-CDH5.3/conf/rexster-hbase.xml

1 个答案:

答案 0 :(得分:0)

止动器没有正确放置。 在角色定义之后,它是按角色定义的。

 <...ROLE...>}]
,
     "stopRunner" : {
     "masterRole":"TITAN_REXTER_SERVER",
     "relevantRoleTypes" : ["TITAN_REXTER_SERVER"],
     "runner" : {
            "program" : "scripts/rexster.sh",
            "args" : [ "stop" ],
            "environmentVariables" : {
                "CONF_FILE" : "${conf_file}",
                "REXSTER_PORT" : "${rexster_port}",
                "HBASE_ZK" : "${hbase_zk_quorum}",
                "REXSTER_SHUTDOWN_PORT" : "${rexster_shutdown_port}",
                "HBASE_TABLE_NAME" : "${hbase_tablename}"
            }
        }
       }