scwhittle commented on code in PR #31091:
URL: https://github.com/apache/beam/pull/31091#discussion_r1580903297
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineDebugOptions.java:
##########
@@ -216,14 +216,42 @@ public Dataflow create(PipelineOptions options) {
void setReaderCacheTimeoutSec(Integer value);
- /** The max amount of time an UnboundedReader is consumed before
checkpointing. */
+ /**
+ * The max amount of time an UnboundedReader is consumed before
checkpointing.
+ *
+ * @deprecated use {@link
DataflowPipelineDebugOptions#getUnboundedReaderMaxReadTimeMs()} instead
+ */
@Description(
"The max amount of time before an UnboundedReader is consumed before
checkpointing, in seconds.")
- @Default.Integer(10)
+ @Deprecated
Review Comment:
nit: does keeping the Default.Integer(10) here work? then you could remove
the null check and default from the factory?
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineDebugOptions.java:
##########
@@ -216,14 +216,42 @@ public Dataflow create(PipelineOptions options) {
void setReaderCacheTimeoutSec(Integer value);
- /** The max amount of time an UnboundedReader is consumed before
checkpointing. */
+ /**
+ * The max amount of time an UnboundedReader is consumed before
checkpointing.
+ *
+ * @deprecated use {@link
DataflowPipelineDebugOptions#getUnboundedReaderMaxReadTimeMs()} instead
+ */
@Description(
"The max amount of time before an UnboundedReader is consumed before
checkpointing, in seconds.")
- @Default.Integer(10)
+ @Deprecated
Integer getUnboundedReaderMaxReadTimeSec();
void setUnboundedReaderMaxReadTimeSec(Integer value);
+ /** The max amount of time an UnboundedReader is consumed before
checkpointing. */
+ @Description(
+ "The max amount of time before an UnboundedReader is consumed before
checkpointing, in millis.")
+ @Default.InstanceFactory(UnboundedReaderMaxReadTimeFactory.class)
+ Integer getUnboundedReaderMaxReadTimeMs();
+
+ void setUnboundedReaderMaxReadTimeMs(Integer value);
+
+ /**
+ * Sets Integer value based on old, deprecated field ({@link
+ * DataflowPipelineDebugOptions#getUnboundedReaderMaxReadTimeSec()}) is set.
+ */
+ class UnboundedReaderMaxReadTimeFactory implements
DefaultValueFactory<Integer> {
Review Comment:
can this be static final class?
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineDebugOptions.java:
##########
@@ -216,14 +216,42 @@ public Dataflow create(PipelineOptions options) {
void setReaderCacheTimeoutSec(Integer value);
- /** The max amount of time an UnboundedReader is consumed before
checkpointing. */
+ /**
+ * The max amount of time an UnboundedReader is consumed before
checkpointing.
+ *
+ * @deprecated use {@link
DataflowPipelineDebugOptions#getUnboundedReaderMaxReadTimeMs()} instead
+ */
@Description(
"The max amount of time before an UnboundedReader is consumed before
checkpointing, in seconds.")
- @Default.Integer(10)
+ @Deprecated
Integer getUnboundedReaderMaxReadTimeSec();
void setUnboundedReaderMaxReadTimeSec(Integer value);
+ /** The max amount of time an UnboundedReader is consumed before
checkpointing. */
+ @Description(
+ "The max amount of time before an UnboundedReader is consumed before
checkpointing, in millis.")
+ @Default.InstanceFactory(UnboundedReaderMaxReadTimeFactory.class)
+ Integer getUnboundedReaderMaxReadTimeMs();
+
+ void setUnboundedReaderMaxReadTimeMs(Integer value);
+
+ /**
+ * Sets Integer value based on old, deprecated field ({@link
+ * DataflowPipelineDebugOptions#getUnboundedReaderMaxReadTimeSec()}) is set.
Review Comment:
rm "is set"
--
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]