[
https://issues.apache.org/jira/browse/GOBBLIN-1377?focusedWorklogId=567063&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-567063
]
ASF GitHub Bot logged work on GOBBLIN-1377:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Mar/21 15:50
Start Date: 16/Mar/21 15:50
Worklog Time Spent: 10m
Work Description: sv2000 commented on a change in pull request #3158:
URL: https://github.com/apache/gobblin/pull/3158#discussion_r595301251
##########
File path:
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriterBuilder.java
##########
@@ -52,14 +53,13 @@
public synchronized static void setJobSpecificOutputPaths(State state) {
// Other tasks may have set this already
+ // If reading from the sharded dataset path, writer directory paths are
stored in the workunit state
if
(!StringUtils.containsIgnoreCase(state.getProp(ConfigurationKeys.WRITER_STAGING_DIR),
- state.getProp(ConfigurationKeys.JOB_ID_KEY))) {
-
- state.setProp(ConfigurationKeys.WRITER_STAGING_DIR, new
Path(state.getProp(ConfigurationKeys.WRITER_STAGING_DIR),
- state.getProp(ConfigurationKeys.JOB_ID_KEY)));
- state.setProp(ConfigurationKeys.WRITER_OUTPUT_DIR, new
Path(state.getProp(ConfigurationKeys.WRITER_OUTPUT_DIR),
- state.getProp(ConfigurationKeys.JOB_ID_KEY)));
-
+ state.getProp(ConfigurationKeys.JOB_ID_KEY)) &&
!state.getPropAsBoolean(ConfigurationKeys.USE_DATASET_LOCAL_WORK_DIR)) {
+ state.setProp(ConfigurationKeys.WRITER_STAGING_DIR, new
Path(state.getProp(ConfigurationKeys.WRITER_STAGING_DIR),
Review comment:
Same comment as earlier. We should be able to set override the
WRITER_STAGING_DIR config inside the DatasetHandler and leave the code here
unchanged.
##########
File path:
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/publisher/CopyDataPublisher.java
##########
@@ -117,8 +117,9 @@ public CopyDataPublisher(State state) throws IOException {
this.fs = FileSystem.get(URI.create(uri),
WriterUtils.getFsConfiguration(state));
FileAwareInputStreamDataWriterBuilder.setJobSpecificOutputPaths(state);
-
- this.writerOutputDir = new
Path(state.getProp(ConfigurationKeys.WRITER_OUTPUT_DIR));
+ // If directories are sharded by dataset, initialize writers using
workunit state instead
+ this.writerOutputDir =
state.getPropAsBoolean(ConfigurationKeys.USE_DATASET_LOCAL_WORK_DIR) ?
Review comment:
I don't understand the explanation. What I am suggesting is to have the
ConfigurationKeys#WRITER_OUTPUT_DIR being overwritten inside the DatasetHandler
impl, which would avoid the need for this 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 567063)
Time Spent: 4h (was: 3h 50m)
> Add class to create directory shards on cloud environments for hive distcp
> --------------------------------------------------------------------------
>
> Key: GOBBLIN-1377
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1377
> Project: Apache Gobblin
> Issue Type: New Feature
> Reporter: William Lo
> Priority: Major
> Time Spent: 4h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)