You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/06/19 21:52:26 UTC

[GitHub] [incubator-gobblin] aryavaibhav93 opened a new pull request #3050: [GOBBLIN-10948] Adding configurations for staging directory in Distcp template

aryavaibhav93 opened a new pull request #3050:
URL: https://github.com/apache/incubator-gobblin/pull/3050


   
   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   JIRA
   https://jira01.corp.linkedin.com:8443/browse/ETL-10948
   
   
   Description
   Currently, Embedded distcp creates it's own temp staging directory. But, this PR adds the option to have a user defined staging directory which can be used in place of the temp staging directory.
   
   
   Tests
   My PR incorporates change to the following unit tests:
   FileAwareInputStreamDataWriterTest.java
   
   
   ### Commits
   - [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] asfgit closed pull request #3050: [GOBBLIN-1203] Adding configurations for staging directory in Distcp template

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3050:
URL: https://github.com/apache/incubator-gobblin/pull/3050


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] aryavaibhav93 commented on a change in pull request #3050: [GOBBLIN-1203] Adding configurations for staging directory in Distcp template

Posted by GitBox <gi...@apache.org>.
aryavaibhav93 commented on a change in pull request #3050:
URL: https://github.com/apache/incubator-gobblin/pull/3050#discussion_r444412834



##########
File path: gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriter.java
##########
@@ -140,9 +140,13 @@ public FileAwareInputStreamDataWriter(State state, int numBranches, int branchId
     this.fs = FileSystem.get(uri, conf);
     this.fileContext = FileContext.getFileContext(uri, conf);
 
-    this.stagingDir = this.writerAttemptIdOptional.isPresent() ? WriterUtils
-        .getWriterStagingDir(state, numBranches, branchId, this.writerAttemptIdOptional.get())
-        : WriterUtils.getWriterStagingDir(state, numBranches, branchId);
+    if (state.getPropAsBoolean(ConfigurationKeys.USER_DEFINED_STAGING_DIR_FLAG)) {

Review comment:
       For backward-compatibility, I have added default value of USER_DEFINED_STAGING_DIR_FLAG as false, also, in disctp template the value for the above flag is false




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] aryavaibhav93 commented on a change in pull request #3050: [GOBBLIN-1203] Adding configurations for staging directory in Distcp template

Posted by GitBox <gi...@apache.org>.
aryavaibhav93 commented on a change in pull request #3050:
URL: https://github.com/apache/incubator-gobblin/pull/3050#discussion_r444411814



##########
File path: gobblin-api/src/main/java/org/apache/gobblin/configuration/ConfigurationKeys.java
##########
@@ -207,6 +207,8 @@
   public static final String CLEANUP_OLD_JOBS_DATA = "cleanup.old.job.data";
   public static final boolean DEFAULT_CLEANUP_OLD_JOBS_DATA = false;
   public static final String MAXIMUM_JAR_COPY_RETRY_TIMES_KEY = JOB_JAR_FILES_KEY + ".uploading.retry.maximum";
+  public static final String USER_DEFINED_STAGING_DIR = "user.defined.staging.dir";

Review comment:
       I have renamed key: USER_DEFINED_STAGING_DIR as USER_DEFINED_STATIC_STAGING_DIR and value: user.defined.staging.dir as user.defined.static.staging.dir




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #3050: [GOBBLIN-10948] Adding configurations for staging directory in Distcp template

Posted by GitBox <gi...@apache.org>.
autumnust commented on a change in pull request #3050:
URL: https://github.com/apache/incubator-gobblin/pull/3050#discussion_r443061486



##########
File path: gobblin-api/src/main/java/org/apache/gobblin/configuration/ConfigurationKeys.java
##########
@@ -207,6 +207,8 @@
   public static final String CLEANUP_OLD_JOBS_DATA = "cleanup.old.job.data";
   public static final boolean DEFAULT_CLEANUP_OLD_JOBS_DATA = false;
   public static final String MAXIMUM_JAR_COPY_RETRY_TIMES_KEY = JOB_JAR_FILES_KEY + ".uploading.retry.maximum";
+  public static final String USER_DEFINED_STAGING_DIR = "user.defined.staging.dir";

Review comment:
       I'll just name it as "user.defined.static.staging.dir". Let's sync offline for why I suggest doing this. 

##########
File path: gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriter.java
##########
@@ -140,9 +140,13 @@ public FileAwareInputStreamDataWriter(State state, int numBranches, int branchId
     this.fs = FileSystem.get(uri, conf);
     this.fileContext = FileContext.getFileContext(uri, conf);
 
-    this.stagingDir = this.writerAttemptIdOptional.isPresent() ? WriterUtils
-        .getWriterStagingDir(state, numBranches, branchId, this.writerAttemptIdOptional.get())
-        : WriterUtils.getWriterStagingDir(state, numBranches, branchId);
+    if (state.getPropAsBoolean(ConfigurationKeys.USER_DEFINED_STAGING_DIR_FLAG)) {

Review comment:
       Think about maintaining the backward-compatibility for such kind of change. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org