pcoet commented on a change in pull request #16587:
URL: https://github.com/apache/beam/pull/16587#discussion_r790937882



##########
File path: website/www/site/content/en/documentation/programming-guide.md
##########
@@ -6568,28 +6569,28 @@ In this section, we will use 
[KafkaIO.Read](https://beam.apache.org/releases/jav
 There are two ways to make Java transforms available to other SDKs.
 
 * Option 1: In some cases, you can use existing Java transforms from other 
SDKs without writing any additional Java code.
-* Option 2: You can use arbitrary Java Transforms from other SDKs by adding a 
few Java classes.
+* Option 2: You can use arbitrary Java transforms from other SDKs by adding a 
few Java classes.
 
-##### 13.1.1.1 Using Existing Java Transforms from Other SDKs Without Writing 
more Java Code
+##### 13.1.1.1 Using existing Java transforms
 
-Starting with Beam 2.34.0, Python SDK users can use some Java transforms 
without writing additional Java code. This can be useful in many cases. For 
example,
-* A developer not familiar with Java may need to use an existing Java 
transform from a Python pipeline
-* A developer may need to make an existing Java transform available to a 
Python pipeline without writing/releasing more Java code
+Starting with Beam 2.34.0, Python SDK users can use some Java transforms 
without writing additional Java code. This can be useful in many cases. For 
example:
+* A developer not familiar with Java may need to use an existing Java 
transform from a Python pipeline.
+* A developer may need to make an existing Java transform available to a 
Python pipeline without writing/releasing more Java code.
 
 > **Note:** This feature is currently only available when using Java 
 > transforms from a Python pipeline.
 
-To be eligible for direct usage, the API of the Java transform has to follow 
the following pattern.
-* Requirement 1: The Java transform can be constructed using an available 
public constructor or a public static method (a constructor method) in the same 
Java class.
-* Requirement 2: The Java transform can be configured using one or more 
builder methods. Each builder method should be public and should return an 
instance of the Java transform.
+To be eligible for direct usage, the API of the Java transform has to meet the 
following requirements:
+1. The Java transform can be constructed using an available public constructor 
or a public static method (a constructor method) in the same Java class.
+2. The Java transform can be configured using one or more builder methods. 
Each builder method should be public and should return an instance of the Java 
transform.
 
-See below for the structure of an example Java class that can be directly used 
from the Python API.
+Here's an example Java class that can be directly used from the Python API.
 
-{{< highlight >}}
+```java
 public class JavaDataGenerator extends PTransform<PBegin, PCollection<String>> 
{
   . . .
 
-  // Following method satisfies the Requirement 1.
-  // Note that you may also use a class constructor instead of a static method.
+  // The following method satisfies requirement 1.

Review comment:
       I think we could inject the samples. I don't have a lot more time to 
spend on this project, so I created a ticket: 
https://issues.apache.org/jira/browse/BEAM-13730 . We can loop back on this.




-- 
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]


Reply via email to