Refactor storage dir

I propose that we make `StorageDir` the entry point and drop `BlockHandler`.  The core reasons for this are that:

`BlockHandler` is the same thing as java's `Channel`.  Easier to use one std convention than create a new one.
`StorageDir` is the main entry point anyways, since the path is relative to the tier, so `BlockHandler` can't be the gateway since it's path depends on the `StorageDir`.
No, it will know the path.  There are different and faster ways to access
ssd and HDD , so limiting ourselves isn't a good idea.

Second, from the network level, blocking APIs are a big problem for me.  To
use the current design requires that we put all access to tired storage in
its own thread pool.  The more threads we put in there, the slower on the
whole tachyon gets.  This means the server layer must think hard about
every thread it uses.

I can let tired storage in its own thread pool short term, but it has to be
written in a network friendly manner long term.
On Oct 21, 2014 10:06 PM, "shimingfei" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/worker/hierarchy/StorageDir.java:
>
> > @@ -571,4 +566,14 @@ public boolean unlockBlock(long blockId, long userId) {
> >      mLockedBlocksPerUser.remove(userId, blockId);
> >      return true;
> >    }
> > +
> > +  public boolean addBlock(long blockId) {
> > +    File path = new File(getBlockFilePath(blockId));
>
> After initialization, StorageDir will know what file system it is on by
> checking the TachyonURI of the StorageDir
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/461/files#r19194568>.
>