in myriad-scheduler/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MyriadFileSystemRMStateStore.java [126:136]
protected void reflectedUpdateFile(Path outputPath, byte[] data) throws InvocationTargetException, IllegalAccessException {
Class<?> [] parameters = updateFileMethod.getParameterTypes();
if (parameters.length == 2 && parameters[0].equals(Path.class) && parameters[1].isArray()) {
updateFileMethod.invoke(this, outputPath, data);
} else if (parameters.length == 3 && parameters[0].equals(Path.class) && parameters[1].isArray() && parameters[2].isPrimitive()) {
updateFileMethod.invoke(this, outputPath, data, true);
} else {
//something is broken
throw new RuntimeException("updateFile Method has unexpected parameters");
}
}