drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #1051: DRILL-5963: Query state process improvements
Date Tue, 28 Nov 2017 06:54:18 GMT
Github user paul-rogers commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/rm/QueryResourceManager.java
    @@ -38,22 +35,17 @@
        * For some cases the foreman does not have a full plan, just a cost. In
        * this case, this object will not plan memory, but still needs the cost
        * to place the job into the correct queue.
    -   * @param cost
    +   * @param cost query cost
       void setCost(double cost);
    -   * Admit the query into the cluster. Blocks until the query
    -   * can run. (Later revisions may use a more thread-friendly
    -   * approach.)
    -   * @throws QueryQueueException if something goes wrong with the
    -   * queue mechanism
    -   * @throws QueueTimeoutException if the query timed out waiting to
    -   * be admitted.
    +   * Admit the query into the cluster. Starts enqueueing process in separate thread.
    --- End diff --
    If we want to do this, please provide an interface with the needed services. Also, if
we want to do this, then the implementation should change. Maybe admit returns a status: ADMITTED,
QUEUED, FAILED. (Or, FAILED can be in the form of an exception.)
    The mechanism should be: pass in a handle to the query. If admit, tell the handle to run.
If blocked, figure out how to receive the notification from ZK. Once the query is admitted,
let it run. If a timeout occurs, tell the handle that the query failed.
    With a handle, we can unit test the mechanism.


View raw message