@Override public Guid guid() throws IOException { return Guid.fromStrings(toString()); }
@Override public String getStateStoreNameFromDatasetUrn(String datasetUrn) throws IOException { if (!this.sanitizedNameToDatasetURNMap.inverse().containsKey(datasetUrn)) { String guid = Guid.fromStrings(datasetUrn).toString(); this.sanitizedNameToDatasetURNMap.put(guid, datasetUrn); } return this.sanitizedNameToDatasetURNMap.inverse().get(datasetUrn); } }
/** * Generates a replicable guid to uniquely identify the origin of this {@link CopyableFile}. * @return a guid uniquely identifying the origin file. */ @Override public Guid guid() throws IOException { StringBuilder uniqueString = new StringBuilder(); uniqueString.append(getFileStatus().getModificationTime()); uniqueString.append(getFileStatus().getLen()); uniqueString.append(getFileStatus().getPath()); return Guid.fromStrings(uniqueString.toString()); }
throws IOException { for (String datasetUrn : datasetUrns) { String key = Guid.fromStrings(datasetUrn).toString(); if (!this.sanitizedNameToDatasetURNMap.containsKey(key)) { this.sanitizedNameToDatasetURNMap.put(key, datasetUrn);
private static void computeAndSetWorkUnitGuid(WorkUnit workUnit) throws IOException { Guid guid = Guid.fromStrings(workUnit.contains(ConfigurationKeys.CONVERTER_CLASSES_KEY) ? workUnit .getProp(ConfigurationKeys.CONVERTER_CLASSES_KEY) : ""); setWorkUnitGuid(workUnit, guid.append(deserializeCopyEntity(workUnit))); }