Till Westmann has posted comments on this change.

Change subject: Add a REST endpoint for query cancellation.
......................................................................


Patch Set 13:

(10 comments)

Looks good to me - the cancel button works!

Nearly all comments are on naming ...

https://asterix-gerrit.ics.uci.edu/#/c/1564/13/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/ctx/StatementExecutorContext.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/ctx/StatementExecutorContext.java:

PS13, Line 30: activeQueries
The term "active" is overloaded in AsterixDB. I think that it'd be good to use 
the naming conventions from the IJobManager interface:

    Collection<JobRun> getRunningJobs();
    Collection<JobRun> getPendingJobs();
    Collection<JobRun> getArchivedJobs();


https://asterix-gerrit.ics.uci.edu/#/c/1564/13/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryCancellationServlet.java:

PS13, Line 51: setContentType
I think that we don't return content, so we don't need a content type.


PS13, Line 60: activeQueries
Again, the term "active" is overloaded in AsterixDB. I think that it'd be good 
to use the naming conventions from the IJobManager interface:

    Collection<JobRun> getRunningJobs();
    Collection<JobRun> getPendingJobs();
    Collection<JobRun> getArchivedJobs();


PS13, Line 61: ACTIVE_QUERIES_ATTR
see above


https://asterix-gerrit.ics.uci.edu/#/c/1564/13/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ServletConstants.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ServletConstants.java:

PS13, Line 26: ACTIVE_QUERIES_ATTR
Again, the term "active" is overloaded in AsterixDB. I think that it'd be good 
to use the naming conventions from the IJobManager interface:

    Collection<JobRun> getRunningJobs();
    Collection<JobRun> getPendingJobs();
    Collection<JobRun> getArchivedJobs();


https://asterix-gerrit.ics.uci.edu/#/c/1564/13/asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/QueryCancellationServletTest.java
File 
asterixdb/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/QueryCancellationServletTest.java:

PS13, Line 47: testGet(
s/testGet/testDelete/?


https://asterix-gerrit.ics.uci.edu/#/c/1564/13/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/CancellationTestExecutor.java
File 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/CancellationTestExecutor.java:

PS13, Line 70: invest
s/invest/investigate/?


PS13, Line 75: submit
s/submit/submitted/


https://asterix-gerrit.ics.uci.edu/#/c/1564/13/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/Servlets.java
File 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/Servlets.java:

PS13, Line 37: query
To be more consistent with the other endpoints I'd not prefix this admin 
endpoint with "query". Also I'd again follow the IJobManager naming 
conventions. e.g. 

    /admin/requests/running/*


https://asterix-gerrit.ics.uci.edu/#/c/1564/13/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/io/RunFileReader.java
File 
hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/io/RunFileReader.java:

PS13, Line 88: idempotent
This is only safe, if each handle is only handled by a single thread. Is that 
right?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1564
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2936ac83f71bbef533e2695ed0a2b220c23fc483
Gerrit-PatchSet: 13
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to