Add storage dir and eviction strategy [TACHYON-33][SubTask 2 & 3]

resubmitted for PR361, rebase to current master.
Don't get the statement.  Register returns the object pasted in, so ist
common to assign the variable from the output of register
On Sep 3, 2014 12:48 AM, "shimingfei" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/worker/hierarchy/StorageDir.java:
>
> > +   * Copy block from current StorageDir to another
> > +   *
> > +   * @param blockId
> > +   *          id of the block
> > +   * @param dstDir
> > +   *          destination StorageDir
> > +   * @return true if success, false otherwise
> > +   * @throws IOException
> > +   */
> > +  public boolean copyBlock(long blockId, StorageDir dstDir) throws IOException {
> > +    int len = (int) getBlockSize(blockId);
> > +    boolean copySuccess = false;
> > +    Closer closer = Closer.create();
> > +    try {
> > +      BlockHandler bhSrc = getBlockHandler(blockId);
> > +      closer.register(bhSrc);
>
> @dcapwell <https://github.com/dcapwell>
> it can't be rewrite as above, because closer is called in finally.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/411/files#r17035264>.
>