[TACHYON-115] Share client threads

Use a fixed threadpool per file system for the heartbeat threads.  
Can you add more details to the JIRA?
On Sep 26, 2014 9:39 PM, "Haoyuan Li" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/client/TachyonFS.java:
>
> > @@ -129,8 +133,12 @@ private TachyonFS(InetSocketAddress masterAddress, boolean zookeeperMode) throws
> >      mZookeeperMode = zookeeperMode;
> >      mAvailableSpaceBytes = 0L;
> >
> > -    mMasterClient = new MasterClient(mMasterAddress, mZookeeperMode);
> > -    mWorkerClient = new WorkerClient(mMasterClient);
> > +    mExecutorService = Executors.newFixedThreadPool(2,
> > +        new ThreadFactoryBuilder().setDaemon(true)
> > +            .setNameFormat("heartbeat-client-" + masterAddress + "-%d").build());
> > +
> > +    mMasterClient = new MasterClient(mMasterAddress, mZookeeperMode, mExecutorService);
>
> This one. https://tachyon.atlassian.net/browse/TACHYON-168
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/399/files#r18121917>.
>