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`.
But as was agreed, client will no longer use this code base, so this won't
be needed here.
On Oct 20, 2014 12:08 AM, "shimingfei" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/worker/hierarchy/StorageDir.java:
>
> > -   * @param blockId Id of the block
> > -   * @return true if success, false otherwise
> > -   * @throws IOException
> > -   */
> > -  public boolean cacheBlock(long userId, long blockId) throws IOException {
> > -    String srcPath = getUserTempFilePath(userId, blockId);
> > -    String dstPath = getBlockFilePath(blockId);
> > -    long blockSize = mFs.getFileSize(srcPath);
> > -    boolean result = mFs.rename(srcPath, dstPath);
> > -    if (result) {
> > -      addBlockId(blockId, blockSize);
> > -    }
> > -    return result;
> > -  }
> > +//  /**
> > +//   * Move the cached block file from user temporary directory to data directory
>
> after client write block file to the temp folder, it calls cachBlock to
> let worker move block file from temp folder to data folder
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/461/files#r19070322>.
>