[Java] KUDU-3498 Scanner keeps alive in periodically

Kudu caches the scanner in the tablet server for continuing
reading. It will be expired if the idle time is over the defined
scanner ttl time. Sometimes the client reads a batch of data,
if the data is every large, it takes a long time to handle it.
Then the client reads the next batch using the same scanner, the
scanner will be expired even if it has sent a keep alive request.

This patch adds support for keeping a scanner alive periodically.
It uses a timer to send keep alive requests background. So,
it will never be expired when the scanner is in using.

Change-Id: I50648e987b72aead472a20ff4336e3e7f23d8e06
Reviewed-on: http://gerrit.cloudera.org:8080/20761
Reviewed-by: Yifan Zhang <chinazhangyifan@163.com>
Tested-by: Yifan Zhang <chinazhangyifan@163.com>
3 files changed