[ignite-3] 02/03: Code review fixes

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch ignite-14198
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit c50dc4807799ca5b4b1fa131a2ec3b4b46b52c42
Author: Andrey Gura 
AuthorDate: Wed Mar 24 01:55:16 2021 +0300

Code review fixes
---
 .../org/apache/ignite/metastorage/client/MetaStorageService.java   | 7 ---
 .../main/java/org/apache/ignite/metastorage/common/Condition.java  | 5 ++---
 .../main/java/org/apache/ignite/metastorage/common/Operations.java | 5 -
 .../java/org/apache/ignite/metastorage/common/WatchListener.java   | 2 +-
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git 
a/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
 
b/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
index 255ce4b..2fb7b47 100644
--- 
a/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
+++ 
b/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
@@ -264,7 +264,7 @@ public interface MetaStorageService {
  *
  * @param keyFrom Start key of range (inclusive). Could be {@code null}.
  * @param keyTo End key of range (exclusive). Could be {@code null}.
- * @param revision Start revision inclusive. {@code 0} - all revision,
+ * @param revision Start revision inclusive. {@code 0} - all revisions,
  * {@code -1} - latest revision (accordingly to current meta storage 
state).
  * @param lsnr Listener which will be notified for each update.
  * @return Subscription identifier. Could be used in {@link #stopWatch} 
method in order to cancel subscription.
@@ -281,8 +281,8 @@ public interface MetaStorageService {
 /**
  * Subscribes on meta storage updates for the given key.
  *
- * @param key The target key. Could be {@code null}.
- * @param revision Start revision inclusive. {@code 0} - all revision,
+ * @param key The target key. Couldn't be {@code null}.
+ * @param revision Start revision inclusive. {@code 0} - all revisions,
  * {@code -1} - latest revision (accordingly to current meta storage 
state).
  * @param lsnr Listener which will be notified for each update.
  * @return Subscription identifier. Could be used in {@link #stopWatch} 
method in order to cancel subscription.
@@ -329,6 +329,7 @@ public interface MetaStorageService {
  * @return Completed future. Couldn't be {@code null}.
  * @throws OperationTimeoutException If the operation is timed out. Will 
be thrown on getting future result.
  */
+@NotNull
 CompletableFuture compact();
 }
 
diff --git 
a/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Condition.java
 
b/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Condition.java
index ee3cab6..359829b 100644
--- 
a/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Condition.java
+++ 
b/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Condition.java
@@ -71,7 +71,6 @@ public final class Condition {
 // No-op.
 }
 
-// TODO: eq, ne, lt, le, gt, ge
 /**
  * Produces the condition of type {@link Type#EQUAL}. This condition 
tests the given revision on equality with
  * target entry revision.
@@ -280,8 +279,8 @@ public final class Condition {
 }
 
 /**
- * Produces the condition of type {@link Type#NOT_EQUAL}. This 
condition tests the given мфдгу on inequality
- * with target entry мфдгу.
+ * Produces the condition of type {@link Type#NOT_EQUAL}. This 
condition tests the given value on inequality
+ * with target entry value.
  *
  * @param val The value.
  * @return The condition of type {@link Type#NOT_EQUAL}.
diff --git 
a/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Operations.java
 
b/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Operations.java
index d7296a7..994f4bd 100644
--- 
a/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Operations.java
+++ 
b/modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Operations.java
@@ -24,6 +24,9 @@ package org.apache.ignite.metastorage.common;
  * @see Operation
  */
 public final class Operations {
+/** No-op operation singleton. */
+private static final Operation.NoOp NO_OP = new Operation.NoOp();
+
 /**
  * Creates operation of type remove. This type of operation removes 
entry.
  *
@@ -49,7 +52,7 @@ public final class Operations {
  * @return Operation of type noop.
  */
 public static Operation noop() {
-return new Operation(new Operation.NoOp());
+return new Operation(NO_OP);
 }

[ignite-3] 01/03: IGNITE-14198 Meta storage client interface

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch ignite-14198
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 40ded7fddb474253f2b504c96f6ad70db0d53171
Author: Andrey Gura 
AuthorDate: Wed Feb 17 18:53:22 2021 +0300

IGNITE-14198 Meta storage client interface
---
 modules/metastorage-client/pom.xml |  42 +++
 .../metastorage/client/MetaStorageService.java | 334 +++
 .../ignite/metastorage/client/package-info.java|  21 ++
 modules/metastorage-common/pom.xml |  41 +++
 .../metastorage/common/CompactedException.java |  59 
 .../ignite/metastorage/common/Condition.java   | 357 +
 .../ignite/metastorage/common/Conditions.java  |  53 +++
 .../apache/ignite/metastorage/common/Cursor.java   |  27 ++
 .../apache/ignite/metastorage/common/Entry.java|  52 +++
 .../ignite/metastorage/common/Operation.java   |  84 +
 .../common/OperationTimeoutException.java  |  59 
 .../ignite/metastorage/common/Operations.java  |  61 
 .../ignite/metastorage/common/WatchEvent.java  |  58 
 .../ignite/metastorage/common/WatchListener.java   |  42 +++
 .../ignite/metastorage/common/package-info.java|  21 ++
 pom.xml|   2 +
 16 files changed, 1313 insertions(+)

diff --git a/modules/metastorage-client/pom.xml 
b/modules/metastorage-client/pom.xml
new file mode 100644
index 000..0d21c81
--- /dev/null
+++ b/modules/metastorage-client/pom.xml
@@ -0,0 +1,42 @@
+
+
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+
+org.apache.ignite
+ignite-parent
+1
+../../parent/pom.xml
+
+
+metastorage-client
+3.0.0-SNAPSHOT
+
+
+
+org.apache.ignite
+metastorage-common
+${project.version}
+
+
+
diff --git 
a/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
 
b/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
new file mode 100644
index 000..255ce4b
--- /dev/null
+++ 
b/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
@@ -0,0 +1,334 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.ignite.metastorage.client;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.metastorage.common.CompactedException;
+import org.apache.ignite.metastorage.common.Condition;
+import org.apache.ignite.metastorage.common.Cursor;
+import org.apache.ignite.metastorage.common.Entry;
+import org.apache.ignite.metastorage.common.Operation;
+import org.apache.ignite.metastorage.common.OperationTimeoutException;
+import org.apache.ignite.metastorage.common.WatchListener;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Defines interface for access to a meta storage service.
+ */
+public interface MetaStorageService {
+/**
+ * Retrieves an entry for the given key.
+ *
+ * @param key Key. Couldn't be {@code null}.
+ * @return An entry for the given key. Couldn't be {@code null}.
+ * @throws OperationTimeoutException If the operation is timed out. Will 
be thrown on getting future result.
+ * @see Entry
+ */
+@NotNull
+CompletableFuture get(@NotNull byte[] key);
+
+/**
+ * Retrieves an entry for the given key and the revision upper bound.
+ *
+ * @param key The key. Couldn't be {@code null}.
+ * @param revUpperBound  The upper bound for entry revisions. Must be 
positive.
+ * @return An entry for the given key and maximum revision limited by 
{@code revUpperBound}.
+ * Couldn't be {@code null}.
+ * @throws OperationTimeoutException If the operation is timed out. Will 
be thrown on getting 

[ignite-3] 03/03: IGNITE-14198 Revised meta storage interface: introduced Key entity instead of byte array.

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch ignite-14198
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 51acdb7b2bdb2080d4fb62ee655dc8383ec49d6c
Author: Andrey Gura 
AuthorDate: Fri Mar 26 00:22:04 2021 +0300

IGNITE-14198 Revised meta storage interface: introduced Key entity instead 
of byte array.
---
 .../ignite/util/LexicographicComparator.java   | 51 +
 .../metastorage/client/MetaStorageService.java | 88 +-
 modules/metastorage-common/pom.xml |  6 ++
 .../apache/ignite/metastorage/common/Entry.java|  4 +-
 .../org/apache/ignite/metastorage/common/Key.java  | 81 
 pom.xml|  2 +-
 6 files changed, 192 insertions(+), 40 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/util/LexicographicComparator.java
 
b/modules/core/src/main/java/org/apache/ignite/util/LexicographicComparator.java
new file mode 100644
index 000..103fdc2
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/util/LexicographicComparator.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.ignite.util;
+
+import java.util.Comparator;
+
+/**
+ * Byte array lexicographic comparator.
+ */
+public class LexicographicComparator implements Comparator {
+/** Comparator instance. */
+private static final Comparator INSTANCE = new 
LexicographicComparator();
+
+/**
+ * Returns instance of comparator.
+ *
+ * @return Comparator instance.
+ */
+public static Comparator getInstance() {
+return INSTANCE;
+}
+
+/** {@inheritDoc} */
+@Override public int compare(byte[] o1, byte[] o2) {
+int minLength = Math.min(o1.length, o2.length);
+
+for (int i = 0; i < minLength; ++i) {
+int res = Byte.compareUnsigned(o1[i], o2[i]);
+
+if (res != 0)
+return res;
+}
+
+return o1.length - o2.length;
+}
+}
diff --git 
a/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
 
b/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
index 2fb7b47..50e19dd 100644
--- 
a/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
+++ 
b/modules/metastorage-client/src/main/java/org/apache/ignite/metastorage/client/MetaStorageService.java
@@ -18,13 +18,14 @@
 package org.apache.ignite.metastorage.client;
 
 import java.util.Collection;
-import java.util.List;
-import java.util.UUID;
+import java.util.Map;
 import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.metastorage.common.CompactedException;
 import org.apache.ignite.metastorage.common.Condition;
 import org.apache.ignite.metastorage.common.Cursor;
 import org.apache.ignite.metastorage.common.Entry;
+import org.apache.ignite.metastorage.common.Key;
 import org.apache.ignite.metastorage.common.Operation;
 import org.apache.ignite.metastorage.common.OperationTimeoutException;
 import org.apache.ignite.metastorage.common.WatchListener;
@@ -41,10 +42,11 @@ public interface MetaStorageService {
  * @param key Key. Couldn't be {@code null}.
  * @return An entry for the given key. Couldn't be {@code null}.
  * @throws OperationTimeoutException If the operation is timed out. Will 
be thrown on getting future result.
+ * @see Key
  * @see Entry
  */
 @NotNull
-CompletableFuture get(@NotNull byte[] key);
+CompletableFuture get(@NotNull Key key);
 
 /**
  * Retrieves an entry for the given key and the revision upper bound.
@@ -56,23 +58,24 @@ public interface MetaStorageService {
  * @throws OperationTimeoutException If the operation is timed out. Will 
be thrown on getting future result.
  * @throws CompactedException If the desired revisions are removed from 
the storage due to a compaction.
  * Will be thrown on getting future result.
+ * @see Key
  * @see Entry
  */
 @NotNull
-

[ignite-3] branch ignite-14198 updated (973d0fe -> 51acdb7)

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a change to branch ignite-14198
in repository https://gitbox.apache.org/repos/asf/ignite-3.git.


omit 973d0fe  Code review fixes
omit 360d68a  IGNITE-14198 Meta storage client interface
 add 2e6ea88  IGNITE-14371 JSON representation for configuration & partial 
code for JSON update requests parsing. (#72)
 add a8919fe  IGNITE-14403 Added ignite-core module and IgniteUuid class
 new 40ded7f  IGNITE-14198 Meta storage client interface
 new c50dc48  Code review fixes
 new 51acdb7  IGNITE-14198 Revised meta storage interface: introduced Key 
entity instead of byte array.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (973d0fe)
\
 N -- N -- N   refs/heads/ignite-14198 (51acdb7)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ignite/configuration/ConfigurationChanger.java |  10 +
 .../configuration/ConfigurationRegistry.java   |  42 
 .../apache/ignite/configuration/Configurator.java  |  28 ---
 .../configuration/annotation/ConfigValue.java  |   4 -
 .../ignite/configuration/internal/SuperRoot.java   |   6 +
 .../internal/util/ConfigurationUtil.java   |  17 +-
 .../configuration/tree/ConfigurationVisitor.java   |   2 +-
 .../ignite/configuration/tree/NamedListNode.java   |  12 +-
 modules/{configuration => core}/pom.xml|  36 ++--
 .../java/org/apache/ignite/lang/IgniteUuid.java| 135 
 .../apache/ignite/lang/IgniteUuidGenerator.java|  84 
 .../ignite/util/LexicographicComparator.java}  |  39 ++--
 .../metastorage/client/MetaStorageService.java |  88 
 modules/metastorage-common/pom.xml |   6 +
 .../apache/ignite/metastorage/common/Entry.java|   4 +-
 .../org/apache/ignite/metastorage/common/Key.java  |  81 +++
 modules/rest/pom.xml   |   1 +
 .../java/org/apache/ignite/rest/RestModule.java|  31 +--
 .../configuration/RestConfigurationSchema.java |  15 +-
 .../rest/presentation/json/JsonConverter.java  | 236 -
 .../rest/presentation/json/JsonPresentation.java   |  14 +-
 .../rest/presentation/json/JsonConverterTest.java  | 211 ++
 .../json/TestConfigurationStorage.java |  63 ++
 .../ignite/configuration/ConfigurationModule.java  |   2 +-
 pom.xml|   3 +-
 25 files changed, 1026 insertions(+), 144 deletions(-)
 delete mode 100644 
modules/configuration/src/main/java/org/apache/ignite/configuration/Configurator.java
 copy modules/{configuration => core}/pom.xml (70%)
 create mode 100644 
modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java
 create mode 100644 
modules/core/src/main/java/org/apache/ignite/lang/IgniteUuidGenerator.java
 copy 
modules/{schema/src/main/java/org/apache/ignite/internal/schema/builder/AbstractIndexBuilder.java
 => core/src/main/java/org/apache/ignite/util/LexicographicComparator.java} 
(53%)
 create mode 100644 
modules/metastorage-common/src/main/java/org/apache/ignite/metastorage/common/Key.java
 create mode 100644 
modules/rest/src/test/java/org/apache/ignite/rest/presentation/json/JsonConverterTest.java
 create mode 100644 
modules/rest/src/test/java/org/apache/ignite/rest/presentation/json/TestConfigurationStorage.java


[ignite-3] branch ignite-14403 deleted (was a8919fe)

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a change to branch ignite-14403
in repository https://gitbox.apache.org/repos/asf/ignite-3.git.


 was a8919fe  IGNITE-14403 Added ignite-core module and IgniteUuid class

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


[ignite-3] branch main updated (2e6ea88 -> a8919fe)

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git.


from 2e6ea88  IGNITE-14371 JSON representation for configuration & partial 
code for JSON update requests parsing. (#72)
 add a8919fe  IGNITE-14403 Added ignite-core module and IgniteUuid class

No new revisions were added by this update.

Summary of changes:
 modules/{configuration => core}/pom.xml|  36 +++---
 .../java/org/apache/ignite/lang/IgniteUuid.java| 135 +
 .../apache/ignite/lang/IgniteUuidGenerator.java|  84 +
 pom.xml|   1 +
 4 files changed, 241 insertions(+), 15 deletions(-)
 copy modules/{configuration => core}/pom.xml (70%)
 create mode 100644 
modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java
 create mode 100644 
modules/core/src/main/java/org/apache/ignite/lang/IgniteUuidGenerator.java


[ignite-3] 01/01: IGNITE-14403 Added ignite-core module and IgniteUuid class

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch ignite-14403
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit a8919feb9c7abe1e86a0f943d84bae1a697c18e8
Author: Andrey Gura 
AuthorDate: Thu Mar 25 18:16:13 2021 +0300

IGNITE-14403 Added ignite-core module and IgniteUuid class
---
 pom.xml => modules/core/pom.xml|  55 ++---
 .../java/org/apache/ignite/lang/IgniteUuid.java| 135 +
 .../apache/ignite/lang/IgniteUuidGenerator.java|  84 +
 pom.xml|   1 +
 4 files changed, 257 insertions(+), 18 deletions(-)

diff --git a/pom.xml b/modules/core/pom.xml
similarity index 52%
copy from pom.xml
copy to modules/core/pom.xml
index 4a225d9..c84ded1 100644
--- a/pom.xml
+++ b/modules/core/pom.xml
@@ -17,8 +17,10 @@
   limitations under the License.
 -->
 
-http://maven.apache.org/POM/4.0.0;
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
 4.0.0
 
@@ -26,23 +28,40 @@
 org.apache.ignite
 ignite-parent
 1
-parent
+../../parent/pom.xml
 
 
-apache-ignite
+ignite-core
 3.0.0-SNAPSHOT
-pom
-
-
-modules/api
-modules/bytecode
-modules/cli
-modules/cli-common
-modules/configuration
-modules/configuration-annotation-processor
-modules/network
-modules/rest
-modules/runner
-modules/schema
-
+
+
+
+
+org.junit.jupiter
+junit-jupiter-api
+test
+
+
+
+org.junit.jupiter
+junit-jupiter-engine
+test
+
+
+
+
+
+
+src/main/resources
+true
+
+
+
+
+
+org.apache.maven.plugins
+maven-compiler-plugin
+
+
+
 
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java 
b/modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java
new file mode 100644
index 000..d05ff50
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.ignite.lang;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+/**
+ * This is a faster performing version of {@link UUID}. On basic tests this 
version is at least
+ * 10x time faster for ID creation. It uses extra memory for 8-byte counter 
additionally to
+ * internal UUID.
+ */
+public final class IgniteUuid implements Comparable, Cloneable, 
Serializable {
+/** */
+private static final long serialVersionUID = 0L;
+
+/** */
+private final UUID gid;
+
+/** */
+private final long locId;
+
+/**
+ * Constructs {@code IgniteUuid} from a global and local identifiers.
+ *
+ * @param gid UUID.
+ * @param locId Counter.
+ */
+public IgniteUuid(UUID gid, long locId) {
+assert gid != null;
+
+this.gid = gid;
+this.locId = locId;
+}
+
+/**
+ * Converts string into {@code IgniteUuid}. The String must be in the 
format generated
+ * by {@link #toString() IgniteUuid.toString()} method.
+ *
+ * @param s String to convert to {@code IgniteUuid}.
+ * @return {@code IgniteUuid} instance representing given string.
+ */
+public static IgniteUuid fromString(String s) {
+int firstDash = s.indexOf('-');
+
+return new IgniteUuid(
+UUID.fromString(s.substring(firstDash + 1)),
+Long.valueOf(new StringBuilder(s.substring(0, 
firstDash)).reverse().toString(), 16)
+);
+}
+
+/**
+ * Gets a short string version of this ID. Use it only for UI where full 
version is
+ * available to the application.
+ *
+ * @return Short string version of this 

[ignite-3] branch ignite-14403 updated (d0aa194 -> a8919fe)

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a change to branch ignite-14403
in repository https://gitbox.apache.org/repos/asf/ignite-3.git.


 discard d0aa194  IGNITE-14403 Added ignite-core module and IgniteUuid class
 new a8919fe  IGNITE-14403 Added ignite-core module and IgniteUuid class

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d0aa194)
\
 N -- N -- N   refs/heads/ignite-14403 (a8919fe)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[ignite] branch ignite-cdc updated: IGNITE-13596 Flag to distinguish DataRecord on primary and backup added (#8904)

2021-03-25 Thread nizhikov
This is an automated email from the ASF dual-hosted git repository.

nizhikov pushed a commit to branch ignite-cdc
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-cdc by this push:
 new db8bb81  IGNITE-13596 Flag to distinguish DataRecord on primary and 
backup added (#8904)
db8bb81 is described below

commit db8bb814c5c5a4876b21de7a22126ed74d6ffddf
Author: Nikolay 
AuthorDate: Thu Mar 25 18:34:03 2021 +0300

IGNITE-13596 Flag to distinguish DataRecord on primary and backup added 
(#8904)
---
 .../util/GridCommandHandlerClusterByClassTest.java |   3 +-
 .../apache/ignite/util/GridCommandHandlerTest.java |   3 +-
 .../internal/pagemem/wal/record/DataEntry.java |  16 +++-
 .../internal/pagemem/wal/record/DataRecord.java|   2 +-
 .../internal/pagemem/wal/record/LazyDataEntry.java |   6 +-
 .../internal/pagemem/wal/record/MvccDataEntry.java |   2 +-
 .../pagemem/wal/record/UnwrapDataEntry.java|   6 +-
 .../internal/pagemem/wal/record/WALRecord.java |  23 -
 .../processors/cache/GridCacheMapEntry.java|  42 ++---
 .../GridDistributedTxRemoteAdapter.java|   3 +-
 .../dht/colocated/GridDhtDetachedCacheEntry.java   |   8 +-
 .../cache/distributed/near/GridNearCacheEntry.java |   8 +-
 .../GridCacheDatabaseSharedManager.java|   3 +
 .../wal/reader/StandaloneWalRecordsIterator.java   |   7 +-
 .../wal/serializer/RecordDataV1Serializer.java |  47 ++
 .../wal/serializer/RecordDataV2Serializer.java |  10 ++-
 .../cache/transactions/IgniteTxLocalAdapter.java   |   3 +-
 .../java/org/apache/ignite/TestStorageUtils.java   |   3 +-
 .../IgnitePdsSporadicDataRecordsOnBackupTest.java  |   2 +-
 ...CheckpointSimulationWithRealCpDisabledTest.java |   2 +-
 .../persistence/db/wal/IgniteWalRebalanceTest.java |   3 +-
 .../db/wal/reader/IgniteWalReaderTest.java | 100 -
 .../testframework/wal/record/RecordUtils.java  |   9 ++
 .../ignite/development/utils/DataEntryWrapper.java |   3 +-
 .../apache/ignite/development/utils/WalStat.java   |   2 +-
 .../utils/IgniteWalConverterArgumentsTest.java |   4 +-
 .../utils/IgniteWalConverterSensitiveDataTest.java |   3 +-
 .../development/utils/IgniteWalConverterTest.java  |   4 +-
 28 files changed, 257 insertions(+), 70 deletions(-)

diff --git 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassTest.java
 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassTest.java
index 4014d4e..aa55b91 100644
--- 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassTest.java
+++ 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassTest.java
@@ -1523,7 +1523,8 @@ public class GridCommandHandlerClusterByClassTest extends 
GridCommandHandlerClus
 new GridCacheVersion(),
 0L,
 partId,
-updateCntr
+updateCntr,
+false
 );
 
 GridCacheDatabaseSharedManager db = 
(GridCacheDatabaseSharedManager)ctx.shared().database();
diff --git 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index 80c33ee..0b525ee 100644
--- 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -2630,7 +2630,8 @@ public class GridCommandHandlerTest extends 
GridCommandHandlerClusterPerMethodAb
 new GridCacheVersion(),
 0L,
 partId,
-updateCntr
+updateCntr,
+false
 );
 
 GridCacheDatabaseSharedManager db = 
(GridCacheDatabaseSharedManager)ctx.shared().database();
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/DataEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/DataEntry.java
index dd05726..2244897 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/DataEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/DataEntry.java
@@ -61,6 +61,10 @@ public class DataEntry {
 @GridToStringInclude
 protected long partCnt;
 
+/** If {@code true} then change made on primary node. */
+@GridToStringInclude
+protected boolean primary;
+
 /** Constructor. */
 private DataEntry() {
 // No-op, used from factory methods.
@@ -76,6 +80,7 @@ public class DataEntry {
  * @param expireTime Expire time.
  * @param partId Partition ID.
  * @param partCnt Partition counter.
+ * @param primary {@code True} if 

[ignite-3] 01/01: IGNITE-14403 Added ignite-core module and IgniteUuid class

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch ignite-14403
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit d0aa194dad2d2fb754b51c790f6436f11459eb4e
Author: Andrey Gura 
AuthorDate: Thu Mar 25 18:16:13 2021 +0300

IGNITE-14403 Added ignite-core module and IgniteUuid class
---
 pom.xml => modules/core/pom.xml|  55 ++---
 .../java/org/apache/ignite/lang/IgniteUuid.java| 135 +
 .../apache/ignite/lang/IgniteUuidGenerator.java|  84 +
 pom.xml|   1 +
 4 files changed, 257 insertions(+), 18 deletions(-)

diff --git a/pom.xml b/modules/core/pom.xml
similarity index 52%
copy from pom.xml
copy to modules/core/pom.xml
index 4a225d9..c84ded1 100644
--- a/pom.xml
+++ b/modules/core/pom.xml
@@ -17,8 +17,10 @@
   limitations under the License.
 -->
 
-http://maven.apache.org/POM/4.0.0;
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
 4.0.0
 
@@ -26,23 +28,40 @@
 org.apache.ignite
 ignite-parent
 1
-parent
+../../parent/pom.xml
 
 
-apache-ignite
+ignite-core
 3.0.0-SNAPSHOT
-pom
-
-
-modules/api
-modules/bytecode
-modules/cli
-modules/cli-common
-modules/configuration
-modules/configuration-annotation-processor
-modules/network
-modules/rest
-modules/runner
-modules/schema
-
+
+
+
+
+org.junit.jupiter
+junit-jupiter-api
+test
+
+
+
+org.junit.jupiter
+junit-jupiter-engine
+test
+
+
+
+
+
+
+src/main/resources
+true
+
+
+
+
+
+org.apache.maven.plugins
+maven-compiler-plugin
+
+
+
 
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java 
b/modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java
new file mode 100644
index 000..d05ff50
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteUuid.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.ignite.lang;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+/**
+ * This is a faster performing version of {@link UUID}. On basic tests this 
version is at least
+ * 10x time faster for ID creation. It uses extra memory for 8-byte counter 
additionally to
+ * internal UUID.
+ */
+public final class IgniteUuid implements Comparable, Cloneable, 
Serializable {
+/** */
+private static final long serialVersionUID = 0L;
+
+/** */
+private final UUID gid;
+
+/** */
+private final long locId;
+
+/**
+ * Constructs {@code IgniteUuid} from a global and local identifiers.
+ *
+ * @param gid UUID.
+ * @param locId Counter.
+ */
+public IgniteUuid(UUID gid, long locId) {
+assert gid != null;
+
+this.gid = gid;
+this.locId = locId;
+}
+
+/**
+ * Converts string into {@code IgniteUuid}. The String must be in the 
format generated
+ * by {@link #toString() IgniteUuid.toString()} method.
+ *
+ * @param s String to convert to {@code IgniteUuid}.
+ * @return {@code IgniteUuid} instance representing given string.
+ */
+public static IgniteUuid fromString(String s) {
+int firstDash = s.indexOf('-');
+
+return new IgniteUuid(
+UUID.fromString(s.substring(firstDash + 1)),
+Long.valueOf(new StringBuilder(s.substring(0, 
firstDash)).reverse().toString(), 16)
+);
+}
+
+/**
+ * Gets a short string version of this ID. Use it only for UI where full 
version is
+ * available to the application.
+ *
+ * @return Short string version of this 

[ignite-3] branch ignite-14403 created (now d0aa194)

2021-03-25 Thread agura
This is an automated email from the ASF dual-hosted git repository.

agura pushed a change to branch ignite-14403
in repository https://gitbox.apache.org/repos/asf/ignite-3.git.


  at d0aa194  IGNITE-14403 Added ignite-core module and IgniteUuid class

This branch includes the following new commits:

 new d0aa194  IGNITE-14403 Added ignite-core module and IgniteUuid class

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ignite-3] branch ignite-14393 updated: IGNITE-14393 Updated image

2021-03-25 Thread agoncharuk
This is an automated email from the ASF dual-hosted git repository.

agoncharuk pushed a commit to branch ignite-14393
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/ignite-14393 by this push:
 new 0026274  IGNITE-14393 Updated image
0026274 is described below

commit 0026274db523b38e999219be2981c11a0f31d681
Author: Alexey Goncharuk 
AuthorDate: Thu Mar 25 10:50:56 2021 +0300

IGNITE-14393 Updated image
---
 modules/runner/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/runner/README.md b/modules/runner/README.md
index a182dd9..7226377 100644
--- a/modules/runner/README.md
+++ b/modules/runner/README.md
@@ -46,7 +46,7 @@ enforces serveral rules related to the components interaction:
 
-![Example components dependency 
graph](http://www.plantuml.com/plantuml/svg/TO_Fpi8W4CJlF0N7xpkKn3zUJ3HDZCTwqNZVjXkjKZ1qqTUND6rbCLw0tVbDXiax0aU-rSAMDwn87f1Urjt5SCkrjAv69pTo9aRc35wJwCz8dqzwWGGTMGSN5D4xOXSJUwoks4819W1Ei2dYbnD_WbBZY7y6Hgy4YysoxLYBENeX0h_4eMYw_lrdPaltF2kHLQq6N-W1ZsO7Ml_zinhA1oHfh9kEqA1JrkoVQ2XOSZIrR_KR)
+![Example components dependency 
graph](http://www.plantuml.com/plantuml/svg/VP7F2i8m3CRlVOeUzR22Vxm8Ze5ud1V5UxO6dNQjT9c-lcMwactWfMto_KBIBrb3uAcjZN357KkI5sWDYUwKM-cyHYztSY5w_OZqTluXVZTZbf79aQ0Xv-6AWhqPkuhigRnX3JdO07WnY1Y_ZlmP2eCzpW9ERyIWRPAaSMnUqGaCd8XVCoRflpF7ikXGecEAezFs8rbfbSf-4V2izc3CR3xucMe3CZB1L0sXHQ-SFRpGKYZ9qEgmuWy0)
 
 The diagram above shows an example component dependency diagram and provides 
an order in which compomnents may be 
 initialized.