在 MapReduce 作业中增加 ZooKeeper 协商超时

Increase ZooKeeper negotiated timeout in a MapReduce job

需要增加我的 MapReduce 作业的协商超时。

我尝试设置如下 属性:

Configuration conf = new Configuration();
conf.set("zk.connectiontimeout.ms", "60000");

但这并没有帮助。仍然不断收到下面给出的消息。如何以编程方式更改此值?

消息如下:

15/03/27 11:46:40 信息 zookeeper.ClientCnxn:服务器上的会话建立完成,sessionid = 0x14bxxbbf2c9e,协商超时 = 30000

ZooKeeper 配置仅在 ZooKeeper 服务器启动时使用。在它们已经 运行.

之后,您将无法更改它们

您可以在 zookeeper 配置中设置 ticktime。 @pathZooKeeper/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