我已经构建了一个 parcel 和一个 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" ]
}
}
}
脚本/rexster.sh 提取
...
;;
(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