You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ignitetcbot (via GitHub)" <gi...@apache.org> on 2026/05/07 13:39:58 UTC
[PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
ignitetcbot opened a new pull request, #13114:
URL: https://github.com/apache/ignite/pull/13114
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see tab `PR Check` at [TC.Bot - Instance 1](https://tcbot2.sbt-ignite-dev.ru/prs.html) or [TC.Bot - Instance 2](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "ignitetcbot (via GitHub)" <gi...@apache.org>.
ignitetcbot commented on PR #13114:
URL: https://github.com/apache/ignite/pull/13114#issuecomment-4413178696
<!-- tcbot-analysis-comment chainBuildId=9055465 suiteBuildIds=9055342,9055354,9055359,9055411,9055413 -->
### TCBot Test Analysis
* TeamCity: [--> Run :: All Results](https://ci2.ignite.apache.org/viewLog.html?buildId=9055465&buildTypeId=IgniteTests24Java8_RunAll)
* Branch: `pull/13114/head`
* Base: `master`
* Tested commit: [1964340](https://github.com/apache/ignite/pull/13114/commits/196434043951ac78ccc033cb22be0d695a13e466)
#### Possible Blockers (6)
* [Platform .NET (Windows)](https://ci2.ignite.apache.org/viewLog.html?buildId=9055411): 1 tests
* `exe`: `ClientConnectionTest.TestFailoverWithRetryPolicyReconnectsToNewNode` - Test has low fail rate in base branch 0,0% and is not flaky
* [Cache 8](https://ci2.ignite.apache.org/viewLog.html?buildId=9055354): 1 tests
* `IgniteCacheTestSuite8`: `GridCachePartitionedMetricsSelfTest.testPutsReads` - Test has low fail rate in base branch 0,0% and is not flaky
* [Cache (Failover) 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9055359): 1 tests
* `IgniteCacheFailoverTestSuite2`: `CacheAsyncOperationsFailoverAtomicTest.testPutAllAsyncFailover` - Test has low fail rate in base branch 0,0% and is not flaky
* [Binary Objects](https://ci2.ignite.apache.org/viewLog.html?buildId=9055342): 2 tests
* `org.apache.ignite.testsuites.IgniteBinaryObjectsTestSuite: org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest.` - History for base branch is absent.
* `IgniteBinaryObjectsTestSuite`: `GridCacheClientNodeBinaryObjectMetadataMultinodeTest.testFailoverOnStart` - Test has low fail rate in base branch 0,0% and is not flaky
* [Queries 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9055413): 1 tests
* `IgniteBinaryCacheQueryTestSuite2`: `DynamicIndexReplicatedTransactionalConcurrentSelfTest.testConcurrentOperationsAndCacheStartStopMultithreaded` - Test has low fail rate in base branch 0,0% and is not flaky
#### New Tests (1)
* [Binary Objects](https://ci2.ignite.apache.org/viewLog.html?buildId=9055342): 1 tests
* `org.apache.ignite.testsuites.IgniteBinaryObjectsTestSuite: org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest.` - FAILED
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "ignitetcbot (via GitHub)" <gi...@apache.org>.
ignitetcbot commented on PR #13114:
URL: https://github.com/apache/ignite/pull/13114#issuecomment-4413111001
<!-- tcbot-analysis-comment buildId=9055465 -->
### TCBot Test Analysis
* TeamCity: [--> Run :: All Results](https://ci2.ignite.apache.org/viewLog.html?buildId=9055465&buildTypeId=IgniteTests24Java8_RunAll)
* Branch: `pull/13114/head`
* Base: `master`
* Tested commit: [1964340](https://github.com/apache/ignite/commit/196434043951ac78ccc033cb22be0d695a13e466)
#### Possible Blockers (6)
* [Platform .NET (Windows)](https://ci2.ignite.apache.org/viewLog.html?buildId=9055411): 1 tests
* `exe`: `ClientConnectionTest.TestFailoverWithRetryPolicyReconnectsToNewNode` - Test has low fail rate in base branch 0,0% and is not flaky
* [Cache 8](https://ci2.ignite.apache.org/viewLog.html?buildId=9055354): 1 tests
* `IgniteCacheTestSuite8`: `GridCachePartitionedMetricsSelfTest.testPutsReads` - Test has low fail rate in base branch 0,0% and is not flaky
* [Cache (Failover) 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9055359): 1 tests
* `IgniteCacheFailoverTestSuite2`: `CacheAsyncOperationsFailoverAtomicTest.testPutAllAsyncFailover` - Test has low fail rate in base branch 0,0% and is not flaky
* [Binary Objects](https://ci2.ignite.apache.org/viewLog.html?buildId=9055342): 2 tests
* `org.apache.ignite.testsuites.IgniteBinaryObjectsTestSuite: org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest.` - History for base branch is absent.
* `IgniteBinaryObjectsTestSuite`: `GridCacheClientNodeBinaryObjectMetadataMultinodeTest.testFailoverOnStart` - Test has low fail rate in base branch 0,0% and is not flaky
* [Queries 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9055413): 1 tests
* `IgniteBinaryCacheQueryTestSuite2`: `DynamicIndexReplicatedTransactionalConcurrentSelfTest.testConcurrentOperationsAndCacheStartStopMultithreaded` - Test has low fail rate in base branch 0,0% and is not flaky
#### New Tests (1)
* [Binary Objects](https://ci2.ignite.apache.org/viewLog.html?buildId=9055342): 1 tests
* `org.apache.ignite.testsuites.IgniteBinaryObjectsTestSuite: org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest.` - FAILED
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #13114:
URL: https://github.com/apache/ignite/pull/13114#discussion_r3225832862
##########
docs/_docs/distributed-computing/distributed-computing.adoc:
##########
@@ -305,60 +305,27 @@ If you want to use the key and value objects inside `IgniteCallable` and `Ignite
====
-////////////////////////////////////////////////////////////////////////////////
-
-
-
-In the cases where you do not need to colocate computations with data but simply want to process all data remotely, you can run local cache queries inside the `call()` method. Consider the following example.
-
-Let's say we have a cache that stores information about persons and we want to calculate the average age of all persons. One way to accomplish this is to run a link:key-value-api/using-cache-queries[scan query] that will fetch the ages of all persons to the local node, where you can calculate the average age.
-
-A more efficient way, however, is to avoid network calls to other nodes by running the query locally on each remote node and aggregating the result on the local node.
-
-This task can be easily split
-
-[source, java]
--------------------------------------------------------------------------------
-private class AverageAgeJob implements IgniteCallable<Double> {
-
- @IgniteInstanceResource
- private Ignite ignite;
-
- @Override
- public Double call() throws Exception {
-
- IgniteCache<Long, Person> cache = ignite.cache("person");
-
- int localAvg = 0;
- try (QueryCursor<Cache.Entry<Long, Person>> cursor = cache
- .query(new ScanQuery<Long, Person>().setLocal(true))) {
- for (Cache.Entry<Long, Person> entry : cursor) {
- localAvg += (int) entry.getValue().getAge();
- }
- }
-
- return (localAvg / (double) cache.size());
- }
-}
-
--------------------------------------------------------------------------------
-Note that the scan query is executed in the local mode. It means that it will only fetch objects from the Person cache that are stored localy and will not request data from other nodes.
+=== Processing Cache Data Locally
-If you broadcast this task to all nodes, all person objecs will be processed (each locally), and the results are sent to the node that initiated the task.
-
-[source, java]
--------------------------------------------------------------------------------
-Ignite ignite = Ignition.ignite();
-
-double average = ignite.compute().broadcast(new AverageAgeTask()).stream().reduce(0D, (a, b) -> a + b);
--------------------------------------------------------------------------------
-
-
-The task is executed on every node, where it will query all persons stored locally and calculate the local average. Then the result are sent to the node that initiated the task and summed up. In this implementation, objects are not transferred via network.
+If you need to process all cache data remotely, you can broadcast a task to the data nodes and run a local cache query inside the task.
+In this mode, each node scans only the cache entries stored locally, processes them there, and returns only the aggregated result to the caller.
+For example, assume that a cache stores `Person` objects and you need to calculate the average age of all persons.
Review Comment:
nitpicking - seems it more clear to use 3-rd face form, like :
For example, assume that a cache stores Person objects and it is necessary to calculate the average age of all persons.
Or
For example, assume that a cache stores Person objects and one needs to calculate the average age of all persons.
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "dspavlov (via GitHub)" <gi...@apache.org>.
dspavlov merged PR #13114:
URL: https://github.com/apache/ignite/pull/13114
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "ignitetcbot (via GitHub)" <gi...@apache.org>.
ignitetcbot commented on PR #13114:
URL: https://github.com/apache/ignite/pull/13114#issuecomment-4413359913
<!-- tcbot-analysis-comment chainBuildId=9055465 rerunBuildIds=none -->
### TCBot Test Analysis
* TeamCity: [--> Run :: All Results](https://ci2.ignite.apache.org/viewLog.html?buildId=9055465&buildTypeId=IgniteTests24Java8_RunAll)
* Branch: `pull/13114/head`
* Base: `master`
* Tested commit: [1964340](https://github.com/apache/ignite/pull/13114/commits/196434043951ac78ccc033cb22be0d695a13e466)
#### Possible Blockers (6)
* [Platform .NET (Windows)](https://ci2.ignite.apache.org/viewLog.html?buildId=9055411): 1 tests
* `exe`: `ClientConnectionTest.TestFailoverWithRetryPolicyReconnectsToNewNode` - Test has low fail rate in base branch 0,0% and is not flaky
* [Cache 8](https://ci2.ignite.apache.org/viewLog.html?buildId=9055354): 1 tests
* `IgniteCacheTestSuite8`: `GridCachePartitionedMetricsSelfTest.testPutsReads` - Test has low fail rate in base branch 0,0% and is not flaky
* [Cache (Failover) 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9055359): 1 tests
* `IgniteCacheFailoverTestSuite2`: `CacheAsyncOperationsFailoverAtomicTest.testPutAllAsyncFailover` - Test has low fail rate in base branch 0,0% and is not flaky
* [Binary Objects](https://ci2.ignite.apache.org/viewLog.html?buildId=9055342): 2 tests
* `org.apache.ignite.testsuites.IgniteBinaryObjectsTestSuite: org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest.` - History for base branch is absent.
* `IgniteBinaryObjectsTestSuite`: `GridCacheClientNodeBinaryObjectMetadataMultinodeTest.testFailoverOnStart` - Test has low fail rate in base branch 0,0% and is not flaky
* [Queries 2](https://ci2.ignite.apache.org/viewLog.html?buildId=9055413): 1 tests
* `IgniteBinaryCacheQueryTestSuite2`: `DynamicIndexReplicatedTransactionalConcurrentSelfTest.testConcurrentOperationsAndCacheStartStopMultithreaded` - Test has low fail rate in base branch 0,0% and is not flaky
#### New Tests (1)
* [Binary Objects](https://ci2.ignite.apache.org/viewLog.html?buildId=9055342): 1 tests
* `org.apache.ignite.testsuites.IgniteBinaryObjectsTestSuite: org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest.` - FAILED
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "dspavlov (via GitHub)" <gi...@apache.org>.
dspavlov commented on PR #13114:
URL: https://github.com/apache/ignite/pull/13114#issuecomment-4453939740
TC Bot message are just for testing, proposal applied, merged. Please consider cherrypicking to 2.18
--
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
Re: [PR] IGNITE-28641 Restore outcommented docs section: Ignite compute and setLocal for query [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13114:
URL: https://github.com/apache/ignite/pull/13114#issuecomment-4429859965
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13114) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13114&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13114&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=13114&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13114&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13114&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13114)
--
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