2010-08-04 3 views
2

이상한 문제가 있습니다. DistributedCache가 내 파일의 이름을 변경하는 것으로 보입니다. 원래 이름을 상위 폴더로 사용하고 하위 파일로 추가합니다.왜 DistributedCache가 내 파일 이름을 mangle합니까?

즉 폴더 \ 여기서 filename.ext 될 폴더 \ 여기서 filename.ext \ 여기서 filename.ext

모든 아이디어, 내 코드는 다음과 같습니다. 감사 Akintayo

String paramsLocation="/user/fwang/settings/ecgparams.txt"; 
DistributedCache.addCacheFile(new URI(paramsLocation), firstStageConf); 

Path[] paths = DistributedCache.getLocalCacheFiles(job); 
for (Path path: paths) { 
    if (path.getName().equals(ecgParamsFilename)) { 
    File f = new File(path.toString()); 
    if (f.exists()) { 
    ecgParamsFullFileName = f.getAbsolutePath(); 
    //this becomes /user/fwang/settings/ecgparams.txt/ecgparams.txt 
    } 
    } 
} 

업데이트 : 다음에 원래 통화를 교체 2010년 8월 16일 는 이름의 맹 글링을 중지합니다.

DistributedCache.addCacheArchive(new URI(ecgParamsLocation), firstStageConf); 

답변