[
https://issues.apache.org/jira/browse/ZOOKEEPER-2022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113562#comment-14113562
]
Rakesh R commented on ZOOKEEPER-2022:
-------------------------------------
Following is one sample case where it negotiated and reduced the session
timeout to (ticktime * 20) , 2000 * 20 = 40000.
In the client logs, first and last lines gives the info about the proposed and
negotiated timeout values. Is that sufficient for you?
{code}
2014-08-28 14:24:16,770 [myid:] - INFO [main:ZooKeeper@709] - Initiating
client connection, connectString=10.18.40.105:2183 sessionTimeout=90000
watcher=org.apache.zookeeper.TestClient$1@17494c8
2014-08-28 14:24:16,791 [myid:] - INFO
[main-SendThread(10.18.40.105:2183):ClientCnxn$SendThread@1093] - Opening
socket connection to server 10.18.40.105/10.18.40.105:2183. Will not attempt to
authenticate using SASL (java.lang.SecurityException: Unable to locate a login
configuration)
2014-08-28 14:24:16,795 [myid:] - INFO
[main-SendThread(10.18.40.105:2183):ClientCnxn$SendThread@963] - Socket
connection established to 10.18.40.105/10.18.40.105:2183, initiating session
2014-08-28 14:24:16,882 [myid:] - INFO
[main-SendThread(10.18.40.105:2183):ClientCnxn$SendThread@1346] - Session
establishment complete on server 10.18.40.105/10.18.40.105:2183, sessionid =
0x1481d05a03e0000, negotiated timeout = 40000
{code}
> The log of sessionTimeout is inaccurate
> ---------------------------------------
>
> Key: ZOOKEEPER-2022
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2022
> Project: ZooKeeper
> Issue Type: Improvement
> Components: java client
> Reporter: chendihao
> Priority: Minor
>
> When the client constructs ZooKeeper object, it will record the basic info in
> log. But its sessionTimeout may be inaccurate if it's not equal to
> negotiationSessionTimeout. Can we change the description of this info?
> {code:java}
> public ZooKeeper(String connectString, int sessionTimeout, Watcher
> watcher)
> throws IOException
> {
> LOG.info("Initiating client connection, connectString=" +
> connectString
> + " sessionTimeout=" + sessionTimeout + " watcher=" +
> watcher);
> watchManager.defaultWatcher = watcher;
> cnxn = new ClientCnxn(connectString, sessionTimeout, this,
> watchManager);
> cnxn.start();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)