[
https://issues.apache.org/jira/browse/KUDU-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179289#comment-15179289
]
Todd Lipcon commented on KUDU-1364:
-----------------------------------
Agreed, we shouldn't reset the cache for a "normal" disconnection.
I started some work here: http://gerrit.cloudera.org:8080/#/c/1494/ which makes
the server send a 'GO_AWAY' message to the client before disconnecting it due
to idle-ness. That would help, I think, but in the meantime doing what Binglin
suggests makes the most sense.
> By default, java client only caches tablet locations for 5 seconds of
> inactivity
> --------------------------------------------------------------------------------
>
> Key: KUDU-1364
> URL: https://issues.apache.org/jira/browse/KUDU-1364
> Project: Kudu
> Issue Type: Bug
> Components: client
> Affects Versions: 0.7.0
> Reporter: Mike Percy
>
> Reported by [~bruceSz] and [~decster].
> When using the Java client, the tablet locations will only be cached for 5
> seconds of inactivity before another call to the master is required. This is
> related to the "socket read timeout" parameter.
> Per Binglin:
> this was "annoying" issue we experienced too :) actually I think it should
> handle this timeout as normal case(cause master just kicks out idle
> connection) should not consider this error(and invalidate caches)
> Workaround:
> {code}
> client = builder
> .defaultSocketReadTimeoutMs(xxxx)
> .build();
> {code}
> From the docs:
> {code}org.kududb.client.AsyncKuduClient.AsyncKuduClientBuilder.defaultSocketReadTimeoutMs(long
> timeoutMs){code}
> Sets the default timeout to use when waiting on data from a socket. Optional.
> If not provided, defaults to 5s. A value of 0 disables the timeout.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)