amaliujia commented on a change in pull request #12601:
URL: https://github.com/apache/beam/pull/12601#discussion_r471809031
##########
File path:
sdks/java/testing/tpcds/src/main/java/org/apache/beam/sdk/tpcds/TpcdsRun.java
##########
@@ -19,22 +19,38 @@
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
+import org.apache.beam.sdk.PipelineResult.State;
import java.util.concurrent.Callable;
/**
* To fulfill multi-threaded execution
*/
-public class TpcdsRun implements Callable<PipelineResult> {
+public class TpcdsRun implements Callable<TpcdsRunResult> {
private final Pipeline pipeline;
public TpcdsRun (Pipeline pipeline) {
this.pipeline = pipeline;
}
@Override
- public PipelineResult call() {
- PipelineResult pipelineResult = pipeline.run();
- pipelineResult.waitUntilFinish();
- return pipelineResult;
+ public TpcdsRunResult call() {
+ TpcdsRunResult tpcdsRunResult;
+
+ try {
+ PipelineResult pipelineResult = pipeline.run();
+ long startTimeStamp = System.currentTimeMillis();
+ State state = pipelineResult.waitUntilFinish();
+ long endTimeStamp = System.currentTimeMillis();
+
+ // Make sure to set the job status to be successful only when
pipelineResult's final state is DONE.
+ boolean isSuccessful = state == State.DONE;
Review comment:
Actually nvm 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.
For queries about this service, please contact Infrastructure at:
[email protected]