This is an automated email from the ASF dual-hosted git repository.

lesun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new c05416e  [GOBBLIN-1550] Add dataset.root in 
ConfigurableCleanableDataset (#3400)
c05416e is described below

commit c05416eb3cfbff887ffb13fa253f0b476bd6eb2f
Author: Arjun Singh Bora <[email protected]>
AuthorDate: Wed Sep 22 13:37:55 2021 -0700

    [GOBBLIN-1550] Add dataset.root in ConfigurableCleanableDataset (#3400)
    
    * add dataset.root in a couple of dataset finders
    
    * address review comments
---
 .../retention/profile/ManagedCleanableDatasetFinder.java         | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/profile/ManagedCleanableDatasetFinder.java
 
b/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/profile/ManagedCleanableDatasetFinder.java
index a4c9910..26fd400 100644
--- 
a/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/profile/ManagedCleanableDatasetFinder.java
+++ 
b/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/profile/ManagedCleanableDatasetFinder.java
@@ -35,6 +35,7 @@ import 
org.apache.gobblin.config.store.api.ConfigStoreCreationException;
 import org.apache.gobblin.config.store.api.VersionDoesNotExistException;
 import org.apache.gobblin.configuration.ConfigurationKeys;
 import 
org.apache.gobblin.data.management.retention.dataset.ConfigurableCleanableDataset;
+import org.apache.gobblin.data.management.retention.dataset.FsCleanableHelper;
 import org.apache.gobblin.data.management.version.FileSystemDatasetVersion;
 
 
@@ -57,10 +58,14 @@ public class ManagedCleanableDatasetFinder
 
   @Override
   public ConfigurableCleanableDataset<FileSystemDatasetVersion> 
datasetAtPath(Path path) throws IOException {
+    Properties datasetProps = new Properties();
+    datasetProps.putAll(this.props);
+    datasetProps.setProperty(FsCleanableHelper.RETENTION_DATASET_ROOT, 
path.toString());
+
     try {
-      return new ConfigurableCleanableDataset<>(this.fs, this.props, path,
+      return new ConfigurableCleanableDataset<>(this.fs, datasetProps, path,
           this.client
-              
.getConfig(this.props.getProperty(ConfigurationKeys.CONFIG_MANAGEMENT_STORE_URI)
 + path.toString()),
+              
.getConfig(this.props.getProperty(ConfigurationKeys.CONFIG_MANAGEMENT_STORE_URI)
 + path),
           LoggerFactory.getLogger(ConfigurableCleanableDataset.class));
     } catch (VersionDoesNotExistException | 
ConfigStoreFactoryDoesNotExistsException | ConfigStoreCreationException
         | URISyntaxException e) {

Reply via email to