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

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

                Author: ASF GitHub Bot
            Created on: 19/Apr/24 23:26
            Start Date: 19/Apr/24 23:26
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3931:
URL: https://github.com/apache/gobblin/pull/3931#discussion_r1573050980


##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinClusterUtils.java:
##########
@@ -131,6 +131,9 @@ public static String getHostname() throws 
UnknownHostException {
    */
   public static Path getAppWorkDirPathFromConfig(Config config, FileSystem fs,
       String applicationName, String applicationId) {
+    if 
(config.hasPath(GobblinClusterConfigurationKeys.CLUSTER_EXACT_WORK_DIR)) {
+      return new Path(new Path(fs.getUri()), 
config.getString(GobblinClusterConfigurationKeys.CLUSTER_EXACT_WORK_DIR));
+    }
     if (config.hasPath(GobblinClusterConfigurationKeys.CLUSTER_WORK_DIR)) {
       return new Path(new Path(fs.getUri()), 
PathUtils.combinePaths(config.getString(GobblinClusterConfigurationKeys.CLUSTER_WORK_DIR),

Review Comment:
   nit: this feels clearer:
   ```
   if (X) {
     return A;
   } else if (Y) {
     return B;
   } else {
     return C;
   }
   ```
   
   vs.
   ```
   if (X) {
     return A;
   }
   if (Y) {
     return B;
   }
   return C;
   ```





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

    Worklog Id:     (was: 915642)
    Time Spent: 1h 50m  (was: 1h 40m)

> Allow configurable token file paths and cluster work directories to allow for 
> easy cleanup after yarn app closes
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-2050
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2050
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: William Lo
>            Priority: Major
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Gobblin Yarn Application Launcher has some issues where directories used for 
> the job can persist after the job ends. It also creates a number of temporary 
> files which can grow out of control.
> We want to be able to:
> 1. Clean up directories effectively
> 2. Use explicit paths to allow for consolidation of temp files to be under 
> the same folder for token renewal and cluster work files.



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

Reply via email to