if (entity.getEntityType() != EntityType.PROCESS) {
return false;
}
try {
Process process = (Process) entity;
org.apache.falcon.entity.v0.cluster.Cluster clusterEntity =
ConfigurationStore.get().get(EntityType.CLUSTER, cluster);
Path bundlePath = EntityUtil.getLastCommittedStagingPath(clusterEntity, process);
if (bundlePath == null) {
return true;
}
Path checksum = new Path(bundlePath, EntityUtil.PROCESS_CHECKSUM_FILE);
Configuration conf = ClusterHelper.getConfiguration(clusterEntity);
FileSystem fs = HadoopClientFactory.get().createProxiedFileSystem(conf);
if (!fs.exists(checksum)) {
//Update if there is no checksum file(for migration)
return true;
}
Map<String, String> checksums = readChecksums(fs, checksum);
//Get checksum from user wf/lib
Map<String, String> wfPaths = checksumAndCopy(fs, new Path(process.getWorkflow().getPath()), null);
if (process.getWorkflow().getLib() != null) {
wfPaths.putAll(checksumAndCopy(fs, new Path(process.getWorkflow().getLib()), null));
}
//Update if the user wf/lib is updated i.e., if checksums are different
return !wfPaths.equals(checksums);
} catch (IOException e) {