Skip to content

Commit

Permalink
Merge pull request apache#9903: [BEAM-8496] Remove duplicate SDF tran…
Browse files Browse the repository at this point in the history
…slation from Flink translator
  • Loading branch information
mxm authored Jan 8, 2020
2 parents 7346cf2 + a1d3dac commit 668c004
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 37 deletions.
5 changes: 4 additions & 1 deletion runners/flink/flink_runner.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ def createValidatesRunnerTask(Map m) {
])
systemProperty "beamTestPipelineOptions", pipelineOptions
classpath = configurations.validatesRunner
testClassesDirs = files(project(":sdks:java:core").sourceSets.test.output.classesDirs, project(":runners:core-java").sourceSets.test.output.classesDirs)
testClassesDirs = files(
project(":sdks:java:core").sourceSets.test.output.classesDirs,
project(":runners:core-java").sourceSets.test.output.classesDirs,
)
// maxParallelForks decreased from 4 in order to avoid OOM errors
maxParallelForks 2
useJUnit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1310,46 +1310,12 @@ public static class FlinkTransformsRegistrar implements TransformPayloadTranslat
new CreateStreamingFlinkViewPayloadTranslator())
.put(
SplittableParDoViaKeyedWorkItems.ProcessElements.class,
new SplittableParDoProcessElementsTranslator())
.put(
SplittableParDoViaKeyedWorkItems.GBKIntoKeyedWorkItems.class,
new SplittableParDoGbkIntoKeyedWorkItemsPayloadTranslator())
PTransformTranslation.TransformPayloadTranslator.NotSerializable.forUrn(
SPLITTABLE_PROCESS_URN))
.build();
}
}

/**
* A translator just to vend the URN. This will need to be moved to runners-core-construction-java
* once SDF is reorganized appropriately.
*/
private static class SplittableParDoProcessElementsPayloadTranslator
extends PTransformTranslation.TransformPayloadTranslator.NotSerializable<
SplittableParDoViaKeyedWorkItems.ProcessElements<?, ?, ?, ?>> {

private SplittableParDoProcessElementsPayloadTranslator() {}

@Override
public String getUrn(SplittableParDoViaKeyedWorkItems.ProcessElements<?, ?, ?, ?> transform) {
return SPLITTABLE_PROCESS_URN;
}
}

/**
* A translator just to vend the URN. This will need to be moved to runners-core-construction-java
* once SDF is reorganized appropriately.
*/
private static class SplittableParDoGbkIntoKeyedWorkItemsPayloadTranslator
extends PTransformTranslation.TransformPayloadTranslator.NotSerializable<
SplittableParDoViaKeyedWorkItems.GBKIntoKeyedWorkItems<?, ?>> {

private SplittableParDoGbkIntoKeyedWorkItemsPayloadTranslator() {}

@Override
public String getUrn(SplittableParDoViaKeyedWorkItems.GBKIntoKeyedWorkItems<?, ?> transform) {
return SplittableParDo.SPLITTABLE_GBKIKWI_URN;
}
}

/** A translator just to vend the URN. */
private static class CreateStreamingFlinkViewPayloadTranslator
extends PTransformTranslation.TransformPayloadTranslator.NotSerializable<
Expand Down

0 comments on commit 668c004

Please sign in to comment.