All,

I cannot confirm if this is an issue with my code / usage or if I am actually 
running into a framework issue. I just ran a job that uses the exact same 
method and it works perfectly which makes me think I am missing something minor.

I have Tool implemented for my main class and I am using -files on the command 
line to pass it a local URI. I use the code below to access the file in the 
setup method of the mapper:

...
    try{
      Path[] cacheFiles = 
DistributedCache.getLocalCacheFiles(context.getConfiguration());
      if (cacheFiles != null && cacheFiles.length > 0){
        System.out.println("Reading data from DistributedCache: " + 
cacheFiles[0].toString() + "\n");

        FileSystem fs = FileSystem.get(context.getConfiguration());
        FSDataInputStream scoresInputStream = fs.open(cacheFiles[0]);
...

The only thing I can think of is the file size is substantially different (6MB 
vs 90MB) but with the network backend we have it should be less than a 2 second 
difference between the file being there or not. Is it possible that the file 
has not propagated by the time it is attempted to be accessed and are there 
hooks in there to not start until files have been fully distributed?

Matt
This e-mail message may contain privileged and/or confidential information, and 
is intended to be received only by persons entitled
to receive such information. If you have received this e-mail in error, please 
notify the sender immediately. Please delete it and
all attachments from any servers, hard drives or any other media. Other use of 
this e-mail by you is strictly prohibited.

All e-mails and attachments sent and received are subject to monitoring, 
reading and archival by Monsanto, including its
subsidiaries. The recipient of this e-mail is solely responsible for checking 
for the presence of "Viruses" or other "Malware".
Monsanto, along with its subsidiaries, accepts no liability for any damage 
caused by any such code transmitted by or accompanying
this e-mail or any attachment.


The information contained in this email may be subject to the export control 
laws and regulations of the United States, potentially
including but not limited to the Export Administration Regulations (EAR) and 
sanctions regulations issued by the U.S. Department of
Treasury, Office of Foreign Asset Controls (OFAC).  As a recipient of this 
information you are obligated to comply with all
applicable U.S. export laws and regulations.

Reply via email to