diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java index 66f7a6a327a8..4eb06d22b87a 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java @@ -74,7 +74,7 @@ private ApproximateQuantiles() { * {@code numQuantiles-2} intermediate values, and maximum value, in * sorted order, using the given {@code Comparator} to order values. * To compute traditional {@code N}-tiles, one should use - * {@code ApproximateQuantiles.globally(compareFn, N+1)}. + * {@code ApproximateQuantiles.globally(N+1, compareFn)}. * *

If there are fewer input elements than {@code numQuantiles}, * then the result {@code List} will contain all the input elements, @@ -86,7 +86,7 @@ private ApproximateQuantiles() { *

 {@code
    * PCollection pc = ...;
    * PCollection> quantiles =
-   *     pc.apply(ApproximateQuantiles.globally(stringCompareFn, 11));
+   *     pc.apply(ApproximateQuantiles.globally(11, stringCompareFn));
    * } 
* * @param the type of the elements in the input {@code PCollection} diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Combine.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Combine.java index f3a7c0360100..8a39c98a16e7 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Combine.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Combine.java @@ -1661,7 +1661,7 @@ protected SimpleCombineFn(SerializableFunction, V> combiner) { *
 {@code
    * PCollection> salesRecords = ...;
    * PCollection> totalSalesPerPerson =
-   *     salesRecords.apply(Combine.perKey(
+   *     salesRecords.apply(Combine.perKey(
    *         new Sum.SumDoubleFn()));
    * } 
*