You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Sergey Bartunov <sb...@gmail.com> on 2011/06/15 22:03:37 UTC

DistributedCache adds prefix to the file

Hello. I'm using DistributedCache at first time, and I have found that
it adds some prefixes to the files. For example, the original file was
"test.txt", it became "localhosttest.txt" in the cache.

How to handle such things? Just see if cache file ends with original filename?

Re: DistributedCache adds prefix to the file

Posted by Yaozhen Pan <it...@gmail.com>.
Hi,

I solved it by using absolute path of cache file.
The code looks like this:
*DistributedCache.addCacheFile(new
Path(strCacheFile).makeQualified(fs).toUri(), conf);*
*
*

On Thu, Jun 16, 2011 at 4:03 AM, Sergey Bartunov <sb...@gmail.com> wrote:

> Hello. I'm using DistributedCache at first time, and I have found that
> it adds some prefixes to the files. For example, the original file was
> "test.txt", it became "localhosttest.txt" in the cache.
>
> How to handle such things? Just see if cache file ends with original
> filename?
>