需要增加MapReduce作业的协商超时。
我尝试设置以下属性:
Configuration conf = new Configuration();
conf.set("zk.connectiontimeout.ms", "60000");
但这并没有帮助。仍然继续得到下面给出的消息。我如何以编程方式更改此值?
这里有消息:
15/03/27 11:46:40 INFO zookeeper.ClientCnxn:服务器上的会话建立完成,sessionid = 0x14bxxbbf2c9e,协商超时= 30000
答案 0 :(得分:1)
ZooKeeper配置仅在ZooKeeper服务器启动时使用。在它们已经运行之后你就无法改变它们。
答案 1 :(得分:0)
您可以在zookeeper配置中设置ticktime。 @path ZooKeeper / conf编辑配置文件 默认情况下,ticktime = 2000 您可以更改ticktime并重新启动zookeeper服务..
Here are detail configuration parameters :
#The number of milliseconds of each tick
tickTime=5000
#The number of ticks that the initial
#synchronization phase can take
initLimit=10
#The number of ticks that can pass between
#sending a request and getting an acknowledgement
syncLimit=5
#the directory where the snapshot is stored.
dataDir=/tmp/zookeep`
#the port at which the clients will connect
clientPort=2181