in src/main/java/com/netflix/bdp/s3mper/listing/ConsistentListingAspect.java [193:236]
public Object metastoreUpdate(final ProceedingJoinPoint pjp) throws Throwable {
if(disabled) {
return pjp.proceed();
}
Configuration conf = ((FileSystem) pjp.getTarget()).getConf();
updateConfig(conf);
Object result = pjp.proceed();
Path path = null;
if (result instanceof Boolean && !((Boolean) result)) {
return result;
}
try {
//Locate the path parameter in the arguments
for (Object arg : pjp.getArgs()) {
if (arg instanceof Path) {
path = (Path) arg;
break;
}
}
metastore.add(path, trackDirectories && pjp.getSignature().getName().contains("mkdir"));
} catch (TimeoutException t) {
log.error("Timeout occurred adding path to metastore: " + path, t);
alertDispatcher.timeout("metastoreUpdate", Collections.singletonList(path));
if(failOnTimeout) {
throw t;
}
} catch (Exception e) {
log.error("Failed to add path to metastore: " + path, e);
if(shouldFail(conf)) {
throw e;
}
}
return result;
}