long time = System.currentTimeMillis();
metadata = directoryService.getMetadata(path);
Statistics.incGetMeta(System.currentTimeMillis() - time);
isInPNS = false;
} catch (DirectoryServiceException e) {
throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
}
}
}else{
try {
long time = System.currentTimeMillis();
metadata = directoryService.getMetadata(path);
Statistics.incGetMeta(System.currentTimeMillis() - time);
} catch (DirectoryServiceException e) {
throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
}
}
if(metadata.getStats().getNlink() == 1)
daS.deleteData(metadata.getId_path());
try {
if(!config.isNonSharing() && isInPNS){
namespace.removeMetadata(path);
}else{
long time = System.currentTimeMillis();
directoryService.removeMetadata(path);
Statistics.incDelMeta(System.currentTimeMillis()-time);
}
} catch (DirectoryServiceConnectionProblemException e) {
throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
} catch (DirectoryServiceException e) {
e.printStackTrace();
throw new FuseException(e.getMessage()).initErrno(FuseException.ECONNABORTED);
}
return 0;
}