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 
Don't think we should create a new abstraction for this.  IMO the heartbeat
process needs to be relocked at and simplified.
On Oct 6, 2014 8:59 AM, "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,
>
> you mean mMasterInfo.init() in TachyonMaster ? In HeartbeatThread's run
> function sleeping a small interval . Maybe should create a abstract
> heartbeat service for both master and worker ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/448/files#r18465548>.
>