umustafi commented on code in PR #3597:
URL: https://github.com/apache/gobblin/pull/3597#discussion_r1024416007
##########
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/source/CompactionSource.java:
##########
@@ -128,7 +129,12 @@ public WorkUnitStream getWorkunitStream(SourceState state)
{
// Spawn a single thread to create work units
new Thread(new SingleWorkUnitGeneratorService(state,
prioritize(datasets, state), workUnitIterator),
"SingleWorkUnitGeneratorService").start();
- return new BasicWorkUnitStream.Builder(workUnitIterator).build();
+ WorkUnitStream workUnitStream = new
BasicWorkUnitStream.Builder(workUnitIterator).build();
+ if (workUnitStream.getWorkUnits().hasNext()) {
+ // copy jars iff workunits are created
Review Comment:
small typo `if`
##########
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/source/CompactionSource.java:
##########
@@ -128,7 +129,12 @@ public WorkUnitStream getWorkunitStream(SourceState state)
{
// Spawn a single thread to create work units
new Thread(new SingleWorkUnitGeneratorService(state,
prioritize(datasets, state), workUnitIterator),
"SingleWorkUnitGeneratorService").start();
- return new BasicWorkUnitStream.Builder(workUnitIterator).build();
+ WorkUnitStream workUnitStream = new
BasicWorkUnitStream.Builder(workUnitIterator).build();
+ if (workUnitStream.getWorkUnits().hasNext()) {
+ // copy jars iff workunits are created
Review Comment:
is this to save time for 0 workunit jobs? add a bit more reasoning for why
in comment
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]