You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "alievmirza (via GitHub)" <gi...@apache.org> on 2023/04/11 23:47:38 UTC

[GitHub] [ignite-3] alievmirza opened a new pull request, #1932: IGNITE-18954 add the ability to filter node's attributes

alievmirza opened a new pull request, #1932:
URL: https://github.com/apache/ignite-3/pull/1932

   https://issues.apache.org/jira/browse/IGNITE-18954


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] alievmirza commented on a diff in pull request #1932: IGNITE-18954 add the ability to filter node's attributes

Posted by "alievmirza (via GitHub)" <gi...@apache.org>.
alievmirza commented on code in PR #1932:
URL: https://github.com/apache/ignite-3/pull/1932#discussion_r1164219413


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -370,4 +372,42 @@ public static DistributionZoneConfiguration getZoneById(DistributionZonesConfigu
 
         return null;
     }
+
+    /**
+     * Check if {@code nodeAttributes} satisfy the {@code filter}.
+     *
+     * @param nodeAttributes Key value map of node's attributes.
+     * @param filter Valid {@link JsonPath} filter of JSON fields.
+     * @return True if at least one value from {@code nodeAttributes} satisfy {@code filter}, false otherwise.

Review Comment:
   agreed, javadoc a bit unclear, I'll rewrite



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] alievmirza commented on a diff in pull request #1932: IGNITE-18954 add the ability to filter node's attributes

Posted by "alievmirza (via GitHub)" <gi...@apache.org>.
alievmirza commented on code in PR #1932:
URL: https://github.com/apache/ignite-3/pull/1932#discussion_r1164219413


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -370,4 +372,42 @@ public static DistributionZoneConfiguration getZoneById(DistributionZonesConfigu
 
         return null;
     }
+
+    /**
+     * Check if {@code nodeAttributes} satisfy the {@code filter}.
+     *
+     * @param nodeAttributes Key value map of node's attributes.
+     * @param filter Valid {@link JsonPath} filter of JSON fields.
+     * @return True if at least one value from {@code nodeAttributes} satisfy {@code filter}, false otherwise.

Review Comment:
   agreed, javadoc's a bit unclear, I'll rewrite



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] kgusakov commented on a diff in pull request #1932: IGNITE-18954 add the ability to filter node's attributes

Posted by "kgusakov (via GitHub)" <gi...@apache.org>.
kgusakov commented on code in PR #1932:
URL: https://github.com/apache/ignite-3/pull/1932#discussion_r1164158097


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -370,4 +372,42 @@ public static DistributionZoneConfiguration getZoneById(DistributionZonesConfigu
 
         return null;
     }
+
+    /**
+     * Check if {@code nodeAttributes} satisfy the {@code filter}.
+     *
+     * @param nodeAttributes Key value map of node's attributes.
+     * @param filter Valid {@link JsonPath} filter of JSON fields.
+     * @return True if at least one value from {@code nodeAttributes} satisfy {@code filter}, false otherwise.

Review Comment:
   Not sure, that I understand "True if at least one value from {@code nodeAttributes} satisfy {@code filter}" but at the same time according to the `testNodeAttributesFilter4` attribute `dataRegionSize` satsify the filter "$[?(@.dataRegionSize == 10 && @.region == 'US')]", but the result `False`



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [ignite-3] sk0x50 merged pull request #1932: IGNITE-18954 add the ability to filter node's attributes

Posted by "sk0x50 (via GitHub)" <gi...@apache.org>.
sk0x50 merged PR #1932:
URL: https://github.com/apache/ignite-3/pull/1932


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org