You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tez.apache.org by GitBox <gi...@apache.org> on 2021/02/10 04:48:59 UTC

[GitHub] [tez] abstractdog commented on a change in pull request #105: TEZ-4284: Various Improvements for InputReadyTracker

abstractdog commented on a change in pull request #105:
URL: https://github.com/apache/tez/pull/105#discussion_r573447282



##########
File path: tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
##########
@@ -96,27 +97,26 @@ default void setProgress(float progress) {
    * call. If invoking this method multiple times, it's recommended to remove
    * previously completed Inputs from the invocation list.
    *
-   * @param inputs
-   *          the list of Inputs to monitor
-   * @param timeoutMillis
-   *          timeout to return in milliseconds. If this value is negative,
-   *          this function will wait forever until all inputs get ready
-   *          or interrupted.
-   * @return the Input which is ready for consumption. return null when timeout occurs.
-   * @throws InterruptedException
+   * @param inputs the list of Inputs to monitor
+   * @param time the maximum time to wait
+   * @param unit the time unit of the time argument
+   * @return the {@code Input} which is ready for consumption or null if timeout
+   *         occurs
+   * @throws InterruptedException if the current thread is interrupted (and
+   *           interruption of thread suspension is supported)
    */
-  public Input waitForAnyInputReady(Collection<Input> inputs, long timeoutMillis) throws InterruptedException;
+  public Input waitForAnyInputReady(Collection<Input> inputs, long time, TimeUnit unit) throws InterruptedException;

Review comment:
       what about having a backward compatibility default interface method? 
   this simply breaks the API which is used by hive upstream components (tez-api module),
   https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HashTableLoader.java#L198
   however this uses the single collection parameter version, but anyway, it's still easy to have a backward comp version of "inputs,  timeoutMillis", it can even be @Deprecated
   




----------------------------------------------------------------
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:
users@infra.apache.org