You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/05/19 23:51:31 UTC
[1/5] incubator-ignite git commit: Filenames fix
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-484 f2b96e0b5 -> b1a512b59
Filenames fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4423a465
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4423a465
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4423a465
Branch: refs/heads/ignite-484
Commit: 4423a4655c03936bb48fb70b713240aefa3f4219
Parents: 9c30fba
Author: avinogradov <av...@gridgain.com>
Authored: Tue May 19 16:42:08 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue May 19 16:42:08 2015 +0300
----------------------------------------------------------------------
LICENSE | 238 +++++++++++++++++++++++++++++++++++++++++
LICENSE.txt | 238 -----------------------------------------
NOTICE | 12 +++
NOTICE.txt | 12 ---
assembly/release-base.xml | 4 +-
5 files changed, 252 insertions(+), 252 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4423a465/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..7649b39
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,238 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+
+==============================================================================
+Apache Ignite (incubating) Subcomponents:
+
+The Apache Ignite project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses.
+
+
+==============================================================================
+For SnapTree:
+==============================================================================
+This product bundles SnapTree, which is available under a
+"3-clause BSD" license. For details, see
+https://github.com/nbronson/snaptree/blob/master/LICENSE.
+
+==============================================================================
+For JSR 166 classes in "org.jsr166" package
+==============================================================================
+This product bundles JSR-166 classes which are donated to public domain.
+For details, see CC0 1.0 Universal (1.0), Public Domain Dedication,
+http://creativecommons.org/publicdomain/zero/1.0/
+
+==============================================================================
+For books used for tests in "org.apache.ignite.internal.processors.hadoop.books"
+==============================================================================
+This code bundles book text files used for testing purposes which contain
+the following header:
+
+This eBook is for the use of anyone anywhere at no cost and with
+almost no restrictions whatsoever. You may copy it, give it away or
+re-use it under the terms of the Project Gutenberg License included
+with this eBook or online at www.gutenberg.org
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4423a465/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 7649b39..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,238 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
-==============================================================================
-Apache Ignite (incubating) Subcomponents:
-
-The Apache Ignite project contains subcomponents with separate copyright
-notices and license terms. Your use of the source code for the these
-subcomponents is subject to the terms and conditions of the following
-licenses.
-
-
-==============================================================================
-For SnapTree:
-==============================================================================
-This product bundles SnapTree, which is available under a
-"3-clause BSD" license. For details, see
-https://github.com/nbronson/snaptree/blob/master/LICENSE.
-
-==============================================================================
-For JSR 166 classes in "org.jsr166" package
-==============================================================================
-This product bundles JSR-166 classes which are donated to public domain.
-For details, see CC0 1.0 Universal (1.0), Public Domain Dedication,
-http://creativecommons.org/publicdomain/zero/1.0/
-
-==============================================================================
-For books used for tests in "org.apache.ignite.internal.processors.hadoop.books"
-==============================================================================
-This code bundles book text files used for testing purposes which contain
-the following header:
-
-This eBook is for the use of anyone anywhere at no cost and with
-almost no restrictions whatsoever. You may copy it, give it away or
-re-use it under the terms of the Project Gutenberg License included
-with this eBook or online at www.gutenberg.org
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4423a465/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..298d05b
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,12 @@
+Apache Ignite (incubating)
+Copyright 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
+This software includes code from IntelliJ IDEA Community Edition
+Copyright (C) JetBrains s.r.o.
+https://www.jetbrains.com/idea/
+Licensed under Apache License, Version 2.0.
+http://search.maven.org/#artifactdetails%7Corg.jetbrains%7Cannotations%7C13.0%7Cjar
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4423a465/NOTICE.txt
----------------------------------------------------------------------
diff --git a/NOTICE.txt b/NOTICE.txt
deleted file mode 100644
index 298d05b..0000000
--- a/NOTICE.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Apache Ignite (incubating)
-Copyright 2015 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
-This software includes code from IntelliJ IDEA Community Edition
-Copyright (C) JetBrains s.r.o.
-https://www.jetbrains.com/idea/
-Licensed under Apache License, Version 2.0.
-http://search.maven.org/#artifactdetails%7Corg.jetbrains%7Cannotations%7C13.0%7Cjar
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4423a465/assembly/release-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-base.xml b/assembly/release-base.xml
index 88f1d10..21c4518 100644
--- a/assembly/release-base.xml
+++ b/assembly/release-base.xml
@@ -23,12 +23,12 @@
http://maven.apache.org/xsd/component-1.1.2.xsd">
<files>
<file>
- <source>LICENSE.txt</source>
+ <source>LICENSE</source>
<outputDirectory>/</outputDirectory>
</file>
<file>
- <source>NOTICE.txt</source>
+ <source>NOTICE</source>
<outputDirectory>/</outputDirectory>
</file>
[3/5] incubator-ignite git commit: ignite-484 - minor
Posted by se...@apache.org.
ignite-484 - minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7436a512
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7436a512
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7436a512
Branch: refs/heads/ignite-484
Commit: 7436a5129a67700f0dee7b2d07277d8732df24b8
Parents: 5e877cc
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue May 19 23:44:48 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue May 19 23:44:48 2015 +0300
----------------------------------------------------------------------
.../processors/query/h2/IgniteH2Indexing.java | 7 +++
.../query/h2/twostep/GridMapQueryExecutor.java | 59 +-------------------
.../h2/twostep/GridReduceQueryExecutor.java | 15 ++---
.../IgniteCacheQueryNodeRestartSelfTest.java | 2 +
4 files changed, 14 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7436a512/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 31a33ef..676dce8 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1392,6 +1392,13 @@ public class IgniteH2Indexing implements GridQueryIndexing {
}
/**
+ * @return Current topology version.
+ */
+ public AffinityTopologyVersion topologyVersion() {
+ return ctx.discovery().topologyVersionEx();
+ }
+
+ /**
* Wrapper to store connection and flag is schema set or not.
*/
private static class ConnectionWrapper {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7436a512/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 39595b1..aadc511 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -36,7 +36,6 @@ import org.apache.ignite.marshaller.*;
import org.apache.ignite.plugin.extensions.communication.*;
import org.h2.jdbc.*;
import org.h2.result.*;
-import org.h2.store.*;
import org.h2.value.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -465,68 +464,12 @@ public class GridMapQueryExecutor {
loc ? null : Collections.<Message>emptyList(),
loc ? Collections.<Value[]>emptyList() : null);
- msg.retry(ctx.discovery().topologyVersionEx());
+ msg.retry(h2.topologyVersion());
ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.PUBLIC_POOL);
}
/**
- * @param bytes Bytes.
- * @return Rows.
- */
- public static List<Value[]> unmarshallRows(byte[] bytes) {
- Data data = Data.create(null, bytes);
-
- int rowCnt = data.readVarInt();
-
- if (rowCnt == 0)
- return Collections.emptyList();
-
- ArrayList<Value[]> rows = new ArrayList<>(rowCnt);
-
- int cols = data.readVarInt();
-
- for (int r = 0; r < rowCnt; r++) {
- Value[] row = new Value[cols];
-
- for (int c = 0; c < cols; c++)
- row[c] = data.readValue();
-
- rows.add(row);
- }
-
- return rows;
- }
-
- /**
- * @param rows Rows.
- * @return Bytes.
- */
- public static byte[] marshallRows(Collection<Value[]> rows) {
- Data data = Data.create(null, 256);
-
- data.writeVarInt(rows.size());
-
- boolean first = true;
-
- for (Value[] row : rows) {
- if (first) {
- data.writeVarInt(row.length);
-
- first = false;
- }
-
- for (Value val : row) {
- data.checkCapacity(data.getValueLen(val));
-
- data.writeValue(val);
- }
- }
-
- return Arrays.copyOf(data.getBytes(), data.length());
- }
-
- /**
*
*/
private class QueryResults {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7436a512/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index bb6801c..eb6db88 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -118,7 +118,7 @@ public class GridReduceQueryExecutor {
* @param h2 H2 Indexing.
* @throws IgniteCheckedException If failed.
*/
- public void start(final GridKernalContext ctx, IgniteH2Indexing h2) throws IgniteCheckedException {
+ public void start(final GridKernalContext ctx, final IgniteH2Indexing h2) throws IgniteCheckedException {
this.ctx = ctx;
this.h2 = h2;
@@ -146,7 +146,7 @@ public class GridReduceQueryExecutor {
for (GridMergeTable tbl : r.tbls) {
if (tbl.getScanIndex(null).hasSource(nodeId)) {
// Will attempt to retry. If reduce query was started it will fail on next page fetching.
- retry(r, topologyVersion(), nodeId);
+ retry(r, h2.topologyVersion(), nodeId);
break;
}
@@ -279,13 +279,6 @@ public class GridReduceQueryExecutor {
}
/**
- * @return Current topology version.
- */
- private AffinityTopologyVersion topologyVersion() {
- return ctx.discovery().topologyVersionEx();
- }
-
- /**
* @param cctx Cache context.
* @param qry Query.
* @return Cursor.
@@ -304,7 +297,7 @@ public class GridReduceQueryExecutor {
r.conn = (JdbcConnection)h2.connectionForSpace(space);
- AffinityTopologyVersion topVer = topologyVersion();
+ AffinityTopologyVersion topVer = h2.topologyVersion();
Collection<ClusterNode> nodes = ctx.discovery().cacheAffinityNodes(space, topVer);
@@ -387,7 +380,7 @@ public class GridReduceQueryExecutor {
}
}
else // Send failed -> retry.
- retry = topologyVersion();
+ retry = h2.topologyVersion();
ResultSet res = null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7436a512/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
index 4edef55..128e148 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
import org.apache.ignite.*;
import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.affinity.rendezvous.*;
import org.apache.ignite.cache.query.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
@@ -79,6 +80,7 @@ public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTe
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setAtomicityMode(TRANSACTIONAL);
cc.setRebalanceMode(CacheRebalanceMode.SYNC);
+ cc.setAffinity(new RendezvousAffinityFunction(false, 15));
cc.setIndexedTypes(
Integer.class, Integer.class
);
[5/5] incubator-ignite git commit: Merge branch 'ignite-sprint-4' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-484
Posted by se...@apache.org.
Merge branch 'ignite-sprint-4' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-484
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b1a512b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b1a512b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b1a512b5
Branch: refs/heads/ignite-484
Commit: b1a512b590f8a6857b1f139ff8aa2c2781be367b
Parents: dc6f272 4423a46
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed May 20 00:50:47 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed May 20 00:50:47 2015 +0300
----------------------------------------------------------------------
LICENSE | 238 +++++++++++++++++++++++++++++++++++++++++
LICENSE.txt | 238 -----------------------------------------
NOTICE | 12 +++
NOTICE.txt | 12 ---
assembly/release-base.xml | 4 +-
5 files changed, 252 insertions(+), 252 deletions(-)
----------------------------------------------------------------------
[4/5] incubator-ignite git commit: ignite-484 - backup filter fix +
clean up
Posted by se...@apache.org.
ignite-484 - backup filter fix + clean up
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/dc6f2723
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/dc6f2723
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/dc6f2723
Branch: refs/heads/ignite-484
Commit: dc6f27236f393d252541665d8e4579cf418c7a36
Parents: 7436a51
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed May 20 00:47:02 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed May 20 00:47:02 2015 +0300
----------------------------------------------------------------------
.../cache/query/GridCacheQueryManager.java | 33 --------------------
.../processors/query/GridQueryIndexing.java | 12 ++-----
.../processors/query/GridQueryProcessor.java | 13 ++------
.../processors/query/h2/IgniteH2Indexing.java | 17 +++++-----
.../query/h2/twostep/GridMapQueryExecutor.java | 2 +-
5 files changed, 13 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc6f2723/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index d3ebe60..e924886 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -1856,39 +1856,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
}
/**
- * @param f1 First filter.
- * @param f2 Second filter.
- * @return And filter of the given two.
- */
- @Nullable private static IndexingQueryFilter and(@Nullable final IndexingQueryFilter f1,
- @Nullable final IndexingQueryFilter f2) {
- if (f1 == null)
- return f2;
-
- if (f2 == null)
- return f1;
-
- return new IndexingQueryFilter() {
- @Nullable @Override public <K, V> IgniteBiPredicate<K, V> forSpace(String spaceName) {
- final IgniteBiPredicate<K, V> fltr1 = f1.forSpace(spaceName);
- final IgniteBiPredicate<K, V> fltr2 = f2.forSpace(spaceName);
-
- if (fltr1 == null)
- return fltr2;
-
- if (fltr2 == null)
- return fltr1;
-
- return new IgniteBiPredicate<K, V>() {
- @Override public boolean apply(K k, V v) {
- return fltr1.apply(k, v) && fltr2.apply(k, v);
- }
- };
- }
- };
- }
-
- /**
* Prints memory statistics for debugging purposes.
*/
@Override public void printMemoryStats() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc6f2723/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
index b1c3970..6b1401d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
@@ -21,12 +21,12 @@ import org.apache.ignite.*;
import org.apache.ignite.cache.query.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.affinity.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.lang.*;
-import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.indexing.*;
import org.jetbrains.annotations.*;
@@ -222,14 +222,8 @@ public interface GridQueryIndexing {
/**
* Returns backup filter.
*
+ * @param topVer Topology version.
* @return Backup filter.
*/
- public IndexingQueryFilter backupFilter();
-
- /**
- * Gets message factory.
- *
- * @return Message factory.
- */
- public MessageFactory messageFactory();
+ public IndexingQueryFilter backupFilter(AffinityTopologyVersion topVer);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc6f2723/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 7a3cb68..afd0386 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -24,7 +24,6 @@ import org.apache.ignite.cache.query.annotations.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
import org.apache.ignite.internal.processors.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.cache.query.*;
@@ -36,7 +35,6 @@ import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.util.worker.*;
import org.apache.ignite.lang.*;
-import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.spi.indexing.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -605,7 +603,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
throw new CacheException("Failed to find SQL table for type: " + type);
final GridCloseableIterator<IgniteBiTuple<K,V>> i = idx.query(space, sqlQry, F.asList(params), typeDesc,
- idx.backupFilter());
+ idx.backupFilter(null));
if (ctx.event().isRecordable(EVT_CACHE_QUERY_EXECUTED)) {
ctx.event().record(new CacheQueryExecutedEvent<>(
@@ -652,13 +650,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
}
/**
- * @return Message factory for {@link GridIoManager}.
- */
- public MessageFactory messageFactory() {
- return idx == null ? null : idx.messageFactory();
- }
-
- /**
* Closeable iterator.
*/
private static interface ClIter<X> extends AutoCloseable, Iterator<X> {
@@ -679,7 +670,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
String sql = qry.getSql();
Object[] args = qry.getArgs();
- GridQueryFieldsResult res = idx.queryFields(space, sql, F.asList(args), idx.backupFilter());
+ GridQueryFieldsResult res = idx.queryFields(space, sql, F.asList(args), idx.backupFilter(null));
if (ctx.event().isRecordable(EVT_CACHE_QUERY_EXECUTED)) {
ctx.event().record(new CacheQueryExecutedEvent<>(
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc6f2723/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 676dce8..1cfc314 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
import org.apache.ignite.cache.*;
import org.apache.ignite.cache.query.*;
import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.affinity.*;
@@ -31,7 +32,6 @@ import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.processors.query.h2.opt.*;
import org.apache.ignite.internal.processors.query.h2.sql.*;
import org.apache.ignite.internal.processors.query.h2.twostep.*;
-import org.apache.ignite.internal.processors.query.h2.twostep.msg.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.offheap.unsafe.*;
@@ -40,7 +40,6 @@ import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.marshaller.jdk.*;
-import org.apache.ignite.plugin.extensions.communication.*;
import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.indexing.*;
@@ -1355,7 +1354,9 @@ public class IgniteH2Indexing implements GridQueryIndexing {
}
/** {@inheritDoc} */
- @Override public IndexingQueryFilter backupFilter() {
+ @Override public IndexingQueryFilter backupFilter(AffinityTopologyVersion topVer) {
+ final AffinityTopologyVersion topVer0 = topVer != null ? topVer : AffinityTopologyVersion.NONE;
+
return new IndexingQueryFilter() {
@Nullable @Override public <K, V> IgniteBiPredicate<K, V> forSpace(String spaceName) {
final GridCacheAdapter<Object, Object> cache = ctx.cache().internalCache(spaceName);
@@ -1363,21 +1364,17 @@ public class IgniteH2Indexing implements GridQueryIndexing {
if (cache.context().isReplicated() || cache.configuration().getBackups() == 0)
return null;
+ final ClusterNode locNode = ctx.discovery().localNode();
+
return new IgniteBiPredicate<K, V>() {
@Override public boolean apply(K k, V v) {
- return cache.context().affinity().primary(ctx.discovery().localNode(), k,
- AffinityTopologyVersion.NONE);
+ return cache.context().affinity().primary(locNode, k, topVer0);
}
};
}
};
}
- /** {@inheritDoc} */
- @Override public MessageFactory messageFactory() {
- return new GridH2ValueMessageFactory();
- }
-
/**
* @param topVer Topology version.
* @throws IgniteCheckedException If failed.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc6f2723/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index aadc511..112949f 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -303,7 +303,7 @@ public class GridMapQueryExecutor {
if (nodeRess.put(req.requestId(), qr) != null)
throw new IllegalStateException();
- h2.setFilters(h2.backupFilter());
+ h2.setFilters(h2.backupFilter(topVer));
// TODO Prepare snapshots for all the needed tables before the run.
[2/5] incubator-ignite git commit: ignite-484 - fixes + tests enabled
Posted by se...@apache.org.
ignite-484 - fixes + tests enabled
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5e877cc7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5e877cc7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5e877cc7
Branch: refs/heads/ignite-484
Commit: 5e877cc75d75c63240296e1e17ba517805a30827
Parents: f2b96e0
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue May 19 22:43:43 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue May 19 22:43:43 2015 +0300
----------------------------------------------------------------------
.../h2/twostep/GridMergeIndexUnsorted.java | 2 +-
.../h2/twostep/GridReduceQueryExecutor.java | 122 ++++++++++++++-----
.../query/h2/twostep/GridResultPage.java | 2 +-
.../IgniteCacheQueryNodeRestartSelfTest.java | 21 +++-
.../IgniteCacheQuerySelfTestSuite.java | 2 +-
5 files changed, 111 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e877cc7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index 76a52e9..fdee17a 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -60,7 +60,7 @@ public class GridMergeIndexUnsorted extends GridMergeIndex {
Iterator<Value[]> iter = Collections.emptyIterator();
@Override public boolean hasNext() {
- while (!iter.hasNext()){
+ while (!iter.hasNext()) {
GridResultPage page;
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e877cc7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 76de71b..bb6801c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -145,7 +145,8 @@ public class GridReduceQueryExecutor {
for (QueryRun r : runs.values()) {
for (GridMergeTable tbl : r.tbls) {
if (tbl.getScanIndex(null).hasSource(nodeId)) {
- fail(r, nodeId, "Node left the topology.");
+ // Will attempt to retry. If reduce query was started it will fail on next page fetching.
+ retry(r, topologyVersion(), nodeId);
break;
}
@@ -201,15 +202,8 @@ public class GridReduceQueryExecutor {
* @param msg Error message.
*/
private void fail(QueryRun r, UUID nodeId, String msg) {
- if (r != null) {
- r.rmtErr = new CacheException("Failed to execute map query on the node: " + nodeId + ", " + msg);
-
- while(r.latch.getCount() != 0)
- r.latch.countDown();
-
- for (GridMergeTable tbl : r.tbls)
- tbl.getScanIndex(null).fail(nodeId);
- }
+ if (r != null)
+ r.state(new CacheException("Failed to execute map query on the node: " + nodeId + ", " + msg), nodeId);
}
/**
@@ -234,8 +228,16 @@ public class GridReduceQueryExecutor {
try {
page = new GridResultPage(ctx, node.id(), msg, false) {
@Override public void fetchNextPage() {
- if (r.rmtErr != null)
- throw new CacheException("Next page fetch failed.", r.rmtErr);
+ Object errState = r.state.get();
+
+ if (errState != null) {
+ CacheException e = new CacheException("Failed to fetch data from node: " + node.id());
+
+ if (errState instanceof CacheException)
+ e.addSuppressed((Throwable)errState);
+
+ throw e;
+ }
try {
GridQueryNextPageRequest msg0 = new GridQueryNextPageRequest(qryReqId, qry, pageSize);
@@ -261,17 +263,29 @@ public class GridReduceQueryExecutor {
idx.addPage(page);
- if (msg.retry() != null) {
- r.retry = msg.retry();
-
- while (r.latch.getCount() != 0)
- r.latch.countDown();
- }
+ if (msg.retry() != null)
+ retry(r, msg.retry(), node.id());
else if (msg.allRows() != -1) // Only the first page contains row count.
r.latch.countDown();
}
/**
+ * @param r Query run.
+ * @param retryVer Retry version.
+ * @param nodeId Node ID.
+ */
+ private void retry(QueryRun r, AffinityTopologyVersion retryVer, UUID nodeId) {
+ r.state(retryVer, nodeId);
+ }
+
+ /**
+ * @return Current topology version.
+ */
+ private AffinityTopologyVersion topologyVersion() {
+ return ctx.discovery().topologyVersionEx();
+ }
+
+ /**
* @param cctx Cache context.
* @param qry Query.
* @return Cursor.
@@ -290,10 +304,13 @@ public class GridReduceQueryExecutor {
r.conn = (JdbcConnection)h2.connectionForSpace(space);
- AffinityTopologyVersion topVer = ctx.discovery().topologyVersionEx();
+ AffinityTopologyVersion topVer = topologyVersion();
Collection<ClusterNode> nodes = ctx.discovery().cacheAffinityNodes(space, topVer);
+ if (F.isEmpty(nodes))
+ throw new CacheException("No data nodes found for cache: " + space);
+
if (cctx.isReplicated() || qry.explain()) {
assert qry.explain() || !nodes.contains(ctx.cluster().get().localNode()) : "We must be on a client node.";
@@ -342,17 +359,37 @@ public class GridReduceQueryExecutor {
mapQry.marshallParams(m);
}
- send(nodes, new GridQueryRequest(qryReqId, r.pageSize, space, mapQrys, topVer,
- extraSpaces(space, qry.spaces())));
+ boolean ok = false;
+
+ try {
+ send(nodes, new GridQueryRequest(qryReqId, r.pageSize, space, mapQrys, topVer,
+ extraSpaces(space, qry.spaces())));
+
+ ok = true;
+ }
+ catch (IgniteCheckedException e) {
+ U.warn(log, "Failed to send query request to nodes: " + nodes);
+ }
+
+ AffinityTopologyVersion retry = null;
- U.await(r.latch);
+ if (ok) { // Sent successfully.
+ U.await(r.latch);
- if (r.rmtErr != null)
- throw new CacheException("Failed to run map query remotely.", r.rmtErr);
+ Object state = r.state.get();
- ResultSet res = null;
+ if (state != null) {
+ if (state instanceof CacheException)
+ throw new CacheException("Failed to run map query remotely.", (CacheException)state);
- AffinityTopologyVersion retry = r.retry;
+ if (state instanceof AffinityTopologyVersion)
+ retry = (AffinityTopologyVersion)state; // Remote nodes can ask us to retry.
+ }
+ }
+ else // Send failed -> retry.
+ retry = topologyVersion();
+
+ ResultSet res = null;
if (retry == null) {
if (qry.explain())
@@ -364,8 +401,14 @@ public class GridReduceQueryExecutor {
}
for (GridMergeTable tbl : r.tbls) {
- if (!tbl.getScanIndex(null).fetchedAll()) // We have to explicitly cancel queries on remote nodes.
- send(nodes, new GridQueryCancelRequest(qryReqId));
+ if (!tbl.getScanIndex(null).fetchedAll()) { // We have to explicitly cancel queries on remote nodes.
+ try {
+ send(nodes, new GridQueryCancelRequest(qryReqId));
+ }
+ catch (IgniteCheckedException e) {
+ U.warn(log, "Failed to send cancel request to nodes: " + nodes);
+ }
+ }
// dropTable(r.conn, tbl.getName()); TODO
}
@@ -697,11 +740,26 @@ public class GridReduceQueryExecutor {
/** */
private int pageSize;
- /** */
- private volatile CacheException rmtErr;
+ /** Can be either CacheException in case of error or AffinityTopologyVersion to retry if needed. */
+ private final AtomicReference<Object> state = new AtomicReference<>();
- /** */
- private volatile AffinityTopologyVersion retry;
+ /**
+ * @param o Fail state object.
+ * @param nodeId Node ID.
+ */
+ void state(Object o, UUID nodeId) {
+ assert o != null;
+ assert o instanceof CacheException || o instanceof AffinityTopologyVersion : o.getClass();
+
+ if (!state.compareAndSet(null, o))
+ return;
+
+ while (latch.getCount() != 0) // We don't need to wait for all nodes to reply.
+ latch.countDown();
+
+ for (GridMergeTable tbl : tbls) // Fail all merge indexes.
+ tbl.getScanIndex(null).fail(nodeId);
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e877cc7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
index 9392fd1..35bfab9 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridResultPage.java
@@ -161,7 +161,7 @@ public class GridResultPage {
* Request next page.
*/
public void fetchNextPage() {
- throw new UnsupportedOperationException();
+ throw new CacheException("Failed to fetch data from node: " + src);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e877cc7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
index 5dce126..4edef55 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
@@ -78,6 +78,7 @@ public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTe
cc.setBackups(1);
cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
cc.setAtomicityMode(TRANSACTIONAL);
+ cc.setRebalanceMode(CacheRebalanceMode.SYNC);
cc.setIndexedTypes(
Integer.class, Integer.class
);
@@ -106,7 +107,7 @@ public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTe
for (int i = 0; i < KEY_CNT; i++)
cache.put(i, i);
- assertEquals(KEY_CNT, cache.localSize());
+ assertEquals(KEY_CNT, cache.size());
final AtomicInteger qryCnt = new AtomicInteger();
@@ -116,9 +117,23 @@ public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTe
@Override public void applyx() throws IgniteCheckedException {
while (!done.get()) {
Collection<Cache.Entry<Integer, Integer>> res =
- cache.query(new SqlQuery(Integer.class, "_val >= 0")).getAll();
+ cache.query(new SqlQuery<Integer, Integer>(Integer.class, "true")).getAll();
- assertFalse(res.isEmpty());
+ Set<Integer> keys = new HashSet<>();
+
+ for (Cache.Entry<Integer,Integer> entry : res)
+ keys.add(entry.getKey());
+
+ if (KEY_CNT > keys.size()) {
+ for (int i = 0; i < KEY_CNT; i++) {
+ if (!keys.contains(i))
+ assertEquals(Integer.valueOf(i), cache.get(i));
+ }
+
+ fail("res size: " + res.size());
+ }
+
+ assertEquals(KEY_CNT, keys.size());
int c = qryCnt.incrementAndGet();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e877cc7/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index ce05980..915b118 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -64,7 +64,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
suite.addTestSuite(IgniteCacheSqlQueryMultiThreadedSelfTest.class);
suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
-// suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest.class); TODO IGNITE-484
+ suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest.class);
suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
suite.addTestSuite(GridCacheCrossCacheQuerySelfTest.class);
suite.addTestSuite(GridCacheQuerySerializationSelfTest.class);