You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/06/09 13:15:00 UTC

[jira] [Commented] (QPID-8581) [Broker-J] Broker-J Query REST API improvements

    [ https://issues.apache.org/jira/browse/QPID-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552200#comment-17552200 ] 

ASF GitHub Bot commented on QPID-8581:
--------------------------------------

vavrtom commented on code in PR #121:
URL: https://github.com/apache/qpid-broker-j/pull/121#discussion_r893482694


##########
broker-plugins/broker-query-engine/src/main/java/org/apache/qpid/server/query/engine/QueryEngine.java:
##########
@@ -112,6 +111,10 @@ public void setMaxBigDecimalValue(final BigDecimal maxBigDecimalValue)
         _maxBigDecimalValue = maxBigDecimalValue;
     }
 
+    public void setMaxQueryCacheSize(final int maxQueryCacheSize) {

Review Comment:
   The curly bracket should be on new line.



##########
broker-plugins/broker-query-engine/src/main/java/org/apache/qpid/server/query/engine/evaluator/settings/QuerySettings.java:
##########
@@ -63,12 +62,12 @@
     /**
      * Maximal amount of queries allowed caching
      */
-    private int _maxQueryCacheSize = HttpPort.DEFAULT_QUERY_ENGINE_CACHE_SIZE;
+    private int _maxQueryCacheSize = 1000;

Review Comment:
   The default value constant could be defined in this class (or in some other class in query engine plugin) and reused in HttpManagementConfiguration to avoid duplication of default values.



##########
broker-plugins/broker-query-engine/src/main/java/org/apache/qpid/server/query/engine/evaluator/settings/QuerySettings.java:
##########
@@ -63,12 +62,12 @@
     /**
      * Maximal amount of queries allowed caching
      */
-    private int _maxQueryCacheSize = HttpPort.DEFAULT_QUERY_ENGINE_CACHE_SIZE;
+    private int _maxQueryCacheSize = 1000;
 
     /**
      * Maximal amount of query tree nodes allowed
      */
-    private int _maxQueryDepth = HttpPort.DEFAULT_QUERY_ENGINE_MAX_QUERY_DEPTH;
+    private int _maxQueryDepth = 4096;

Review Comment:
   The default value constant could be defined in this class (or in some other class in query engine plugin) and reused in HttpManagementConfiguration to avoid duplication of default values.



##########
broker-plugins/broker-query-engine/src/main/java/org/apache/qpid/server/query/engine/evaluator/settings/QuerySettings.java:
##########
@@ -78,7 +77,7 @@
     /**
      * ZoneId used in date/time representation
      */
-    private ZoneId _zoneId = ZoneId.of(HttpPort.DEFAULT_QUERY_ENGINE_ZONE_ID);
+    private ZoneId _zoneId = ZoneId.of("UTC");

Review Comment:
   The default value constant could be defined in this class (or in some other class in query engine plugin) and reused in HttpManagementConfiguration to avoid duplication of default values.





> [Broker-J] Broker-J Query REST API improvements
> -----------------------------------------------
>
>                 Key: QPID-8581
>                 URL: https://issues.apache.org/jira/browse/QPID-8581
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Broker-J
>    Affects Versions: qpid-java-broker-8.0.6
>            Reporter: Daniil Kirilyuk
>            Priority: Minor
>
> Existing broker REST API (including broker query API) doesn’t support such functions as aggregation, grouping and using nested logical operators, which could be useful for gathering broker statistics and reporting.
> We suggest to add a new POST method for the endpoint /api/latest/querybroker and supply search criteria using JSON body. (Existing GET method implementation should stay without changes for keeping backwards compatibility and because of difficulties of parsing complicated search conditions from URI parameters when using GET request method).
> The new functionality should add
>  * logical OR operator (absent in current API)
>  * aggregation operators AVG, CNT, MAX, MIN, SUM
>  * grouping aggregation
>  * new numeric / datetime / string functions



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org