4141import org .apache .beam .sdk .coders .VarIntCoder ;
4242import org .apache .beam .sdk .coders .VoidCoder ;
4343import org .apache .beam .sdk .options .PipelineOptions ;
44- import org .apache .beam .sdk .transforms .Combine .AccumulatingCombineFn ;
45- import org .apache .beam .sdk .transforms .Combine .CombineFn ;
46- import org .apache .beam .sdk .transforms .Combine .Globally ;
47- import org .apache .beam .sdk .transforms .Combine .PerKey ;
4844import org .apache .beam .sdk .transforms .CombineFnBase .AbstractGlobalCombineFn ;
4945import org .apache .beam .sdk .transforms .CombineFnBase .GlobalCombineFn ;
5046import org .apache .beam .sdk .transforms .CombineWithContext .CombineFnWithContext ;
@@ -1503,7 +1499,6 @@ public static class PerKey<K, InputT, OutputT>
15031499 private final DisplayData .ItemSpec <? extends Class <?>> fnDisplayData ;
15041500 private final boolean fewKeys ;
15051501 private final List <PCollectionView <?>> sideInputs ;
1506- private boolean shouldSkipReplacement ;
15071502
15081503 private PerKey (
15091504 GlobalCombineFn <? super InputT , ?, OutputT > fn ,
@@ -1513,7 +1508,6 @@ private PerKey(
15131508 this .fnDisplayData = fnDisplayData ;
15141509 this .fewKeys = fewKeys ;
15151510 this .sideInputs = ImmutableList .of ();
1516- this .shouldSkipReplacement = false ;
15171511 }
15181512
15191513 private PerKey (
@@ -1525,7 +1519,6 @@ private PerKey(
15251519 this .fnDisplayData = fnDisplayData ;
15261520 this .fewKeys = fewKeys ;
15271521 this .sideInputs = sideInputs ;
1528- this .shouldSkipReplacement = false ;
15291522 }
15301523
15311524 @ Override
@@ -1599,11 +1592,6 @@ public List<PCollectionView<?>> getSideInputs() {
15991592 return sideInputs ;
16001593 }
16011594
1602- /** Returns whether a runner should skip replacing this transform. For runner use only */
1603- public boolean shouldSkipReplacement () {
1604- return this .shouldSkipReplacement ;
1605- }
1606-
16071595 /**
16081596 * Returns the side inputs of this {@link Combine}, tagged with the tag of the {@link
16091597 * PCollectionView}. The values of the returned map will be equal to the result of {@link
@@ -1616,13 +1604,6 @@ public Map<TupleTag<?>, PValue> getAdditionalInputs() {
16161604
16171605 @ Override
16181606 public PCollection <KV <K , OutputT >> expand (PCollection <KV <K , InputT >> input ) {
1619- PipelineOptions options = input .getPipeline ().getOptions ();
1620- String gbekOveride = options .getGbek ();
1621- if (gbekOveride != null && !gbekOveride .trim ().isEmpty ()) {
1622- // Don't replace this transform if we're using GBEK since the runner may insert
1623- // its own GBK which doesn't perform encryption.
1624- this .shouldSkipReplacement = true ;
1625- }
16261607 return input
16271608 .apply (fewKeys ? GroupByKey .createWithFewKeys () : GroupByKey .create ())
16281609 .apply (
0 commit comments