Modify  TachyonWorker Heartbeat sleeping to ScheduledExecutorService 

TachyonWorker's heartbeat thread is sleeping several milliseconds . 
JDK API ScheduledExecutorService's scheduleAtFixedRate method running a task after initial delay and subsequently with the given period. It's more fit for the heartbeat task .
And a TODO : split heartbeat thread into another class.
thanks 
Can you explain why it's better to run at fixed rates?
On Oct 6, 2014 9:15 PM, "yaphet" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/worker/TachyonWorker.java:
>
> >    }
> >
> >    /**
> >     * Start the data server thread and heartbeat thread of this TachyonWorker.
> >     */
> >    public void start() {
> > -    mHeartbeatThread.start();
> > +    mHeartbeatService.scheduleWithFixedDelay(this, 0, WorkerConf.get().TO_MASTER_HEARTBEAT_INTERVAL_MS,
>
> schedule method will sleep fixed interval between heartbeats .
> scheduleAtFixedRate is better
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/448/files#r18499821>.
>