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 
Maybe I don't see what you are saying.

The way I read the above is that you send a task to fixed and vary the next
run based off time to send heart beat?  Don't think the scheduled future
gives you this control so you would need to recursively schedule the task.
On Oct 6, 2014 9:56 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,
>
> scheduleAtFixedRate could include heartbeat running time in sleeping
> interval :)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/448/files#r18500487>.
>