You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/09/14 21:11:51 UTC
[GitHub] [druid] vtlim commented on a change in pull request #11708: docs: delete / cancel query
vtlim commented on a change in pull request #11708:
URL: https://github.com/apache/druid/pull/11708#discussion_r708631246
##########
File path: docs/querying/sql.md
##########
@@ -956,6 +955,30 @@ trailer they all include: one blank line at the end of the result set. If you de
through a JSON parsing error or through a missing trailing newline, you should assume the response was not fully
delivered due to an error.
+### HTTP DELETE
+You can use the HTTP `DELETE` method to cancel a SQL query. When you cancel a query canceled, Druid marks its `SqlLifecycle` canceled immediately. After that, any operations in `SqlLifecycle` become non-operational to avoid unnecessary execution of expensive operations.
+
+HTTP DELETE method uses the following syntax:
Review comment:
```suggestion
Druid SQL's HTTP DELETE method uses the following syntax:
```
##########
File path: docs/querying/sql.md
##########
@@ -956,6 +955,30 @@ trailer they all include: one blank line at the end of the result set. If you de
through a JSON parsing error or through a missing trailing newline, you should assume the response was not fully
delivered due to an error.
+### HTTP DELETE
+You can use the HTTP `DELETE` method to cancel a SQL query. When you cancel a query canceled, Druid marks its `SqlLifecycle` canceled immediately. After that, any operations in `SqlLifecycle` become non-operational to avoid unnecessary execution of expensive operations.
Review comment:
```suggestion
You can use the HTTP `DELETE` method to cancel a SQL query. When you cancel a query, Druid immediately marks its `SqlLifecycle` as canceled. After that, any operations in `SqlLifecycle` become non-operational to avoid unnecessary execution of expensive operations.
```
##########
File path: docs/querying/sql.md
##########
@@ -956,6 +955,30 @@ trailer they all include: one blank line at the end of the result set. If you de
through a JSON parsing error or through a missing trailing newline, you should assume the response was not fully
delivered due to an error.
+### HTTP DELETE
+You can use the HTTP `DELETE` method to cancel a SQL query. When you cancel a query canceled, Druid marks its `SqlLifecycle` canceled immediately. After that, any operations in `SqlLifecycle` become non-operational to avoid unnecessary execution of expensive operations.
+
+HTTP DELETE method uses the following syntax:
+```
+DELETE https://BROKER:8082/druid/v2/sql/{sqlQueryId}
Review comment:
I like that this is clearly laid out in a code block, but it's a different format than is used to describe `HTTP POST`, which says: "You can make Druid SQL queries using HTTP via POST to the endpoint `/druid/v2/sql/`."
Perhaps have a DELETE endpoint description similar to HTTP POST, or edit HTTP POST to have a code block like done here?
##########
File path: docs/querying/sql.md
##########
@@ -956,6 +955,30 @@ trailer they all include: one blank line at the end of the result set. If you de
through a JSON parsing error or through a missing trailing newline, you should assume the response was not fully
delivered due to an error.
+### HTTP DELETE
+You can use the HTTP `DELETE` method to cancel a SQL query. When you cancel a query canceled, Druid marks its `SqlLifecycle` canceled immediately. After that, any operations in `SqlLifecycle` become non-operational to avoid unnecessary execution of expensive operations.
+
+HTTP DELETE method uses the following syntax:
+```
+DELETE https://BROKER:8082/druid/v2/sql/{sqlQueryId}
+```
+
+The DELETE method requires the `sqlQueryId`, therefore to predict the query id you must set it in the query context.
Review comment:
```suggestion
The DELETE method requires the `sqlQueryId` path parameter. To predict the query id you must set it in the query context.
```
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org