/** * Get the state (in the form of a {@link SourceState}) of a dataset identified by a dataset URN * of the previous job run. Useful when dataset state store is enabled and we want to load the latest * state of a global watermark dataset. * * @param datasetUrn the dataset URN * @return the dataset state (in the form of a {@link SourceState}) of the previous job run * or {@code null} if no previous dataset state is found for the given dataset URN */ public SourceState getPreviousDatasetState(String datasetUrn) { if (!this.previousDatasetStatesByUrns.containsKey(datasetUrn)) { return null; } return new ImmutableSourceState(this.previousDatasetStatesByUrns.get(datasetUrn)); }
/** * Get the state (in the form of a {@link SourceState}) of a dataset identified by a dataset URN * of the previous job run. Useful when dataset state store is enabled and we want to load the latest * state of a global watermark dataset. * * @param datasetUrn the dataset URN * @return the dataset state (in the form of a {@link SourceState}) of the previous job run * or {@code null} if no previous dataset state is found for the given dataset URN */ public SourceState getPreviousDatasetState(String datasetUrn) { if (!this.previousDatasetStatesByUrns.containsKey(datasetUrn)) { return null; } return new ImmutableSourceState(this.previousDatasetStatesByUrns.get(datasetUrn)); }