You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2016/03/03 16:59:18 UTC

[jira] [Commented] (KUDU-1364) By default, java client only caches tablet locations for 5 seconds of inactivity

    [ https://issues.apache.org/jira/browse/KUDU-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15178006#comment-15178006 ] 

Jean-Daniel Cryans commented on KUDU-1364:
------------------------------------------

So the Java client tries to be "smart" about clearing up the cache. When we get disconnected from a tablet server, we also remove that tablet server from the cache. One way that's done is with that 5 seconds timeout.

Even if there was no timeout on the client side, the server side still disconnects clients after 10 seconds, which in the Java client would have the same effect.

So, the questions are: is 5 seconds too short and 10 seconds' better? Or should we not clear the cache when we get disconnected from a server?

> 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)