[ 
https://issues.apache.org/jira/browse/GOBBLIN-1785?focusedWorklogId=857470&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-857470
 ]

ASF GitHub Bot logged work on GOBBLIN-1785:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Apr/23 20:52
            Start Date: 17/Apr/23 20:52
    Worklog Time Spent: 10m 
      Work Description: arjun4084346 commented on code in PR #3642:
URL: https://github.com/apache/gobblin/pull/3642#discussion_r1169256081


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRJobLauncher.java:
##########
@@ -228,8 +231,17 @@ public MRJobLauncher(Properties jobProps, Configuration 
conf, SharedResourcesBro
       this.fs.delete(this.mrJobDir, true);
     }
     this.unsharedJarsDir = new Path(this.mrJobDir, JARS_DIR_NAME);
-    this.jarsDir = this.jobProps.containsKey(ConfigurationKeys.MR_JARS_DIR) ? 
new Path(
-        this.jobProps.getProperty(ConfigurationKeys.MR_JARS_DIR)) : 
this.unsharedJarsDir;
+
+    if (this.jobProps.containsKey(ConfigurationKeys.MR_JARS_BASE_DIR)) {
+      Path jarsBaseDir = new 
Path(this.jobProps.getProperty(ConfigurationKeys.MR_JARS_BASE_DIR));
+      String monthSuffix = new 
SimpleDateFormat("yyyy-MM").format(System.currentTimeMillis());
+      cleanUpOldJarsDirIfRequired(this.fs, jarsBaseDir);
+      this.jarsDir = new Path(jarsBaseDir, monthSuffix);
+    } else {

Review Comment:
   That looks better, just wanted to make minimal changes to show in a diff to 
the reviewer :D 





Issue Time Tracking
-------------------

    Worklog Id:     (was: 857470)
    Time Spent: 20m  (was: 10m)

> retention on mr jars dir
> ------------------------
>
>                 Key: GOBBLIN-1785
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1785
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to