uranusjr commented on code in PR #71057:
URL: https://github.com/apache/airflow/pull/71057#discussion_r3773725069
##########
java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/DagDef.kt:
##########
@@ -24,46 +24,72 @@ import kotlin.Throws
/**
* A collection of tasks with directional dependencies.
*
- * Create a [Dag] directly and register tasks with [addTask].
+ * Create a [DagDef] directly and register [TaskDef]s with [addTask].
*
* The [Builder.Dag] annotation should generally be preferred in user code,
* where the annotation processor generates the wiring for you. Only use this
- * class directly if you need to do low-level plumbing.
+ * class directly if you need to do low-level plumbing:
+ *
+ * ```java
+ * var dag = new DagDef("java_etl")
+ * .addTask(new TaskDef("extract", Extract.class))
+ * .addTask(new TaskDef("load", Load.class));
+ * ```
*
* @param id Dag identifier. Must contain only ASCII alphanumeric characters,
* dashes, dots, or underscores; must be unique within a [Bundle].
*
* @see Builder.Dag
*/
-class Dag(
+class DagDef(
Review Comment:
Since we’re not renaming the annotations, does this still need to be
renamed? (Also Task/TaskDef.)
--
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]