You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/10/04 16:03:09 UTC

[01/50] [abbrv] ignite git commit: IGNITE-9733 Web Console: Added support for "type=number" on InputDialog

Repository: ignite
Updated Branches:
  refs/heads/ignite-5797 e9ac065f6 -> 4629f21d9


IGNITE-9733 Web Console: Added support for "type=number" on InputDialog


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b12d7380
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b12d7380
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b12d7380

Branch: refs/heads/ignite-5797
Commit: b12d73802616e831d828c4f380e177d465b97ccd
Parents: a8d50e4
Author: Alexander Kalinin <ve...@yandex.ru>
Authored: Fri Sep 28 10:36:30 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Sep 28 10:36:30 2018 +0700

----------------------------------------------------------------------
 .../components/form-field-size/template.pug     |  6 +--
 .../input-dialog/input-dialog.controller.js     | 13 ++---
 .../input-dialog/input-dialog.service.js        | 54 +++++++++++++++-----
 .../input-dialog/input-dialog.tpl.pug           | 25 ++++++---
 .../app/primitives/form-field/number.pug        |  2 +-
 5 files changed, 68 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b12d7380/modules/web-console/frontend/app/components/form-field/components/form-field-size/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/form-field/components/form-field-size/template.pug b/modules/web-console/frontend/app/components/form-field/components/form-field-size/template.pug
index f587112..b712a67 100644
--- a/modules/web-console/frontend/app/components/form-field/components/form-field-size/template.pug
+++ b/modules/web-console/frontend/app/components/form-field/components/form-field-size/template.pug
@@ -22,8 +22,8 @@ include /app/helpers/jade/mixins
     required: '$ctrl.required',
     disabled: '$ctrl.ngDisabled'
 })
-    +form-field__tooltip({ title: '{{::$ctrl.tip}}' })(
-        ng-if='::$ctrl.tip'
+    +form-field__tooltip({title: '{{$ctrl.tip}}'})(
+        ng-if='$ctrl.tip'
     )
 
 .form-field__control.form-field__control-group(ng-form='$ctrl.innerForm')
@@ -74,4 +74,4 @@ include /app/helpers/jade/mixins
     +form-field__error({
         error: 'step',
         message: 'Invalid step'
-    })
\ No newline at end of file
+    })

http://git-wip-us.apache.org/repos/asf/ignite/blob/b12d7380/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js b/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
index a2dd035..1de142c 100644
--- a/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
+++ b/modules/web-console/frontend/app/components/input-dialog/input-dialog.controller.js
@@ -20,18 +20,15 @@ import _ from 'lodash';
 export default class InputDialogController {
     static $inject = ['deferred', 'ui'];
 
-    constructor(deferred, {title, label, value, toValidValue}) {
+    constructor(deferred, options) {
         this.deferred = deferred;
-        this.title = title;
-        this.label = label;
-        this.value = value;
-        this.toValidValue = toValidValue;
+        this.options = options;
     }
 
     confirm() {
-        if (_.isFunction(this.toValidValue))
-            return this.deferred.resolve(this.toValidValue(this.value));
+        if (_.isFunction(this.options.toValidValue))
+            return this.deferred.resolve(this.options.toValidValue(this.options.value));
 
-        this.deferred.resolve(this.value);
+        this.deferred.resolve(this.options.value);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b12d7380/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js b/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
index 7ef9c07..6ddf051 100644
--- a/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
+++ b/modules/web-console/frontend/app/components/input-dialog/input-dialog.service.js
@@ -33,27 +33,29 @@ export default class InputDialog {
     }
 
     /**
-     * Open input dialog to configure custom value.
+     * Fabric for creating modal instance with different input types.
      *
-     * @param {String} title Dialog title.
-     * @param {String} label Input field label.
-     * @param {String} value Default value.
-     * @param {Function} [toValidValue] Validator function.
-     * @returns {ng.IPromise<string>} User input.
+     * @param {Object} args Options for rendering inputs:
+     * @param {'text'|'number'} args.mode Input type.
+     * @param {String} args.title Dialog title.
+     * @param {String} args.label Input field label.
+     * @param {String} args.tip Message for tooltip in label.
+     * @param {String|Number} args.value Default value.
+     * @param {String} args.placeholder Placeholder for input.
+     * @param {Function} [args.toValidValue] Validator function.
+     * @param {Number} args.min Min value for number input.
+     * @param {Number} args.max Max value for number input.
+     * @param {String} args.postfix Postfix for units in numer input.
+     * @return {Promise.<String>} User input.
      */
-    input(title, label, value, toValidValue) {
+    dialogFabric(args) {
         const deferred = this.$q.defer();
 
         const modal = this.$modal({
             templateUrl,
             resolve: {
                 deferred: () => deferred,
-                ui: () => ({
-                    title,
-                    label,
-                    value,
-                    toValidValue
-                })
+                ui: () => args
             },
             controller,
             controllerAs: 'ctrl'
@@ -68,11 +70,25 @@ export default class InputDialog {
     }
 
     /**
+     * Open input dialog to configure custom value.
+     *
+     * @param {String} title Dialog title.
+     * @param {String} label Input field label.
+     * @param {String} value Default value.
+     * @param {Function} [toValidValue] Validator function.
+     * @param {'text'|'number'} mode Input type.
+     * @returns {ng.IPromise<string>} User input.
+     */
+    input(title, label, value, toValidValue, mode = 'text') {
+        return this.dialogFabric({title, label, value, toValidValue, mode});
+    }
+
+    /**
      * Open input dialog to configure cloned object name.
      *
      * @param {String} srcName Name of source object.
      * @param {Array.<String>} names List of already exist names.
-     * @returns {ng.IPromise<string>} New name
+     * @returns {ng.IPromise<string>} New name.
      */
     clone(srcName, names) {
         const uniqueName = (value) => {
@@ -90,4 +106,14 @@ export default class InputDialog {
 
         return this.input('Clone', 'New name', uniqueName(srcName), uniqueName);
     }
+
+    /**
+     * Open input dialog to configure custom number value.
+     *
+     * @param {Object} options Object with settings for rendering number input.
+     * @returns {Promise.<String>} User input.
+     */
+    number(options) {
+        return this.dialogFabric({mode: 'number', ...options});
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b12d7380/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug b/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
index 50087e9..95cb059 100644
--- a/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
+++ b/modules/web-console/frontend/app/components/input-dialog/input-dialog.tpl.pug
@@ -16,22 +16,22 @@
 
 include /app/helpers/jade/mixins
 
-.modal.modal--ignite.theme--ignite(tabindex='-1' role='dialog')
+.modal.modal--ignite.theme--ignite.input-dialog(tabindex='-1' role='dialog')
     .modal-dialog
         form.modal-content(name='ctrl.form' novalidate)
             .modal-header
                 h4.modal-title
                     i.fa.fa-clone
-                    span {{ ctrl.title }}
+                    span {{ ctrl.options.title }}
                 button.close(type='button' aria-label='Close' ng-click='$hide()')
                      svg(ignite-icon="cross")
 
-            .modal-body
-                .row
+            .modal-body(ng-switch='ctrl.options.mode')
+                .row(ng-switch-when='text')
                     .col-100
                         +form-field__text({
-                            label: '{{ ctrl.label }}',
-                            model: 'ctrl.value',
+                            label: '{{ ctrl.options.label }}',
+                            model: 'ctrl.options.value',
                             name: '"inputDialogField"',
                             required: true,
                             placeholder: 'Enter value'
@@ -39,6 +39,19 @@ include /app/helpers/jade/mixins
                             ignite-form-field-input-autofocus='true'
                             ignite-on-enter='form.$valid && ctrl.confirm()'
                         )
+                .row(ng-switch-when='number')
+                    .col-100
+                        +form-field__number({
+                            label: '{{ ctrl.options.label }}',
+                            model: 'ctrl.options.value',
+                            name: '"number"',
+                            placeholder: '{{ ctrl.options.placeholder }}',
+                            min: '{{ ctrl.options.min }}',
+                            max: '{{ ctrl.options.max  }}',
+                            tip: '{{ ctrl.options.tip  }}',
+                            postfix: '{{ ctrl.options.postfix }}',
+                            required: true
+                        })
 
             .modal-footer
                 div

http://git-wip-us.apache.org/repos/asf/ignite/blob/b12d7380/modules/web-console/frontend/app/primitives/form-field/number.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/primitives/form-field/number.pug b/modules/web-console/frontend/app/primitives/form-field/number.pug
index 7755415..ea90709 100644
--- a/modules/web-console/frontend/app/primitives/form-field/number.pug
+++ b/modules/web-console/frontend/app/primitives/form-field/number.pug
@@ -15,7 +15,7 @@
     limitations under the License.
 
 mixin form-field__number({ label, model, name, disabled, required, placeholder, tip, min, max, step = '1', postfix })
-    -var errLbl = label.substring(0, label.length - 1)
+    -var errLbl = label[label.length - 1] === ':' ? label.substring(0, label.length - 1) : label
 
     .form-field.ignite-form-field
         +form-field__label({ label, name, required, disabled })


[44/50] [abbrv] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-5797

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --cc modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index 722b749,2f7e6c0..afecd17
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@@ -44,19 -43,10 +43,23 @@@ import org.apache.ignite.internal.GridD
  import org.apache.ignite.internal.GridDirectMap;
  import org.apache.ignite.internal.GridDirectTransient;
  import org.apache.ignite.internal.IgniteCodeGeneratingFail;
 +import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishResponse;
 +import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse;
 +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishResponse;
 +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareResponse;
 +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse;
 +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
 +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
+ import org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue;
+ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest;
+ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse;
+ import org.apache.ignite.internal.util.IgniteUtils;
  import org.apache.ignite.internal.util.typedef.internal.SB;
  import org.apache.ignite.internal.util.typedef.internal.U;
  import org.apache.ignite.lang.IgniteUuid;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
index 18a3729,4cb68da..ae369cf
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
@@@ -61,9 -66,9 +66,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.segmentation.GridSegmentationProcessor;
  import org.apache.ignite.internal.processors.service.GridServiceProcessor;
  import org.apache.ignite.internal.processors.session.GridTaskSessionProcessor;
+ import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
  import org.apache.ignite.internal.processors.task.GridTaskProcessor;
  import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 +import org.apache.ignite.internal.processors.trace.TraceProcessor;
  import org.apache.ignite.internal.suggestions.GridPerformanceSuggestions;
  import org.apache.ignite.internal.util.IgniteExceptionRegistry;
  import org.apache.ignite.internal.util.StripedExecutor;
@@@ -420,21 -439,16 +440,23 @@@ public interface GridKernalContext exte
      public DataStructuresProcessor dataStructures();
  
      /**
 +     * Gets trace processor.
 +     *
 +     * @return Trace processor.
 +     */
 +    public TraceProcessor trace();
 +
 +    /**
-      * Sets segmented flag to {@code true} when node is stopped due to segmentation issues.
+      * Checks whether this node is invalid due to a critical error or not.
+      *
+      * @return {@code True} if this node is invalid, {@code false} otherwise.
       */
-     public void markSegmented();
+     public boolean invalid();
  
      /**
-      * Gets segmented flag.
+      * Checks whether this node detected its segmentation from the rest of the grid.
       *
-      * @return {@code True} if network is currently segmented, {@code false} otherwise.
+      * @return {@code True} if this node has segmented, {@code false} otherwise.
       */
      public boolean segmented();
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 58522b8,a0e3f93..33d1d4c
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@@ -78,9 -85,9 +85,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.segmentation.GridSegmentationProcessor;
  import org.apache.ignite.internal.processors.service.GridServiceProcessor;
  import org.apache.ignite.internal.processors.session.GridTaskSessionProcessor;
+ import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
  import org.apache.ignite.internal.processors.task.GridTaskProcessor;
  import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 +import org.apache.ignite.internal.processors.trace.TraceProcessor;
  import org.apache.ignite.internal.suggestions.GridPerformanceSuggestions;
  import org.apache.ignite.internal.util.IgniteExceptionRegistry;
  import org.apache.ignite.internal.util.StripedExecutor;
@@@ -283,12 -291,16 +292,20 @@@ public class GridKernalContextImpl impl
      @GridToStringExclude
      private DataStructuresProcessor dataStructuresProc;
  
+     /** Cache mvcc coordinators. */
+     @GridToStringExclude
+     private MvccProcessor coordProc;
+ 
+     /** */
+     @GridToStringExclude
+     private IgniteAuthenticationProcessor authProc;
+ 
      /** */
      @GridToStringExclude
 +    private TraceProcessor traceProc;
 +
 +    /** */
 +    @GridToStringExclude
      private List<GridComponent> comps = new LinkedList<>();
  
      /** */
@@@ -581,11 -618,17 +623,19 @@@
          else if (comp instanceof PlatformProcessor)
              platformProc = (PlatformProcessor)comp;
          else if (comp instanceof PoolProcessor)
-             poolProc = (PoolProcessor) comp;
+             poolProc = (PoolProcessor)comp;
          else if (comp instanceof GridMarshallerMappingProcessor)
              mappingProc = (GridMarshallerMappingProcessor)comp;
+         else if (comp instanceof MvccProcessor)
+             coordProc = (MvccProcessor)comp;
+         else if (comp instanceof PdsFoldersResolver)
+             pdsFolderRslvr = (PdsFoldersResolver)comp;
+         else if (comp instanceof GridInternalSubscriptionProcessor)
+             internalSubscriptionProc = (GridInternalSubscriptionProcessor)comp;
+         else if (comp instanceof IgniteAuthenticationProcessor)
+             authProc = (IgniteAuthenticationProcessor)comp;
 +        else if (comp instanceof TraceProcessor)
 +            traceProc = (TraceProcessor)comp;
          else if (!(comp instanceof DiscoveryNodeValidationProcessor
              || comp instanceof PlatformPluginProcessor))
              assert (comp instanceof GridPluginComponent) : "Unknown manager class: " + comp.getClass();
@@@ -851,13 -903,8 +910,13 @@@
      }
  
      /** {@inheritDoc} */
-     @Override public IgniteLogger log(Class<?> cls) {
-         return log(cls.getName());
++    @Override public TraceProcessor trace() {
++        return traceProc;
 +    }
 +
 +    /** {@inheritDoc} */
-     @Override public void markSegmented() {
-         segFlag = true;
+     @Override public IgniteLogger log(String ctgr) {
+         return config().getGridLogger().getLogger(ctgr);
      }
  
      /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 15ddb77,6b1c995..15e0868
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@@ -145,9 -163,9 +163,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.segmentation.GridSegmentationProcessor;
  import org.apache.ignite.internal.processors.service.GridServiceProcessor;
  import org.apache.ignite.internal.processors.session.GridTaskSessionProcessor;
+ import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
  import org.apache.ignite.internal.processors.task.GridTaskProcessor;
  import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 +import org.apache.ignite.internal.processors.trace.TraceProcessor;
  import org.apache.ignite.internal.suggestions.GridPerformanceSuggestions;
  import org.apache.ignite.internal.suggestions.JvmConfigurationSuggestions;
  import org.apache.ignite.internal.suggestions.OsConfigurationSuggestions;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
index 70c5eca,fe61aec..10eddec
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessage.java
@@@ -23,7 -23,7 +23,8 @@@ import java.nio.ByteBuffer
  import org.apache.ignite.internal.ExecutorAwareMessage;
  import org.apache.ignite.internal.GridDirectTransient;
  import org.apache.ignite.internal.processors.cache.GridCacheMessage;
+ import org.apache.ignite.internal.processors.datastreamer.DataStreamerRequest;
 +import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
  import org.apache.ignite.internal.util.tostring.GridToStringInclude;
  import org.apache.ignite.internal.util.typedef.internal.S;
  import org.apache.ignite.plugin.extensions.communication.Message;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 2433705,54efb47..a573506
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@@ -141,9 -176,9 +176,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryFailResponse;
  import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryNextPageRequest;
  import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryNextPageResponse;
+ import org.apache.ignite.internal.processors.query.schema.message.SchemaOperationStatusMessage;
  import org.apache.ignite.internal.processors.rest.handlers.task.GridTaskResultRequest;
  import org.apache.ignite.internal.processors.rest.handlers.task.GridTaskResultResponse;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.util.GridByteArrayList;
  import org.apache.ignite.internal.util.GridIntList;
  import org.apache.ignite.internal.util.GridLongList;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index c8d5546,9283939..2d084a7
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@@ -32,12 -33,16 +33,16 @@@ import org.apache.ignite.internal.Inval
  import org.apache.ignite.internal.NodeStoppingException;
  import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
  import org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture;
 -import org.apache.ignite.internal.processors.cache.GridCacheFuture;
  import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
  import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinator;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccFuture;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
+ import org.apache.ignite.internal.util.GridLongList;
  import org.apache.ignite.internal.util.future.GridFutureAdapter;
  import org.apache.ignite.internal.util.tostring.GridToStringExclude;
  import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@@ -354,7 -371,8 +377,9 @@@ public final class GridDhtTxFinishFutur
                  tx.activeCachesDeploymentEnabled(),
                  false,
                  false,
+                 tx.mvccSnapshot(),
 -                tx.filterUpdateCountersForBackupNode(n));
++                tx.filterUpdateCountersForBackupNode(n),
 +                tx.nodeTrace() != null ? new EventsTrace() : null);
  
              try {
                  cctx.io().send(n, req, tx.ioPolicy());
@@@ -458,7 -484,8 +491,9 @@@
                  updCntrs,
                  false,
                  false,
+                 mvccSnapshot,
 -                commit ? null : tx.filterUpdateCountersForBackupNode(n));
++                commit ? null : tx.filterUpdateCountersForBackupNode(n),
 +                tx.nodeTrace() != null ? new EventsTrace() : null);
  
              req.writeVersion(tx.writeVersion() != null ? tx.writeVersion() : tx.xidVersion());
  
@@@ -528,7 -555,8 +563,9 @@@
                      tx.activeCachesDeploymentEnabled(),
                      false,
                      false,
+                     mvccSnapshot,
 -                    null);
++                    null,
 +                    tx.nodeTrace() != null ? new EventsTrace() : null);
  
                  req.writeVersion(tx.writeVersion());
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index 9bee5dd,61896b5..96cf37c
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@@ -25,8 -25,8 +25,9 @@@ import org.apache.ignite.cache.CacheWri
  import org.apache.ignite.internal.GridDirectCollection;
  import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
  import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.util.GridLongList;
  import org.apache.ignite.internal.util.tostring.GridToStringInclude;
  import org.apache.ignite.internal.util.typedef.internal.S;
@@@ -123,7 -135,8 +136,9 @@@ public class GridDhtTxFinishRequest ext
          boolean addDepInfo,
          boolean retVal,
          boolean waitRemoteTxs,
+         MvccSnapshot mvccSnapshot,
 -        Collection<PartitionUpdateCountersMessage> updCntrs
++        Collection<PartitionUpdateCountersMessage> updCntrs,
 +        EventsTrace eventsTrace
      ) {
          super(
              xidVer,
@@@ -212,7 -228,8 +233,9 @@@
          Collection<Long> updateIdxs,
          boolean retVal,
          boolean waitRemoteTxs,
+         MvccSnapshot mvccSnapshot,
 -        Collection<PartitionUpdateCountersMessage> updCntrs
++        Collection<PartitionUpdateCountersMessage> updCntrs,
 +        EventsTrace eventsTrace
      ) {
          this(nearNodeId,
              futId,
@@@ -238,7 -255,8 +261,9 @@@
              addDepInfo,
              retVal,
              waitRemoteTxs,
+             mvccSnapshot,
 -            updCntrs);
++            updCntrs,
 +            eventsTrace);
  
          if (updateIdxs != null && !updateIdxs.isEmpty()) {
              partUpdateCnt = new GridLongList(updateIdxs.size());

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index b7f264f,a091d44..751ec3f
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@@ -37,9 -38,7 +38,8 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
- import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index 0d80adf,ffa383b..fa301d7
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@@ -40,9 -45,8 +45,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter;
+ import org.apache.ignite.internal.processors.cache.transactions.TxCounters;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
 +import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
  import org.apache.ignite.internal.util.F0;
  import org.apache.ignite.internal.util.GridLeanMap;
  import org.apache.ignite.internal.util.GridLeanSet;
@@@ -98,9 -109,11 +111,14 @@@ public abstract class GridDhtTxLocalAda
      /** Nodes where transactions were started on lock step. */
      private Set<ClusterNode> lockTxNodes;
  
+     /** Enlist or lock future what is currently in progress. */
+     @SuppressWarnings("UnusedDeclaration")
+     @GridToStringExclude
+     protected volatile IgniteInternalFuture<?> lockFut;
+ 
 +    /** */
 +    protected EventsTrace eventsTrace;
 +
      /**
       * Empty constructor required for {@link Externalizable}.
       */
@@@ -846,29 -857,72 +871,95 @@@
      }
  
      /**
+      * @return Lock future.
+      */
+     public IgniteInternalFuture<?> lockFuture() {
+         return lockFut;
+     }
+ 
+     /**
+      * Atomically updates lock future.
+      *
+      * @param oldFut Old future.
+      * @param newFut New future.
+      * @return {@code true} If future was changed.
+      */
+     public boolean updateLockFuture(IgniteInternalFuture<?> oldFut, IgniteInternalFuture<?> newFut) {
+         return LOCK_FUT_UPD.compareAndSet(this, oldFut, newFut);
+     }
+ 
+     /**
+      * Clears lock future.
+      *
+      * @param cond Clear lock condition.
+      */
+     public void clearLockFuture(@Nullable IgniteInternalFuture cond) {
+         while (true) {
+             IgniteInternalFuture f = lockFut;
+ 
+             if (f == null
+                 || f == ROLLBACK_FUT
+                 || (cond != null && f != cond)
+                 || updateLockFuture(f, null))
+                 return;
+         }
+     }
+ 
+     /**
+      * @param f Future to finish.
+      * @param err Error.
+      * @param clearLockFut {@code True} if need to clear lock future.
+      * @return Finished future.
+      */
+     public <T> GridFutureAdapter<T> finishFuture(GridFutureAdapter<T> f, Throwable err, boolean clearLockFut) {
+         if (clearLockFut)
+             clearLockFuture(null);
+ 
+         f.onDone(err);
+ 
+         return f;
+     }
+ 
+     /**
+      * Prepare async rollback.
+      *
+      * @return Current lock future or null if it's safe to roll back.
+      */
+     @Nullable public IgniteInternalFuture<?> tryRollbackAsync() {
+         while (true) {
+             final IgniteInternalFuture fut = lockFut;
+ 
+             if (fut == ROLLBACK_FUT)
+                 return null;
+             else if (updateLockFuture(fut, ROLLBACK_FUT))
+                 return fut;
+         }
+     }
+ 
+     /**
 +     * @return Node trace.
 +     */
 +    public EventsTrace nodeTrace() {
 +        return eventsTrace;
 +    }
 +
 +    /**
 +     * @param eventsTrace Node trace.
 +     */
 +    public void nodeTrace(EventsTrace eventsTrace) {
 +        this.eventsTrace = eventsTrace;
 +    }
 +
 +    /**
 +     * @param rmtNodeId Remote node ID.
 +     * @param eventsTrace Node trace to collect.
 +     */
 +    public void collectNodeTrace(UUID rmtNodeId, EventsTrace eventsTrace) {
 +        if (this.eventsTrace != null && eventsTrace != null)
 +            this.eventsTrace.addRemoteTrace(rmtNodeId, eventsTrace);
 +    }
 +
 +    /**
       * @param prepFut Prepare future.
       * @return If transaction if finished on prepare step returns future which is completed after transaction finish.
       */

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 4be7c0d,0edf63f..185093d
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@@ -859,9 -894,10 +897,11 @@@ public final class GridDhtTxPrepareFutu
              prepErr,
              null,
              tx.onePhaseCommit(),
 -            tx.activeCachesDeploymentEnabled());
 +            tx.activeCachesDeploymentEnabled(),
 +            tx.nodeTrace());
  
+         res.mvccSnapshot(tx.mvccSnapshot());
+ 
          if (prepErr == null) {
              if (tx.needReturnValue() || tx.nearOnOriginatingNode() || tx.hasInterceptor())
                  addDhtValues(res);
@@@ -1236,235 -1296,269 +1300,271 @@@
                  return;
  
              if (last) {
-                 if (tx.onePhaseCommit() && !tx.nearMap().isEmpty()) {
-                     for (GridDistributedTxMapping nearMapping : tx.nearMap().values()) {
-                         if (!tx.dhtMap().containsKey(nearMapping.primary().id())) {
-                             tx.onePhaseCommit(false);
+                 if (waitCrdCntrFut != null) {
+                     skipInit = true;
  
-                             break;
-                         }
-                     }
-                 }
- 
-                 int miniId = 0;
- 
-                 assert tx.transactionNodes() != null;
- 
-                 final long timeout = timeoutObj != null ? timeoutObj.timeout : 0;
+                     waitCrdCntrFut.listen(new IgniteInClosure<IgniteInternalFuture<MvccSnapshot>>() {
+                         @Override public void apply(IgniteInternalFuture<MvccSnapshot> fut) {
+                             try {
+                                 fut.get();
  
-                 // Create mini futures.
-                 for (GridDistributedTxMapping dhtMapping : tx.dhtMap().values()) {
-                     assert !dhtMapping.empty();
+                                 sendPrepareRequests();
  
-                     ClusterNode n = dhtMapping.primary();
+                                 markInitialized();
+                             }
+                             catch (Throwable e) {
+                                 U.error(log, "Failed to get mvcc version for tx [txId=" + tx.nearXidVersion() +
+                                     ", err=" + e + ']', e);
  
-                     assert !n.isLocal();
+                                 GridNearTxPrepareResponse res = createPrepareResponse(e);
  
-                     GridDistributedTxMapping nearMapping = tx.nearMap().get(n.id());
+                                 onDone(res, res.error());
+                             }
+                         }
+                     });
+                 }
+                 else
+                     sendPrepareRequests();
+             }
+         }
+         finally {
+             if (!skipInit)
+                 markInitialized();
+         }
+     }
  
-                     Collection<IgniteTxEntry> nearWrites = nearMapping == null ? null : nearMapping.writes();
+     /**
+      *
+      */
+     private void sendPrepareRequests() {
+         if (tx.onePhaseCommit() && !tx.nearMap().isEmpty()) {
+             for (GridDistributedTxMapping nearMapping : tx.nearMap().values()) {
+                 if (!tx.dhtMap().containsKey(nearMapping.primary().id())) {
+                     tx.onePhaseCommit(false);
  
-                     Collection<IgniteTxEntry> dhtWrites = dhtMapping.writes();
+                     break;
+                 }
+             }
+         }
  
-                     if (F.isEmpty(dhtWrites) && F.isEmpty(nearWrites))
-                         continue;
+         assert !tx.txState().mvccEnabled(cctx) || !tx.onePhaseCommit() || tx.mvccSnapshot() != null;
  
-                     if (tx.remainingTime() == -1)
-                         return;
+         int miniId = 0;
  
-                     MiniFuture fut = new MiniFuture(n.id(), ++miniId, dhtMapping, nearMapping);
+         assert tx.transactionNodes() != null;
  
-                     add(fut); // Append new future.
+         final long timeout = timeoutObj != null ? timeoutObj.timeout : 0;
  
-                     assert txNodes != null;
+         // Do not need process active transactions on backups.
+         MvccSnapshot mvccSnapshot = tx.mvccSnapshot();
  
-                     GridDhtTxPrepareRequest req = new GridDhtTxPrepareRequest(
-                         futId,
-                         fut.futureId(),
-                         tx.topologyVersion(),
-                         tx,
-                         timeout,
-                         dhtWrites,
-                         nearWrites,
-                         txNodes,
-                         tx.nearXidVersion(),
-                         true,
-                         tx.onePhaseCommit(),
-                         tx.subjectId(),
-                         tx.taskNameHash(),
-                         tx.activeCachesDeploymentEnabled(),
-                         tx.storeWriteThrough(),
-                         retVal,
-                         tx.nodeTrace() != null ? new EventsTrace() : null);
+         if (mvccSnapshot != null)
+             mvccSnapshot = mvccSnapshot.withoutActiveTransactions();
  
-                     int idx = 0;
+         // Create mini futures.
+         for (GridDistributedTxMapping dhtMapping : tx.dhtMap().values()) {
+             assert !dhtMapping.empty() || dhtMapping.queryUpdate();
  
-                     for (IgniteTxEntry entry : dhtWrites) {
-                         try {
-                             GridDhtCacheEntry cached = (GridDhtCacheEntry)entry.cached();
+             ClusterNode n = dhtMapping.primary();
  
-                             GridCacheContext<?, ?> cacheCtx = cached.context();
+             assert !n.isLocal();
  
-                             // Do not invalidate near entry on originating transaction node.
-                             req.invalidateNearEntry(idx, !tx.nearNodeId().equals(n.id()) &&
-                                 cached.readerId(n.id()) != null);
+             GridDistributedTxMapping nearMapping = tx.nearMap().get(n.id());
  
-                             if (cached.isNewLocked()) {
-                                 List<ClusterNode> owners = cacheCtx.topology().owners(cached.partition(),
-                                     tx != null ? tx.topologyVersion() : cacheCtx.affinity().affinityTopologyVersion());
+             Collection<IgniteTxEntry> nearWrites = nearMapping == null ? null : nearMapping.writes();
  
-                                 // Do not preload if local node is a partition owner.
-                                 if (!owners.contains(cctx.localNode()))
-                                     req.markKeyForPreload(idx);
-                             }
+             Collection<IgniteTxEntry> dhtWrites = dhtMapping.writes();
  
-                             break;
-                         }
-                         catch (GridCacheEntryRemovedException ignore) {
-                             assert false : "Got removed exception on entry with dht local candidate: " + entry;
-                         }
+             if (!dhtMapping.queryUpdate() && F.isEmpty(dhtWrites) && F.isEmpty(nearWrites))
+                 continue;
  
-                         idx++;
-                     }
+             MiniFuture fut = new MiniFuture(n.id(), ++miniId, dhtMapping, nearMapping);
+ 
+             add(fut); // Append new future.
+ 
+             assert req.transactionNodes() != null;
+ 
+             GridDhtTxPrepareRequest req = new GridDhtTxPrepareRequest(
+                 futId,
+                 fut.futureId(),
+                 tx.topologyVersion(),
+                 tx,
+                 timeout,
+                 dhtWrites,
+                 nearWrites,
+                 this.req.transactionNodes(),
+                 tx.nearXidVersion(),
+                 true,
+                 tx.onePhaseCommit(),
+                 tx.subjectId(),
+                 tx.taskNameHash(),
+                 tx.activeCachesDeploymentEnabled(),
+                 tx.storeWriteThrough(),
+                 retVal,
+                 mvccSnapshot,
 -                tx.filterUpdateCountersForBackupNode(n));
++                tx.filterUpdateCountersForBackupNode(n),
++                tx.nodeTrace() != null ? new EventsTrace() : null);
+ 
+             req.queryUpdate(dhtMapping.queryUpdate());
+ 
+             int idx = 0;
+ 
+             for (IgniteTxEntry entry : dhtWrites) {
+                 try {
+                     GridDhtCacheEntry cached = (GridDhtCacheEntry)entry.cached();
  
-                     if (!F.isEmpty(nearWrites)) {
-                         for (IgniteTxEntry entry : nearWrites) {
-                             try {
-                                 if (entry.explicitVersion() == null) {
-                                     GridCacheMvccCandidate added = entry.cached().candidate(version());
+                     GridCacheContext<?, ?> cacheCtx = cached.context();
  
-                                     assert added != null : "Missing candidate for cache entry:" + entry;
-                                     assert added.dhtLocal();
+                     // Do not invalidate near entry on originating transaction node.
+                     req.invalidateNearEntry(idx, !tx.nearNodeId().equals(n.id()) &&
+                         cached.readerId(n.id()) != null);
  
-                                     if (added.ownerVersion() != null)
-                                         req.owned(entry.txKey(), added.ownerVersion());
-                                 }
+                     if (cached.isNewLocked()) {
+                         List<ClusterNode> owners = cacheCtx.topology().owners(cached.partition(),
+                             tx != null ? tx.topologyVersion() : cacheCtx.affinity().affinityTopologyVersion());
  
-                                 break;
-                             }
-                             catch (GridCacheEntryRemovedException ignore) {
-                                 assert false : "Got removed exception on entry with dht local candidate: " + entry;
-                             }
-                         }
+                         // Do not preload if local node is a partition owner.
+                         if (!owners.contains(cctx.localNode()))
+                             req.markKeyForPreload(idx);
                      }
  
-                     assert req.transactionNodes() != null;
+                     break;
+                 }
+                 catch (GridCacheEntryRemovedException ignore) {
+                     assert false : "Got removed exception on entry with dht local candidate: " + entry;
+                 }
  
+                 idx++;
+             }
+ 
+             if (!F.isEmpty(nearWrites)) {
+                 for (IgniteTxEntry entry : nearWrites) {
                      try {
-                         cctx.io().send(n, req, tx.ioPolicy());
+                         if (entry.explicitVersion() == null) {
+                             GridCacheMvccCandidate added = entry.cached().candidate(version());
  
-                         if (msgLog.isDebugEnabled()) {
-                             msgLog.debug("DHT prepare fut, sent request dht [txId=" + tx.nearXidVersion() +
-                                 ", dhtTxId=" + tx.xidVersion() +
-                                 ", node=" + n.id() + ']');
-                         }
-                     }
-                     catch (ClusterTopologyCheckedException ignored) {
-                         fut.onNodeLeft();
-                     }
-                     catch (IgniteCheckedException e) {
-                         if (!cctx.kernalContext().isStopping()) {
-                             if (msgLog.isDebugEnabled()) {
-                                 msgLog.debug("DHT prepare fut, failed to send request dht [txId=" + tx.nearXidVersion() +
-                                     ", dhtTxId=" + tx.xidVersion() +
-                                     ", node=" + n.id() + ']');
-                             }
+                             assert added != null : "Missing candidate for cache entry:" + entry;
+                             assert added.dhtLocal();
  
-                             fut.onResult(e);
-                         }
-                         else {
-                             if (msgLog.isDebugEnabled()) {
-                                 msgLog.debug("DHT prepare fut, failed to send request dht, ignore [txId=" + tx.nearXidVersion() +
-                                     ", dhtTxId=" + tx.xidVersion() +
-                                     ", node=" + n.id() +
-                                     ", err=" + e + ']');
-                             }
+                             if (added.ownerVersion() != null)
+                                 req.owned(entry.txKey(), added.ownerVersion());
                          }
+ 
+                         break;
+                     }
+                     catch (GridCacheEntryRemovedException ignore) {
+                         assert false : "Got removed exception on entry with dht local candidate: " + entry;
                      }
                  }
+             }
  
-                 for (GridDistributedTxMapping nearMapping : tx.nearMap().values()) {
-                     if (!tx.dhtMap().containsKey(nearMapping.primary().id())) {
-                         if (tx.remainingTime() == -1)
-                             return;
+             assert req.transactionNodes() != null;
  
-                         MiniFuture fut = new MiniFuture(nearMapping.primary().id(), ++miniId, null, nearMapping);
+             try {
+                 cctx.io().send(n, req, tx.ioPolicy());
  
-                         add(fut); // Append new future.
+                 if (msgLog.isDebugEnabled()) {
+                     msgLog.debug("DHT prepare fut, sent request dht [txId=" + tx.nearXidVersion() +
+                         ", dhtTxId=" + tx.xidVersion() +
+                         ", node=" + n.id() + ']');
+                 }
+             }
+             catch (ClusterTopologyCheckedException ignored) {
+                 fut.onNodeLeft();
+             }
+             catch (IgniteCheckedException e) {
+                 if (msgLog.isDebugEnabled()) {
+                     msgLog.debug("DHT prepare fut, failed to send request dht [txId=" + tx.nearXidVersion() +
+                         ", dhtTxId=" + tx.xidVersion() +
+                         ", node=" + n.id() + ']');
+                 }
  
-                         GridDhtTxPrepareRequest req = new GridDhtTxPrepareRequest(
-                             futId,
-                             fut.futureId(),
-                             tx.topologyVersion(),
-                             tx,
-                             timeout,
-                             null,
-                             nearMapping.writes(),
-                             tx.transactionNodes(),
-                             tx.nearXidVersion(),
-                             true,
-                             tx.onePhaseCommit(),
-                             tx.subjectId(),
-                             tx.taskNameHash(),
-                             tx.activeCachesDeploymentEnabled(),
-                             tx.storeWriteThrough(),
-                             retVal,
-                             tx.nodeTrace() != null ? new EventsTrace() : null);
- 
-                         for (IgniteTxEntry entry : nearMapping.entries()) {
-                             if (CU.writes().apply(entry)) {
-                                 try {
-                                     if (entry.explicitVersion() == null) {
-                                         GridCacheMvccCandidate added = entry.cached().candidate(version());
+                 fut.onResult(e);
+             }
+         }
  
-                                         assert added != null : "Null candidate for non-group-lock entry " +
-                                             "[added=" + added + ", entry=" + entry + ']';
-                                         assert added.dhtLocal() : "Got non-dht-local candidate for prepare future" +
-                                             "[added=" + added + ", entry=" + entry + ']';
+         for (GridDistributedTxMapping nearMapping : tx.nearMap().values()) {
+             if (!tx.dhtMap().containsKey(nearMapping.primary().id())) {
+                 if (tx.remainingTime() == -1)
+                     return;
  
-                                         if (added != null && added.ownerVersion() != null)
-                                             req.owned(entry.txKey(), added.ownerVersion());
-                                     }
+                 MiniFuture fut = new MiniFuture(nearMapping.primary().id(), ++miniId, null, nearMapping);
+ 
+                 add(fut); // Append new future.
+ 
+                 GridDhtTxPrepareRequest req = new GridDhtTxPrepareRequest(
+                     futId,
+                     fut.futureId(),
+                     tx.topologyVersion(),
+                     tx,
+                     timeout,
+                     null,
+                     nearMapping.writes(),
+                     tx.transactionNodes(),
+                     tx.nearXidVersion(),
+                     true,
+                     tx.onePhaseCommit(),
+                     tx.subjectId(),
+                     tx.taskNameHash(),
+                     tx.activeCachesDeploymentEnabled(),
+                     tx.storeWriteThrough(),
+                     retVal,
+                     mvccSnapshot,
 -                    null);
++                    null,
++                    tx.nodeTrace() != null ? new EventsTrace() : null);
+ 
+                 for (IgniteTxEntry entry : nearMapping.entries()) {
+                     if (CU.writes().apply(entry)) {
+                         try {
+                             if (entry.explicitVersion() == null) {
+                                 GridCacheMvccCandidate added = entry.cached().candidate(version());
  
-                                     break;
-                                 } catch (GridCacheEntryRemovedException ignore) {
-                                     assert false : "Got removed exception on entry with dht local candidate: " + entry;
-                                 }
+                                 assert added != null : "Null candidate for non-group-lock entry " +
+                                     "[added=" + added + ", entry=" + entry + ']';
+                                 assert added.dhtLocal() : "Got non-dht-local candidate for prepare future" +
+                                     "[added=" + added + ", entry=" + entry + ']';
+ 
+                                 if (added != null && added.ownerVersion() != null)
+                                     req.owned(entry.txKey(), added.ownerVersion());
                              }
+ 
+                             break;
+                         } catch (GridCacheEntryRemovedException ignore) {
+                             assert false : "Got removed exception on entry with dht local candidate: " + entry;
                          }
+                     }
+                 }
  
-                         assert req.transactionNodes() != null;
+                 assert req.transactionNodes() != null;
  
-                         try {
-                             cctx.io().send(nearMapping.primary(), req, tx.ioPolicy());
+                 try {
+                     cctx.io().send(nearMapping.primary(), req, tx.ioPolicy());
  
-                             if (msgLog.isDebugEnabled()) {
-                                 msgLog.debug("DHT prepare fut, sent request near [txId=" + tx.nearXidVersion() +
-                                     ", dhtTxId=" + tx.xidVersion() +
-                                     ", node=" + nearMapping.primary().id() + ']');
-                             }
-                         }
-                         catch (ClusterTopologyCheckedException ignored) {
-                             fut.onNodeLeft();
+                     if (msgLog.isDebugEnabled()) {
+                         msgLog.debug("DHT prepare fut, sent request near [txId=" + tx.nearXidVersion() +
+                             ", dhtTxId=" + tx.xidVersion() +
+                             ", node=" + nearMapping.primary().id() + ']');
+                     }
+                 }
+                 catch (ClusterTopologyCheckedException ignored) {
+                     fut.onNodeLeft();
+                 }
+                 catch (IgniteCheckedException e) {
+                     if (!cctx.kernalContext().isStopping()) {
+                         if (msgLog.isDebugEnabled()) {
+                             msgLog.debug("DHT prepare fut, failed to send request near [txId=" + tx.nearXidVersion() +
+                                 ", dhtTxId=" + tx.xidVersion() +
+                                 ", node=" + nearMapping.primary().id() + ']');
                          }
-                         catch (IgniteCheckedException e) {
-                             if (!cctx.kernalContext().isStopping()) {
-                                 if (msgLog.isDebugEnabled()) {
-                                     msgLog.debug("DHT prepare fut, failed to send request near [txId=" + tx.nearXidVersion() +
-                                         ", dhtTxId=" + tx.xidVersion() +
-                                         ", node=" + nearMapping.primary().id() + ']');
-                                 }
  
-                                 fut.onResult(e);
-                             }
-                             else {
-                                 if (msgLog.isDebugEnabled()) {
-                                     msgLog.debug("DHT prepare fut, failed to send request near, ignore [txId=" + tx.nearXidVersion() +
-                                         ", dhtTxId=" + tx.xidVersion() +
-                                         ", node=" + nearMapping.primary().id() +
-                                         ", err=" + e + ']');
-                                 }
-                             }
+                         fut.onResult(e);
+                     }
+                     else {
+                         if (msgLog.isDebugEnabled()) {
+                             msgLog.debug("DHT prepare fut, failed to send request near, ignore [txId=" + tx.nearXidVersion() +
+                                 ", dhtTxId=" + tx.xidVersion() +
+                                 ", node=" + nearMapping.primary().id() +
+                                 ", err=" + e + ']');
                          }
                      }
                  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 1de6cb1,30e8ceb..e8d6bbd
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@@ -143,8 -155,8 +156,10 @@@ public class GridDhtTxPrepareRequest ex
          boolean addDepInfo,
          boolean storeWriteThrough,
          boolean retVal,
+         MvccSnapshot mvccSnapshot,
 -        Collection<PartitionUpdateCountersMessage> counters) {
++        Collection<PartitionUpdateCountersMessage> counters,
 +        EventsTrace eventsTrace
 +    ) {
          super(tx,
              timeout,
              null,
@@@ -174,9 -187,7 +191,12 @@@
  
          nearNodeId = tx.nearNodeId();
  
+         skipCompletedVers = tx.xidVersion() == tx.nearXidVersion();
++
++
 +        this.eventsTrace = eventsTrace;
 +
 +        recordTracePoint(TracePoint.DHT_PREPARE_REQUEST_CREATED);
      }
  
      /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index 87499a8,140c1d5..3f61b1a
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@@ -40,10 -42,7 +42,8 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException;
- import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
- import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
  import org.apache.ignite.internal.util.future.GridCompoundFuture;
  import org.apache.ignite.internal.util.future.GridFinishedFuture;
  import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@@ -556,8 -583,8 +586,9 @@@ public class GridNearOptimisticSerializ
              tx.subjectId(),
              tx.taskNameHash(),
              m.clientFirst(),
+             txNodes.size() == 1,
 -            tx.activeCachesDeploymentEnabled());
 +            tx.activeCachesDeploymentEnabled(),
 +            cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
  
          for (IgniteTxEntry txEntry : writes) {
              if (txEntry.op() == TRANSFORM)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index bd7f2a2,06d7a8c..42ec5ca
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@@ -44,7 -48,7 +48,8 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
  import org.apache.ignite.internal.processors.cache.transactions.TxDeadlock;
+ import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
  import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
@@@ -538,8 -573,8 +576,9 @@@ public class GridNearOptimisticTxPrepar
                      tx.subjectId(),
                      tx.taskNameHash(),
                      m.clientFirst(),
+                     true,
 -                    tx.activeCachesDeploymentEnabled());
 +                    tx.activeCachesDeploymentEnabled(),
-                     cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
++                    cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null));
  
                  for (IgniteTxEntry txEntry : m.entries()) {
                      if (txEntry.op() == TRANSFORM)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index 45ff1df,85a48a3..37fd8de
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@@ -33,12 -34,13 +34,15 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
  import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
  import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
- import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopology;
+ import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionTopology;
  import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxMapping;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinator;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotResponseListener;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
 +import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
  import org.apache.ignite.internal.util.future.GridFutureAdapter;
  import org.apache.ignite.internal.util.typedef.C1;
@@@ -213,8 -228,10 +232,11 @@@ public class GridNearPessimisticTxPrepa
              tx.subjectId(),
              tx.taskNameHash(),
              false,
+             true,
 -            tx.activeCachesDeploymentEnabled());
 +            tx.activeCachesDeploymentEnabled(),
-             cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
++            cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null));
+ 
+         req.queryUpdate(m.queryUpdate());
  
          for (IgniteTxEntry txEntry : writes) {
              if (txEntry.op() == TRANSFORM)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index aeecf87,4a4d8e3..fd8ca5a
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@@ -44,10 -49,9 +49,11 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
 +import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
  import org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
+ import org.apache.ignite.internal.util.GridLongList;
  import org.apache.ignite.internal.util.future.GridFutureAdapter;
  import org.apache.ignite.internal.util.tostring.GridToStringInclude;
  import org.apache.ignite.internal.util.typedef.C1;
@@@ -392,15 -401,12 +413,14 @@@ public final class GridNearTxFinishFutu
              fut.getClass() == CheckRemoteTxMiniFuture.class;
      }
  
-     /**
-      * Initializes future.
-      *
-      * @param commit Commit flag.
-      */
-     @SuppressWarnings("ForLoopReplaceableByForEach")
-     void finish(boolean commit) {
+     /** {@inheritDoc} */
+     @Override @SuppressWarnings("ForLoopReplaceableByForEach")
+     public void finish(final boolean commit, final boolean clearThreadMap, final boolean onTimeout) {
 +        tx.recordTracePoint(IgniteTraceAware.TracePoint.TX_COMMIT);
 +
+         if (!cctx.mvcc().addFuture(this, futureId()))
+             return;
+ 
          if (tx.onNeedCheckBackup()) {
              assert tx.onePhaseCommit();
  
@@@ -724,8 -806,8 +819,9 @@@
              tx.size(),
              tx.subjectId(),
              tx.taskNameHash(),
+             tx.mvccSnapshot(),
 -            tx.activeCachesDeploymentEnabled()
 +            tx.activeCachesDeploymentEnabled(),
 +            cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null
          );
  
          // If this is the primary node for the keys.
@@@ -860,7 -947,8 +961,9 @@@
              tx.activeCachesDeploymentEnabled(),
              !waitRemoteTxs && (tx.needReturnValue() && tx.implicit()),
              waitRemoteTxs,
+             null,
 -            null);
++            null,
 +            cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
  
          finishReq.checkCommitted(true);
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 5fb9991,6b5aa90..56200eb
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@@ -24,9 -24,10 +24,11 @@@ import java.util.UUID
  import org.apache.ignite.cache.CacheWriteSynchronizationMode;
  import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
  import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
+ import org.apache.ignite.internal.util.typedef.internal.U;
  import org.apache.ignite.lang.IgniteUuid;
  import org.apache.ignite.plugin.extensions.communication.MessageReader;
  import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@@ -88,9 -92,8 +93,10 @@@ public class GridNearTxFinishRequest ex
          int txSize,
          @Nullable UUID subjId,
          int taskNameHash,
+         MvccSnapshot mvccSnapshot,
 -        boolean addDepInfo) {
 +        boolean addDepInfo,
 +        EventsTrace eventsTrace
 +    ) {
          super(
              xidVer,
              futId,
@@@ -115,7 -117,7 +121,9 @@@
          explicitLock(explicitLock);
          storeEnabled(storeEnabled);
  
+         this.mvccSnapshot = mvccSnapshot;
++
 +        recordTracePoint(TracePoint.NEAR_FINISH_REQUEST_CREATED);
      }
  
      /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index a9a2e99,111f5d2..7be33cc
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@@ -66,8 -70,11 +70,12 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
  import org.apache.ignite.internal.processors.cache.transactions.TransactionProxy;
  import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl;
+ import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyRollbackOnlyImpl;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+ import org.apache.ignite.internal.processors.query.EnlistOperation;
+ import org.apache.ignite.internal.processors.query.UpdateSourceIterator;
+ import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
  import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
@@@ -225,14 -255,23 +256,27 @@@ public class GridNearTxLocal extends Gr
              false,
              txSize,
              subjId,
 -            taskNameHash);
 +            taskNameHash,
 +            ctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
 +
 +        recordTracePoint(TracePoint.TX_CREATE);
 +
+         this.lb = lb;
+ 
          mappings = implicitSingle ? new IgniteTxMappingsSingleImpl() : new IgniteTxMappingsImpl();
  
+         this.mvccOp = mvccOp;
+ 
          initResult();
+ 
+         trackTimeout = timeout() > 0 && !implicit() && cctx.time().addTimeoutObject(this);
+     }
+ 
+     /**
+      * @return Mvcc query version tracker.
+      */
+     public MvccQueryTracker mvccQueryTracker() {
+         return mvccTracker;
      }
  
      /** {@inheritDoc} */
@@@ -3099,8 -3714,14 +3719,16 @@@
              if (!PREP_FUT_UPD.compareAndSet(this, null, fut))
                  return prepFut;
  
+             if (trackTimeout) {
+                 prepFut.listen(new IgniteInClosure<IgniteInternalFuture<?>>() {
+                     @Override public void apply(IgniteInternalFuture<?> f) {
+                         GridNearTxLocal.this.removeTimeoutHandler();
+                     }
+                 });
+             }
+ 
 +            recordTracePoint(TracePoint.TX_PREPARE);
 +
              if (timeout == -1) {
                  fut.onDone(this, timeoutException());
  
@@@ -3153,55 -3771,45 +3778,49 @@@
          if (log.isDebugEnabled())
              log.debug("Committing near local tx: " + this);
  
-         if (fastFinish()) {
-             state(PREPARING);
-             state(PREPARED);
-             state(COMMITTING);
+         final NearTxFinishFuture fut;
+         final NearTxFinishFuture fut0 = finishFut;
  
-             cctx.tm().fastFinishTx(this, true);
+         boolean fastFinish;
  
-             state(COMMITTED);
+         if (fut0 != null || !FINISH_FUT_UPD.compareAndSet(this, null, fut = finishFuture(fastFinish = fastFinish(), true)))
+             return chainFinishFuture(finishFut, true, true, false);
  
-             recordTracePoint(TracePoint.TX_END);
- 
-             return new GridFinishedFuture<>((IgniteInternalTx)this);
-         }
- 
-         final IgniteInternalFuture<?> prepareFut = prepareNearTxLocal();
- 
-         GridNearTxFinishFuture fut = commitFut;
- 
-         if (fut == null &&
-             !COMMIT_FUT_UPD.compareAndSet(this, null, fut = new GridNearTxFinishFuture<>(cctx, this, true)))
-             return commitFut;
- 
-         cctx.mvcc().addFuture(fut, fut.futureId());
+         if (!fastFinish) {
+             final IgniteInternalFuture<?> prepareFut = prepareNearTxLocal();
  
-         prepareFut.listen(new CI1<IgniteInternalFuture<?>>() {
-             @Override public void apply(IgniteInternalFuture<?> f) {
-                 GridNearTxFinishFuture fut0 = commitFut;
+             prepareFut.listen(new CI1<IgniteInternalFuture<?>>() {
+                 @Override public void apply(IgniteInternalFuture<?> f) {
+                     try {
+                         // Make sure that here are no exceptions.
+                         prepareFut.get();
  
-                 try {
-                     // Make sure that here are no exceptions.
-                     prepareFut.get();
+                         fut.finish(true, true, false);
+                     }
+                     catch (Error | RuntimeException e) {
+                         COMMIT_ERR_UPD.compareAndSet(GridNearTxLocal.this, null, e);
  
-                     fut0.finish(true);
-                 }
-                 catch (Error | RuntimeException e) {
-                     COMMIT_ERR_UPD.compareAndSet(GridNearTxLocal.this, null, e);
+                         fut.finish(false, true, false);
  
-                     fut0.finish(false);
+                         throw e;
+                     }
+                     catch (IgniteCheckedException e) {
+                         COMMIT_ERR_UPD.compareAndSet(GridNearTxLocal.this, null, e);
  
-                     throw e;
+                         if (!(e instanceof NodeStoppingException))
+                             fut.finish(false, true, true);
+                         else
+                             fut.onNodeStop(e);
+                     }
                  }
-                 catch (IgniteCheckedException e) {
-                     COMMIT_ERR_UPD.compareAndSet(GridNearTxLocal.this, null, e);
+             });
+         }
 -        else
++        else {
++            // TODO is this needed?
++            recordTracePoint(TracePoint.TX_END);
 +
-                     if (!(e instanceof NodeStoppingException))
-                         fut0.finish(false);
-                 }
-             }
-         });
+             fut.finish(true, false, false);
++        }
  
          return fut;
      }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
index 3a31c62,55c809d..3a7a788
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
@@@ -117,8 -124,8 +125,9 @@@ public class GridNearTxPrepareRequest e
          @Nullable UUID subjId,
          int taskNameHash,
          boolean firstClientReq,
+         boolean allowWaitTopFut,
 -        boolean addDepInfo
 +        boolean addDepInfo,
 +        EventsTrace eventsTrace
      ) {
          super(tx,
              timeout,

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index a7e9ca3,e9865df..2f259e2
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@@ -33,9 -33,9 +33,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.GridCacheReturn;
  import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
  import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse;
+ import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
  import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
  import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 +import org.apache.ignite.internal.processors.trace.EventsTrace;
  import org.apache.ignite.internal.util.tostring.GridToStringExclude;
  import org.apache.ignite.internal.util.tostring.GridToStringInclude;
  import org.apache.ignite.internal.util.typedef.internal.S;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
index 6b19db1,3f35c5f..a7a4bd0
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
@@@ -68,9 -80,9 +80,10 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.segmentation.GridSegmentationProcessor;
  import org.apache.ignite.internal.processors.service.GridServiceProcessor;
  import org.apache.ignite.internal.processors.session.GridTaskSessionProcessor;
+ import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
  import org.apache.ignite.internal.processors.task.GridTaskProcessor;
  import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 +import org.apache.ignite.internal.processors.trace.TraceProcessor;
  import org.apache.ignite.internal.suggestions.GridPerformanceSuggestions;
  import org.apache.ignite.internal.util.IgniteExceptionRegistry;
  import org.apache.ignite.internal.util.StripedExecutor;
@@@ -351,12 -468,14 +469,19 @@@ public class StandaloneGridKernalContex
      }
  
      /** {@inheritDoc} */
 +    @Override public TraceProcessor trace() {
 +        return null;
 +    }
 +
 +    /** {@inheritDoc} */
-     @Override public void markSegmented() { }
+     @Override public MvccProcessor coordinators() {
+         return null;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public boolean invalid() {
+         return false;
+     }
  
      /** {@inheritDoc} */
      @Override public boolean segmented() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index fb1f1e2,314bb52..7630136
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@@ -347,53 -382,77 +383,78 @@@ public class IgniteTxHandler 
              }
  
              try {
-                 if (top != null && needRemap(req.topologyVersion(), top.topologyVersion(), req)) {
-                     if (txPrepareMsgLog.isDebugEnabled()) {
-                         txPrepareMsgLog.debug("Topology version mismatch for near prepare, need remap transaction [" +
-                             "txId=" + req.version() +
-                             ", node=" + nearNodeId +
-                             ", reqTopVer=" + req.topologyVersion() +
-                             ", locTopVer=" + top.topologyVersion() +
-                             ", req=" + req + ']');
-                     }
+                 if (top != null ) {
+                     boolean retry = false;
  
-                     GridNearTxPrepareResponse res = new GridNearTxPrepareResponse(
-                         req.partition(),
-                         req.version(),
-                         req.futureId(),
-                         req.miniId(),
-                         req.version(),
-                         req.version(),
-                         null,
-                         null,
-                         top.topologyVersion(),
-                         req.onePhaseCommit(),
-                         req.deployInfo() != null,
-                         req.nodeTrace());
+                     GridDhtTopologyFuture topFut = top.topologyVersionFuture();
  
-                     try {
-                         ctx.io().send(nearNodeId, res, req.policy());
+                     if (!req.allowWaitTopologyFuture() && !topFut.isDone()) {
+                         retry = true;
  
                          if (txPrepareMsgLog.isDebugEnabled()) {
-                             txPrepareMsgLog.debug("Sent remap response for near prepare [txId=" + req.version() +
-                                 ", node=" + nearNodeId + ']');
+                             txPrepareMsgLog.debug("Topology change is in progress, need remap transaction [" +
+                                 "txId=" + req.version() +
+                                 ", node=" + nearNode.id() +
+                                 ", reqTopVer=" + req.topologyVersion() +
+                                 ", locTopVer=" + top.readyTopologyVersion() +
+                                 ", req=" + req + ']');
                          }
                      }
-                     catch (ClusterTopologyCheckedException ignored) {
+ 
+                     if (!retry && needRemap(req.topologyVersion(), top.readyTopologyVersion(), req)) {
+                         retry = true;
+ 
                          if (txPrepareMsgLog.isDebugEnabled()) {
-                             txPrepareMsgLog.debug("Failed to send remap response for near prepare, node failed [" +
+                             txPrepareMsgLog.debug("Topology version mismatch for near prepare, need remap transaction [" +
                                  "txId=" + req.version() +
-                                 ", node=" + nearNodeId + ']');
+                                 ", node=" + nearNode.id() +
+                                 ", reqTopVer=" + req.topologyVersion() +
+                                 ", locTopVer=" + top.readyTopologyVersion() +
+                                 ", req=" + req + ']');
                          }
                      }
-                     catch (IgniteCheckedException e) {
-                         U.error(txPrepareMsgLog, "Failed to send remap response for near prepare " +
-                             "[txId=" + req.version() +
-                             ", node=" + nearNodeId +
-                             ", req=" + req + ']', e);
+ 
+                     if (retry) {
+                         GridNearTxPrepareResponse res = new GridNearTxPrepareResponse(
+                             req.partition(),
+                             req.version(),
+                             req.futureId(),
+                             req.miniId(),
+                             req.version(),
+                             req.version(),
+                             null,
+                             null,
+                             top.lastTopologyChangeVersion(),
+                             req.onePhaseCommit(),
 -                            req.deployInfo() != null);
++                            req.deployInfo() != null,
++                            req.nodeTrace());
+ 
+                         try {
+                             ctx.io().send(nearNode, res, req.policy());
+ 
+                             if (txPrepareMsgLog.isDebugEnabled()) {
+                                 txPrepareMsgLog.debug("Sent remap response for near prepare [txId=" + req.version() +
+                                     ", node=" + nearNode.id() + ']');
+                             }
+                         }
+                         catch (ClusterTopologyCheckedException ignored) {
+                             if (txPrepareMsgLog.isDebugEnabled()) {
+                                 txPrepareMsgLog.debug("Failed to send remap response for near prepare, node failed [" +
+                                     "txId=" + req.version() +
+                                     ", node=" + nearNode.id() + ']');
+                             }
+                         }
+                         catch (IgniteCheckedException e) {
+                             U.error(txPrepareMsgLog, "Failed to send remap response for near prepare " +
+                                 "[txId=" + req.version() +
+                                 ", node=" + nearNode.id() +
+                                 ", req=" + req + ']', e);
+                         }
+ 
+                         return new GridFinishedFuture<>(res);
                      }
  
-                     return new GridFinishedFuture<>(res);
+                     assert topFut.isDone();
                  }
  
                  tx = new GridDhtTxLocal(
@@@ -788,8 -943,7 +945,8 @@@
                  req.threadId(),
                  req.futureId(),
                  req.miniId(),
-                 new IgniteCheckedException("Transaction has been already completed."),
 -                new IgniteTxRollbackCheckedException("Transaction has been already completed or not started yet."));
++                new IgniteTxRollbackCheckedException("Transaction has been already completed or not started yet."),
 +                req.nodeTrace());
  
              try {
                  ctx.io().send(nodeId, res, req.policy());

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec2526f4/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index ae533cb,e4c96b4..ae6c4e9
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@@ -55,8 -55,8 +55,9 @@@ import org.apache.ignite.configuration.
  import org.apache.ignite.internal.IgniteInternalFuture;
  import org.apache.ignite.internal.IgniteInterruptedCheckedException;
  import org.apache.ignite.internal.managers.communication.GridIoMessage;
 +import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
  import org.apache.ignite.internal.util.GridConcurrentHashSet;
+ import org.apache.ignite.internal.util.GridUnsafe;
  import org.apache.ignite.internal.util.future.GridCompoundFuture;
  import org.apache.ignite.internal.util.nio.ssl.GridNioSslFilter;
  import org.apache.ignite.internal.util.tostring.GridToStringExclude;


[10/50] [abbrv] ignite git commit: IGNITE-9565 Web Console: Fixed charts update logic. Fixed minor CSS issues.

Posted by ag...@apache.org.
IGNITE-9565 Web Console: Fixed charts update logic. Fixed minor CSS issues.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6f39115e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6f39115e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6f39115e

Branch: refs/heads/ignite-5797
Commit: 6f39115e3b4295c3cd8d1c517d3cd2204dd12e2e
Parents: 1ad9b9c
Author: Alexander Kalinin <ve...@yandex.ru>
Authored: Fri Sep 28 18:04:39 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Sep 28 18:04:39 2018 +0700

----------------------------------------------------------------------
 .../ignite-chart-series-selector/template.pug       |  2 +-
 .../app/components/ignite-chart/controller.js       |  4 ++--
 .../frontend/app/components/ignite-chart/style.scss | 16 ++++++++++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6f39115e/modules/web-console/frontend/app/components/ignite-chart-series-selector/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-chart-series-selector/template.pug b/modules/web-console/frontend/app/components/ignite-chart-series-selector/template.pug
index fec0d9a..203f12f 100644
--- a/modules/web-console/frontend/app/components/ignite-chart-series-selector/template.pug
+++ b/modules/web-console/frontend/app/components/ignite-chart-series-selector/template.pug
@@ -24,6 +24,6 @@ button.btn-ignite.btn-ignite--link-dashed-secondary(
     bs-on-before-show='$ctrl.onShow'
     data-multiple='true'
     ng-transclude
-    ng-show='$ctrl.charts.length'
+    ng-disabled='!($ctrl.charts.length)'
 )
     svg(ignite-icon='gear').icon

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f39115e/modules/web-console/frontend/app/components/ignite-chart/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-chart/controller.js b/modules/web-console/frontend/app/components/ignite-chart/controller.js
index 5ae536e..79156fc 100644
--- a/modules/web-console/frontend/app/components/ignite-chart/controller.js
+++ b/modules/web-console/frontend/app/components/ignite-chart/controller.js
@@ -93,8 +93,8 @@ export class IgniteChartController {
         if (this.chart && _.get(changes, 'refreshRate.currentValue'))
             this.onRefreshRateChanged(_.get(changes, 'refreshRate.currentValue'));
 
-        // TODO: Investigate other signaling for resetting component state.
-        if (changes.chartDataPoint && _.isNil(changes.chartDataPoint.currentValue)) {
+        if ((changes.chartDataPoint && _.isNil(changes.chartDataPoint.currentValue)) ||
+            (changes.chartHistory && _.isEmpty(changes.chartHistory.currentValue))) {
             this.clearDatasets();
 
             return;

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f39115e/modules/web-console/frontend/app/components/ignite-chart/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ignite-chart/style.scss b/modules/web-console/frontend/app/components/ignite-chart/style.scss
index be0fb6d..3a07bd5 100644
--- a/modules/web-console/frontend/app/components/ignite-chart/style.scss
+++ b/modules/web-console/frontend/app/components/ignite-chart/style.scss
@@ -41,9 +41,25 @@ ignite-chart {
       line-height: 36px;
     }
 
+    ignite-chart-series-selector {
+      margin: 0 2px;
+    }
+
     > div {
+      &:first-child {
+        width: calc(100% - 120px);
+        white-space: nowrap;
+      }
+
       display: flex;
       align-items: center;
+      flex-wrap: nowrap;
+      flex-grow: 0;
+
+      .chart-text {
+        overflow: hidden;
+        text-overflow: ellipsis;
+      }
     }
   }
 


[06/50] [abbrv] ignite git commit: IGNITE-9711: [ML] Remove IgniteThread wrapper from ml examples

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/svm/multiclass/SVMMultiClassClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/svm/multiclass/SVMMultiClassClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/svm/multiclass/SVMMultiClassClassificationExample.java
index b7ca448..520b8cc 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/svm/multiclass/SVMMultiClassClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/svm/multiclass/SVMMultiClassClassificationExample.java
@@ -32,7 +32,6 @@ import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
 import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerTrainer;
 import org.apache.ignite.ml.svm.SVMLinearMultiClassClassificationModel;
 import org.apache.ignite.ml.svm.SVMLinearMultiClassClassificationTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run SVM multi-class classification trainer ({@link SVMLinearMultiClassClassificationModel}) over distributed dataset
@@ -59,106 +58,100 @@ public class SVMMultiClassClassificationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                SVMMultiClassClassificationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, Vector> dataCache = new TestCache(ignite).getVectors(data);
+            IgniteCache<Integer, Vector> dataCache = new TestCache(ignite).getVectors(data);
 
-                SVMLinearMultiClassClassificationTrainer trainer = new SVMLinearMultiClassClassificationTrainer();
+            SVMLinearMultiClassClassificationTrainer trainer = new SVMLinearMultiClassClassificationTrainer();
 
-                SVMLinearMultiClassClassificationModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> {
-                        double[] arr = v.asArray();
-                        return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
-                    },
-                    (k, v) -> v.get(0)
-                );
+            SVMLinearMultiClassClassificationModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> {
+                    double[] arr = v.asArray();
+                    return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
+                },
+                (k, v) -> v.get(0)
+            );
 
-                System.out.println(">>> SVM Multi-class model");
-                System.out.println(mdl.toString());
+            System.out.println(">>> SVM Multi-class model");
+            System.out.println(mdl.toString());
 
-                MinMaxScalerTrainer<Integer, Vector> normalizationTrainer = new MinMaxScalerTrainer<>();
+            MinMaxScalerTrainer<Integer, Vector> normalizationTrainer = new MinMaxScalerTrainer<>();
 
-                IgniteBiFunction<Integer, Vector, Vector> preprocessor = normalizationTrainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> {
-                        double[] arr = v.asArray();
-                        return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
-                    }
-                );
-
-                SVMLinearMultiClassClassificationModel mdlWithNormalization = trainer.fit(
-                    ignite,
-                    dataCache,
-                    preprocessor,
-                    (k, v) -> v.get(0)
-                );
+            IgniteBiFunction<Integer, Vector, Vector> preprocessor = normalizationTrainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> {
+                    double[] arr = v.asArray();
+                    return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
+                }
+            );
 
-                System.out.println(">>> SVM Multi-class model with minmaxscaling");
-                System.out.println(mdlWithNormalization.toString());
+            SVMLinearMultiClassClassificationModel mdlWithNormalization = trainer.fit(
+                ignite,
+                dataCache,
+                preprocessor,
+                (k, v) -> v.get(0)
+            );
 
-                System.out.println(">>> ----------------------------------------------------------------");
-                System.out.println(">>> | Prediction\t| Prediction with Normalization\t| Ground Truth\t|");
-                System.out.println(">>> ----------------------------------------------------------------");
+            System.out.println(">>> SVM Multi-class model with minmaxscaling");
+            System.out.println(mdlWithNormalization.toString());
 
-                int amountOfErrors = 0;
-                int amountOfErrorsWithNormalization = 0;
-                int totalAmount = 0;
+            System.out.println(">>> ----------------------------------------------------------------");
+            System.out.println(">>> | Prediction\t| Prediction with Normalization\t| Ground Truth\t|");
+            System.out.println(">>> ----------------------------------------------------------------");
 
-                // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
-                int[][] confusionMtx = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
-                int[][] confusionMtxWithNormalization = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+            int amountOfErrors = 0;
+            int amountOfErrorsWithNormalization = 0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, Vector>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, Vector> observation : observations) {
-                        double[] val = observation.getValue().asArray();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
+            int[][] confusionMtx = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+            int[][] confusionMtxWithNormalization = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
-                        double predictionWithNormalization = mdlWithNormalization.apply(new DenseVector(inputs));
+            try (QueryCursor<Cache.Entry<Integer, Vector>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, Vector> observation : observations) {
+                    double[] val = observation.getValue().asArray();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        totalAmount++;
+                    double prediction = mdl.apply(new DenseVector(inputs));
+                    double predictionWithNormalization = mdlWithNormalization.apply(new DenseVector(inputs));
 
-                        // Collect data for model
-                        if(groundTruth != prediction)
-                            amountOfErrors++;
+                    totalAmount++;
 
-                        int idx1 = (int)prediction == 1 ? 0 : ((int)prediction == 3 ? 1 : 2);
-                        int idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
+                    // Collect data for model
+                    if(groundTruth != prediction)
+                        amountOfErrors++;
 
-                        confusionMtx[idx1][idx2]++;
+                    int idx1 = (int)prediction == 1 ? 0 : ((int)prediction == 3 ? 1 : 2);
+                    int idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
 
-                        // Collect data for model with minmaxscaling
-                        if(groundTruth != predictionWithNormalization)
-                            amountOfErrorsWithNormalization++;
+                    confusionMtx[idx1][idx2]++;
 
-                        idx1 = (int)predictionWithNormalization == 1 ? 0 : ((int)predictionWithNormalization == 3 ? 1 : 2);
-                        idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
+                    // Collect data for model with minmaxscaling
+                    if(groundTruth != predictionWithNormalization)
+                        amountOfErrorsWithNormalization++;
 
-                        confusionMtxWithNormalization[idx1][idx2]++;
+                    idx1 = (int)predictionWithNormalization == 1 ? 0 : ((int)predictionWithNormalization == 3 ? 1 : 2);
+                    idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t\t\t\t\t| %.4f\t\t|\n", prediction, predictionWithNormalization, groundTruth);
-                    }
-                    System.out.println(">>> ----------------------------------------------------------------");
-                    System.out.println("\n>>> -----------------SVM model-------------");
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
-                    System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
+                    confusionMtxWithNormalization[idx1][idx2]++;
 
-                    System.out.println("\n>>> -----------------SVM model with Normalization-------------");
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrorsWithNormalization);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrorsWithNormalization / (double)totalAmount));
-                    System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtxWithNormalization));
-
-                    System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t\t\t\t\t| %.4f\t\t|\n", prediction, predictionWithNormalization, groundTruth);
                 }
-            });
+                System.out.println(">>> ----------------------------------------------------------------");
+                System.out.println("\n>>> -----------------SVM model-------------");
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+                System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
+
+                System.out.println("\n>>> -----------------SVM model with Normalization-------------");
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrorsWithNormalization);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrorsWithNormalization / (double)totalAmount));
+                System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtxWithNormalization));
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeClassificationTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeClassificationTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeClassificationTrainerExample.java
index 28a5fbc..652b293 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeClassificationTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeClassificationTrainerExample.java
@@ -26,7 +26,6 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Example of using distributed {@link DecisionTreeClassificationTrainer}.
@@ -53,58 +52,49 @@ public class DecisionTreeClassificationTrainerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                DecisionTreeClassificationTrainerExample.class.getSimpleName(), () -> {
+            // Create cache with training data.
+            CacheConfiguration<Integer, LabeledPoint> trainingSetCfg = new CacheConfiguration<>();
+            trainingSetCfg.setName("TRAINING_SET");
+            trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
 
-                // Create cache with training data.
-                CacheConfiguration<Integer, LabeledPoint> trainingSetCfg = new CacheConfiguration<>();
-                trainingSetCfg.setName("TRAINING_SET");
-                trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
+            IgniteCache<Integer, LabeledPoint> trainingSet = ignite.createCache(trainingSetCfg);
 
-                IgniteCache<Integer, LabeledPoint> trainingSet = ignite.createCache(trainingSetCfg);
+            Random rnd = new Random(0);
 
-                Random rnd = new Random(0);
+            // Fill training data.
+            for (int i = 0; i < 1000; i++)
+                trainingSet.put(i, generatePoint(rnd));
 
-                // Fill training data.
-                for (int i = 0; i < 1000; i++)
-                    trainingSet.put(i, generatePoint(rnd));
+            // Create classification trainer.
+            DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(4, 0);
 
-                // Create classification trainer.
-                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(4, 0);
+            // Train decision tree model.
+            DecisionTreeNode mdl = trainer.fit(
+                ignite,
+                trainingSet,
+                (k, v) -> VectorUtils.of(v.x, v.y),
+                (k, v) -> v.lb
+            );
 
-                // Train decision tree model.
-                DecisionTreeNode mdl = trainer.fit(
-                    ignite,
-                    trainingSet,
-                    (k, v) -> VectorUtils.of(v.x, v.y),
-                    (k, v) -> v.lb
-                );
+            System.out.println(">>> Decision tree classification model: " + mdl);
 
-                System.out.println(">>> Decision tree classification model: " + mdl);
+            // Calculate score.
+            int correctPredictions = 0;
+            for (int i = 0; i < 1000; i++) {
+                LabeledPoint pnt = generatePoint(rnd);
 
-                // Calculate score.
-                int correctPredictions = 0;
-                for (int i = 0; i < 1000; i++) {
-                    LabeledPoint pnt = generatePoint(rnd);
+                double prediction = mdl.apply(VectorUtils.of(pnt.x, pnt.y));
+                double lbl = pnt.lb;
 
-                    double prediction = mdl.apply(VectorUtils.of(pnt.x, pnt.y));
-                    double lbl = pnt.lb;
+                if (i %50 == 1)
+                    System.out.printf(">>> test #: %d\t\t predicted: %.4f\t\tlabel: %.4f\n", i, prediction, lbl);
 
-                    if (i %50 == 1)
-                        System.out.printf(">>> test #: %d\t\t predicted: %.4f\t\tlabel: %.4f\n", i, prediction, lbl);
+                if (prediction == lbl)
+                    correctPredictions++;
+            }
 
-                    if (prediction == lbl)
-                        correctPredictions++;
-                }
-
-                System.out.println(">>> Accuracy: " + correctPredictions / 10.0 + "%");
-
-                System.out.println(">>> Decision tree classification trainer example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> Accuracy: " + correctPredictions / 10.0 + "%");
+            System.out.println(">>> Decision tree classification trainer example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeRegressionTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeRegressionTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeRegressionTrainerExample.java
index 301df10..2a89c7e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeRegressionTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/DecisionTreeRegressionTrainerExample.java
@@ -25,7 +25,6 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
 import org.apache.ignite.ml.tree.DecisionTreeRegressionTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Example of using distributed {@link DecisionTreeRegressionTrainer}.
@@ -53,51 +52,43 @@ public class DecisionTreeRegressionTrainerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                DecisionTreeRegressionTrainerExample.class.getSimpleName(), () -> {
+            // Create cache with training data.
+            CacheConfiguration<Integer, Point> trainingSetCfg = new CacheConfiguration<>();
+            trainingSetCfg.setName("TRAINING_SET");
+            trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
 
-                // Create cache with training data.
-                CacheConfiguration<Integer, Point> trainingSetCfg = new CacheConfiguration<>();
-                trainingSetCfg.setName("TRAINING_SET");
-                trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
+            IgniteCache<Integer, Point> trainingSet = ignite.createCache(trainingSetCfg);
 
-                IgniteCache<Integer, Point> trainingSet = ignite.createCache(trainingSetCfg);
+            // Fill training data.
+            generatePoints(trainingSet);
 
-                // Fill training data.
-                generatePoints(trainingSet);
+            // Create regression trainer.
+            DecisionTreeRegressionTrainer trainer = new DecisionTreeRegressionTrainer(10, 0);
 
-                // Create regression trainer.
-                DecisionTreeRegressionTrainer trainer = new DecisionTreeRegressionTrainer(10, 0);
+            // Train decision tree model.
+            DecisionTreeNode mdl = trainer.fit(
+                ignite,
+                trainingSet,
+                (k, v) -> VectorUtils.of(v.x),
+                (k, v) -> v.y
+            );
 
-                // Train decision tree model.
-                DecisionTreeNode mdl = trainer.fit(
-                    ignite,
-                    trainingSet,
-                    (k, v) -> VectorUtils.of(v.x),
-                    (k, v) -> v.y
-                );
+            System.out.println(">>> Decision tree regression model: " + mdl);
 
-                System.out.println(">>> Decision tree regression model: " + mdl);
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
+            // Calculate score.
+            for (int x = 0; x < 10; x++) {
+                double predicted = mdl.apply(VectorUtils.of(x));
 
-                // Calculate score.
-                for (int x = 0; x < 10; x++) {
-                    double predicted = mdl.apply(VectorUtils.of(x));
+                System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", predicted, Math.sin(x));
+            }
 
-                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", predicted, Math.sin(x));
-                }
+            System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> ---------------------------------");
-
-                System.out.println(">>> Decision tree regression trainer example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> Decision tree regression trainer example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesClassificationTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesClassificationTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesClassificationTrainerExample.java
index e092e5c..5beb954 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesClassificationTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesClassificationTrainerExample.java
@@ -27,7 +27,6 @@ import org.apache.ignite.ml.composition.boosting.convergence.mean.MeanAbsValueCo
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.trainers.DatasetTrainer;
 import org.apache.ignite.ml.tree.boosting.GDBBinaryClassifierOnTreesTrainer;
-import org.apache.ignite.thread.IgniteThread;
 import org.jetbrains.annotations.NotNull;
 
 /**
@@ -50,45 +49,38 @@ public class GDBOnTreesClassificationTrainerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                GDBBinaryClassifierOnTreesTrainer.class.getSimpleName(), () -> {
+            // Create cache with training data.
+            CacheConfiguration<Integer, double[]> trainingSetCfg = createCacheConfiguration();
+            IgniteCache<Integer, double[]> trainingSet = fillTrainingData(ignite, trainingSetCfg);
 
-                // Create cache with training data.
-                CacheConfiguration<Integer, double[]> trainingSetCfg = createCacheConfiguration();
-                IgniteCache<Integer, double[]> trainingSet = fillTrainingData(ignite, trainingSetCfg);
+            // Create regression trainer.
+            DatasetTrainer<ModelsComposition, Double> trainer = new GDBBinaryClassifierOnTreesTrainer(1.0, 300, 2, 0.)
+                .withCheckConvergenceStgyFactory(new MeanAbsValueConvergenceCheckerFactory(0.1));
 
-                // Create regression trainer.
-                DatasetTrainer<ModelsComposition, Double> trainer = new GDBBinaryClassifierOnTreesTrainer(1.0, 300, 2, 0.)
-                    .withCheckConvergenceStgyFactory(new MeanAbsValueConvergenceCheckerFactory(0.1));
+            // Train decision tree model.
+            ModelsComposition mdl = trainer.fit(
+                ignite,
+                trainingSet,
+                (k, v) -> VectorUtils.of(v[0]),
+                (k, v) -> v[1]
+            );
 
-                // Train decision tree model.
-                ModelsComposition mdl = trainer.fit(
-                    ignite,
-                    trainingSet,
-                    (k, v) -> VectorUtils.of(v[0]),
-                    (k, v) -> v[1]
-                );
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Valid answer\t|");
+            System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Valid answer\t|");
-                System.out.println(">>> ---------------------------------");
+            // Calculate score.
+            for (int x = -5; x < 5; x++) {
+                double predicted = mdl.apply(VectorUtils.of(x));
 
-                // Calculate score.
-                for (int x = -5; x < 5; x++) {
-                    double predicted = mdl.apply(VectorUtils.of(x));
+                System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", predicted, Math.sin(x) < 0 ? 0.0 : 1.0);
+            }
 
-                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", predicted, Math.sin(x) < 0 ? 0.0 : 1.0);
-                }
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> Count of trees = " + mdl.getModels().size());
+            System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> Count of trees = " + mdl.getModels().size());
-                System.out.println(">>> ---------------------------------");
-
-                System.out.println(">>> GDB classification trainer example completed.");
-            });
-
-            igniteThread.start();
-            igniteThread.join();
+            System.out.println(">>> GDB classification trainer example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
index 3662973..482a47c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/boosting/GDBOnTreesRegressionTrainerExample.java
@@ -29,7 +29,6 @@ import org.apache.ignite.ml.math.primitives.vector.Vector;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.trainers.DatasetTrainer;
 import org.apache.ignite.ml.tree.boosting.GDBRegressionOnTreesTrainer;
-import org.apache.ignite.thread.IgniteThread;
 import org.jetbrains.annotations.NotNull;
 
 /**
@@ -52,43 +51,35 @@ public class GDBOnTreesRegressionTrainerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                GDBOnTreesRegressionTrainerExample.class.getSimpleName(), () -> {
+            // Create cache with training data.
+            CacheConfiguration<Integer, double[]> trainingSetCfg = createCacheConfiguration();
+            IgniteCache<Integer, double[]> trainingSet = fillTrainingData(ignite, trainingSetCfg);
 
-                // Create cache with training data.
-                CacheConfiguration<Integer, double[]> trainingSetCfg = createCacheConfiguration();
-                IgniteCache<Integer, double[]> trainingSet = fillTrainingData(ignite, trainingSetCfg);
+            // Create regression trainer.
+            DatasetTrainer<ModelsComposition, Double> trainer = new GDBRegressionOnTreesTrainer(1.0, 2000, 1, 0.)
+                .withCheckConvergenceStgyFactory(new MeanAbsValueConvergenceCheckerFactory(0.001));
 
-                // Create regression trainer.
-                DatasetTrainer<ModelsComposition, Double> trainer = new GDBRegressionOnTreesTrainer(1.0, 2000, 1, 0.)
-                    .withCheckConvergenceStgyFactory(new MeanAbsValueConvergenceCheckerFactory(0.001));
+            // Train decision tree model.
+            Model<Vector, Double> mdl = trainer.fit(
+                ignite,
+                trainingSet,
+                (k, v) -> VectorUtils.of(v[0]),
+                (k, v) -> v[1]
+            );
 
-                // Train decision tree model.
-                Model<Vector, Double> mdl = trainer.fit(
-                    ignite,
-                    trainingSet,
-                    (k, v) -> VectorUtils.of(v[0]),
-                    (k, v) -> v[1]
-                );
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Valid answer \t|");
+            System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Valid answer \t|");
-                System.out.println(">>> ---------------------------------");
+            // Calculate score.
+            for (int x = -5; x < 5; x++) {
+                double predicted = mdl.apply(VectorUtils.of(x));
 
-                // Calculate score.
-                for (int x = -5; x < 5; x++) {
-                    double predicted = mdl.apply(VectorUtils.of(x));
+                System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", predicted, Math.pow(x, 2));
+            }
 
-                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", predicted, Math.pow(x, 2));
-                }
-
-                System.out.println(">>> ---------------------------------");
-
-                System.out.println(">>> GDB regression trainer example completed.");
-            });
-
-            igniteThread.start();
-            igniteThread.join();
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> GDB regression trainer example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
index 4693744..ea235ee 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestClassificationExample.java
@@ -33,7 +33,6 @@ import org.apache.ignite.ml.dataset.feature.FeatureMeta;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.tree.randomforest.RandomForestClassifierTrainer;
 import org.apache.ignite.ml.tree.randomforest.data.FeaturesCountSelectionStrategies;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Example represents a solution for the task of wine classification based on a
@@ -62,57 +61,50 @@ public class RandomForestClassificationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                RandomForestClassificationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                AtomicInteger idx = new AtomicInteger(0);
-                RandomForestClassifierTrainer classifier = new RandomForestClassifierTrainer(
-                    IntStream.range(0, data[0].length - 1).mapToObj(
-                        x -> new FeatureMeta("", idx.getAndIncrement(), false)).collect(Collectors.toList())
-                ).withAmountOfTrees(101)
-                    .withFeaturesCountSelectionStrgy(FeaturesCountSelectionStrategies.ONE_THIRD)
-                    .withMaxDepth(4)
-                    .withMinImpurityDelta(0.)
-                    .withSubSampleSize(0.3)
-                    .withSeed(0);
+            AtomicInteger idx = new AtomicInteger(0);
+            RandomForestClassifierTrainer classifier = new RandomForestClassifierTrainer(
+                IntStream.range(0, data[0].length - 1).mapToObj(
+                    x -> new FeatureMeta("", idx.getAndIncrement(), false)).collect(Collectors.toList())
+            ).withAmountOfTrees(101)
+                .withFeaturesCountSelectionStrgy(FeaturesCountSelectionStrategies.ONE_THIRD)
+                .withMaxDepth(4)
+                .withMinImpurityDelta(0.)
+                .withSubSampleSize(0.3)
+                .withSeed(0);
 
-                System.out.println(">>> Configured trainer: " + classifier.getClass().getSimpleName());
+            System.out.println(">>> Configured trainer: " + classifier.getClass().getSimpleName());
 
-                ModelsComposition randomForest = classifier.fit(ignite, dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            ModelsComposition randomForest = classifier.fit(ignite, dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> Trained model: " + randomForest.toString(true));
+            System.out.println(">>> Trained model: " + randomForest.toString(true));
 
-                int amountOfErrors = 0;
-                int totalAmount = 0;
+            int amountOfErrors = 0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        double prediction = randomForest.apply(VectorUtils.of(inputs));
+                    double prediction = randomForest.apply(VectorUtils.of(inputs));
 
-                        totalAmount++;
-                        if (groundTruth != prediction)
-                            amountOfErrors++;
-
-                    }
-
-                    System.out.println("\n>>> Evaluated model on " + totalAmount + " data points.");
-
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double) totalAmount));
-                    System.out.println(">>> Random Forest multi-class classification algorithm over cached dataset usage example completed.");
+                    totalAmount++;
+                    if (groundTruth != prediction)
+                        amountOfErrors++;
                 }
-            });
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println("\n>>> Evaluated model on " + totalAmount + " data points.");
+
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double) totalAmount));
+                System.out.println(">>> Random Forest multi-class classification algorithm over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
index ee0c1c2..9b4aece 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tree/randomforest/RandomForestRegressionExample.java
@@ -37,7 +37,6 @@ import org.apache.ignite.ml.environment.parallelism.ParallelismStrategy;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.tree.randomforest.RandomForestRegressionTrainer;
 import org.apache.ignite.ml.tree.randomforest.data.FeaturesCountSelectionStrategies;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Example represents a solution for the task of price predictions for houses in Boston based on a
@@ -66,68 +65,62 @@ public class RandomForestRegressionExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                RandomForestRegressionExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                AtomicInteger idx = new AtomicInteger(0);
-                RandomForestRegressionTrainer trainer = new RandomForestRegressionTrainer(
-                    IntStream.range(0, data[0].length - 1).mapToObj(
-                        x -> new FeatureMeta("", idx.getAndIncrement(), false)).collect(Collectors.toList())
-                ).withAmountOfTrees(101)
-                    .withFeaturesCountSelectionStrgy(FeaturesCountSelectionStrategies.ONE_THIRD)
-                    .withMaxDepth(4)
-                    .withMinImpurityDelta(0.)
-                    .withSubSampleSize(0.3)
-                    .withSeed(0);
+            AtomicInteger idx = new AtomicInteger(0);
+            RandomForestRegressionTrainer trainer = new RandomForestRegressionTrainer(
+                IntStream.range(0, data[0].length - 1).mapToObj(
+                    x -> new FeatureMeta("", idx.getAndIncrement(), false)).collect(Collectors.toList())
+            ).withAmountOfTrees(101)
+                .withFeaturesCountSelectionStrgy(FeaturesCountSelectionStrategies.ONE_THIRD)
+                .withMaxDepth(4)
+                .withMinImpurityDelta(0.)
+                .withSubSampleSize(0.3)
+                .withSeed(0);
 
-                trainer.setEnvironment(LearningEnvironment.builder()
-                    .withParallelismStrategy(ParallelismStrategy.Type.ON_DEFAULT_POOL)
-                    .withLoggingFactory(ConsoleLogger.factory(MLLogger.VerboseLevel.LOW))
-                    .build()
-                );
+            trainer.setEnvironment(LearningEnvironment.builder()
+                .withParallelismStrategy(ParallelismStrategy.Type.ON_DEFAULT_POOL)
+                .withLoggingFactory(ConsoleLogger.factory(MLLogger.VerboseLevel.LOW))
+                .build()
+            );
 
-                System.out.println(">>> Configured trainer: " + trainer.getClass().getSimpleName());
+            System.out.println(">>> Configured trainer: " + trainer.getClass().getSimpleName());
 
-                ModelsComposition randomForest = trainer.fit(ignite, dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 0, v.length - 1)),
-                    (k, v) -> v[v.length - 1]
-                );
+            ModelsComposition randomForest = trainer.fit(ignite, dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 0, v.length - 1)),
+                (k, v) -> v[v.length - 1]
+            );
 
-                System.out.println(">>> Trained model: " + randomForest.toString(true));
+            System.out.println(">>> Trained model: " + randomForest.toString(true));
 
-                double mse = 0.0;
-                double mae = 0.0;
-                int totalAmount = 0;
+            double mse = 0.0;
+            double mae = 0.0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 0, val.length - 1);
-                        double groundTruth = val[val.length - 1];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 0, val.length - 1);
+                    double groundTruth = val[val.length - 1];
 
-                        double prediction = randomForest.apply(VectorUtils.of(inputs));
+                    double prediction = randomForest.apply(VectorUtils.of(inputs));
 
-                        mse += Math.pow(prediction - groundTruth, 2.0);
-                        mae += Math.abs(prediction - groundTruth);
+                    mse += Math.pow(prediction - groundTruth, 2.0);
+                    mae += Math.abs(prediction - groundTruth);
 
-                        totalAmount++;
-                    }
-
-                    System.out.println("\n>>> Evaluated model on " + totalAmount + " data points.");
+                    totalAmount++;
+                }
 
-                    mse = mse / totalAmount;
-                    System.out.println("\n>>> Mean squared error (MSE) " + mse);
+                System.out.println("\n>>> Evaluated model on " + totalAmount + " data points.");
 
-                    mae = mae / totalAmount;
-                    System.out.println("\n>>> Mean absolute error (MAE) " + mae);
+                mse = mse / totalAmount;
+                System.out.println("\n>>> Mean squared error (MSE) " + mse);
 
-                    System.out.println(">>> Random Forest regression algorithm over cached dataset usage example completed.");
-                }
-            });
+                mae = mae / totalAmount;
+                System.out.println("\n>>> Mean absolute error (MAE) " + mae);
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> Random Forest regression algorithm over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
index 78ec9f5..264dbf4 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
@@ -28,7 +28,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Usage of {@link DecisionTreeClassificationTrainer} to predict death in the disaster.
@@ -48,47 +47,41 @@ public class Step_1_Read_and_Learn {
         System.out.println(">>> Tutorial step 1 (read and learn) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_1_Read_and_Learn.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    IgniteBiFunction<Integer, Object[], Vector> featureExtractor
-                        = (k, v) -> VectorUtils.of((double) v[0], (double) v[5], (double) v[6]);
+                IgniteBiFunction<Integer, Object[], Vector> featureExtractor
+                    = (k, v) -> VectorUtils.of((double) v[0], (double) v[5], (double) v[6]);
 
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
 
-                    DecisionTreeNode mdl = trainer.fit(
-                        ignite,
-                        dataCache,
-                        featureExtractor, // "pclass", "sibsp", "parch"
-                        lbExtractor
-                    );
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    featureExtractor, // "pclass", "sibsp", "parch"
+                    lbExtractor
+                );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
+                System.out.println("\n>>> Trained model: " + mdl);
 
-                    double accuracy = Evaluator.evaluate(
-                        dataCache,
-                        mdl,
-                        featureExtractor,
-                        lbExtractor,
-                        new Accuracy<>()
-                    );
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    featureExtractor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
 
-                    System.out.println(">>> Tutorial step 1 (read and learn) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> Tutorial step 1 (read and learn) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
index f86e1b6..df73235 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
@@ -29,7 +29,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Usage of {@link ImputerTrainer} to fill missed data ({@code Double.NaN}) values in the chosen columns.
@@ -50,54 +49,48 @@ public class Step_2_Imputing {
         System.out.println(">>> Tutorial step 2 (imputing) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_2_Imputing.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    IgniteBiFunction<Integer, Object[], Vector> featureExtractor
-                        = (k, v) -> VectorUtils.of((double) v[0], (double) v[5], (double) v[6]);
+                IgniteBiFunction<Integer, Object[], Vector> featureExtractor
+                    = (k, v) -> VectorUtils.of((double) v[0], (double) v[5], (double) v[6]);
 
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor // "pclass", "sibsp", "parch"
-                        );
-
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
-
-                    // Train decision tree model.
-                    DecisionTreeNode mdl = trainer.fit(
-                        ignite,
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
                         dataCache,
-                        imputingPreprocessor,
-                        lbExtractor
+                        featureExtractor // "pclass", "sibsp", "parch"
                     );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
 
-                    double accuracy = Evaluator.evaluate(
-                        dataCache,
-                        mdl,
-                        imputingPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
-                    );
+                // Train decision tree model.
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    imputingPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + mdl);
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    imputingPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
 
-                    System.out.println(">>> Tutorial step 2 (imputing) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> Tutorial step 2 (imputing) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
index 03ff527..463a6ba 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
@@ -30,7 +30,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Let's add two categorial features "sex", "embarked" to predict more precisely than in {@link Step_1_Read_and_Learn}.
@@ -53,65 +52,58 @@ public class Step_3_Categorial {
         System.out.println(">>> Tutorial step 3 (categorial) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_3_Categorial.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[5], v[6], v[10]}; // "pclass", "sibsp", "parch", "sex", "embarked"
+                // Defines first preprocessor that extracts features from an upstream data.
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[5], v[6], v[10]}; // "pclass", "sibsp", "parch", "sex", "embarked"
 
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(4)
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
-                    );
-
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
-
-                    // Train decision tree model.
-                    DecisionTreeNode mdl = trainer.fit(
-                        ignite,
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(4)
+                    .fit(ignite,
                         dataCache,
-                        imputingPreprocessor,
-                        lbExtractor
-                    );
+                        featureExtractor
+                );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
-
-                    double accuracy = Evaluator.evaluate(
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
                         dataCache,
-                        mdl,
-                        imputingPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        strEncoderPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
-
-                    System.out.println(">>> Tutorial step 3 (categorial) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
+
+                // Train decision tree model.
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    imputingPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + mdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    imputingPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 3 (categorial) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
index a4535ba..93e7e79 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
@@ -30,7 +30,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Let's add two categorial features "sex", "embarked" to predict more precisely than in {@link Step_1_Read_and_Learn}..
@@ -54,68 +53,61 @@ public class Step_3_Categorial_with_One_Hot_Encoder {
         System.out.println(">>> Tutorial step 3 (categorial with One-hot encoder) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_3_Categorial_with_One_Hot_Encoder.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[5], v[6], v[10]
-                    }; // "pclass", "sibsp", "parch", "sex", "embarked"
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    IgniteBiFunction<Integer, Object[], Vector> oneHotEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.ONE_HOT_ENCODER)
-                        .withEncodedFeature(0)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(4)
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
-                    );
-
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            oneHotEncoderPreprocessor
-                        );
-
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+
+                // Defines first preprocessor that extracts features from an upstream data.
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[5], v[6], v[10]
+                }; // "pclass", "sibsp", "parch", "sex", "embarked"
+
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+
+                IgniteBiFunction<Integer, Object[], Vector> oneHotEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.ONE_HOT_ENCODER)
+                    .withEncodedFeature(0)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(4)
+                    .fit(ignite,
+                        dataCache,
+                        featureExtractor
+                );
 
-                    // Train decision tree model.
-                    DecisionTreeNode mdl = trainer.fit(
-                        ignite,
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
                         dataCache,
-                        imputingPreprocessor,
-                        lbExtractor
+                        oneHotEncoderPreprocessor
                     );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
 
-                    double accuracy = Evaluator.evaluate(
-                        dataCache,
-                        mdl,
-                        imputingPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
-                    );
+                // Train decision tree model.
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    imputingPreprocessor,
+                    lbExtractor
+                );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
+                System.out.println("\n>>> Trained model: " + mdl);
 
-                    System.out.println(">>> Tutorial step 3 (categorial with One-hot encoder) example started.");
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    imputingPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
 
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
 
-            igniteThread.start();
+                System.out.println(">>> Tutorial step 3 (categorial with One-hot encoder) example started.");
 
-            igniteThread.join();
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
index 789d7e8..bbeedb6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
@@ -30,7 +30,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Add yet two numerical features "age", "fare" to improve our model over {@link Step_3_Categorial}.
@@ -51,66 +50,59 @@ public class Step_4_Add_age_fare {
         System.out.println(">>> Tutorial step 4 (add age and fare) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_4_Add_age_fare.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
 
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here.
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
-                    );
-
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
-
-                    // Train decision tree model.
-                    DecisionTreeNode mdl = trainer.fit(
-                        ignite,
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here.
+                    .fit(ignite,
                         dataCache,
-                        imputingPreprocessor,
-                        lbExtractor
-                    );
+                        featureExtractor
+                );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
-
-                    double accuracy = Evaluator.evaluate(
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
                         dataCache,
-                        mdl,
-                        imputingPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        strEncoderPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
-
-                    System.out.println(">>> Tutorial step 4 (add age and fare) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
+
+                // Train decision tree model.
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    imputingPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + mdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    imputingPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 4 (add age and fare) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
index e3de585..7d934d7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
@@ -32,7 +32,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * {@link MinMaxScalerTrainer} and {@link NormalizationTrainer} are used in this example due to different values
@@ -54,80 +53,74 @@ public class Step_5_Scaling {
         System.out.println(">>> Tutorial step 5 (scaling) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_5_Scaling.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here.
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
+
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here.
+                    .fit(ignite,
+                        dataCache,
+                        featureExtractor
+                );
+
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
+                        dataCache,
+                        strEncoderPreprocessor
                     );
 
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
-                        .fit(
-                            ignite,
-                            dataCache,
-                            imputingPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
-                        .withP(1)
-                        .fit(
-                            ignite,
-                            dataCache,
-                            minMaxScalerPreprocessor
-                        );
-
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
-
-                    // Train decision tree model.
-                    DecisionTreeNode mdl = trainer.fit(
+                IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
+                    .fit(
                         ignite,
                         dataCache,
-                        normalizationPreprocessor,
-                        lbExtractor
+                        imputingPreprocessor
                     );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
-
-                    double accuracy = Evaluator.evaluate(
+                IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
+                    .withP(1)
+                    .fit(
+                        ignite,
                         dataCache,
-                        mdl,
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        minMaxScalerPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
-
-                    System.out.println(">>> Tutorial step 5 (scaling) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-            igniteThread.join();
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
+
+                // Train decision tree model.
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    normalizationPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + mdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 5 (scaling) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
index 1d5900f..cc0a278 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
@@ -32,7 +32,6 @@ import org.apache.ignite.ml.preprocessing.normalization.NormalizationTrainer;
 import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * {@link MinMaxScalerTrainer} and {@link NormalizationTrainer} are used in this example due to different values
@@ -54,54 +53,48 @@ public class Step_5_Scaling_with_Pipeline {
         System.out.println(">>> Tutorial step 5 (scaling) via Pipeline example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_5_Scaling_with_Pipeline.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
 
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    PipelineMdl<Integer, Object[]> mdl = new Pipeline<Integer, Object[], Object[]>()
-                        .addFeatureExtractor(featureExtractor)
-                        .addLabelExtractor(lbExtractor)
-                        .addPreprocessor(new EncoderTrainer<Integer, Object[]>()
-                            .withEncoderType(EncoderType.STRING_ENCODER)
-                            .withEncodedFeature(1)
-                            .withEncodedFeature(6))
-                        .addPreprocessor(new ImputerTrainer<Integer, Object[]>())
-                        .addPreprocessor(new MinMaxScalerTrainer<Integer, Object[]>())
-                        .addPreprocessor(new NormalizationTrainer<Integer, Object[]>()
-                            .withP(1))
-                        .addTrainer(new DecisionTreeClassificationTrainer(5, 0))
-                        .fit(ignite, dataCache);
+                PipelineMdl<Integer, Object[]> mdl = new Pipeline<Integer, Object[], Object[]>()
+                    .addFeatureExtractor(featureExtractor)
+                    .addLabelExtractor(lbExtractor)
+                    .addPreprocessor(new EncoderTrainer<Integer, Object[]>()
+                        .withEncoderType(EncoderType.STRING_ENCODER)
+                        .withEncodedFeature(1)
+                        .withEncodedFeature(6))
+                    .addPreprocessor(new ImputerTrainer<Integer, Object[]>())
+                    .addPreprocessor(new MinMaxScalerTrainer<Integer, Object[]>())
+                    .addPreprocessor(new NormalizationTrainer<Integer, Object[]>()
+                        .withP(1))
+                    .addTrainer(new DecisionTreeClassificationTrainer(5, 0))
+                    .fit(ignite, dataCache);
 
-                    System.out.println("\n>>> Trained model: " + mdl);
+                System.out.println("\n>>> Trained model: " + mdl);
 
-                    double accuracy = Evaluator.evaluate(
-                        dataCache,
-                        mdl,
-                        mdl.getFeatureExtractor(),
-                        mdl.getLabelExtractor(),
-                        new Accuracy<>()
-                    );
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    mdl.getFeatureExtractor(),
+                    mdl.getLabelExtractor(),
+                    new Accuracy<>()
+                );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
 
-                    System.out.println(">>> Tutorial step 5 (scaling) via Pipeline example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> Tutorial step 5 (scaling) via Pipeline example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }


[25/50] [abbrv] ignite git commit: IGNITE-7251 Remove term "fabric" from Ignite deliverables

Posted by ag...@apache.org.
IGNITE-7251 Remove term "fabric" from Ignite deliverables

Signed-off-by: Anton Vinogradov <av...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7989173b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7989173b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7989173b

Branch: refs/heads/ignite-5797
Commit: 7989173b4d64a681fd08b7d7bcda2d26559941ae
Parents: 29f13da
Author: Anton Vinogradov <av...@apache.org>
Authored: Mon Oct 1 14:16:15 2018 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Mon Oct 1 14:16:15 2018 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |  15 +-
 assembly/LICENSE_FABRIC                         | 304 -------------------
 assembly/LICENSE_IGNITE                         | 304 +++++++++++++++++++
 assembly/NOTICE_FABRIC                          |  13 -
 assembly/NOTICE_IGNITE                          |  13 +
 assembly/dependencies-apache-ignite-hadoop.xml  | 166 ++++++++++
 assembly/dependencies-apache-ignite-lgpl.xml    | 184 +++++++++++
 assembly/dependencies-apache-ignite.xml         | 189 ++++++++++++
 assembly/dependencies-fabric-lgpl.xml           | 184 -----------
 assembly/dependencies-fabric.xml                | 189 ------------
 assembly/dependencies-hadoop.xml                | 166 ----------
 assembly/libs/README.txt                        |   8 +-
 assembly/release-apache-ignite-base.xml         | 257 ++++++++++++++++
 assembly/release-apache-ignite-hadoop.xml       |  95 ++++++
 assembly/release-apache-ignite-lgpl.xml         |  51 ++++
 assembly/release-apache-ignite.xml              |  51 ++++
 assembly/release-fabric-base.xml                | 257 ----------------
 assembly/release-fabric-lgpl.xml                |  51 ----
 assembly/release-fabric.xml                     |  51 ----
 assembly/release-hadoop.xml                     |  95 ------
 assembly/release-sources.xml                    |  80 -----
 docker/apache-ignite/Dockerfile                 |   4 +-
 docker/apache-ignite/README.txt                 |   4 +-
 examples/README.txt                             |   2 +-
 modules/kubernetes/DEVNOTES.txt                 |   2 +-
 modules/kubernetes/config/Dockerfile            |   8 +-
 modules/mesos/pom.xml                           |   2 +-
 .../ignite/mesos/resource/IgniteProvider.java   |   2 +-
 packaging/package.sh                            |   4 +-
 packaging/rpm/apache-ignite.spec                |   4 +-
 parent/pom.xml                                  |   2 +-
 pom.xml                                         |  41 +--
 32 files changed, 1339 insertions(+), 1459 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 7785ee7..3df0496 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -19,7 +19,7 @@ Ignite Fabric Maven Build Instructions
 
         mvn initialize -Prelease
 
-Look for apache-ignite-fabric-<version>-bin.zip in ./target/bin directory.
+Look for apache-ignite-<version>-bin.zip in ./target/bin directory.
 
 
 Ignite Fabric with LGPL Maven Build Instructions
@@ -41,9 +41,9 @@ Ignite Fabric with LGPL Maven Build Instructions
 
 4) Assembly Apache Ignite fabric with LGPL dependencies:
 
-        mvn initialize -Prelease,lgpl -Dignite.edition=fabric-lgpl
+        mvn initialize -Prelease,lgpl -Dignite.edition=apache-ignite-lgpl
 
-   Look for apache-ignite-fabric-lgpl-<version>-bin.zip in ./target/bin directory.
+   Look for apache-ignite-lgpl-<version>-bin.zip in ./target/bin directory.
 
 
 Ignite Hadoop Accelerator Maven Build Instructions
@@ -60,7 +60,7 @@ Ignite Hadoop Accelerator Maven Build Instructions
 
 2) Assembly Hadoop Accelerator:
 
-        mvn initialize -Prelease -Dignite.edition=hadoop
+        mvn initialize -Prelease -Dignite.edition=apache-ignite-hadoop
 
    Look for apache-ignite-hadoop-<version>-bin.zip in ./target/bin directory. Resulting binary
    assembly will also include integration module for Apache Spark.
@@ -161,12 +161,7 @@ Ignite Release Instructions
 
    3.4) Assembly Hadoop Accelerator:
 
-                mvn initialize -Prelease -Dignite.edition=hadoop
-
-   NOTE: Binary artifact name can be changed by setting additional property -Dignite.zip.pattern. Binary artifact will be
-   created inside /target/bin folder when release profile is used.
-
-   NOTE: Sources artifact name is fixed. Sources artifact will be created inside /target dir when apache-release profile is used.
+                mvn initialize -Prelease -Dignite.edition=apache-ignite-hadoop
 
    NOTE: Nexus staging (repository.apache.org) should be closed with appropriate comment contains release version and
    release candidate number, for example "Apache Ignite 1.0.0-rc7", when mvn deploy finished.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
deleted file mode 100644
index ce44bea..0000000
--- a/assembly/LICENSE_FABRIC
+++ /dev/null
@@ -1,304 +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 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 the following:
-"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 JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
-==============================================================================
-This product bundles JSR107 API and SPI which is available under the following:
-JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt
-
-==============================================================================
-For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
-==============================================================================
-This product bundles JSch which is available under the following:
-Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
-
-==============================================================================
-For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
-==============================================================================
-This product bundles JLine which is available under the following:
-The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
-
-==============================================================================
-For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.*
-==============================================================================
-This product bundles Scala Library which is available under the following:
-BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
-
-==============================================================================
-For H2 Database Engine (http://www.h2database.com) com.h2database:h2:jar:1.4.191
-==============================================================================
-This product bundles H2 Database Engine which is available under the following:
-MPL 2.0, and EPL 1.0. For details, see http://h2database.com/html/license.html.
-
-==============================================================================
-For JTidy (http://jtidy.sourceforge.net) net.sf.jtidy:jtidy:jar:r938
-==============================================================================
-This product bundles JTidy which is available under the following:
-Java HTML Tidy License. For details, see http://jtidy.svn.sourceforge.net/viewvc/jtidy/trunk/jtidy/LICENSE.txt?revision=95.
-
-==============================================================================
-For tomcat-servlet-api (http://tomcat.apache.org/) org.apache.tomcat:tomcat-servlet-api:jar:9.0.10
-==============================================================================
-This product bundles tomcat-servlet-api which is available under the following:
-Apache License, Version 2.0 and Common Development And Distribution License (CDDL) Version 1.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt and http://www.opensource.org/licenses/cddl1.txt.
-
-==============================================================================
-For AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
-==============================================================================
-This product bundles AOP alliance which is available under the following:
-Public Domain.
-
-==============================================================================
-For AspectJ (http://www.aspectj.org) org.aspectj:*:jar:1.7.2
-==============================================================================
-This product bundles AspectJ which is available under the following:
-Eclipse Public License - v 1.0. For details, see http://www.eclipse.org/legal/epl-v10.html.
-
-==============================================================================
-For Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
-==============================================================================
-This product bundles Java Transaction API which is available under it's own license.
-See http://download.oracle.com/otndocs/jcp/jta-1.1-classes-oth-JSpec/jta-1.1-classes-oth-JSpec-license.html for details.
-
-==============================================================================
-For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:5.0.3
-==============================================================================
-This product bundles ASM All which is available under the following:
-BSD. For details, see http://asm.objectweb.org/license.html.
-
-==============================================================================
-For Jetty (http://www.eclipse.org/jetty) org.eclipse.jetty:*:jar:9.2.11.v20150529
-==============================================================================
-This product bundles Jetty which is available under the following:
-Apache Software License - Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.
-Eclipse Public License - Version 1.0. For details, see http://www.eclipse.org/org/documents/epl-v10.php.
-
-==============================================================================
-For SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4
-==============================================================================
-This product bundles SLF4J API Module which is available under the following:
-MIT License. For details, see http://www.opensource.org/licenses/mit-license.php.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/LICENSE_IGNITE
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_IGNITE b/assembly/LICENSE_IGNITE
new file mode 100644
index 0000000..ce44bea
--- /dev/null
+++ b/assembly/LICENSE_IGNITE
@@ -0,0 +1,304 @@
+                                 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 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 the following:
+"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 JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
+==============================================================================
+This product bundles JSR107 API and SPI which is available under the following:
+JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt
+
+==============================================================================
+For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
+==============================================================================
+This product bundles JSch which is available under the following:
+Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
+
+==============================================================================
+For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
+==============================================================================
+This product bundles JLine which is available under the following:
+The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
+
+==============================================================================
+For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.*
+==============================================================================
+This product bundles Scala Library which is available under the following:
+BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
+
+==============================================================================
+For H2 Database Engine (http://www.h2database.com) com.h2database:h2:jar:1.4.191
+==============================================================================
+This product bundles H2 Database Engine which is available under the following:
+MPL 2.0, and EPL 1.0. For details, see http://h2database.com/html/license.html.
+
+==============================================================================
+For JTidy (http://jtidy.sourceforge.net) net.sf.jtidy:jtidy:jar:r938
+==============================================================================
+This product bundles JTidy which is available under the following:
+Java HTML Tidy License. For details, see http://jtidy.svn.sourceforge.net/viewvc/jtidy/trunk/jtidy/LICENSE.txt?revision=95.
+
+==============================================================================
+For tomcat-servlet-api (http://tomcat.apache.org/) org.apache.tomcat:tomcat-servlet-api:jar:9.0.10
+==============================================================================
+This product bundles tomcat-servlet-api which is available under the following:
+Apache License, Version 2.0 and Common Development And Distribution License (CDDL) Version 1.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt and http://www.opensource.org/licenses/cddl1.txt.
+
+==============================================================================
+For AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
+==============================================================================
+This product bundles AOP alliance which is available under the following:
+Public Domain.
+
+==============================================================================
+For AspectJ (http://www.aspectj.org) org.aspectj:*:jar:1.7.2
+==============================================================================
+This product bundles AspectJ which is available under the following:
+Eclipse Public License - v 1.0. For details, see http://www.eclipse.org/legal/epl-v10.html.
+
+==============================================================================
+For Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
+==============================================================================
+This product bundles Java Transaction API which is available under it's own license.
+See http://download.oracle.com/otndocs/jcp/jta-1.1-classes-oth-JSpec/jta-1.1-classes-oth-JSpec-license.html for details.
+
+==============================================================================
+For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:5.0.3
+==============================================================================
+This product bundles ASM All which is available under the following:
+BSD. For details, see http://asm.objectweb.org/license.html.
+
+==============================================================================
+For Jetty (http://www.eclipse.org/jetty) org.eclipse.jetty:*:jar:9.2.11.v20150529
+==============================================================================
+This product bundles Jetty which is available under the following:
+Apache Software License - Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.
+Eclipse Public License - Version 1.0. For details, see http://www.eclipse.org/org/documents/epl-v10.php.
+
+==============================================================================
+For SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4
+==============================================================================
+This product bundles SLF4J API Module which is available under the following:
+MIT License. For details, see http://www.opensource.org/licenses/mit-license.php.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/NOTICE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/NOTICE_FABRIC b/assembly/NOTICE_FABRIC
deleted file mode 100644
index 964fd35..0000000
--- a/assembly/NOTICE_FABRIC
+++ /dev/null
@@ -1,13 +0,0 @@
-Apache Ignite
-Copyright 2018 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/ignite/blob/7989173b/assembly/NOTICE_IGNITE
----------------------------------------------------------------------
diff --git a/assembly/NOTICE_IGNITE b/assembly/NOTICE_IGNITE
new file mode 100644
index 0000000..964fd35
--- /dev/null
+++ b/assembly/NOTICE_IGNITE
@@ -0,0 +1,13 @@
+Apache Ignite
+Copyright 2018 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/ignite/blob/7989173b/assembly/dependencies-apache-ignite-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-apache-ignite-hadoop.xml b/assembly/dependencies-apache-ignite-hadoop.xml
new file mode 100644
index 0000000..076f09c
--- /dev/null
+++ b/assembly/dependencies-apache-ignite-hadoop.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>dependencies</id>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <moduleSets>
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-spark</include>
+                <include>org.apache.ignite:ignite-spring</include>
+                <include>org.apache.ignite:ignite-log4j</include>
+                <include>org.apache.ignite:ignite-indexing</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>true</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <excludes>
+                            <exclude>hadoop*.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-core</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>false</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-hadoop</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>true</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <excludes>
+                            <exclude>hadoop*.jar</exclude>
+                            <exclude>log4j*.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+    </moduleSets>
+
+    <fileSets>
+        <fileSet>
+            <directory>modules/core/licenses</directory>
+            <outputDirectory>/licenses</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/dependencies-apache-ignite-lgpl.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-apache-ignite-lgpl.xml b/assembly/dependencies-apache-ignite-lgpl.xml
new file mode 100644
index 0000000..fe2932e
--- /dev/null
+++ b/assembly/dependencies-apache-ignite-lgpl.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>dependencies</id>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <moduleSets>
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-spring</include>
+                <include>org.apache.ignite:ignite-indexing</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>true</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-core</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>false</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+
+        <moduleSet>
+            <includeSubModules>true</includeSubModules>
+            <excludes>
+                <exclude>org.apache.ignite:ignite-core</exclude>
+                <exclude>org.apache.ignite:ignite-clients</exclude>
+                <exclude>org.apache.ignite:ignite-spring</exclude>
+                <exclude>org.apache.ignite:ignite-tools</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-p2p</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
+                <exclude>org.apache.ignite:ignite-examples</exclude>
+                <exclude>org.apache.ignite:ignite-indexing</exclude>
+                <exclude>org.apache.ignite:ignite-visor-console</exclude>
+                <exclude>org.apache.ignite:ignite-visor-console_2.10</exclude>
+                <exclude>org.apache.ignite:ignite-visor-plugins</exclude>
+                <exclude>org.apache.ignite:ignite-hadoop</exclude>
+                <exclude>org.apache.ignite:ignite-codegen</exclude>
+                <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
+                <exclude>org.apache.ignite:ignite-appserver-test</exclude>
+                <exclude>org.apache.ignite:ignite-websphere-test</exclude>
+                <exclude>org.apache.ignite:ignite-cassandra</exclude>
+                <exclude>org.apache.ignite:ignite-yardstick</exclude>
+                <exclude>org.apache.ignite:ignite-benchmarks</exclude>
+                <exclude>org.apache.ignite:ignite-web-agent</exclude>
+                <exclude>org.apache.ignite:ignite-dev-utils</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-platform</exclude>
+                <exclude>org.apache.ignite:ignite-compatibility</exclude>
+                <exclude>org.apache.ignite:ignite-sqlline</exclude>
+            </excludes>
+            <sources>
+                <includeModuleDirectory>true</includeModuleDirectory>
+                <outputDirectoryMapping>optional/${module.artifactId}</outputDirectoryMapping>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/classes</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>features.xml</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+    </moduleSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/dependencies-apache-ignite.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-apache-ignite.xml b/assembly/dependencies-apache-ignite.xml
new file mode 100644
index 0000000..3bcae04
--- /dev/null
+++ b/assembly/dependencies-apache-ignite.xml
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>dependencies</id>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <moduleSets>
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-spring</include>
+                <include>org.apache.ignite:ignite-indexing</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>true</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-core</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>false</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+
+        <moduleSet>
+            <includeSubModules>true</includeSubModules>
+            <excludes>
+                <exclude>org.apache.ignite:ignite-core</exclude>
+                <exclude>org.apache.ignite:ignite-clients</exclude>
+                <exclude>org.apache.ignite:ignite-spring</exclude>
+                <exclude>org.apache.ignite:ignite-tools</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-p2p</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
+                <exclude>org.apache.ignite:ignite-examples</exclude>
+                <exclude>org.apache.ignite:ignite-indexing</exclude>
+                <exclude>org.apache.ignite:ignite-visor-console</exclude>
+                <exclude>org.apache.ignite:ignite-visor-console_2.10</exclude>
+                <exclude>org.apache.ignite:ignite-visor-plugins</exclude>
+                <exclude>org.apache.ignite:ignite-hadoop</exclude>
+                <exclude>org.apache.ignite:ignite-codegen</exclude>
+                <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
+                <exclude>org.apache.ignite:ignite-hibernate-core</exclude>
+                <exclude>org.apache.ignite:ignite-hibernate_4.2</exclude>
+                <exclude>org.apache.ignite:ignite-hibernate_5.1</exclude>
+                <exclude>org.apache.ignite:ignite-schedule</exclude>
+                <exclude>org.apache.ignite:ignite-geospatial</exclude>
+                <exclude>org.apache.ignite:ignite-appserver-test</exclude>
+                <exclude>org.apache.ignite:ignite-websphere-test</exclude>
+                <exclude>org.apache.ignite:ignite-cassandra</exclude>
+                <exclude>org.apache.ignite:ignite-yardstick</exclude>
+                <exclude>org.apache.ignite:ignite-benchmarks</exclude>
+                <exclude>org.apache.ignite:ignite-web-agent</exclude>
+                <exclude>org.apache.ignite:ignite-dev-utils</exclude>
+                <exclude>org.apache.ignite:ignite-extdata-platform</exclude>
+                <exclude>org.apache.ignite:ignite-compatibility</exclude>
+                <exclude>org.apache.ignite:ignite-sqlline</exclude>
+            </excludes>
+            <sources>
+                <includeModuleDirectory>true</includeModuleDirectory>
+                <outputDirectoryMapping>optional/${module.artifactId}</outputDirectoryMapping>
+                <fileSets>
+                    <fileSet>
+                        <directory>${basedir}</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>README.txt</include>
+                            <include>licenses/**</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>${basedir}/target/licenses</directory>
+                        <outputDirectory>/licenses</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/libs</directory>
+                        <outputDirectory>/</outputDirectory>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target/classes</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>features.xml</include>
+                        </includes>
+                    </fileSet>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+    </moduleSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/dependencies-fabric-lgpl.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric-lgpl.xml b/assembly/dependencies-fabric-lgpl.xml
deleted file mode 100644
index fe2932e..0000000
--- a/assembly/dependencies-fabric-lgpl.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>dependencies</id>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <moduleSets>
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-spring</include>
-                <include>org.apache.ignite:ignite-indexing</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>true</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-core</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>false</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-
-        <moduleSet>
-            <includeSubModules>true</includeSubModules>
-            <excludes>
-                <exclude>org.apache.ignite:ignite-core</exclude>
-                <exclude>org.apache.ignite:ignite-clients</exclude>
-                <exclude>org.apache.ignite:ignite-spring</exclude>
-                <exclude>org.apache.ignite:ignite-tools</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-p2p</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
-                <exclude>org.apache.ignite:ignite-examples</exclude>
-                <exclude>org.apache.ignite:ignite-indexing</exclude>
-                <exclude>org.apache.ignite:ignite-visor-console</exclude>
-                <exclude>org.apache.ignite:ignite-visor-console_2.10</exclude>
-                <exclude>org.apache.ignite:ignite-visor-plugins</exclude>
-                <exclude>org.apache.ignite:ignite-hadoop</exclude>
-                <exclude>org.apache.ignite:ignite-codegen</exclude>
-                <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
-                <exclude>org.apache.ignite:ignite-appserver-test</exclude>
-                <exclude>org.apache.ignite:ignite-websphere-test</exclude>
-                <exclude>org.apache.ignite:ignite-cassandra</exclude>
-                <exclude>org.apache.ignite:ignite-yardstick</exclude>
-                <exclude>org.apache.ignite:ignite-benchmarks</exclude>
-                <exclude>org.apache.ignite:ignite-web-agent</exclude>
-                <exclude>org.apache.ignite:ignite-dev-utils</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-platform</exclude>
-                <exclude>org.apache.ignite:ignite-compatibility</exclude>
-                <exclude>org.apache.ignite:ignite-sqlline</exclude>
-            </excludes>
-            <sources>
-                <includeModuleDirectory>true</includeModuleDirectory>
-                <outputDirectoryMapping>optional/${module.artifactId}</outputDirectoryMapping>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/classes</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>features.xml</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-    </moduleSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/dependencies-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric.xml b/assembly/dependencies-fabric.xml
deleted file mode 100644
index 3bcae04..0000000
--- a/assembly/dependencies-fabric.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>dependencies</id>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <moduleSets>
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-spring</include>
-                <include>org.apache.ignite:ignite-indexing</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>true</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-core</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>false</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-
-        <moduleSet>
-            <includeSubModules>true</includeSubModules>
-            <excludes>
-                <exclude>org.apache.ignite:ignite-core</exclude>
-                <exclude>org.apache.ignite:ignite-clients</exclude>
-                <exclude>org.apache.ignite:ignite-spring</exclude>
-                <exclude>org.apache.ignite:ignite-tools</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-p2p</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
-                <exclude>org.apache.ignite:ignite-examples</exclude>
-                <exclude>org.apache.ignite:ignite-indexing</exclude>
-                <exclude>org.apache.ignite:ignite-visor-console</exclude>
-                <exclude>org.apache.ignite:ignite-visor-console_2.10</exclude>
-                <exclude>org.apache.ignite:ignite-visor-plugins</exclude>
-                <exclude>org.apache.ignite:ignite-hadoop</exclude>
-                <exclude>org.apache.ignite:ignite-codegen</exclude>
-                <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
-                <exclude>org.apache.ignite:ignite-hibernate-core</exclude>
-                <exclude>org.apache.ignite:ignite-hibernate_4.2</exclude>
-                <exclude>org.apache.ignite:ignite-hibernate_5.1</exclude>
-                <exclude>org.apache.ignite:ignite-schedule</exclude>
-                <exclude>org.apache.ignite:ignite-geospatial</exclude>
-                <exclude>org.apache.ignite:ignite-appserver-test</exclude>
-                <exclude>org.apache.ignite:ignite-websphere-test</exclude>
-                <exclude>org.apache.ignite:ignite-cassandra</exclude>
-                <exclude>org.apache.ignite:ignite-yardstick</exclude>
-                <exclude>org.apache.ignite:ignite-benchmarks</exclude>
-                <exclude>org.apache.ignite:ignite-web-agent</exclude>
-                <exclude>org.apache.ignite:ignite-dev-utils</exclude>
-                <exclude>org.apache.ignite:ignite-extdata-platform</exclude>
-                <exclude>org.apache.ignite:ignite-compatibility</exclude>
-                <exclude>org.apache.ignite:ignite-sqlline</exclude>
-            </excludes>
-            <sources>
-                <includeModuleDirectory>true</includeModuleDirectory>
-                <outputDirectoryMapping>optional/${module.artifactId}</outputDirectoryMapping>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/classes</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>features.xml</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-    </moduleSets>
-</assembly>


[34/50] [abbrv] ignite git commit: IGNITE-9772: Removed word "fabric" from various places. This closes #4889.

Posted by ag...@apache.org.
IGNITE-9772: Removed word "fabric" from various places. This closes #4889.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b44c1d20
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b44c1d20
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b44c1d20

Branch: refs/heads/ignite-5797
Commit: b44c1d208d4ac124c718ec635890fc862740289c
Parents: a03c6e9
Author: Peter Ivanov <mr...@gmail.com>
Authored: Wed Oct 3 10:44:59 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Oct 3 10:44:59 2018 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    | 14 ++--
 README.txt                                      |  4 +-
 RELEASE_NOTES.txt                               | 76 ++++++++++----------
 doap_Ignite.rdf                                 |  4 +-
 .../ignite/mesos/resource/IgniteProvider.java   |  4 +-
 modules/platforms/cpp/core/namespaces.dox       |  2 +-
 .../rest/protocols/http/jetty/rest.html         |  4 +-
 .../org/apache/ignite/yarn/IgniteProvider.java  |  6 +-
 parent/pom.xml                                  |  4 +-
 9 files changed, 59 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 3df0496..3071890 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -1,4 +1,4 @@
-Ignite Fabric Maven Build Instructions
+Apache Ignite Maven Build Instructions
 ======================================
 1) Optional: build Apache Ignite.NET as described at modules/platforms/dotnet/DEVNOTES.txt.
 
@@ -15,14 +15,14 @@ Ignite Fabric Maven Build Instructions
 
         mvn initialize -Pjavadoc
 
-4) Assembly Apache Ignite fabric:
+4) Assembly Apache Ignite:
 
         mvn initialize -Prelease
 
 Look for apache-ignite-<version>-bin.zip in ./target/bin directory.
 
 
-Ignite Fabric with LGPL Maven Build Instructions
+Apache Ignite with LGPL Maven Build Instructions
 ================================================
 1) Optional: build Apache Ignite.NET as described at modules/platforms/dotnet/DEVNOTES.txt.
 
@@ -39,7 +39,7 @@ Ignite Fabric with LGPL Maven Build Instructions
 
         mvn initialize -Pjavadoc,lgpl
 
-4) Assembly Apache Ignite fabric with LGPL dependencies:
+4) Assembly Apache Ignite  with LGPL dependencies:
 
         mvn initialize -Prelease,lgpl -Dignite.edition=apache-ignite-lgpl
 
@@ -147,15 +147,15 @@ Ignite Release Instructions
 
 3) Deploy Ignite release candidate to maven repository and dev-svn, make tag:
 
-   3.1) Deploy Ignite to maven repository, prepares sources and fabric edition binaries.
+   3.1) Deploy Ignite to maven repository, prepares sources and binaries.
 
-                mvn deploy -Papache-release,gpg,all-java,all-scala,licenses,deploy-ignite-site -Dignite.edition=fabric -DskipTests
+                mvn deploy -Papache-release,gpg,all-java,all-scala,licenses,deploy-ignite-site -Dignite.edition=apache-ignite -DskipTests
 
    3.2) Javadoc generation:
 
                 mvn initialize -Pjavadoc
 
-   3.3) Assembly Apache Ignite Fabric:
+   3.3) Assembly Apache Ignite:
 
                 mvn initialize -Prelease
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
index 7cfdaad..2e6add5 100644
--- a/README.txt
+++ b/README.txt
@@ -1,5 +1,5 @@
-Apache Ignite In-Memory Data Fabric
-===================================
+Apache Ignite In-Memory Database and Caching Platform
+=====================================================
 
 Ignite is a memory-centric distributed database, caching, and processing platform for transactional, analytical,
 and streaming workloads delivering in-memory speeds at petabyte scale.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index d4d3bf0..42b9320 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,8 +1,8 @@
 Apache Ignite Release Notes
 ===========================
 
-Apache Ignite In-Memory Data Fabric 2.6
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.6
+---------------------------------------------------------
 Ignite:
 * Fixed incorrect calculation of client affinity assignment with baseline.
 * Fixed incorrect calculation of switch segment record in WAL.
@@ -11,8 +11,8 @@ Ignite:
 REST:
 * Fixed serialization of BinaryObjects to JSON.
 
-Apache Ignite In-Memory Data Fabric 2.5
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.5
+---------------------------------------------------------
 Ignite:
 * Implemented Zookeeper discovery SPI.
 * Added Java thin client.
@@ -127,8 +127,8 @@ ML:
 * Implemented Linear SVM for binary classification.
 * Implemented distributed version of SVM (support vector machine) algoritm.
 
-Apache Ignite In-Memory Data Fabric 2.4
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.4
+---------------------------------------------------------
 Ignite:
 * Introduced Baseline Affinity Topology
 * Ability to disable WAL for cache in runtime through IgniteCluster API or ALTER TABLE command
@@ -221,8 +221,8 @@ Visor:
 * Fixed reading last command line in batch mode
 * Updated eviction policy factory in configs
 
-Apache Ignite In-Memory Data Fabric 2.3
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.3
+---------------------------------------------------------
 Ignite:
 * Ability to enable persistence per data region.
 * Default page size is changed to 4KB.
@@ -319,8 +319,8 @@ Visor:
 * Added missing configuration properties to "config" command.
 * Fixed script execution after alert throttling interval.
 
-Apache Ignite In-Memory Data Fabric 2.2
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.2
+---------------------------------------------------------
 Ignite:
 * Checkpointing algorithm optimized
 * Default max memory size changed from 80% to 20%
@@ -329,8 +329,8 @@ Ignite CPP:
 * Now possible to start node with persistent store
 * Ignite.setActive method added to C++ API
 
-Apache Ignite In-Memory Data Fabric 2.1
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.1
+---------------------------------------------------------
 Ignite:
 * Persistent cache store
 * Added IgniteFuture.listenAsync() and IgniteFuture.chainAsync() mehtods
@@ -362,8 +362,8 @@ Web Console:
 * Added option to show full stack trace on Queries screen
 * Added PK alias generation on Models screen.
 
-Apache Ignite In-Memory Data Fabric 2.0
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 2.0
+---------------------------------------------------------
 Ignite:
 * Introduced new page memory architecture
 * Machine Learning beta: distributed algebra support for dense and sparse data sets
@@ -398,8 +398,8 @@ Web Console:
 * Possibility to configure Kubernetes IP finder
 * EnforceJoinOrder option on Queries screen
 
-Apache Ignite In-Memory Data Fabric 1.9
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.9
+---------------------------------------------------------
 Ignite:
 * Added Data streamer mode for DML
 * Added Discovery SPI Implementation for Ignite Kubernetes Pods
@@ -418,8 +418,8 @@ Ignite CPP:
 * Implemented LoadCache
 * ContinuousQuery support
 
-Apache Ignite In-Memory Data Fabric 1.8
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.8
+---------------------------------------------------------
 Ignite:
 * SQL: Added DML operations support (INSERT, UPDATE, DELETE, MERGE)
 * SQL: Improved DISTINCT keyword handling in aggregates
@@ -440,8 +440,8 @@ ODBC driver:
 * Added DSN support
 * Performance improvements
 
-Apache Ignite In-Memory Data Fabric 1.7
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.7
+---------------------------------------------------------
 Ignite:
 * Added distributed SQL JOIN.
 * Node can be assigned as primary only after preloading is finished.
@@ -459,8 +459,8 @@ Ignite.NET:
 Ignite CPP:
 * Marshalling performance improvements.
 
-Apache Ignite In-Memory Data Fabric 1.6
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.6
+---------------------------------------------------------
 Ignite .NET:
 * Added LINQ Provider for cache SQL queries
 * Added native configuration mechanism (C#, app.config, web.config - instead of Spring XML)
@@ -548,8 +548,8 @@ Ignite:
 * Web sessions: user session classes are no longer needed on server nodes.
 * A lot of stability and fault-tolerance fixes.
 
-Apache Ignite In-Memory Data Fabric 1.5
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.5
+---------------------------------------------------------
 * Ignite.NET: Initial Release.
 * Ignite C++: Initial Release.
 * Massive performance improvements for cache operations and SQL.
@@ -571,8 +571,8 @@ Apache Ignite In-Memory Data Fabric 1.5
 
 Complete list of closed issues: https://issues.apache.org/jira/issues/?jql=project%20%3D%20IGNITE%20AND%20fixVersion%20%3D%201.5%20AND%20status%20%3D%20closed
 
-Apache Ignite In-Memory Data Fabric 1.4
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.4
+---------------------------------------------------------
 * Added SSL support to communication and discovery.
 * Added support for log4j2.
 * Added versioned entry to cache API.
@@ -589,8 +589,8 @@ Apache Ignite In-Memory Data Fabric 1.4
 * Fixed affinity routing in compute grid.
 * Many stability and fault-tolerance fixes.
 
-Apache Ignite In-Memory Data Fabric 1.3
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.3
+---------------------------------------------------------
 
 * Added auto-retries for cache operations in recoverable cases.
 * Added integration with Apache YARN.
@@ -603,8 +603,8 @@ Apache Ignite In-Memory Data Fabric 1.3
 * Bug fixes in In-Memory Accelerator For Apache Hadoop.
 * Many stability and fault-tolerance fixes.
 
-Apache Ignite In-Memory Data Fabric 1.2
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.2
+---------------------------------------------------------
 
 * Added client mode to TCP discovery SPI.
 * Added memory based evictions.
@@ -615,8 +615,8 @@ Apache Ignite In-Memory Data Fabric 1.2
 * Bug fixes in In-Memory Accelerator For Apache Hadoop.
 * Many stability and fault-tolerance fixes.
 
-Apache Ignite In-Memory Data Fabric 1.1
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.1
+---------------------------------------------------------
 
 * Added Google Compute Engine TCP discovery IP finder.
 * Added generic cloud TCP discovery IP finder (based on jclouds).
@@ -635,8 +635,8 @@ Apache Ignite In-Memory Data Fabric 1.1
 * Made deployment scanners for URI-based deployment pluggable.
 * Many stability and fault-tolerance fixes.
 
-Apache Ignite In-Memory Data Fabric 1.0
----------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.0
+---------------------------------------------------------
 
 * Simplified query API.
 * Added automatic aggregation, grouping, and sorting support to SQL queries.
@@ -651,14 +651,14 @@ Apache Ignite In-Memory Data Fabric 1.0
 * Added ability to automatically exclude LGPL optional dependencies during build.
 
 
-Apache Ignite In-Memory Data Fabric 1.0 RC3
--------------------------------------------
+Apache Ignite In-Memory Database and Caching Platform 1.0 RC3
+-------------------------------------------------------------
 
 This is the first release of Apache Ignite project. The source code in large part is based
-on the 7 year old GridGain In-Memory Data Fabric, open source edition, v. 6.6.2, which was
+on the 7 year old GridGain In-Memory Database and Caching Platform, open source edition, v. 6.6.2, which was
 donated to Apache Software Foundation in September 2014.
 
-The main feature set of Ignite In-Memory Data Fabric includes:
+The main feature set of Ignite In-Memory Database and Caching Platform includes:
 * Advanced Clustering
 * Compute Grid
 * Data Grid

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/doap_Ignite.rdf
----------------------------------------------------------------------
diff --git a/doap_Ignite.rdf b/doap_Ignite.rdf
index 16649c4..4d5daa4 100644
--- a/doap_Ignite.rdf
+++ b/doap_Ignite.rdf
@@ -27,8 +27,8 @@
     <name>Apache Ignite</name>
     <homepage rdf:resource="http://ignite.apache.org" />
     <asfext:pmc rdf:resource="http://ignite.apache.org" />
-    <shortdesc>Apache Ignite is an In-Memory Data Fabric providing in-memory data caching, partitioning, processing, and querying components.</shortdesc>
-    <description>Apache Ignite In-Memory Data Fabric is designed to deliver uncompromised performance for a wide set of in-memory computing use cases from high performance computing, to the industry most advanced data grid, in-memory SQL, in-memory file system, streaming, and more.</description>
+    <shortdesc>Apache Ignite is an In-Memory Database and Caching Platform providing in-memory data caching, partitioning, processing, and querying components.</shortdesc>
+    <description>Apache Ignite In-Memory Database and Caching Platform is designed to deliver uncompromised performance for a wide set of in-memory computing use cases from high performance computing, to the industry most advanced data grid, in-memory SQL, in-memory file system, streaming, and more.</description>
     <bug-database rdf:resource="https://issues.apache.org/jira/browse/IGNITE" />
     <mailing-list rdf:resource="https://ignite.apache.org/community/resources.html#mail-lists" />
     <download-page rdf:resource="https://ignite.apache.org/download" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
index 652879e..5bd2010 100644
--- a/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
+++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
@@ -58,7 +58,7 @@ public class IgniteProvider {
     private static final String APACHE_MIRROR_URL = "https://www.apache.org/dyn/closer.cgi?as_json=1";
 
     /** Ignite on Apache URL path. */
-    private static final String IGNITE_PATH = "/ignite/%s/apache-ignite-fabric-%s-bin.zip";
+    private static final String IGNITE_PATH = "/ignite/%s/apache-ignite-%s-bin.zip";
 
     /** Version pattern. */
     private static final Pattern VERSION_PATTERN = Pattern.compile("(?<=version=).*\\S+");
@@ -271,4 +271,4 @@ public class IgniteProvider {
 
         return split[split.length - 1];
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/modules/platforms/cpp/core/namespaces.dox
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/namespaces.dox b/modules/platforms/cpp/core/namespaces.dox
index 60e8cf7..eccfc82 100644
--- a/modules/platforms/cpp/core/namespaces.dox
+++ b/modules/platforms/cpp/core/namespaces.dox
@@ -18,7 +18,7 @@
 /**
  * \mainpage Apache Ignite C++
  *
- * Apache Ignite In-Memory Data Fabric is a high-performance, integrated and distributed in-memory platform for
+ * Apache Ignite In-Memory Database and Caching Platformis a high-performance, integrated and distributed in-memory platform for
  * computing and transacting on large-scale data sets in real-time, orders of magnitude faster than possible with
  * traditional disk-based or flash-based technologies.
  */

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/rest.html
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/rest.html b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/rest.html
index f78d26a..10c5fc1 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/rest.html
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/rest.html
@@ -25,7 +25,7 @@
     <meta http-equiv="Content-language" content="en-US">
     <meta http-equiv="Content-Type" content="text/html; CHARSET=UTF-8">
     <meta http-equiv="Author" content="Apache Software Foundation">
-    <title>Apache Ignite - In-Memory Data Fabric</title>
+    <title>Apache Ignite - In-Memory Database and Caching Platform</title>
     <style type="text/css">
         body {
             font-family: helvetica, verdana, arial, sans-serif;
@@ -56,7 +56,7 @@
     <br>
     <center>
         <a class="img_link" href="https://ignite.apache.org" title="Apache Software Foundation">
-            <img src="http://ignite.apache.org/images/logo3.png" alt="Ignite - In-Memory Data Fabric">
+            <img src="http://ignite.apache.org/images/logo3.png" alt="Ignite - In-Memory Database and Caching Platform">
         </a>
         <p>
         <div style="width: 650px; text-align: justify; padding-top: 20px">

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
index 08913c2..d4faa38 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -118,7 +118,7 @@ public class IgniteProvider {
 
         if (files != null) {
             for (String fileName : files) {
-                if (fileName.contains("gridgain-community-fabric-") && fileName.endsWith(".zip"))
+                if (fileName.contains("gridgain-professional-") && fileName.endsWith(".zip"))
                     ignites.add(fileName);
             }
         }
@@ -167,7 +167,7 @@ public class IgniteProvider {
             for (FileStatus file : fileStatuses) {
                 String fileName = file.getPath().getName();
 
-                if (fileName.contains("gridgain-community-fabric-") && fileName.endsWith(".zip"))
+                if (fileName.contains("gridgain-professional-") && fileName.endsWith(".zip"))
                     ignites.add(fileName);
             }
         }
@@ -199,7 +199,7 @@ public class IgniteProvider {
      * @return Path
      */
     private static String formatPath(String folder, String version) {
-        return folder + File.separator + "gridgain-community-fabric-" + version + ".zip";
+        return folder + File.separator + "gridgain-professional-" + version + ".zip";
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/b44c1d20/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 412e81e..cfc3483 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -491,7 +491,7 @@
                         </groups>
                         <header>
                             <![CDATA[
-                                    Ignite - In-Memory Data Fabric
+                                    Ignite - In-Memory Database and Caching Platform
                                 ]]>
                         </header>
                         <bottom>
@@ -519,7 +519,7 @@
                                                 <tbody style="padding: 0; margin: 0">
                                                     <tr style="padding: 0; margin: 0">
                                                         <td>
-                                                            <b>Ignite Fabric</b>
+                                                            <b>Ignite Database and Caching Platform</b>
                                                         </td>
                                                         <td>:&nbsp;&nbsp;
                                                             ver. <strong>${project.version}</strong>


[09/50] [abbrv] ignite git commit: IGNITE-7282 Add missing license header

Posted by ag...@apache.org.
IGNITE-7282 Add missing license header


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1ad9b9c4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1ad9b9c4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1ad9b9c4

Branch: refs/heads/ignite-5797
Commit: 1ad9b9c4a42c04f233744094d500782915d1cba9
Parents: d5f6e50
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Fri Sep 28 13:47:35 2018 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Fri Sep 28 13:47:35 2018 +0300

----------------------------------------------------------------------
 .../Client/EndpointTest.cs                         | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1ad9b9c4/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/EndpointTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/EndpointTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/EndpointTest.cs
index 05366ed..7b2e755 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/EndpointTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/EndpointTest.cs
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 namespace Apache.Ignite.Core.Tests.Client
 {
     using System.Linq;


[02/50] [abbrv] ignite git commit: IGNITE-8950 More informative file validation check message - Fixes #4322.

Posted by ag...@apache.org.
IGNITE-8950 More informative file validation check message - Fixes #4322.

Signed-off-by: Dmitriy Pavlov <dp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/66acc566
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/66acc566
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/66acc566

Branch: refs/heads/ignite-5797
Commit: 66acc566a939e1e7c051b73f1525c7f23dd7ea1d
Parents: b12d738
Author: Evgeny Stanilovskiy <es...@gridgain.com>
Authored: Fri Sep 28 10:04:45 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Fri Sep 28 10:04:45 2018 +0300

----------------------------------------------------------------------
 .../cache/persistence/file/FilePageStore.java           | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/66acc566/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
index 4bb7513..110807c 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
@@ -194,29 +194,31 @@ public class FilePageStore implements PageStore {
 
         long signature = hdr.getLong();
 
+        String prefix = "Failed to verify, file=" + cfgFile.getAbsolutePath() + "\" ";
+
         if (SIGNATURE != signature)
-            throw new IOException("Failed to verify store file (invalid file signature)" +
+            throw new IOException(prefix + "(invalid file signature)" +
                 " [expectedSignature=" + U.hexLong(SIGNATURE) +
                 ", actualSignature=" + U.hexLong(signature) + ']');
 
         int ver = hdr.getInt();
 
         if (version() != ver)
-            throw new IOException("Failed to verify store file (invalid file version)" +
+            throw new IOException(prefix + "(invalid file version)" +
                 " [expectedVersion=" + version() +
                 ", fileVersion=" + ver + "]");
 
         byte type = hdr.get();
 
         if (this.type != type)
-            throw new IOException("Failed to verify store file (invalid file type)" +
+            throw new IOException(prefix + "(invalid file type)" +
                 " [expectedFileType=" + this.type +
                 ", actualFileType=" + type + "]");
 
         int pageSize = hdr.getInt();
 
         if (dbCfg.getPageSize() != pageSize)
-            throw new IOException("Failed to verify store file (invalid page size)" +
+            throw new IOException(prefix + "(invalid page size)" +
                 " [expectedPageSize=" + dbCfg.getPageSize() +
                 ", filePageSize=" + pageSize + "]");
 
@@ -226,7 +228,7 @@ public class FilePageStore implements PageStore {
             fileSize = pageSize + headerSize();
 
         if ((fileSize - headerSize()) % pageSize != 0)
-            throw new IOException("Failed to verify store file (invalid file size)" +
+            throw new IOException(prefix + "(invalid file size)" +
                 " [fileSize=" + U.hexLong(fileSize) +
                 ", pageSize=" + U.hexLong(pageSize) + ']');
 


[39/50] [abbrv] ignite git commit: IGNITE-9750: MVCC: do not allow near cache for TRANSACTIONAL_SNAPSHOT atomicity mode. This closes #4891.

Posted by ag...@apache.org.
IGNITE-9750: MVCC: do not allow near cache for TRANSACTIONAL_SNAPSHOT atomicity mode. This closes #4891.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/72b5c05a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/72b5c05a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/72b5c05a

Branch: refs/heads/ignite-5797
Commit: 72b5c05ae94b068cfbefaa47901bce95ad8020d9
Parents: dab050a
Author: devozerov <vo...@gridgain.com>
Authored: Wed Oct 3 16:09:52 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Oct 3 16:09:52 2018 +0300

----------------------------------------------------------------------
 .../JdbcThinConnectionMvccEnabledSelfTest.java  |   8 +-
 .../jdbc/thin/JdbcThinTransactionsSelfTest.java |   4 +-
 ...ThinTransactionsWithMvccEnabledSelfTest.java |  15 +-
 .../processors/cache/GridCacheProcessor.java    |  33 +++
 .../cache/mvcc/MvccProcessorImpl.java           |  31 +-
 .../IgniteCacheTxIteratorSelfTest.java          |   2 +-
 .../CacheMvccConfigurationValidationTest.java   | 287 ++++++++-----------
 .../cache/mvcc/CacheMvccTransactionsTest.java   |   4 -
 .../DataStreamProcessorMvccSelfTest.java        |  40 +--
 9 files changed, 174 insertions(+), 250 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java
index 0196cb2..a26f547 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMvccEnabledSelfTest.java
@@ -52,11 +52,11 @@ public class JdbcThinConnectionMvccEnabledSelfTest extends JdbcThinAbstractSelfT
     private static final String URL = "jdbc:ignite:thin://127.0.0.1";
 
     /** {@inheritDoc} */
-    @SuppressWarnings("deprecation")
+    @SuppressWarnings({"deprecation", "unchecked"})
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME));
+        cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME).setNearConfiguration(null));
 
         TcpDiscoverySpi disco = new TcpDiscoverySpi();
 
@@ -65,7 +65,6 @@ public class JdbcThinConnectionMvccEnabledSelfTest extends JdbcThinAbstractSelfT
         cfg.setDiscoverySpi(disco);
 
         cfg.setMarshaller(new BinaryMarshaller());
-
         cfg.setGridLogger(new GridStringLogger());
 
         return cfg;
@@ -74,9 +73,8 @@ public class JdbcThinConnectionMvccEnabledSelfTest extends JdbcThinAbstractSelfT
     /**
      * @param name Cache name.
      * @return Cache configuration.
-     * @throws Exception In case of error.
      */
-    private CacheConfiguration cacheConfiguration(@NotNull String name) throws Exception {
+    private CacheConfiguration cacheConfiguration(@NotNull String name) {
         CacheConfiguration cfg = defaultCacheConfiguration();
 
         cfg.setName(name);

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java
index a8fa47b..1d68712 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsSelfTest.java
@@ -55,11 +55,11 @@ public class JdbcThinTransactionsSelfTest extends JdbcThinAbstractSelfTest {
     private GridStringLogger log;
 
     /** {@inheritDoc} */
-    @SuppressWarnings("deprecation")
+    @SuppressWarnings({"deprecation", "unchecked"})
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME));
+        cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME).setNearConfiguration(null));
 
         TcpDiscoverySpi disco = new TcpDiscoverySpi();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java
index e01a53d..3ee003a 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinTransactionsWithMvccEnabledSelfTest.java
@@ -55,11 +55,11 @@ public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstrac
     private GridStringLogger log;
 
     /** {@inheritDoc} */
-    @SuppressWarnings("deprecation")
+    @SuppressWarnings({"deprecation", "unchecked"})
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME));
+        cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME).setNearConfiguration(null));
 
         TcpDiscoverySpi disco = new TcpDiscoverySpi();
 
@@ -77,9 +77,8 @@ public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstrac
     /**
      * @param name Cache name.
      * @return Cache configuration.
-     * @throws Exception In case of error.
      */
-    private CacheConfiguration cacheConfiguration(@NotNull String name) throws Exception {
+    private CacheConfiguration cacheConfiguration(@NotNull String name) {
         CacheConfiguration cfg = defaultCacheConfiguration();
 
         cfg.setName(name);
@@ -211,7 +210,7 @@ public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstrac
      *
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
-    public void testErrorNestedTxAutocommitOff() throws SQLException {
+    public void testErrorNestedTxAutocommitOff() {
         GridTestUtils.assertThrows(null, new Callable<Void>() {
             @Override public Void call() throws Exception {
                 try (Connection c = c(false, NestedTxMode.ERROR)) {
@@ -251,7 +250,7 @@ public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstrac
      *
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
-    public void testErrorNestedTxAutocommitOn() throws SQLException {
+    public void testErrorNestedTxAutocommitOn() {
         GridTestUtils.assertThrows(null, new Callable<Void>() {
             @Override public Void call() throws Exception {
                 try (Connection c = c(true, NestedTxMode.ERROR)) {
@@ -291,7 +290,7 @@ public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstrac
      *
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
-    public void testErrorNestedTxAutocommitOffBatched() throws SQLException {
+    public void testErrorNestedTxAutocommitOffBatched() {
         GridTestUtils.assertThrows(null, new Callable<Void>() {
             @Override public Void call() throws Exception {
                 try (Connection c = c(false, NestedTxMode.ERROR)) {
@@ -331,7 +330,7 @@ public class JdbcThinTransactionsWithMvccEnabledSelfTest extends JdbcThinAbstrac
      *
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
-    public void testErrorNestedTxAutocommitOnBatched() throws SQLException {
+    public void testErrorNestedTxAutocommitOnBatched() {
         GridTestUtils.assertThrows(null, new Callable<Void>() {
             @Override public Void call() throws Exception {
                 try (Connection c = c(true, NestedTxMode.ERROR)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 2b05d96..16e1799 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -35,6 +35,9 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.stream.Collectors;
+import javax.cache.configuration.FactoryBuilder;
+import javax.cache.expiry.EternalExpiryPolicy;
+import javax.cache.expiry.ExpiryPolicy;
 import javax.management.MBeanServer;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
@@ -487,6 +490,36 @@ public class GridCacheProcessor extends GridProcessorAdapter implements Metastor
                 CacheConfiguration.MAX_PARTITIONS_COUNT + " partitions [actual=" + cc.getAffinity().partitions() +
                 ", affFunction=" + cc.getAffinity() + ", cacheName=" + cc.getName() + ']');
 
+        if (cc.getAtomicityMode() == TRANSACTIONAL_SNAPSHOT) {
+            assertParameter(cc.getCacheMode() != LOCAL,
+                "LOCAL cache mode cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+
+            assertParameter(cc.getNearConfiguration() == null,
+                "near cache cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+
+            assertParameter(!cc.isReadThrough(),
+                "readThrough cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+
+            assertParameter(!cc.isWriteThrough(),
+                "writeThrough cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+
+            assertParameter(!cc.isWriteBehindEnabled(),
+                "writeBehindEnabled cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+
+            ExpiryPolicy expPlc = null;
+
+            if (cc.getExpiryPolicyFactory() instanceof FactoryBuilder.SingletonFactory)
+                expPlc = (ExpiryPolicy)cc.getExpiryPolicyFactory().create();
+
+            if (!(expPlc instanceof EternalExpiryPolicy)) {
+                assertParameter(cc.getExpiryPolicyFactory() == null,
+                    "expiry policy cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+            }
+
+            assertParameter(cc.getInterceptor() == null,
+                "interceptor cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode");
+        }
+
         if (cc.isWriteBehindEnabled()) {
             if (cfgStore == null)
                 throw new IgniteCheckedException("Cannot enable write-behind (writer or store is not provided) " +

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
index ca77bf9..3c45963 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
@@ -28,11 +28,9 @@ import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.atomic.AtomicInteger;
-import javax.cache.expiry.EternalExpiryPolicy;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -79,7 +77,6 @@ import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
 import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.persistence.DatabaseLifecycleListener;
 import org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
-import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.tree.mvcc.data.MvccDataRow;
 import org.apache.ignite.internal.processors.cache.tree.mvcc.search.MvccLinkAwareSearchRow;
@@ -259,32 +256,12 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
     }
 
     /** {@inheritDoc} */
-    @Override public void validateCacheConfiguration(CacheConfiguration ccfg) throws IgniteCheckedException {
+    @Override public void validateCacheConfiguration(CacheConfiguration ccfg) {
         if (ccfg.getAtomicityMode() == TRANSACTIONAL_SNAPSHOT) {
             if (!mvccSupported)
                 throw new IgniteException("Cannot start MVCC transactional cache. " +
                     "MVCC is unsupported by the cluster.");
 
-            if (ccfg.getCacheStoreFactory() != null) {
-                throw new IgniteCheckedException("Transactional cache may not have a third party cache store when " +
-                    "MVCC is enabled.");
-            }
-
-            if (ccfg.getExpiryPolicyFactory() != null && !(ccfg.getExpiryPolicyFactory().create() instanceof
-                EternalExpiryPolicy)) {
-                throw new IgniteCheckedException("Transactional cache may not have expiry policy when " +
-                    "MVCC is enabled.");
-            }
-
-            if (ccfg.getInterceptor() != null) {
-                throw new IgniteCheckedException("Transactional cache may not have an interceptor when " +
-                    "MVCC is enabled.");
-            }
-
-            if (ccfg.getCacheMode() == CacheMode.LOCAL)
-                throw new IgniteCheckedException("Local caches are not supported by MVCC engine. Use " +
-                    "CacheAtomicityMode.TRANSACTIONAL for local caches.");
-
             mvccEnabled = true;
         }
     }
@@ -333,7 +310,7 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
     }
 
     /** {@inheritDoc} */
-    @Override public void afterInitialise(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException {
+    @Override public void afterInitialise(IgniteCacheDatabaseSharedManager mgr) {
         // No-op.
     }
 
@@ -348,7 +325,7 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
     }
 
     /** {@inheritDoc} */
-    @Override public void afterMemoryRestore(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException {
+    @Override public void afterMemoryRestore(IgniteCacheDatabaseSharedManager mgr) {
         // No-op.
     }
 
@@ -2134,8 +2111,6 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
                         prevKey = row.key();
 
                     if (cctx == null) {
-                        assert shared;
-
                         cctx = part.group().shared().cacheContext(curCacheId = row.cacheId());
 
                         if (cctx == null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
index 6a00ea4..d5212e5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
@@ -107,7 +107,7 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
         try {
             for (CacheMode mode : CacheMode.values()) {
                 for (CacheAtomicityMode atomMode : CacheAtomicityMode.values()) {
-                    if (mode == CacheMode.PARTITIONED) {
+                    if (mode == CacheMode.PARTITIONED && atomMode != CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT) {
                         // Near cache makes sense only for partitioned cache.
                         checkTxCache(CacheMode.PARTITIONED, atomMode, true, false);
                     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java
index 8b70468..c677656 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java
@@ -17,36 +17,37 @@
 
 package org.apache.ignite.internal.processors.cache.mvcc;
 
+import java.io.Serializable;
+import java.util.UUID;
 import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
+import javax.cache.Cache;
 import javax.cache.CacheException;
 import javax.cache.configuration.Factory;
-import javax.cache.configuration.FactoryBuilder;
-import javax.cache.expiry.CreatedExpiryPolicy;
-import javax.cache.expiry.Duration;
 import javax.cache.expiry.ExpiryPolicy;
+
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheInterceptorAdapter;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheInterceptor;
 import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.store.CacheStore;
-import org.apache.ignite.cache.store.CacheStoreReadFromBackupTest;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.configvariations.ConfigVariations;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
+import static org.apache.ignite.cache.CacheMode.LOCAL;
 
 /**
  *
@@ -75,14 +76,16 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest
     /**
      * @throws Exception If failed.
      */
+    @SuppressWarnings("ThrowableNotThrown")
     public void testMvccModeMismatchForGroup1() throws Exception {
         final Ignite node = startGrid(0);
 
         node.createCache(new CacheConfiguration("cache1").setGroupName("grp1").setAtomicityMode(ATOMIC));
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                node.createCache(new CacheConfiguration("cache2").setGroupName("grp1").setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
+            @Override public Void call() {
+                node.createCache(
+                    new CacheConfiguration("cache2").setGroupName("grp1").setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
 
                 return null;
             }
@@ -94,25 +97,29 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest
     /**
      * @throws Exception If failed.
      */
+    @SuppressWarnings("ThrowableNotThrown")
     public void testMvccModeMismatchForGroup2() throws Exception {
         final Ignite node = startGrid(0);
 
-        node.createCache(new CacheConfiguration("cache1").setGroupName("grp1").setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
+        node.createCache(
+            new CacheConfiguration("cache1").setGroupName("grp1").setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
+            @Override public Void call() {
                 node.createCache(new CacheConfiguration("cache2").setGroupName("grp1").setAtomicityMode(ATOMIC));
 
                 return null;
             }
         }, CacheException.class, null);
 
-        node.createCache(new CacheConfiguration("cache2").setGroupName("grp1").setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
+        node.createCache(
+            new CacheConfiguration("cache2").setGroupName("grp1").setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
     }
 
     /**
      * @throws Exception If failed.
      */
+    @SuppressWarnings("ThrowableNotThrown")
     public void testMvccLocalCacheDisabled() throws Exception {
         final Ignite node1 = startGrid(1);
         final Ignite node2 = startGrid(2);
@@ -125,7 +132,7 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest
         cache1.put(2,2);
 
         GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
+            @Override public Void call() {
                 node1.createCache(new CacheConfiguration("cache2").setCacheMode(CacheMode.LOCAL)
                     .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
 
@@ -144,108 +151,7 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest
     /**
      * @throws Exception If failed.
      */
-    public void testMvccExpiredPolicyCacheDisabled() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-8640");
-
-        final Ignite node1 = startGrid(1);
-        final Ignite node2 = startGrid(2);
-
-        IgniteCache cache1 = node1.createCache(new CacheConfiguration("cache1")
-            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-        cache1.put(1,1);
-        cache1.put(2,2);
-        cache1.put(2,2);
-
-        GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                node1.createCache(new CacheConfiguration("cache2")
-                    .setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 1)))
-                    .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-                return null;
-            }
-        }, CacheException.class, null);
-
-        IgniteCache cache3 = node2.createCache(new CacheConfiguration("cache3")
-            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-        cache3.put(1, 1);
-        cache3.put(2, 2);
-        cache3.put(3, 3);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMvccThirdPartyStoreCacheDisabled() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-8640");
-
-        final Ignite node1 = startGrid(1);
-        final Ignite node2 = startGrid(2);
-
-        IgniteCache cache1 = node1.createCache(new CacheConfiguration("cache1")
-            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-        cache1.put(1,1);
-        cache1.put(2,2);
-        cache1.put(2,2);
-
-        GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                node1.createCache(new CacheConfiguration("cache2")
-                    .setCacheStoreFactory(FactoryBuilder.factoryOf(CacheStoreReadFromBackupTest.TestStore.class))
-                    .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-                return null;
-            }
-        }, CacheException.class, null);
-
-        IgniteCache cache3 = node2.createCache(new CacheConfiguration("cache3")
-            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-        cache3.put(1, 1);
-        cache3.put(2, 2);
-        cache3.put(3, 3);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMvccInterceptorCacheDisabled() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-8640");
-
-        final Ignite node1 = startGrid(1);
-        final Ignite node2 = startGrid(2);
-
-        IgniteCache cache1 = node1.createCache(new CacheConfiguration("cache1")
-            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-        cache1.put(1,1);
-        cache1.put(2,2);
-        cache1.put(2,2);
-
-        GridTestUtils.assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                node1.createCache(new CacheConfiguration("cache2")
-                    .setInterceptor(new ConfigVariations.NoopInterceptor())
-                    .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-                return null;
-            }
-        }, CacheException.class, null);
-
-        IgniteCache cache3 = node2.createCache(new CacheConfiguration("cache3")
-            .setAtomicityMode(TRANSACTIONAL_SNAPSHOT));
-
-        cache3.put(1, 1);
-        cache3.put(2, 2);
-        cache3.put(3, 3);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
+    @SuppressWarnings("ThrowableNotThrown")
     public void testNodeRestartWithCacheModeChangedTxToMvcc() throws Exception {
         cleanPersistenceDir();
 
@@ -292,6 +198,7 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest
     /**
      * @throws Exception If failed.
      */
+    @SuppressWarnings("ThrowableNotThrown")
     public void testNodeRestartWithCacheModeChangedMvccToTx() throws Exception {
         cleanPersistenceDir();
 
@@ -336,89 +243,123 @@ public class CacheMvccConfigurationValidationTest extends GridCommonAbstractTest
     }
 
     /**
+     * Test TRANSACTIONAL_SNAPSHOT and near cache.
+     *
      * @throws Exception If failed.
      */
-    public void testTxCacheWithCacheStore() throws Exception {
-        checkTransactionalModeConflict("cacheStoreFactory", new TestFactory(),
-            "Transactional cache may not have a third party cache store when MVCC is enabled.");
+    @SuppressWarnings("unchecked")
+    public void testTransactionalSnapshotLimitations() throws Exception {
+        assertCannotStart(
+            mvccCacheConfig().setCacheMode(LOCAL),
+            "LOCAL cache mode cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
+
+        assertCannotStart(
+            mvccCacheConfig().setNearConfiguration(new NearCacheConfiguration<>()),
+            "near cache cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
+
+        assertCannotStart(
+            mvccCacheConfig().setReadThrough(true),
+            "readThrough cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
+
+        assertCannotStart(
+            mvccCacheConfig().setWriteThrough(true),
+            "writeThrough cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
+
+        assertCannotStart(
+            mvccCacheConfig().setWriteBehindEnabled(true),
+            "writeBehindEnabled cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
+
+        assertCannotStart(
+            mvccCacheConfig().setExpiryPolicyFactory(new TestExpiryPolicyFactory()),
+            "expiry policy cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
+
+        assertCannotStart(
+            mvccCacheConfig().setInterceptor(new TestCacheInterceptor()),
+            "interceptor cannot be used with TRANSACTIONAL_SNAPSHOT atomicity mode"
+        );
     }
 
     /**
+     * Make sure cache cannot be started with the given configuration.
+     *
+     * @param ccfg Cache configuration.
+     * @param msg Message.
      * @throws Exception If failed.
      */
-    public void testTxCacheWithExpiryPolicy() throws Exception {
-        checkTransactionalModeConflict("expiryPolicyFactory0", CreatedExpiryPolicy.factoryOf(Duration.FIVE_MINUTES),
-            "Transactional cache may not have expiry policy when MVCC is enabled.");
+    @SuppressWarnings("unchecked")
+    private void assertCannotStart(CacheConfiguration ccfg, String msg) throws Exception {
+        Ignite node = startGrid(0);
+
+        try {
+            try {
+                node.getOrCreateCache(ccfg);
+
+                fail("Cache should not start.");
+            }
+            catch (Exception e) {
+                if (msg != null) {
+                    assert e.getMessage() != null : "Error message is null";
+                    assert e.getMessage().contains(msg) : "Wrong error message: " + e.getMessage();
+                }
+            }
+        }
+        finally {
+            stopAllGrids();
+        }
     }
 
     /**
-     * @throws Exception If failed.
+     * @return MVCC-enabled cache configuration.
      */
-    public void testTxCacheWithInterceptor() throws Exception {
-        checkTransactionalModeConflict("interceptor", new CacheInterceptorAdapter(),
-            "Transactional cache may not have an interceptor when MVCC is enabled.");
+    private static CacheConfiguration mvccCacheConfig() {
+        return new CacheConfiguration().setName(DEFAULT_CACHE_NAME + UUID.randomUUID())
+            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT);
     }
 
     /**
-     * Check that setting specified property conflicts with transactional cache atomicity mode.
-     * @param propName Property name.
-     * @param obj Property value.
-     * @param errMsg Expected error message.
-     * @throws IgniteCheckedException if failed.
+     * Test expiry policy.
      */
-    @SuppressWarnings("ThrowableNotThrown")
-    private void checkTransactionalModeConflict(String propName, Object obj, String errMsg)
-        throws Exception {
-        final String setterName = "set" + propName.substring(0, 1).toUpperCase() + propName.substring(1);
-
-        try (final Ignite node = startGrid(0)) {
-            final CacheConfiguration cfg = new TestConfiguration("cache");
-
-            cfg.setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
-
-            U.invoke(TestConfiguration.class, cfg, setterName, obj);
-
-            GridTestUtils.assertThrows(log, new Callable<Void>() {
-                @SuppressWarnings("unchecked")
-                @Override public Void call() {
-                    node.getOrCreateCache(cfg);
-
-                    return null;
-                }
-            }, IgniteCheckedException.class, errMsg);
+    private static class TestExpiryPolicyFactory implements Factory<ExpiryPolicy>, Serializable {
+        /** {@inheritDoc} */
+        @Override public ExpiryPolicy create() {
+            return null;
         }
     }
 
     /**
-     * Dummy class to overcome ambiguous method name "setExpiryPolicyFactory".
+     * Test cache interceptor.
      */
-    private final static class TestConfiguration extends CacheConfiguration {
-        /**
-         *
-         */
-        TestConfiguration(String cacheName) {
-            super(cacheName);
+    private static class TestCacheInterceptor implements CacheInterceptor, Serializable {
+        /** {@inheritDoc} */
+        @Nullable
+        @Override public Object onGet(Object key, @Nullable Object val) {
+            return null;
         }
 
-        /**
-         *
-         */
-        @SuppressWarnings("unused")
-        public void setExpiryPolicyFactory0(Factory<ExpiryPolicy> plcFactory) {
-            super.setExpiryPolicyFactory(plcFactory);
+        /** {@inheritDoc} */
+        @Nullable @Override public Object onBeforePut(Cache.Entry entry, Object newVal) {
+            return null;
         }
-    }
 
-    /**
-     *
-     */
-    private static class TestFactory implements Factory<CacheStore> {
-        /** Serial version uid. */
-        private static final long serialVersionUID = 0L;
+        /** {@inheritDoc} */
+        @Override public void onAfterPut(Cache.Entry entry) {
+            // No-op.
+        }
 
         /** {@inheritDoc} */
-        @Override public CacheStore create() {
+        @Nullable @Override public IgniteBiTuple onBeforeRemove(Cache.Entry entry) {
             return null;
         }
+
+        /** {@inheritDoc} */
+        @Override public void onAfterRemove(Cache.Entry entry) {
+            // No-op.
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
index 4d1145c..66555a0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
@@ -2229,8 +2229,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testRebalanceSimple() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-9451");
-
         Ignite srv0 = startGrid(0);
 
         IgniteCache<Integer, Integer> cache = (IgniteCache)srv0.createCache(
@@ -2310,8 +2308,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testRebalanceWithRemovedValuesSimple() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-9451");
-
         Ignite node = startGrid(0);
 
         IgniteTransactions txs = node.transactions();

http://git-wip-us.apache.org/repos/asf/ignite/blob/72b5c05a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
index 381d9a9..ca8be09 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
@@ -28,13 +28,19 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
  */
 public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest {
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration igniteConfiguration = super.getConfiguration(igniteInstanceName);
 
-        CacheConfiguration[] cacheConfigurations = igniteConfiguration.getCacheConfiguration();
+        CacheConfiguration[] ccfgs = igniteConfiguration.getCacheConfiguration();
 
-        assert cacheConfigurations == null || cacheConfigurations.length == 0
-                || (cacheConfigurations.length == 1 && cacheConfigurations[0].getAtomicityMode() == TRANSACTIONAL_SNAPSHOT);
+        if (ccfgs != null) {
+            for (CacheConfiguration ccfg : ccfgs)
+                ccfg.setNearConfiguration(null);
+        }
+
+        assert ccfgs == null || ccfgs.length == 0 ||
+            (ccfgs.length == 1 && ccfgs[0].getAtomicityMode() == TRANSACTIONAL_SNAPSHOT);
 
         return igniteConfiguration;
     }
@@ -45,30 +51,6 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest
     }
 
     /** {@inheritDoc} */
-    @Override public void testPartitioned() throws Exception {
-        // test uses batchedSorted StreamReceiver which depends on Cache.putAll, Cache.removeAll
-        fail("https://issues.apache.org/jira/browse/IGNITE-9451");
-
-        super.testPartitioned();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testColocated() throws Exception {
-        // test uses batchedSorted StreamReceiver which depends on Cache.putAll, Cache.removeAll
-        fail("https://issues.apache.org/jira/browse/IGNITE-9451");
-
-        super.testColocated();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testReplicated() throws Exception {
-        // test uses batchedSorted StreamReceiver which depends on Cache.putAll, Cache.removeAll
-        fail("https://issues.apache.org/jira/browse/IGNITE-9451");
-
-        super.testReplicated();
-    }
-
-    /** {@inheritDoc} */
     @Override public void testUpdateStore() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-8582");
 
@@ -76,12 +58,12 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest
     }
 
     /** {@inheritDoc} */
-    @Override public void testFlushTimeout() throws Exception {
+    @Override public void testFlushTimeout() {
         fail("https://issues.apache.org/jira/browse/IGNITE-9321");
     }
 
     /** {@inheritDoc} */
-    @Override public void testLocal() throws Exception {
+    @Override public void testLocal() {
         // Do not check local caches with MVCC enabled.
     }
 }


[08/50] [abbrv] ignite git commit: IGNITE-9501 Backward compatibility fix - Fixes #4860.

Posted by ag...@apache.org.
IGNITE-9501 Backward compatibility fix - Fixes #4860.

Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d5f6e50e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d5f6e50e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d5f6e50e

Branch: refs/heads/ignite-5797
Commit: d5f6e50edaa1dfd27d9a6f2a3bbcdacaf26057cd
Parents: 609266f
Author: Pavel Kovalenko <jo...@gmail.com>
Authored: Fri Sep 28 12:06:52 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Fri Sep 28 12:06:52 2018 +0300

----------------------------------------------------------------------
 .../dht/preloader/GridDhtPartitionsExchangeFuture.java            | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d5f6e50e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 4e76f99..f43afa0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -1508,7 +1508,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
         releaseLatch.countDown();
 
         // For compatibility with old version where joining nodes are not waiting for latch.
-        if (!cctx.exchange().latch().canSkipJoiningNodes(initialVersion()))
+        if (localJoinExchange() && !cctx.exchange().latch().canSkipJoiningNodes(initialVersion()))
             return;
 
         try {
@@ -2543,7 +2543,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
                 }
             }
         }
-
         if (allReceived) {
             if (!awaitSingleMapUpdates())
                 return;


[03/50] [abbrv] ignite git commit: IGNITE-9706: [ML] Update ignite-tensorflow to support TensorFlow standalone client mode

Posted by ag...@apache.org.
IGNITE-9706: [ML] Update ignite-tensorflow to support
TensorFlow standalone client mode

this closes #4847


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5aef8813
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5aef8813
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5aef8813

Branch: refs/heads/ignite-5797
Commit: 5aef8813269f7e7b3e3d175a4343a9fd72b68325
Parents: 66acc56
Author: Anton Dmitriev <dm...@gmail.com>
Authored: Fri Sep 28 11:49:08 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Fri Sep 28 11:49:08 2018 +0300

----------------------------------------------------------------------
 .../TensorFlowServerScriptFormatter.java        | 51 ++++++++++++--------
 .../util/TensorFlowUserScriptRunner.java        | 15 ++----
 2 files changed, 37 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5aef8813/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/tfrunning/TensorFlowServerScriptFormatter.java
----------------------------------------------------------------------
diff --git a/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/tfrunning/TensorFlowServerScriptFormatter.java b/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/tfrunning/TensorFlowServerScriptFormatter.java
index 7cfa1c6..18854ab 100644
--- a/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/tfrunning/TensorFlowServerScriptFormatter.java
+++ b/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/tfrunning/TensorFlowServerScriptFormatter.java
@@ -34,10 +34,16 @@ public class TensorFlowServerScriptFormatter {
     public String format(TensorFlowServer srv, boolean join, Ignite ignite) {
         StringBuilder builder = new StringBuilder();
 
+        builder.append("from __future__ import absolute_import").append("\n");
+        builder.append("from __future__ import division").append("\n");
+        builder.append("from __future__ import print_function").append("\n");
+
         builder.append("from threading import Thread").append("\n");
         builder.append("from time import sleep").append("\n");
         builder.append("import os, signal").append("\n");
+
         builder.append("\n");
+
         builder.append("def check_pid(pid):").append("\n");
         builder.append("    try:").append("\n");
         builder.append("        os.kill(pid, 0)").append("\n");
@@ -45,24 +51,23 @@ public class TensorFlowServerScriptFormatter {
         builder.append("        return False").append("\n");
         builder.append("    else:").append("\n");
         builder.append("        return True").append("\n");
+
         builder.append("\n");
+
         builder.append("def threaded_function(pid):").append("\n");
         builder.append("    while check_pid(pid):").append("\n");
         builder.append("        sleep(1)").append("\n");
         builder.append("    os.kill(os.getpid(), signal.SIGUSR1)").append("\n");
+
         builder.append("\n");
+
         builder.append("Thread(target = threaded_function, args = (int(os.environ['PPID']), )).start()")
             .append("\n");
         builder.append("\n");
 
         builder.append("import tensorflow as tf").append('\n');
-        builder.append("from tensorflow.contrib.ignite import IgniteDataset").append("\n");
-        builder.append("\n");
-        builder.append("cluster = tf.train.ClusterSpec(")
-            .append(srv.getClusterSpec().format(ignite))
-            .append(')')
-            .append('\n');
-        builder.append("");
+        builder.append("fto_import_contrib_ops = tf.contrib.resampler").append("\n");
+        builder.append("import tensorflow.contrib.igfs.python.ops.igfs_ops").append("\n");
 
         builder.append("print('job:%s task:%d' % ('")
             .append(srv.getJobName())
@@ -74,22 +79,30 @@ public class TensorFlowServerScriptFormatter {
         builder.append("print('IGNITE_DATASET_PORT = ', os.environ.get('IGNITE_DATASET_PORT'))").append("\n");
         builder.append("print('IGNITE_DATASET_PART = ', os.environ.get('IGNITE_DATASET_PART'))").append("\n");
 
-        builder.append("server = tf.train.Server(cluster");
-
-        if (srv.getJobName() != null)
-            builder.append(", job_name=\"").append(srv.getJobName()).append('"');
-
-        if (srv.getTaskIdx() != null)
-            builder.append(", task_index=").append(srv.getTaskIdx());
-
-        if (srv.getProto() != null)
-            builder.append(", protocol=\"").append(srv.getProto()).append('"');
-
-        builder.append(')').append('\n');
+        builder.append("os.environ['TF_CONFIG'] = '").append(formatTfConfigVar(srv, ignite)).append("'\n");
+        builder.append("server = tf.contrib.distribute.run_standard_tensorflow_server()").append("\n");
 
         if (join)
             builder.append("server.join()").append('\n');
 
         return builder.toString();
     }
+
+    /**
+     * Formats "TF_CONFIG" variable to be passed into user script.
+     *
+     * @param srv Server description.
+     * @param ignite Ignite instance.
+     * @return Formatted "TF_CONFIG" variable to be passed into user script.
+     */
+    private String formatTfConfigVar(TensorFlowServer srv, Ignite ignite) {
+        return "{\"cluster\" : " +
+            srv.getClusterSpec().format(ignite).replace('\n', ' ') +
+            ", " +
+            "\"task\": {\"type\" : \"" +
+            srv.getJobName() +
+            "\", \"index\": " +
+            srv.getTaskIdx() +
+            "}}";
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5aef8813/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/util/TensorFlowUserScriptRunner.java
----------------------------------------------------------------------
diff --git a/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/util/TensorFlowUserScriptRunner.java b/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/util/TensorFlowUserScriptRunner.java
index 17e63bb..d9ed9b2 100644
--- a/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/util/TensorFlowUserScriptRunner.java
+++ b/modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/cluster/util/TensorFlowUserScriptRunner.java
@@ -124,7 +124,7 @@ public class TensorFlowUserScriptRunner extends AsyncNativeProcessRunner {
 
         Map<String, String> env = procBuilder.environment();
         env.put("PYTHONPATH", workingDir.getAbsolutePath());
-        env.put("TF_CONFIG", formatTfConfigVar());
+        env.put("TF_CLUSTER", formatTfClusterVar());
         env.put("TF_WORKERS", formatTfWorkersVar());
         env.put("TF_CHIEF_SERVER", formatTfChiefServerVar());
 
@@ -132,17 +132,12 @@ public class TensorFlowUserScriptRunner extends AsyncNativeProcessRunner {
     }
 
     /**
-     * Formats "TF_CONFIG" variable to be passed into user script.
+     * Formats "TF_CLUSTER" variable to be passed into user script.
      *
-     * @return Formatted "TF_CONFIG" variable to be passed into user script.
+     * @return Formatted "TF_CLUSTER" variable to be passed into user script.
      */
-    private String formatTfConfigVar() {
-        return new StringBuilder()
-            .append("{\"cluster\" : ")
-            .append(clusterSpec.format(Ignition.ignite()))
-            .append(", ")
-            .append("\"task\": {\"type\" : \"" + TensorFlowClusterResolver.CHIEF_JOB_NAME + "\", \"index\": 0}}")
-            .toString();
+    private String formatTfClusterVar() {
+        return clusterSpec.format(Ignition.ignite());
     }
 
     /**


[31/50] [abbrv] ignite git commit: IGNITE-9390: MVCC: added new properties to .NET IgniteConfiguration and CacheAtomicityMode. This closes #4887.

Posted by ag...@apache.org.
IGNITE-9390: MVCC: added new properties to .NET IgniteConfiguration and CacheAtomicityMode. This closes #4887.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/45721371
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/45721371
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/45721371

Branch: refs/heads/ignite-5797
Commit: 457213713a442b734cddb59c1c8310fc6d9cd340
Parents: 96c271b
Author: devozerov <vo...@gridgain.com>
Authored: Tue Oct 2 14:27:39 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Oct 2 14:27:39 2018 +0300

----------------------------------------------------------------------
 .../apache/ignite/cache/CacheAtomicityMode.java | 10 +++--
 .../configuration/IgniteConfiguration.java      | 30 +++++++--------
 .../utils/PlatformConfigurationUtils.java       |  8 ++++
 .../ApiParity/IgniteConfigurationParityTest.cs  |  4 +-
 .../Cache/CachePartitionedTest.cs               | 37 ++++++++++++++++++
 .../Config/full-config.xml                      |  2 +-
 .../IgniteConfigurationSerializerTest.cs        |  3 ++
 .../IgniteConfigurationTest.cs                  |  7 ++++
 .../Cache/Configuration/CacheAtomicityMode.cs   | 30 ++++++++++++++-
 .../Apache.Ignite.Core/IgniteConfiguration.cs   | 40 ++++++++++++++++++++
 .../IgniteConfigurationSection.xsd              | 11 ++++++
 .../Impl/Binary/BinaryReaderExtensions.cs       |  8 ++++
 .../Impl/Binary/BinaryWriterExtensions.cs       | 16 +++++++-
 13 files changed, 182 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
index 43c561c..5b101bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
@@ -38,6 +38,10 @@ public enum CacheAtomicityMode {
      * <b>Note!</b> In this mode, transactional consistency is guaranteed for key-value API operations only.
      * To enable ACID capabilities for SQL transactions, use the {@code TRANSACTIONAL_SNAPSHOT} mode.
      * <p>
+     * <b>Note!</b> This atomicity mode is not compatible with the other modes within the same transaction.
+     * if a transaction is executed over multiple caches, all caches must have the same atomicity mode,
+     * either {@code TRANSACTIONAL_SNAPSHOT} or {@code TRANSACTIONAL}.
+     * <p>
      * See {@link Transaction} for more information about transactions.
      */
     TRANSACTIONAL,
@@ -109,9 +113,9 @@ public enum CacheAtomicityMode {
      * by the coordinator. This snapshot ensures that the transaction works with a consistent database state
      * during its execution period.
      * <p>
-     * Note! This atomicity mode is not compatible with the other modes within the same transaction.
-     * If a transaction is executed over multiple caches, all caches must have the same mode,
-     * either {@code TRANSACTIONAL_SNAPSHOT} or {@code TRANSACTIONAL}
+     * <b>Note!</b> This atomicity mode is not compatible with the other modes within the same transaction.
+     * If a transaction is executed over multiple caches, all caches must have the same atomicity mode,
+     * either {@code TRANSACTIONAL_SNAPSHOT} or {@code TRANSACTIONAL}.
      * <p>
      * See {@link Transaction} for more information about transactions.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 6a0c7cb..964c73b 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -214,11 +214,11 @@ public class IgniteConfiguration {
     /** Default timeout after which long query warning will be printed. */
     public static final long DFLT_LONG_QRY_WARN_TIMEOUT = 3000;
 
-    /** Default size of MVCC vacuum thread pool. */
+    /** Default number of MVCC vacuum threads.. */
     public static final int DFLT_MVCC_VACUUM_THREAD_CNT = 2;
 
-    /** Default time interval between vacuum process runs (ms). */
-    public static final int DFLT_MVCC_VACUUM_FREQUENCY = 5000;
+    /** Default time interval between MVCC vacuum runs in milliseconds. */
+    public static final long DFLT_MVCC_VACUUM_FREQUENCY = 5000;
 
     /** Optional local Ignite instance name. */
     private String igniteInstanceName;
@@ -496,8 +496,8 @@ public class IgniteConfiguration {
     /** Size of MVCC vacuum thread pool. */
     private int mvccVacuumThreadCnt = DFLT_MVCC_VACUUM_THREAD_CNT;
 
-    /** Time interval between vacuum process runs (ms). */
-    private int mvccVacuumFreq = DFLT_MVCC_VACUUM_FREQUENCY;
+    /** Time interval between vacuum runs (ms). */
+    private long mvccVacuumFreq = DFLT_MVCC_VACUUM_FREQUENCY;
 
     /** User authentication enabled. */
     private boolean authEnabled;
@@ -2998,18 +2998,18 @@ public class IgniteConfiguration {
     }
 
     /**
-     * Returns number of MVCC vacuum cleanup threads.
+     * Returns number of MVCC vacuum threads.
      *
-     * @return Number of MVCC vacuum cleanup threads.
+     * @return Number of MVCC vacuum threads.
      */
     public int getMvccVacuumThreadCount() {
         return mvccVacuumThreadCnt;
     }
 
     /**
-     * Sets number of MVCC vacuum cleanup threads.
+     * Sets number of MVCC vacuum threads.
      *
-     * @param mvccVacuumThreadCnt Number of MVCC vacuum cleanup threads.
+     * @param mvccVacuumThreadCnt Number of MVCC vacuum threads.
      * @return {@code this} for chaining.
      */
     public IgniteConfiguration setMvccVacuumThreadCount(int mvccVacuumThreadCnt) {
@@ -3019,21 +3019,21 @@ public class IgniteConfiguration {
     }
 
     /**
-     * Returns time interval between vacuum runs.
+     * Returns time interval between MVCC vacuum runs in milliseconds.
      *
-     * @return Time interval between vacuum runs.
+     * @return Time interval between MVCC vacuum runs in milliseconds.
      */
-    public int getMvccVacuumFrequency() {
+    public long getMvccVacuumFrequency() {
         return mvccVacuumFreq;
     }
 
     /**
-     * Sets time interval between vacuum runs.
+     * Sets time interval between MVCC vacuum runs in milliseconds.
      *
-     * @param mvccVacuumFreq Time interval between vacuum runs.
+     * @param mvccVacuumFreq Time interval between MVCC vacuum runs in milliseconds.
      * @return {@code this} for chaining.
      */
-    public IgniteConfiguration setMvccVacuumFrequency(int mvccVacuumFreq) {
+    public IgniteConfiguration setMvccVacuumFrequency(long mvccVacuumFreq) {
         this.mvccVacuumFreq = mvccVacuumFreq;
 
         return this;

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index cd67f15..8e66102 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -654,6 +654,10 @@ public class PlatformConfigurationUtils {
             cfg.setActiveOnStart(in.readBoolean());
         if (in.readBoolean())
             cfg.setAuthenticationEnabled(in.readBoolean());
+        if (in.readBoolean())
+            cfg.setMvccVacuumFrequency(in.readLong());
+        if (in.readBoolean())
+            cfg.setMvccVacuumThreadCount(in.readInt());
 
         int sqlSchemasCnt = in.readInt();
 
@@ -1201,6 +1205,10 @@ public class PlatformConfigurationUtils {
         w.writeBoolean(cfg.isActiveOnStart());
         w.writeBoolean(true);
         w.writeBoolean(cfg.isAuthenticationEnabled());
+        w.writeBoolean(true);
+        w.writeLong(cfg.getMvccVacuumFrequency());
+        w.writeBoolean(true);
+        w.writeInt(cfg.getMvccVacuumThreadCount());
 
         if (cfg.getSqlSchemas() == null)
             w.writeInt(-1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
index 5b4106a..1fd8e72 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
@@ -80,9 +80,7 @@ namespace Apache.Ignite.Core.Tests.ApiParity
             "TimeServerPortBase",
             "TimeServerPortRange",
             "IncludeProperties",
-            "isAutoActivationEnabled",  // IGNITE-7301
-            "MvccVacuumFrequency", //TODO: IGNITE-9390: Remove when Mvcc support will be added.
-            "MvccVacuumThreadCount" //TODO: IGNITE-9390: Remove when Mvcc support will be added.
+            "isAutoActivationEnabled"  // IGNITE-7301
         };
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CachePartitionedTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CachePartitionedTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CachePartitionedTest.cs
index 68546b9..c9100b2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CachePartitionedTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CachePartitionedTest.cs
@@ -17,6 +17,9 @@
 
 namespace Apache.Ignite.Core.Tests.Cache
 {
+    using Apache.Ignite.Core.Cache;
+    using Apache.Ignite.Core.Cache.Configuration;
+    using Apache.Ignite.Core.Transactions;
     using NUnit.Framework;
 
     [Category(TestUtils.CategoryIntensive)]
@@ -41,5 +44,39 @@ namespace Apache.Ignite.Core.Tests.Cache
         {
             return 1;
         }
+
+        /// <summary>
+        /// Test MVCC transaction.
+        /// </summary>
+        [Test]
+        public void TestMvccTransaction()
+        {
+            IIgnite ignite = GetIgnite(0);
+
+            ICache<int, int> cache = ignite.GetOrCreateCache<int, int>(new CacheConfiguration
+            {
+                Name = "mvcc",
+                AtomicityMode = CacheAtomicityMode.TransactionalSnapshot
+            });
+
+            ITransaction tx = ignite.GetTransactions().TxStart();
+
+            cache.Put(1, 1);
+            cache.Put(2, 2);
+
+            tx.Commit();
+
+            Assert.AreEqual(1, cache.Get(1));
+            Assert.AreEqual(2, cache.Get(2));
+
+            tx = ignite.GetTransactions().TxStart();
+
+            Assert.AreEqual(1, cache.Get(1));
+            Assert.AreEqual(2, cache.Get(2));
+
+            tx.Commit();
+
+            ignite.DestroyCache("mvcc");
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
index b091a49..4aa5190 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
@@ -23,7 +23,7 @@
               workDirectory='c:' JvmMaxMemoryMb='1024' MetricsLogFrequency='0:0:10' isDaemon='true' 
               isLateAffinityAssignment='false' springConfigUrl='c:\myconfig.xml' autoGenerateIgniteInstanceName='true' 
               peerAssemblyLoadingMode='CurrentAppDomain' longQueryWarningTimeout='1:2:3' isActiveOnStart='false' 
-              consistentId='someId012' redirectJavaConsoleOutput='false' authenticationEnabled='true'>
+              consistentId='someId012' redirectJavaConsoleOutput='false' authenticationEnabled='true' mvccVacuumFrequency='10000' mvccVacuumThreadCount='4'>
     <localhost>127.1.1.1</localhost>
     <binaryConfiguration compactFooter='false' keepDeserialized='true'>
         <nameMapper type='Apache.Ignite.Core.Tests.IgniteConfigurationSerializerTest+NameMapper' bar='testBar' />

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index e2ece20..ec9d4fd 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -100,6 +100,9 @@ namespace Apache.Ignite.Core.Tests
             Assert.IsFalse(cfg.IsActiveOnStart);
             Assert.IsTrue(cfg.AuthenticationEnabled);
 
+            Assert.AreEqual(10000, cfg.MvccVacuumFrequency);
+            Assert.AreEqual(4, cfg.MvccVacuumThreadCount);
+
             Assert.IsNotNull(cfg.SqlSchemas);
             Assert.AreEqual(2, cfg.SqlSchemas.Count);
             Assert.IsTrue(cfg.SqlSchemas.Contains("SCHEMA_1"));

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index a03d09c..2861c30 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -242,6 +242,9 @@ namespace Apache.Ignite.Core.Tests
 
                 AssertExtensions.ReflectionEqual(cfg.DataStorageConfiguration, resCfg.DataStorageConfiguration);
 
+                Assert.AreEqual(cfg.MvccVacuumFrequency, resCfg.MvccVacuumFrequency);
+                Assert.AreEqual(cfg.MvccVacuumThreadCount, resCfg.MvccVacuumThreadCount);
+
                 Assert.IsNotNull(resCfg.SqlSchemas);
                 Assert.AreEqual(2, resCfg.SqlSchemas.Count);
                 Assert.IsTrue(resCfg.SqlSchemas.Contains("SCHEMA_3"));
@@ -498,6 +501,8 @@ namespace Apache.Ignite.Core.Tests
                 cfg.ClientConnectorConfigurationEnabled);
             Assert.AreEqual(IgniteConfiguration.DefaultRedirectJavaConsoleOutput, cfg.RedirectJavaConsoleOutput);
             Assert.AreEqual(IgniteConfiguration.DefaultAuthenticationEnabled, cfg.AuthenticationEnabled);
+            Assert.AreEqual(IgniteConfiguration.DefaultMvccVacuumFrequency, cfg.MvccVacuumFrequency);
+            Assert.AreEqual(IgniteConfiguration.DefaultMvccVacuumThreadCount, cfg.MvccVacuumThreadCount);
 
             // Thread pools.
             Assert.AreEqual(IgniteConfiguration.DefaultManagementThreadPoolSize, cfg.ManagementThreadPoolSize);
@@ -836,6 +841,8 @@ namespace Apache.Ignite.Core.Tests
                     }
                 },
                 AuthenticationEnabled = false,
+                MvccVacuumFrequency = 20000,
+                MvccVacuumThreadCount = 8,
 
                 SqlSchemas = new List<string> { "SCHEMA_3", "schema_4" }
             };

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
index 8c36a77..49e5d12 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
@@ -26,6 +26,13 @@ namespace Apache.Ignite.Core.Cache.Configuration
     {
         /// <summary>
         /// Specifies fully ACID-compliant transactional cache behavior.
+        /// <para />
+        /// <b>Note!</b> In this mode, transactional consistency is guaranteed for key-value API operations only.
+        /// To enable ACID capabilities for SQL transactions, use TRANSACTIONAL_SNAPSHOT mode.
+        /// <para />
+        /// <b>Note!</b> This atomicity mode is not compatible with the other atomicity modes within the same transaction.
+        /// If a transaction is executed over multiple caches, all caches must have the same atomicity mode,
+        /// either TRANSACTIONAL_SNAPSHOT or TRANSACTIONAL.
         /// </summary>
         Transactional,
 
@@ -49,6 +56,27 @@ namespace Apache.Ignite.Core.Cache.Configuration
         /// Also note that all data modifications in <see cref="Atomic"/> mode are guaranteed to be atomic
         /// and consistent with writes to the underlying persistent store, if one is configured.        
         /// </summary>
-        Atomic
+        Atomic,
+
+        /// <summary>
+        /// Specifies fully ACID-compliant transactional cache behavior for both key-value API and SQL transactions.
+        /// <para/>
+        /// This atomicity mode enables multiversion concurrency control (MVCC) for the cache. In MVCC-enabled caches,
+        /// when a transaction updates a row, it creates a new version of that row instead of overwriting it.
+        /// Other users continue to see the old version of the row until the transaction is committed.
+        /// In this way, readers and writers do not conflict with each other and always work with a consistent dataset.
+        /// The old version of data is cleaned up when it's no longer accessed by anyone.
+        /// <para />
+        /// With this mode enabled, one node is elected as an MVCC coordinator. This node tracks all in-flight transactions
+        /// and queries executed in the cluster. Each transaction or query executed over the cache with
+        /// TRANSACTIONAL_SNAPSHOT mode works with a current snapshot of data generated for this transaction or query
+        /// by the coordinator. This snapshot ensures that the transaction works with a consistent database state
+        /// during its execution period.
+        /// <para />
+        /// <b>Note!</b> This atomicity mode is not compatible with the other atomicity modes within the same transaction.
+        /// If a transaction is executed over multiple caches, all caches must have the same atomicity mode,
+        /// either TRANSACTIONAL_SNAPSHOT or TRANSACTIONAL.
+        /// </summary>
+        TransactionalSnapshot,
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index bd53118..315b27d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -205,6 +205,12 @@ namespace Apache.Ignite.Core
         /** Map from user-defined listener to it's id. */
         private Dictionary<object, int> _localEventListenerIds;
 
+        /** MVCC vacuum frequency. */
+        private long? _mvccVacuumFreq;
+
+        /** MVCC vacuum thread count. */
+        private int? _mvccVacuumThreadCnt;
+
         /// <summary>
         /// Default network retry count.
         /// </summary>
@@ -231,6 +237,16 @@ namespace Apache.Ignite.Core
         public const bool DefaultAuthenticationEnabled = false;
 
         /// <summary>
+        /// Default value for <see cref="MvccVacuumFrequency"/> property.
+        /// </summary>
+        public const long DefaultMvccVacuumFrequency = 5000;
+
+        /// <summary>
+        /// Default value for <see cref="MvccVacuumThreadCount"/> property.
+        /// </summary>
+        public const int DefaultMvccVacuumThreadCount = 2;
+
+        /// <summary>
         /// Initializes a new instance of the <see cref="IgniteConfiguration"/> class.
         /// </summary>
         public IgniteConfiguration()
@@ -309,6 +325,8 @@ namespace Apache.Ignite.Core
             writer.WriteTimeSpanAsLongNullable(_longQueryWarningTimeout);
             writer.WriteBooleanNullable(_isActiveOnStart);
             writer.WriteBooleanNullable(_authenticationEnabled);
+            writer.WriteLongNullable(_mvccVacuumFreq);
+            writer.WriteIntNullable(_mvccVacuumThreadCnt);
 
             if (SqlSchemas == null)
                 writer.WriteInt(-1);
@@ -675,6 +693,8 @@ namespace Apache.Ignite.Core
             _longQueryWarningTimeout = r.ReadTimeSpanNullable();
             _isActiveOnStart = r.ReadBooleanNullable();
             _authenticationEnabled = r.ReadBooleanNullable();
+            _mvccVacuumFreq = r.ReadLongNullable();
+            _mvccVacuumThreadCnt = r.ReadIntNullable();
 
             int sqlSchemasCnt = r.ReadInt();
 
@@ -1550,6 +1570,26 @@ namespace Apache.Ignite.Core
         }
 
         /// <summary>
+        /// Time interval between MVCC vacuum runs in milliseconds.
+        /// </summary>
+        [DefaultValue(DefaultMvccVacuumFrequency)]
+        public long MvccVacuumFrequency
+        {
+            get { return _mvccVacuumFreq ?? DefaultMvccVacuumFrequency; }
+            set { _mvccVacuumFreq = value; }
+        }
+
+        /// <summary>
+        /// Number of MVCC vacuum threads.
+        /// </summary>
+        [DefaultValue(DefaultMvccVacuumThreadCount)]
+        public int MvccVacuumThreadCount
+        {
+            get { return _mvccVacuumThreadCnt ?? DefaultMvccVacuumThreadCount; }
+            set { _mvccVacuumThreadCnt = value; }
+        }
+
+        /// <summary>
         /// Gets or sets predefined failure handlers implementation.
         /// A failure handler handles critical failures of Ignite instance accordingly:
         /// <para><see cref="NoOpFailureHandler"/> -- do nothing.</para>

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index ebbef67..4040610 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -2265,6 +2265,17 @@
                     <xs:documentation>Whether user authentication is enabled for the cluster.</xs:documentation>
                 </xs:annotation>
             </xs:attribute>
+            <xs:attribute name="mvccVacuumFrequency" type="xs:long">
+                <xs:annotation>
+                    <xs:documentation>Time interval between MVCC vacuum runs in milliseconds.</xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
+
+            <xs:attribute name="mvccVacuumThreadCount" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>Number of MVCC vacuum threads.</xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
             <xs:attribute name="clientConnectorConfigurationEnabled" type="xs:boolean">
                 <xs:annotation>
                     <xs:documentation>Whether client connector should be enabled (allow thin clients, ODBC and JDBC drivers to work with Ignite).</xs:documentation>

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReaderExtensions.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReaderExtensions.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReaderExtensions.cs
index b13318c..5fca62d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReaderExtensions.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryReaderExtensions.cs
@@ -79,6 +79,14 @@ namespace Apache.Ignite.Core.Impl.Binary
         }
 
         /// <summary>
+        /// Reads the nullable long.
+        /// </summary>
+        public static long? ReadLongNullable(this IBinaryRawReader reader)
+        {
+            return reader.ReadBoolean() ? reader.ReadLong() : (long?) null;
+        }
+
+        /// <summary>
         /// Reads the nullable bool.
         /// </summary>
         public static bool? ReadBooleanNullable(this IBinaryRawReader reader)

http://git-wip-us.apache.org/repos/asf/ignite/blob/45721371/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriterExtensions.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriterExtensions.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriterExtensions.cs
index e504d75..b965bca 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriterExtensions.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryWriterExtensions.cs
@@ -44,7 +44,7 @@ namespace Apache.Ignite.Core.Impl.Binary
         }
 
         /// <summary>
-        /// Writes the nullable boolean.
+        /// Writes the nullable int.
         /// </summary>
         public static void WriteIntNullable(this IBinaryRawWriter writer, int? value)
         {
@@ -58,6 +58,20 @@ namespace Apache.Ignite.Core.Impl.Binary
         }
 
         /// <summary>
+        /// Writes the nullable long.
+        /// </summary>
+        public static void WriteLongNullable(this IBinaryRawWriter writer, long? value)
+        {
+            if (value != null)
+            {
+                writer.WriteBoolean(true);
+                writer.WriteLong(value.Value);
+            }
+            else
+                writer.WriteBoolean(false);
+        }
+
+        /// <summary>
         /// Writes the timespan.
         /// </summary>
         public static void WriteTimeSpanAsLong(this IBinaryRawWriter writer, TimeSpan value)


[17/50] [abbrv] ignite git commit: IGNITE-9687: Fixed JTA tests for Java 9+. This closes #4858.

Posted by ag...@apache.org.
IGNITE-9687: Fixed JTA tests for Java 9+. This closes #4858.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/37eedfc1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/37eedfc1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/37eedfc1

Branch: refs/heads/ignite-5797
Commit: 37eedfc1824c8d2c62dbb860f08f5397c1b4033a
Parents: 4da48e6
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Fri Sep 28 17:55:14 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Sep 28 17:55:14 2018 +0300

----------------------------------------------------------------------
 modules/jta/pom.xml                                     | 12 +++++++++++-
 .../cache/GridJtaTransactionManagerSelfTest.java        |  2 +-
 .../jta/GridPartitionedCacheJtaFactorySelfTest.java     |  2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/37eedfc1/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 35c5582..9c3bd6c 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -50,7 +50,7 @@
         <dependency>
             <groupId>org.ow2.jotm</groupId>
             <artifactId>jotm-core</artifactId>
-            <version>2.1.9</version>
+            <version>2.2.3</version>
             <scope>test</scope>
         </dependency>
 
@@ -89,6 +89,16 @@
             <version>6.0.43</version>
             <scope>test</scope>
         </dependency>
+
+        <!-- JDK9+ -->
+
+        <dependency>
+            <groupId>org.jboss.spec.javax.rmi</groupId>
+            <artifactId>jboss-rmi-api_1.0_spec</artifactId>
+            <version>1.0.6.Final</version>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/37eedfc1/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java
index e2ffa34..a7bb785 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridJtaTransactionManagerSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import javax.cache.configuration.Factory;
 import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
@@ -27,7 +28,6 @@ import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
 import org.objectweb.jotm.Current;
 import org.objectweb.jotm.Jotm;
-import org.objectweb.transaction.jta.TransactionManager;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.transactions.TransactionState.ACTIVE;

http://git-wip-us.apache.org/repos/asf/ignite/blob/37eedfc1/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaFactorySelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaFactorySelfTest.java
index 14b7fae..ec9f8e8 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaFactorySelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/jta/GridPartitionedCacheJtaFactorySelfTest.java
@@ -18,9 +18,9 @@
 package org.apache.ignite.internal.processors.cache.jta;
 
 import javax.cache.configuration.Factory;
+import javax.transaction.TransactionManager;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
-import org.objectweb.transaction.jta.TransactionManager;
 
 /**
  * Factory JTA integration test using PARTITIONED cache.


[42/50] [abbrv] ignite git commit: IGNITE-9705 Fix flushes invalid byte buffer into snapshot manager - Fixes #4841.

Posted by ag...@apache.org.
IGNITE-9705 Fix flushes invalid byte buffer into snapshot manager - Fixes #4841.

Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/76d6ef03
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/76d6ef03
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/76d6ef03

Branch: refs/heads/ignite-5797
Commit: 76d6ef032f9a634f15398d10e0019419f9798296
Parents: 95b6597
Author: ibessonov <be...@gmail.com>
Authored: Thu Oct 4 11:29:24 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Thu Oct 4 11:29:24 2018 +0300

----------------------------------------------------------------------
 .../cache/persistence/GridCacheDatabaseSharedManager.java          | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/76d6ef03/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index aff2b42..1d048c0 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -1082,6 +1082,8 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
                 // First of all, write page to disk.
                 storeMgr.write(fullId.groupId(), fullId.pageId(), pageBuf, tag);
 
+                pageBuf.rewind();
+
                 // Only after write we can write page into snapshot.
                 snapshotMgr.flushDirtyPageHandler(fullId, pageBuf, tag);
 


[33/50] [abbrv] ignite git commit: IGNITE-9760 Fixed NPE in WAL manager for FSYNC mode - Fixes #4888.

Posted by ag...@apache.org.
IGNITE-9760 Fixed NPE in WAL manager for FSYNC mode - Fixes #4888.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a03c6e98
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a03c6e98
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a03c6e98

Branch: refs/heads/ignite-5797
Commit: a03c6e9833e4767025c9aefeedbead07495da4a5
Parents: bd07c83
Author: Anton Kalashnikov <ka...@yandex.ru>
Authored: Tue Oct 2 19:07:36 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Oct 2 19:07:36 2018 +0300

----------------------------------------------------------------------
 .../wal/FsyncModeFileWriteAheadLogManager.java  |  7 +++--
 .../wal/WalRolloverRecordLoggingFsyncTest.java  | 32 ++++++++++++++++++++
 .../WalRolloverRecordLoggingLogOnlyTest.java    | 32 ++++++++++++++++++++
 .../db/wal/WalRolloverRecordLoggingTest.java    | 16 ++++++----
 .../IgnitePdsWithIndexingCoreTestSuite.java     |  6 ++--
 5 files changed, 83 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a03c6e98/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
index 1c0325e..3d1b0e0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
@@ -2330,19 +2330,22 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda
     private abstract static class FileHandle {
         /** I/O interface for read/write operations with file */
         protected SegmentIO fileIO;
+        /** Segment idx corresponded to fileIo*/
+        final long segmentIdx;
 
         /**
          * @param fileIO I/O interface for read/write operations of FileHandle.
          */
-        private FileHandle(SegmentIO fileIO) {
+        private FileHandle(@NotNull SegmentIO fileIO) {
             this.fileIO = fileIO;
+            this.segmentIdx = fileIO.getSegmentId();
         }
 
         /**
          * @return Current segment id.
          */
         public long getSegmentId(){
-            return fileIO.getSegmentId();
+            return segmentIdx;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a03c6e98/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingFsyncTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingFsyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingFsyncTest.java
new file mode 100644
index 0000000..7454e5f
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingFsyncTest.java
@@ -0,0 +1,32 @@
+/*
+ * 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.internal.processors.cache.persistence.db.wal;
+
+import org.apache.ignite.configuration.WALMode;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ *
+ */
+public class WalRolloverRecordLoggingFsyncTest extends WalRolloverRecordLoggingTest {
+
+    /** {@inheritDoc} */
+    @NotNull @Override public WALMode walMode() {
+        return WALMode.FSYNC;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a03c6e98/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingLogOnlyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingLogOnlyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingLogOnlyTest.java
new file mode 100644
index 0000000..765fdeb
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingLogOnlyTest.java
@@ -0,0 +1,32 @@
+/*
+ * 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.internal.processors.cache.persistence.db.wal;
+
+import org.apache.ignite.configuration.WALMode;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ *
+ */
+public class WalRolloverRecordLoggingLogOnlyTest extends WalRolloverRecordLoggingTest {
+
+    /** {@inheritDoc} */
+    @NotNull @Override public WALMode walMode() {
+        return WALMode.LOG_ONLY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a03c6e98/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
index 67caf63..395b03a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
@@ -23,6 +23,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.failure.StopNodeOrHaltFailureHandler;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -36,13 +37,11 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_PATH;
-import static org.apache.ignite.configuration.WALMode.LOG_ONLY;
+import org.jetbrains.annotations.NotNull;
 /**
  *
  */
-public class WalRolloverRecordLoggingTest extends GridCommonAbstractTest {
+public abstract class WalRolloverRecordLoggingTest extends GridCommonAbstractTest {
     /** */
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
@@ -69,15 +68,20 @@ public class WalRolloverRecordLoggingTest extends GridCommonAbstractTest {
             .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
                 .setPersistenceEnabled(true)
                 .setMaxSize(40 * 1024 * 1024))
-            .setWalMode(LOG_ONLY)
+            .setWalMode(walMode())
             .setWalSegmentSize(4 * 1024 * 1024)
-            .setWalArchivePath(DFLT_WAL_PATH));
+        );
 
         cfg.setFailureHandler(new StopNodeOrHaltFailureHandler(false, 0));
 
         return cfg;
     }
 
+    /**
+     * @return Wal mode.
+     */
+    @NotNull public abstract WALMode walMode();
+
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         stopAllGrids();

http://git-wip-us.apache.org/repos/asf/ignite/blob/a03c6e98/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
index caea388..e9159bf 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
@@ -40,7 +40,8 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteWalR
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteWalRecoveryWithCompactionTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalPathsTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRecoveryTxLogicalRecordsTest;
-import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRolloverRecordLoggingTest;
+import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRolloverRecordLoggingFsyncTest;
+import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRolloverRecordLoggingLogOnlyTest;
 
 /**
  * Test suite for tests that cover core PDS features and depend on indexing module.
@@ -60,7 +61,8 @@ public class IgnitePdsWithIndexingCoreTestSuite extends TestSuite {
         suite.addTestSuite(PersistenceDirectoryWarningLoggingTest.class);
         suite.addTestSuite(WalPathsTest.class);
         suite.addTestSuite(WalRecoveryTxLogicalRecordsTest.class);
-        suite.addTestSuite(WalRolloverRecordLoggingTest.class);
+        suite.addTestSuite(WalRolloverRecordLoggingFsyncTest.class);
+        suite.addTestSuite(WalRolloverRecordLoggingLogOnlyTest.class);
 
         suite.addTestSuite(IgniteWalRecoveryTest.class);
         suite.addTestSuite(IgniteWalRecoveryWithCompactionTest.class);


[35/50] [abbrv] ignite git commit: IGNITE-9727: Fixed ignite.sh and ignite.bat scripts to support Java 9+. This closes #4871.

Posted by ag...@apache.org.
IGNITE-9727: Fixed ignite.sh and ignite.bat scripts to support Java 9+. This closes #4871.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/46fe9ed0
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/46fe9ed0
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/46fe9ed0

Branch: refs/heads/ignite-5797
Commit: 46fe9ed02f1b78b51bb970a04909bfd4d5892cbd
Parents: b44c1d2
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Wed Oct 3 13:09:17 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Oct 3 13:09:17 2018 +0300

----------------------------------------------------------------------
 bin/ignite.bat           | 48 +++++++++++++++++++++++++++++++------------
 bin/ignite.sh            | 37 +++++++++++++++++++++++++--------
 bin/include/functions.sh |  5 -----
 3 files changed, 64 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/46fe9ed0/bin/ignite.bat
----------------------------------------------------------------------
diff --git a/bin/ignite.bat b/bin/ignite.bat
index 25c828f..31c9769 100644
--- a/bin/ignite.bat
+++ b/bin/ignite.bat
@@ -49,10 +49,10 @@ for /f "tokens=* USEBACKQ" %%f in (`%cmd% -version 2^>^&1`) do (
 )
 :LoopEscape
 
-set var=%var:~14%
-set var=%var:"=%
-for /f "tokens=1,2 delims=." %%a in ("%var%") do set MAJOR_JAVA_VER=%%a & set MINOR_JAVA_VER=%%b
+for /f "tokens=1-3  delims= " %%a in ("%var%") do set JAVA_VER_STR=%%c
+set JAVA_VER_STR=%JAVA_VER_STR:"=%
 
+for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set MAJOR_JAVA_VER=%%a & set MINOR_JAVA_VER=%%b
 if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
 
 if %MAJOR_JAVA_VER% LSS 8 (
@@ -63,13 +63,6 @@ if %MAJOR_JAVA_VER% LSS 8 (
 	goto error_finish
 )
 
-if %MAJOR_JAVA_VER% GTR 9 (
-	echo %0, WARNING:
-    echo The version of JAVA installed in %JAVA_HOME% was not tested with Apache Ignite.
-    echo Run it on your own risk or point JAVA_HOME variable to installation of JDK 1.8 or JDK 9.
-    echo You can also download latest JDK at http://java.com/download.
-)
-
 :: Check IGNITE_HOME.
 :checkIgniteHome1
 if defined IGNITE_HOME goto checkIgniteHome2
@@ -181,9 +174,9 @@ if "%JMX_PORT%" == "" (
 ::
 "%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[7]\." > nul
 if %ERRORLEVEL% equ 0 (
-    if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=256m
+    if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:MaxPermSize=256m
 ) else (
-    if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxMetaspaceSize=256m
+    if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m
 )
 
 ::
@@ -235,7 +228,36 @@ if "%MAIN_CLASS%" == "" set MAIN_CLASS=org.apache.ignite.startup.cmdline.Command
 ::
 :: Final JVM_OPTS for Java 9+ compatibility
 ::
-if %MAJOR_JAVA_VER% GEQ 9 set JVM_OPTS=--add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-modules java.xml.bind %JVM_OPTS%
+if "%MAJOR_JAVA_VER%" == "8" (
+    set JVM_OPTS= ^
+    -XX:+AggressiveOpts ^
+    %JVM_OPTS%
+)
+
+if %MAJOR_JAVA_VER% GEQ 9 if %MAJOR_JAVA_VER% LSS 11 (
+    set JVM_OPTS= ^
+    -XX:+AggressiveOpts ^
+    --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
+    --add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
+    --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
+    --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
+    --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
+    --illegal-access=permit ^
+    --add-modules=java.transaction ^
+    --add-modules=java.xml.bind ^
+    %JVM_OPTS%
+)
+
+if "%MAJOR_JAVA_VER%" == "11" (
+    set JVM_OPTS= ^
+    --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
+    --add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
+    --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
+    --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
+    --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED ^
+    --illegal-access=permit ^
+    %JVM_OPTS%
+)
 
 if "%INTERACTIVE%" == "1" (
     "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% %JMX_MON% ^

http://git-wip-us.apache.org/repos/asf/ignite/blob/46fe9ed0/bin/ignite.sh
----------------------------------------------------------------------
diff --git a/bin/ignite.sh b/bin/ignite.sh
index c7b7318..8ef040c 100755
--- a/bin/ignite.sh
+++ b/bin/ignite.sh
@@ -90,7 +90,7 @@ fi
 # ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 #
 if [ -z "$JVM_OPTS" ] ; then
-    JVM_OPTS="-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxMetaspaceSize=256m"
+    JVM_OPTS="-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m"
 fi
 
 #
@@ -149,15 +149,36 @@ fi
 #
 javaMajorVersion "${JAVA_HOME}/bin/java"
 
-if [ $version -gt 8 ]; then
-    JVM_OPTS="--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
-          --add-exports java.base/sun.nio.ch=ALL-UNNAMED \
-          --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
-          --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
-          --add-modules java.xml.bind \
-      ${JVM_OPTS}"
+if [ $version -eq 8 ] ; then
+    JVM_OPTS="\
+        -XX:+AggressiveOpts \
+         ${JVM_OPTS}"
+
+elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
+    JVM_OPTS="\
+        -XX:+AggressiveOpts \
+        --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
+        --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
+        --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
+        --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
+        --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
+        --illegal-access=permit \
+        --add-modules=java.transaction \
+        --add-modules=java.xml.bind \
+        ${JVM_OPTS}"
+
+elif [ $version -eq 11 ] ; then
+    JVM_OPTS="\
+        --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
+        --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
+        --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
+        --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
+        --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
+        --illegal-access=permit \
+        ${JVM_OPTS}"
 fi
 
+
 ERRORCODE="-1"
 
 while [ "${ERRORCODE}" -ne "130" ]

http://git-wip-us.apache.org/repos/asf/ignite/blob/46fe9ed0/bin/include/functions.sh
----------------------------------------------------------------------
diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index dbeee11..bc8187a 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -84,11 +84,6 @@ checkJava() {
         echo "Please point JAVA_HOME variable to installation of JDK 1.8 or JDK 9."
         echo "You can also download latest JDK at http://java.com/download"
         exit 1
-    elif [ $version -gt 9 ]; then
-        echo "$0, WARNING:"
-        echo "The $version version of JAVA installed in JAVA_HOME=$JAVA_HOME was not tested with Apache Ignite."
-        echo "Run it on your own risk or point JAVA_HOME variable to installation of JDK 1.8 or JDK 9."
-        echo "You can also download JDK at http://java.com/download"
     fi
 }
 


[40/50] [abbrv] ignite git commit: IGNITE-9722: MVCC: disallow reads from backups for GET operations. This closes #4903.

Posted by ag...@apache.org.
IGNITE-9722: MVCC: disallow reads from backups for GET operations. This closes #4903.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bf002109
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bf002109
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bf002109

Branch: refs/heads/ignite-5797
Commit: bf002109253b3cc19f5ea205dc1ce38e1c870301
Parents: 72b5c05
Author: devozerov <pp...@gmail.com>
Authored: Wed Oct 3 21:38:06 2018 +0300
Committer: devozerov <pp...@gmail.com>
Committed: Wed Oct 3 21:38:06 2018 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridPartitionedGetFuture.java         | 3 ++-
 .../cache/distributed/dht/GridPartitionedSingleGetFuture.java   | 3 ++-
 .../cache/distributed/dht/colocated/GridDhtColocatedCache.java  | 5 +++--
 .../processors/cache/mvcc/CacheMvccTransactionsTest.java        | 2 --
 4 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bf002109/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 39e0774..1512963 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -461,7 +461,8 @@ public class GridPartitionedGetFuture<K, V> extends CacheDistributedGetFutureAda
             return false;
         }
 
-        boolean fastLocGet = (!forcePrimary || affNodes.get(0).isLocal()) &&
+        // Local get cannot be used with MVCC as local node can contain some visible version which is not latest.
+        boolean fastLocGet = !cctx.mvccEnabled() && (!forcePrimary || affNodes.get(0).isLocal()) &&
             cctx.reserveForFastLocalGet(part, topVer);
 
         if (fastLocGet) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/bf002109/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index 5d3bef2..8ed6695 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -344,7 +344,8 @@ public class GridPartitionedSingleGetFuture extends GridCacheFutureAdapter<Objec
             return null;
         }
 
-        boolean fastLocGet = (!forcePrimary || affNodes.get(0).isLocal()) &&
+        // Local get cannot be used with MVCC as local node can contain some visible version which is not latest.
+        boolean fastLocGet = !cctx.mvccEnabled() && (!forcePrimary || affNodes.get(0).isLocal()) &&
             cctx.reserveForFastLocalGet(part, topVer);
 
         if (fastLocGet) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/bf002109/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index a83a93f..bbfb502 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -468,8 +468,9 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
         if (expiryPlc == null)
             expiryPlc = expiryPolicy(null);
 
-        // Optimization: try to resolve value locally and escape 'get future' creation.
-        if (!forcePrimary && ctx.affinityNode() && (!ctx.mvccEnabled() || mvccSnapshot != null)) {
+        // Optimization: try to resolve value locally and escape 'get future' creation. Not applcable for MVCC,
+        // because local node may contain a visible version which is no the most recent one.
+        if (!ctx.mvccEnabled() && !forcePrimary && ctx.affinityNode()) {
             try {
                 Map<K, V> locVals = null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bf002109/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
index 66555a0..a29a67a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
@@ -2433,8 +2433,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testMvccCoordinatorChangeSimple() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-9722");
-
         Ignite srv0 = startGrid(0);
 
         final List<String> cacheNames = new ArrayList<>();


[18/50] [abbrv] ignite git commit: IGNITE-9621: JDBC thin: remove warning about unsupported transactions.

Posted by ag...@apache.org.
IGNITE-9621: JDBC thin: remove warning about unsupported transactions.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a7480909
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a7480909
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a7480909

Branch: refs/heads/ignite-5797
Commit: a7480909b50f6421e84877654e9f0f56c587cd2a
Parents: 37eedfc
Author: devozerov <vo...@gridgain.com>
Authored: Fri Sep 28 18:09:22 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Sep 28 18:09:22 2018 +0300

----------------------------------------------------------------------
 .../internal/jdbc/thin/JdbcThinConnection.java  | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a7480909/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
index 547b1db..323a410 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
@@ -234,7 +234,7 @@ public class JdbcThinConnection implements Connection {
         int resSetHoldability) throws SQLException {
         ensureNotClosed();
 
-        checkCursorOptions(resSetType, resSetConcurrency, resSetHoldability);
+        checkCursorOptions(resSetType, resSetConcurrency);
 
         JdbcThinStatement stmt  = new JdbcThinStatement(this, resSetHoldability, schema);
 
@@ -264,7 +264,7 @@ public class JdbcThinConnection implements Connection {
         int resSetHoldability) throws SQLException {
         ensureNotClosed();
 
-        checkCursorOptions(resSetType, resSetConcurrency, resSetHoldability);
+        checkCursorOptions(resSetType, resSetConcurrency);
 
         if (sql == null)
             throw new SQLException("SQL string cannot be null.");
@@ -284,19 +284,14 @@ public class JdbcThinConnection implements Connection {
     /**
      * @param resSetType Cursor option.
      * @param resSetConcurrency Cursor option.
-     * @param resSetHoldability Cursor option.
      * @throws SQLException If options unsupported.
      */
-    private void checkCursorOptions(int resSetType, int resSetConcurrency,
-        int resSetHoldability) throws SQLException {
+    private void checkCursorOptions(int resSetType, int resSetConcurrency) throws SQLException {
         if (resSetType != TYPE_FORWARD_ONLY)
             throw new SQLFeatureNotSupportedException("Invalid result set type (only forward is supported).");
 
         if (resSetConcurrency != CONCUR_READ_ONLY)
             throw new SQLFeatureNotSupportedException("Invalid concurrency (updates are not supported).");
-
-        if (resSetHoldability != HOLD_CURSORS_OVER_COMMIT)
-            LOG.warning("Transactions are not supported.");
     }
 
     /** {@inheritDoc} */
@@ -441,10 +436,6 @@ public class JdbcThinConnection implements Connection {
             case Connection.TRANSACTION_READ_COMMITTED:
             case Connection.TRANSACTION_REPEATABLE_READ:
             case Connection.TRANSACTION_SERIALIZABLE:
-                LOG.warning("Transactions are not supported.");
-
-                break;
-
             case Connection.TRANSACTION_NONE:
                 break;
 
@@ -459,8 +450,6 @@ public class JdbcThinConnection implements Connection {
     @Override public int getTransactionIsolation() throws SQLException {
         ensureNotClosed();
 
-        LOG.warning("Transactions are not supported.");
-
         return txIsolation;
     }
 
@@ -494,9 +483,6 @@ public class JdbcThinConnection implements Connection {
     @Override public void setHoldability(int holdability) throws SQLException {
         ensureNotClosed();
 
-        if (holdability != HOLD_CURSORS_OVER_COMMIT)
-            LOG.warning("Transactions are not supported.");
-
         if (holdability != HOLD_CURSORS_OVER_COMMIT && holdability != CLOSE_CURSORS_AT_COMMIT)
             throw new SQLException("Invalid result set holdability value.");
 


[50/50] [abbrv] ignite git commit: Lock tracing

Posted by ag...@apache.org.
Lock tracing


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4629f21d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4629f21d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4629f21d

Branch: refs/heads/ignite-5797
Commit: 4629f21d9d1e250d816880245444aaa946d3b754
Parents: 1767dce
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Oct 4 18:53:49 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 18:53:49 2018 +0300

----------------------------------------------------------------------
 .../distributed/GridDistributedLockResponse.java    |  1 +
 .../dht/GridDhtTransactionalCacheAdapter.java       |  2 ++
 .../cache/transactions/IgniteTxHandler.java         |  1 +
 .../trace/GridCacheTxTracingSelfTest.java           | 16 ++++++++--------
 4 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4629f21d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index a8e20a6..f4dc17a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -154,6 +154,7 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage impl
         this.cacheId = cacheId;
         this.futId = futId;
         this.err = err;
+        this.evtsTrace = evtsTrace;
 
         vals = new ArrayList<>(cnt);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4629f21d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 2bc0f2d..8d84fd0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -1172,6 +1172,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                     top.readUnlock();
             }
 
+            tx.nodeTrace(req.nodeTrace());
+
             boolean timedOut = false;
 
             for (KeyCacheObject key : keys) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/4629f21d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index 44ce649..055d8d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -505,6 +505,7 @@ public class IgniteTxHandler {
             if (req.explicitLock())
                 tx.explicitLock(true);
 
+            tx.nodeTrace(req.nodeTrace());
             tx.transactionNodes(req.transactionNodes());
 
             if (req.near())

http://git-wip-us.apache.org/repos/asf/ignite/blob/4629f21d/modules/core/src/test/java/org/apache/ignite/internal/processors/trace/GridCacheTxTracingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/trace/GridCacheTxTracingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/trace/GridCacheTxTracingSelfTest.java
index 72d5b63..99b83d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/trace/GridCacheTxTracingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/trace/GridCacheTxTracingSelfTest.java
@@ -51,6 +51,8 @@ public class GridCacheTxTracingSelfTest extends GridCommonAbstractTest {
 
         cfg.setCacheConfiguration(ccfg);
 
+        cfg.setConsistentId(igniteInstanceName);
+
         if (getTestIgniteInstanceName(GRID_CNT - 1).equals(igniteInstanceName))
             cfg.setClientMode(true);
 
@@ -72,16 +74,14 @@ public class GridCacheTxTracingSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Object, Object> cache = client.cache(DEFAULT_CACHE_NAME);
 
-        for (int r = 0; r < 1000; r++) {
-            try (Transaction tx = client.transactions().txStart(OPTIMISTIC, REPEATABLE_READ)) {
-                for (int i = 0; i < 10; i++)
-                    cache.put(i, i);
+        try (Transaction tx = client.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+            for (int i = 0; i < 9; i++)
+                cache.put(i, i);
 
-                tx.commit();
+            tx.commit();
 
-                if (r == 999)
-                    System.out.println("A");
-            }
+            if (GRID_CNT == 4)
+                System.out.println("A");
         }
     }
 }


[11/50] [abbrv] ignite git commit: IGNITE-7764: MVCC: cache API support. This closes #4725.

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
index 83bb81c..af74996 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
@@ -20,8 +20,10 @@ package org.apache.ignite.internal.processors.cache.mvcc;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
@@ -64,7 +66,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetR
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
 import org.apache.ignite.internal.processors.cache.mvcc.msg.MvccAckRequestQueryCntr;
 import org.apache.ignite.internal.processors.cache.mvcc.msg.MvccAckRequestTx;
@@ -86,9 +87,7 @@ import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
-import org.apache.ignite.transactions.TransactionOptimisticException;
 import org.jetbrains.annotations.Nullable;
 import org.junit.Assert;
 
@@ -98,11 +97,8 @@ import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstract
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SCAN;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.PUT;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker.MVCC_TRACKER_ID_NA;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
 
 /**
  * TODO IGNITE-6739: tests reload
@@ -117,40 +113,104 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
     }
 
     /**
-     * @throws Exception If failed.
+     * @throws Exception if failed.
      */
-    public void testPessimisticTx1() throws Exception {
-        checkTx1(PESSIMISTIC, REPEATABLE_READ);
-    }
+    public void testEmptyTx() throws Exception {
+        Ignite node = startGrids(2);
 
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOptimisticSerializableTx1() throws Exception {
-        checkTx1(OPTIMISTIC, SERIALIZABLE);
-    }
+        IgniteCache cache = node.createCache(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, DFLT_PARTITION_COUNT));
 
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOptimisticRepeatableReadTx1() throws Exception {
-        checkTx1(OPTIMISTIC, REPEATABLE_READ);
+        cache.putAll(Collections.emptyMap());
+
+        IgniteTransactions txs = node.transactions();
+        try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+            tx.commit();
+        }
+        finally {
+            stopAllGrids();
+        }
     }
 
     /**
-     * @throws Exception If failed.
+     * @throws Exception if failed.
      */
-    public void testOptimisticReadCommittedTx1() throws Exception {
-        checkTx1(OPTIMISTIC, READ_COMMITTED);
+    public void testImplicitTxOps() throws Exception {
+        checkTxWithAllCaches(new CI1<IgniteCache<Integer, Integer>>() {
+            @Override public void apply(IgniteCache<Integer, Integer> cache) {
+                try {
+                    List<Integer> keys = testKeys(cache);
+
+                    for (Integer key : keys) {
+                        log.info("Test key: " + key);
+
+                        Integer val = cache.get(key);
+
+                        assertNull(val);
+
+                        assertFalse(cache.containsKey(key));
+
+                        cache.put(key, -1);
+
+                        val = (Integer)checkAndGet(true, cache, key, GET, SCAN);
+
+                        assertEquals(Integer.valueOf(-1), val);
+
+                        assertTrue(cache.containsKey(key));
+
+                        cache.put(key, key);
+
+                        val = (Integer)checkAndGet(true, cache, key, GET, SCAN);
+
+                        assertEquals(key, val);
+
+                        cache.remove(key);
+
+                        val = cache.get(key);
+
+                        assertNull(val);
+
+                        val = (Integer)checkAndGet(false, cache, key, SCAN, GET);
+
+                        assertNull(val);
+
+                        assertTrue(cache.putIfAbsent(key, key));
+
+                        val = (Integer)checkAndGet(true, cache, key, GET, SCAN);
+
+                        assertEquals(key, val);
+
+                        val = cache.getAndReplace(key, -1);
+
+                        assertEquals(key, val);
+
+                        val = (Integer)checkAndGet(true, cache, key, GET, SCAN);
+
+                        assertEquals(Integer.valueOf(-1), val);
+
+                        val = cache.getAndRemove(key);
+
+                        assertEquals(Integer.valueOf(-1), val);
+
+                        val = cache.get(key);
+
+                        assertNull(val);
+
+                        val = (Integer)checkAndGet(false, cache, key, SCAN, GET);
+
+                        assertNull(val);
+                    }
+                }
+                catch (Exception e) {
+                    throw new IgniteException(e);
+                }
+            }
+        });
     }
 
     /**
-     * @param concurrency Transaction concurrency.
-     * @param isolation Transaction isolation.
      * @throws Exception If failed.
      */
-    private void checkTx1(final TransactionConcurrency concurrency, final TransactionIsolation isolation)
-        throws Exception {
+    public void testPessimisticTx1() throws Exception {
         checkTxWithAllCaches(new CI1<IgniteCache<Integer, Integer>>() {
             @Override public void apply(IgniteCache<Integer, Integer> cache) {
                 try {
@@ -161,7 +221,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                     for (Integer key : keys) {
                         log.info("Test key: " + key);
 
-                        try (Transaction tx = txs.txStart(concurrency, isolation)) {
+                        try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                             Integer val = cache.get(key);
 
                             assertNull(val);
@@ -191,23 +251,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testPessimisticTx2() throws Exception {
-        checkTx2(PESSIMISTIC, REPEATABLE_READ);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOptimisticSerializableTx2() throws Exception {
-        checkTx2(OPTIMISTIC, SERIALIZABLE);
-    }
-
-    /**
-     * @param concurrency Transaction concurrency.
-     * @param isolation Transaction isolation.
-     * @throws Exception If failed.
-     */
-    private void checkTx2(final TransactionConcurrency concurrency, final TransactionIsolation isolation)
-        throws Exception {
         checkTxWithAllCaches(new CI1<IgniteCache<Integer, Integer>>() {
             @Override public void apply(IgniteCache<Integer, Integer> cache) {
                 try {
@@ -218,7 +261,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                     for (Integer key : keys) {
                         log.info("Test key: " + key);
 
-                        try (Transaction tx = txs.txStart(concurrency, isolation)) {
+                        try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                             cache.put(key, key);
                             cache.put(key + 1, key + 1);
 
@@ -394,7 +437,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                         keys.add(rnd.nextInt());
 
                     if (tx) {
-                        try (Transaction tx = txs.txStart(OPTIMISTIC, SERIALIZABLE)) {
+                        try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                             cache.getAll(keys);
 
                             if (rnd.nextBoolean())
@@ -417,8 +460,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxReadIsolationSimple() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-7764");
-
         Ignite srv0 = startGrids(4);
 
         client = true;
@@ -453,37 +494,23 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                         @Override public Void call() throws Exception {
                             IgniteCache<Object, Object> cache = node.cache(DEFAULT_CACHE_NAME);
 
-                            try (Transaction tx = node.transactions().txStart(OPTIMISTIC, isolation)) {
+                            try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                                 assertEquals(0, checkAndGet(false, cache, 0, SCAN, GET));
 
                                 readStart.countDown();
 
                                 assertTrue(readProceed.await(5, TimeUnit.SECONDS));
 
-                                if (isolation == READ_COMMITTED) {
-                                    assertNull(checkAndGet(false, cache, 1, SCAN, GET));
-
-                                    assertEquals(1, checkAndGet(false, cache, 2, SCAN, GET));
-
-                                    Map<Object, Object> res = checkAndGetAll(false, cache, startVals.keySet(), SCAN, GET);
-
-                                    assertEquals(startVals.size() / 2, res.size());
+                                assertEquals(0, checkAndGet(true, cache, 1, GET, SCAN));
 
-                                    for (Map.Entry<Object, Object> e : res.entrySet())
-                                        assertEquals("Invalid value for key: " + e.getKey(), 1, e.getValue());
-                                }
-                                else {
-                                    assertEquals(0, checkAndGet(true, cache, 1, GET, SCAN));
-
-                                    assertEquals(0, checkAndGet(true, cache, 2, GET, SCAN));
+                                assertEquals(0, checkAndGet(true, cache, 2, GET, SCAN));
 
-                                    Map<Object, Object> res = checkAndGetAll(true, cache, startVals.keySet(), GET, SCAN);
+                                Map<Object, Object> res = checkAndGetAll(true, cache, startVals.keySet(), GET, SCAN);
 
-                                    assertEquals(startVals.size(), res.size());
+                                assertEquals(startVals.size(), res.size());
 
-                                    for (Map.Entry<Object, Object> e : res.entrySet())
-                                        assertEquals("Invalid value for key: " + e.getKey(), 0, e.getValue());
-                                }
+                                for (Map.Entry<Object, Object> e : res.entrySet())
+                                    assertEquals("Invalid value for key: " + e.getKey(), 0, e.getValue());
 
                                 tx.rollback();
                             }
@@ -589,8 +616,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
     }
 
     /**
-     * @throws Exception If failed.
      * @param largeKeys {@code True} to use large keys (not fitting in single page).
+     * @throws Exception If failed.
      */
     private void putRemoveSimple(boolean largeKeys) throws Exception {
         Ignite node = startGrid(0);
@@ -771,6 +798,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testWaitPreviousTxAck() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         testSpi = true;
 
         startGrid(0);
@@ -1032,11 +1061,10 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             @Override public Void call() throws Exception {
                 IgniteCache<Integer, Integer> cache = client.cache(srvCache.getName());
 
-
                 Map<Integer, Integer> vals;
 
                 if (inTx) {
-                    try (Transaction tx = client.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) {
+                    try (Transaction tx = client.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         vals = checkAndGetAll(false, cache, F.asSet(key1, key2), SCAN, GET);
 
                         tx.rollback();
@@ -1085,6 +1113,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testCleanupWaitsForGet2() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
         /*
         Simulate case when there are two active transactions modifying the same key
         (it is possible if key lock is released but ack message is delayed), and at this moment
@@ -1430,8 +1459,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 2, 1, 64, null, SCAN, PUT);
     }
 
-
-
     /**
      * @throws Exception If failed.
      */
@@ -1576,79 +1603,35 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testPessimisticTxGetAllReadsSnapshot_SingleNode_SinglePartition() throws Exception {
-        txReadsSnapshot(1, 0, 0, 1, true, GET);
+        txReadsSnapshot(1, 0, 0, 1, GET);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPessimisticTxGetAllReadsSnapshot_ClientServer() throws Exception {
-        txReadsSnapshot(4, 2, 1, 64, true, GET);
+        txReadsSnapshot(4, 2, 1, 64, GET);
     }
 
     /**
      * @throws Exception If failed.
      */
-    public void testOptimisticTxGetAllReadsSnapshot_SingleNode() throws Exception {
-        txReadsSnapshot(1, 0, 0, 64, false, GET);
+    public void testPessimisticTxScanReadsSnapshot_SingleNode_SinglePartition() throws Exception {
+        txReadsSnapshot(1, 0, 0, 1, SCAN);
     }
 
     /**
      * @throws Exception If failed.
      */
-    public void testOptimisticTxGetAllReadsSnapshot_SingleNode_SinglePartition() throws Exception {
-        txReadsSnapshot(1, 0, 0, 1, false, GET);
+    public void testPessimisticTxScanReadsSnapshot_ClientServer() throws Exception {
+        txReadsSnapshot(4, 2, 1, 64, SCAN);
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testOptimisticTxGetAllReadsSnapshot_ClientServer() throws Exception {
-        txReadsSnapshot(4, 2, 1, 64, false, GET);
-    }
-
-//    TODO: IGNITE-7371
-//    /**
-//     * @throws Exception If failed.
-//     */
-//    public void testPessimisticTxScanReadsSnapshot_SingleNode_SinglePartition() throws Exception {
-//        txReadsSnapshot(1, 0, 0, 1, true, SCAN);
-//    }
-//
-//    /**
-//     * @throws Exception If failed.
-//     */
-//    public void testPessimisticTxScanReadsSnapshot_ClientServer() throws Exception {
-//        txReadsSnapshot(4, 2, 1, 64, true, SCAN);
-//    }
-//
-//    /**
-//     * @throws Exception If failed.
-//     */
-//    public void testOptimisticTxScanReadsSnapshot_SingleNode() throws Exception {
-//        txReadsSnapshot(1, 0, 0, 64, false, SCAN);
-//    }
-//
-//    /**
-//     * @throws Exception If failed.
-//     */
-//    public void testOptimisticTxScanReadsSnapshot_SingleNode_SinglePartition() throws Exception {
-//        txReadsSnapshot(1, 0, 0, 1, false, SCAN);
-//    }
-//
-//    /**
-//     * @throws Exception If failed.
-//     */
-//    public void testOptimisticTxScanReadsSnapshot_ClientServer() throws Exception {
-//        txReadsSnapshot(4, 2, 1, 64, false, SCAN);
-//    }
-
-    /**
      * @param srvs Number of server nodes.
      * @param clients Number of client nodes.
      * @param cacheBackups Number of cache backups.
      * @param cacheParts Number of cache partitions.
-     * @param pessimistic If {@code true} uses pessimistic tx, otherwise optimistic.
      * @param readMode Read mode.
      * @throws Exception If failed.
      */
@@ -1657,9 +1640,10 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         final int clients,
         int cacheBackups,
         int cacheParts,
-        final boolean pessimistic,
         ReadMode readMode
     ) throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         final int ACCOUNTS = 20;
 
         final int ACCOUNT_START_VAL = 1000;
@@ -1668,18 +1652,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
         final int readers = 4;
 
-        final TransactionConcurrency concurrency;
-        final TransactionIsolation isolation;
-
-        if (pessimistic) {
-            concurrency = PESSIMISTIC;
-            isolation = REPEATABLE_READ;
-        }
-        else {
-            concurrency = OPTIMISTIC;
-            isolation = SERIALIZABLE;
-        }
-
         final IgniteInClosure<IgniteCache<Object, Object>> init = new IgniteInClosure<IgniteCache<Object, Object>>() {
             @Override public void apply(IgniteCache<Object, Object> cache) {
                 final IgniteTransactions txs = cache.unwrap(Ignite.class).transactions();
@@ -1689,7 +1661,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                 for (int i = 0; i < ACCOUNTS; i++)
                     accounts.put(i, new MvccTestAccount(ACCOUNT_START_VAL, 1));
 
-                try (Transaction tx = txs.txStart(concurrency, isolation)) {
+                try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                     cache.putAll(accounts);
 
                     tx.commit();
@@ -1718,7 +1690,13 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                             while (id1.equals(id2))
                                 id2 = rnd.nextInt(ACCOUNTS);
 
-                            TreeSet<Integer> keys = new TreeSet<>();
+                            if(id1 > id2) {
+                                int tmp = id1;
+                                id1 = id2;
+                                id2 = tmp;
+                            }
+
+                            Set<Integer> keys = new HashSet<>();
 
                             keys.add(id1);
                             keys.add(id2);
@@ -1763,88 +1741,36 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
                         Map<Integer, MvccTestAccount> accounts = new HashMap<>();
 
-                        if (pessimistic) {
-                            try (Transaction tx = txs.txStart(concurrency, isolation)) {
-                                int remaining = ACCOUNTS;
-
-                                do {
-                                    int readCnt = rnd.nextInt(remaining) + 1;
-
-                                    Set<Integer> readKeys = new TreeSet<>();
-
-                                    for (int i = 0; i < readCnt; i++)
-                                        readKeys.add(accounts.size() + i);
+                        try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                            int remaining = ACCOUNTS;
 
-                                    Map<Integer, MvccTestAccount> readRes =
-                                        checkAndGetAll(false, cache.cache, readKeys, readMode);
+                            do {
+                                int readCnt = rnd.nextInt(remaining) + 1;
 
-                                    assertEquals(readCnt, readRes.size());
+                                Set<Integer> readKeys = new TreeSet<>();
 
-                                    accounts.putAll(readRes);
+                                for (int i = 0; i < readCnt; i++)
+                                    readKeys.add(accounts.size() + i);
 
-                                    remaining = ACCOUNTS - accounts.size();
-                                }
-                                while (remaining > 0);
+                                Map<Integer, MvccTestAccount> readRes =
+                                    checkAndGetAll(false, cache.cache, readKeys, readMode);
 
-                                validateSum(accounts);
+                                assertEquals(readCnt, readRes.size());
 
-                                tx.commit();
+                                accounts.putAll(readRes);
 
-                                cnt++;
+                                remaining = ACCOUNTS - accounts.size();
                             }
-                            finally {
-                                cache.readUnlock();
-                            }
-                        }
-                        else {
-                            try (Transaction tx = txs.txStart(concurrency, isolation)) {
-                                int remaining = ACCOUNTS;
-
-                                do {
-                                    int readCnt = rnd.nextInt(remaining) + 1;
-
-                                    if (rnd.nextInt(3) == 0) {
-                                        for (int i = 0; i < readCnt; i++) {
-                                            Integer key = rnd.nextInt(ACCOUNTS);
-
-                                            MvccTestAccount account =
-                                                (MvccTestAccount)checkAndGet(false, cache.cache, key, readMode);
-
-                                            assertNotNull(account);
-
-                                            accounts.put(key, account);
-                                        }
-                                    }
-                                    else {
-                                        Set<Integer> readKeys = new LinkedHashSet<>();
-
-                                        for (int i = 0; i < readCnt; i++)
-                                            readKeys.add(rnd.nextInt(ACCOUNTS));
-
-                                        Map<Integer, MvccTestAccount> readRes =
-                                            checkAndGetAll(false, cache.cache, readKeys, readMode);
+                            while (remaining > 0);
 
-                                        assertEquals(readKeys.size(), readRes.size());
-
-                                        accounts.putAll(readRes);
-                                    }
+                            validateSum(accounts);
 
-                                    remaining = ACCOUNTS - accounts.size();
-                                }
-                                while (remaining > 0);
-
-                                validateSum(accounts);
-
-                                cnt++;
+                            tx.commit();
 
-                                tx.commit();
-                            }
-                            catch (TransactionOptimisticException ignore) {
-                                // No-op.
-                            }
-                            finally {
-                                cache.readUnlock();
-                            }
+                            cnt++;
+                        }
+                        finally {
+                            cache.readUnlock();
                         }
                     }
 
@@ -1954,9 +1880,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int cacheBackups,
         int cacheParts,
         ReadMode readMode
-    )
-        throws Exception
-    {
+    ) throws Exception {
         final int writers = 4;
 
         final int readers = 4;
@@ -2103,50 +2027,26 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                     ThreadLocalRandom rnd = ThreadLocalRandom.current();
 
                     Map<Integer, Integer> map = new TreeMap<>();
+                    Set<Integer> keys = new LinkedHashSet();
 
                     int cnt = 0;
 
                     while (!stop.get()) {
-                        int keys = rnd.nextInt(32) + 1;
+                        int keysCnt = rnd.nextInt(32) + 1;
 
-                        while (map.size() < keys)
-                            map.put(rnd.nextInt(KEYS), cnt);
+                        while (keys.size() < keysCnt) {
+                            int key = rnd.nextInt(KEYS);
+
+                            if(keys.add(key))
+                                map.put(key, cnt);
+                        }
 
                         TestCache<Integer, Integer> cache = randomCache(caches, rnd);
 
                         try {
                             IgniteTransactions txs = cache.cache.unwrap(Ignite.class).transactions();
 
-                            TransactionConcurrency concurrency;
-                            TransactionIsolation isolation;
-
-                            switch (rnd.nextInt(3)) {
-                                case 0: {
-                                    concurrency = PESSIMISTIC;
-                                    isolation = REPEATABLE_READ;
-
-                                    break;
-                                }
-                                case 1: {
-                                    concurrency = OPTIMISTIC;
-                                    isolation = REPEATABLE_READ;
-
-                                    break;
-                                }
-                                case 2: {
-                                    concurrency = OPTIMISTIC;
-                                    isolation = SERIALIZABLE;
-
-                                    break;
-                                }
-                                default: {
-                                    fail();
-
-                                    return;
-                                }
-                            }
-
-                            try (Transaction tx = txs.txStart(concurrency, isolation)) {
+                            try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                                 if (rnd.nextBoolean()) {
                                     Map<Integer, Integer> res = checkAndGetAll(false, cache.cache, map.keySet(),
                                         rnd.nextBoolean() ? GET : SCAN);
@@ -2158,18 +2058,16 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
                                 tx.commit();
                             }
-                            catch (TransactionOptimisticException e) {
-                                assertEquals(SERIALIZABLE, isolation);
-                            }
                             catch (Exception e) {
                                 Assert.assertTrue("Unexpected error: " + e, X.hasCause(e, ClusterTopologyException.class));
                             }
                         }
                         finally {
                             cache.readUnlock();
-                        }
 
-                        map.clear();
+                            keys.clear();
+                            map.clear();
+                        }
 
                         cnt++;
                     }
@@ -2282,7 +2180,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
         Ignite srv0 = startGrid(0);
 
-        IgniteCache<Integer, Integer> cache =  (IgniteCache)srv0.createCache(
+        IgniteCache<Integer, Integer> cache = (IgniteCache)srv0.createCache(
             cacheConfiguration(PARTITIONED, FULL_SYNC, 0, DFLT_PARTITION_COUNT));
 
         Map<Integer, Integer> map;
@@ -2413,32 +2311,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxPrepareFailureSimplePessimisticTx() throws Exception {
-        txPrepareFailureSimple(PESSIMISTIC, REPEATABLE_READ);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxPrepareFailureSimpleSerializableTx() throws Exception {
-        txPrepareFailureSimple(OPTIMISTIC, SERIALIZABLE);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxPrepareFailureSimpleOptimisticTx() throws Exception {
-        txPrepareFailureSimple(OPTIMISTIC, REPEATABLE_READ);
-    }
-
-    /**
-     * @param concurrency Transaction concurrency.
-     * @param isolation Transaction isolation.
-     * @throws Exception If failed.
-     */
-    private void txPrepareFailureSimple(
-        final TransactionConcurrency concurrency,
-        final TransactionIsolation isolation
-    ) throws Exception {
         testSpi = true;
 
         startGrids(3);
@@ -2460,7 +2332,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() {
             @Override public Object call() throws Exception {
                 try {
-                    try (Transaction tx = client.transactions().txStart(concurrency, isolation)) {
+                    try (Transaction tx = client.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         cache.put(key1, 1);
                         cache.put(key2, 2);
 
@@ -2477,7 +2349,16 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             }
         }, "tx-thread");
 
-        srv1Spi.waitForBlocked();
+        GridTestUtils.waitForCondition(
+            new GridAbsPredicate() {
+                @Override public boolean apply() {
+                    return srv1Spi.hasBlockedMessages() || fut.isDone() && fut.error() != null;
+                }
+            }, 10_000
+        );
+
+        if (fut.isDone())
+            fut.get(); // Just to fail with future error.
 
         assertFalse(fut.isDone());
 
@@ -2488,7 +2369,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         assertNull(cache.get(key1));
         assertNull(cache.get(key2));
 
-        try (Transaction tx = client.transactions().txStart(concurrency, isolation)) {
+        try (Transaction tx = client.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
             cache.put(key1, 1);
             cache.put(key2, 2);
 
@@ -2502,64 +2383,9 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    public void testSerializableTxRemap() throws Exception {
-        testSpi = true;
-
-        startGrids(2);
-
-        client = true;
-
-        final Ignite client = startGrid(2);
-
-        final IgniteCache cache = client.createCache(
-            cacheConfiguration(PARTITIONED, FULL_SYNC, 0, DFLT_PARTITION_COUNT));
-
-        final Map<Object, Object> vals = new HashMap<>();
-
-        for (int i = 0; i < 100; i++)
-            vals.put(i, i);
-
-        TestRecordingCommunicationSpi clientSpi = TestRecordingCommunicationSpi.spi(ignite(2));
-
-        clientSpi.blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
-            @Override public boolean apply(ClusterNode node, Message msg) {
-                return msg instanceof GridNearTxPrepareRequest;
-            }
-        });
-
-        IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() {
-            @Override public Object call() throws Exception {
-                try (Transaction tx = client.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) {
-                    cache.putAll(vals);
-
-                    tx.commit();
-                }
-
-                return null;
-            }
-        }, "tx-thread");
-
-        clientSpi.waitForBlocked(2);
-
-        this.client = false;
-
-        startGrid(3);
-
-        assertFalse(fut.isDone());
-
-        clientSpi.stopBlock();
-
-        fut.get();
-
-        for (Ignite node : G.allGrids())
-            checkValues(vals, node.cache(cache.getName()));
-    }
-
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testMvccCoordinatorChangeSimple() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9722");
+
         Ignite srv0 = startGrid(0);
 
         final List<String> cacheNames = new ArrayList<>();
@@ -2624,19 +2450,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         for (int i = 0; i < 10; i++)
             vals.put(i, val);
 
-        TransactionConcurrency concurrency;
-        TransactionIsolation isolation;
-
-        if (ThreadLocalRandom.current().nextBoolean()) {
-            concurrency = PESSIMISTIC;
-            isolation = REPEATABLE_READ;
-        }
-        else {
-            concurrency = OPTIMISTIC;
-            isolation = SERIALIZABLE;
-        }
-
-        try (Transaction tx = putNode.transactions().txStart(concurrency, isolation)) {
+        try (Transaction tx = putNode.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
             for (String cacheName : cacheNames)
                 putNode.cache(cacheName).putAll(vals);
 
@@ -2906,8 +2720,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws Exception If failed.
      */
     public void testUpdate_N_Objects_ClientServer_Backups1_Scan() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-7764");
-
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
@@ -2924,7 +2736,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         doImplicitPartsScanTest(1, 0, 0, 1, 10_000);
     }
 
-
     /**
      * @throws Exception If failed.
      */
@@ -2967,6 +2778,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int cacheBackups,
         int cacheParts,
         long time) throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         final int KEYS_PER_PART = 20;
 
         final int writers = 4;
@@ -3033,6 +2846,12 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                         while (k1.equals(k2))
                             k2 = partKeys.get(rnd.nextInt(KEYS_PER_PART));
 
+                        if(k1 > k2) {
+                            int tmp = k1;
+                            k1 = k2;
+                            k2 = tmp;
+                        }
+
                         TreeSet<Integer> keys = new TreeSet<>();
 
                         keys.add(k1);
@@ -3074,7 +2893,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
                             ScanQuery<Integer, MvccTestAccount> qry = new ScanQuery<>(part);
 
-                            List<Cache.Entry<Integer, MvccTestAccount>> res =  cache.cache.query(qry).getAll();
+                            List<Cache.Entry<Integer, MvccTestAccount>> res = cache.cache.query(qry).getAll();
 
                             int sum = 0;
 
@@ -3100,7 +2919,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                             try {
                                 ScanQuery<Integer, MvccTestAccount> qry = new ScanQuery<>();
 
-                                List<Cache.Entry<Integer, MvccTestAccount>> res =  cache.cache.query(qry).getAll();
+                                List<Cache.Entry<Integer, MvccTestAccount>> res = cache.cache.query(qry).getAll();
 
                                 int sum = 0;
 
@@ -3140,8 +2959,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @throws IgniteCheckedException If failed.
      */
     public void testSize() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-9451");
-
         Ignite node = startGrid(0);
 
         IgniteCache cache = node.createCache(cacheConfiguration(PARTITIONED, FULL_SYNC, 0, 1));
@@ -3150,6 +2967,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
         final int KEYS = 10;
 
+        // Initial put.
         for (int i = 0; i < KEYS; i++) {
             final Integer key = i;
 
@@ -3162,6 +2980,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             assertEquals(i + 1, cache.size());
         }
 
+        // Update.
         for (int i = 0; i < KEYS; i++) {
             final Integer key = i;
 
@@ -3176,6 +2995,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
         int size = KEYS;
 
+        // Remove.
         for (int i = 0; i < KEYS; i++) {
             if (i % 2 == 0) {
                 final Integer key = i;
@@ -3207,6 +3027,48 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             }
         }
 
+        // Check rollback create.
+        for (int i = 0; i < KEYS; i++) {
+            if (i % 2 == 0) {
+                final Integer key = i;
+
+                try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                    cache.put(key, i);
+
+                    tx.rollback();
+                }
+
+                assertEquals(size, cache.size());
+            }
+        }
+
+        // Check rollback update.
+        for (int i = 0; i < KEYS; i++) {
+            final Integer key = i;
+
+            try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                cache.put(key, -1);
+
+                tx.rollback();
+            }
+
+            assertEquals(size, cache.size());
+        }
+
+        // Check rollback remove.
+        for (int i = 0; i < KEYS; i++) {
+            final Integer key = i;
+
+            try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                cache.remove(key);
+
+                tx.rollback();
+            }
+
+            assertEquals(size, cache.size());
+        }
+
+        // Restore original state.
         for (int i = 0; i < KEYS; i++) {
             if (i % 2 == 0) {
                 final Integer key = i;
@@ -3222,6 +3084,10 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
                 assertEquals(size, cache.size());
             }
         }
+
+        // Check state.
+        for (int i = 0; i < KEYS; i++)
+            assertEquals(i, cache.get(i));
     }
 
     /**
@@ -3467,7 +3333,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @param readModes Read modes to check.
      * @return Value.
      */
-    private Object checkAndGet(boolean inTx, IgniteCache cache, Object key, ReadMode ... readModes) {
+    private Object checkAndGet(boolean inTx, IgniteCache cache, Object key, ReadMode... readModes) {
         assert readModes != null && readModes.length > 0;
 
         if (inTx)
@@ -3531,13 +3397,12 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         }
     }
 
-
     /**
      * Checks values obtained with different read modes.
      * And returns value in case of it's equality for all read modes.
      * Do not use in tests with writers contention.
      *
-     * // TODO remove inTx flag in IGNITE-7764
+     * // TODO remove inTx flag in IGNITE-6938
      * @param inTx Flag whether current read is inside transaction.
      * This is because reads can't see writes made in current transaction.
      * @param cache Cache.
@@ -3545,7 +3410,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @param readModes Read modes to check.
      * @return Value.
      */
-    private Map checkAndGetAll(boolean inTx, IgniteCache cache, Set keys, ReadMode ... readModes) {
+    private Map checkAndGetAll(boolean inTx, IgniteCache cache, Set keys, ReadMode... readModes) {
         assert readModes != null && readModes.length > 0;
 
         if (inTx)
@@ -3571,11 +3436,10 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         return prevVal;
     }
 
-
     /**
      * Reads value from cache for the given key using given read mode.
      *
-     * // TODO IGNITE-7764 remove inTx flag
+     * // TODO IGNITE-6938 remove inTx flag
      * // TODO IGNITE-6739 add SQL-get support "select _key, _val from cache where _key in ... keySet"
      * @param inTx Flag whether current read is inside transaction.
      * This is because reads can't see writes made in current transaction.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
index d7948bd..381d9a9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java
@@ -76,6 +76,11 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest
     }
 
     /** {@inheritDoc} */
+    @Override public void testFlushTimeout() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9321");
+    }
+
+    /** {@inheritDoc} */
     @Override public void testLocal() throws Exception {
         // Do not check local caches with MVCC enabled.
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
index ca22b56..1b85d33 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
@@ -42,7 +42,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.configuration.TopologyValidator;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.cache.MapCacheStoreStrategy;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller;
 
 import static org.apache.ignite.internal.util.lang.GridFunc.asArray;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DhtResultSetEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DhtResultSetEnlistFuture.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DhtResultSetEnlistFuture.java
index 1d382f7..7f22107 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DhtResultSetEnlistFuture.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DhtResultSetEnlistFuture.java
@@ -20,8 +20,8 @@ package org.apache.ignite.internal.processors.query.h2;
 import java.sql.ResultSet;
 import java.util.UUID;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxAbstractEnlistFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxQueryAbstractEnlistFuture;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.query.UpdateSourceIterator;
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  *
  */
-public class DhtResultSetEnlistFuture extends GridDhtTxAbstractEnlistFuture implements ResultSetEnlistFuture  {
+public class DhtResultSetEnlistFuture extends GridDhtTxQueryAbstractEnlistFuture implements ResultSetEnlistFuture  {
     /** */
     private ResultSet rs;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/NearResultSetEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/NearResultSetEnlistFuture.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/NearResultSetEnlistFuture.java
index 1856430..968a856 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/NearResultSetEnlistFuture.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/NearResultSetEnlistFuture.java
@@ -32,9 +32,6 @@ import org.jetbrains.annotations.Nullable;
  *
  */
 public class NearResultSetEnlistFuture extends GridNearTxQueryResultsEnlistFuture implements ResultSetEnlistFuture  {
-    /** */
-    private static final long serialVersionUID = 877907044489718378L;
-
     /**
      * @param nearNodeId   Near node ID.
      * @param nearLockVer  Near lock version.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
index 8c6f407..76f8013 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
@@ -132,6 +132,8 @@ public class SqlTransactionsCommandsWithMvccEnabledSelfTest extends AbstractSche
      * Test that attempting to perform various SQL operations within non SQL transaction yields an exception.
      */
     public void testSqlOperationsWithinNonSqlTransaction() {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         assertSqlOperationWithinNonSqlTransactionThrows("COMMIT");
 
         assertSqlOperationWithinNonSqlTransactionThrows("ROLLBACK");
@@ -230,8 +232,8 @@ public class SqlTransactionsCommandsWithMvccEnabledSelfTest extends AbstractSche
 
                     return null;
                 }
-            }, IgniteCheckedException.class,
-                "SQL queries and cache operations may not be used in the same transaction.");
+            }, UnsupportedOperationException.class,
+                "operations are not supported on transactional caches when MVCC is enabled.");
         }
         finally {
             try {
@@ -266,78 +268,6 @@ public class SqlTransactionsCommandsWithMvccEnabledSelfTest extends AbstractSche
      */
     @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
     public void testCacheOperationsFromSqlTransaction() {
-        checkCacheOperationThrows("get", 1);
-
-        checkCacheOperationThrows("getAsync", 1);
-
-        checkCacheOperationThrows("getEntry", 1);
-
-        checkCacheOperationThrows("getEntryAsync", 1);
-
-        checkCacheOperationThrows("getAndPut", 1, 1);
-
-        checkCacheOperationThrows("getAndPutAsync", 1, 1);
-
-        checkCacheOperationThrows("getAndPutIfAbsent", 1, 1);
-
-        checkCacheOperationThrows("getAndPutIfAbsentAsync", 1, 1);
-
-        checkCacheOperationThrows("getAndReplace", 1, 1);
-
-        checkCacheOperationThrows("getAndReplaceAsync", 1, 1);
-
-        checkCacheOperationThrows("getAndRemove", 1);
-
-        checkCacheOperationThrows("getAndRemoveAsync", 1);
-
-        checkCacheOperationThrows("containsKey", 1);
-
-        checkCacheOperationThrows("containsKeyAsync", 1);
-
-        checkCacheOperationThrows("put", 1, 1);
-
-        checkCacheOperationThrows("putAsync", 1, 1);
-
-        checkCacheOperationThrows("putIfAbsent", 1, 1);
-
-        checkCacheOperationThrows("putIfAbsentAsync", 1, 1);
-
-        checkCacheOperationThrows("remove", 1);
-
-        checkCacheOperationThrows("removeAsync", 1);
-
-        checkCacheOperationThrows("remove", 1, 1);
-
-        checkCacheOperationThrows("removeAsync", 1, 1);
-
-        checkCacheOperationThrows("replace", 1, 1);
-
-        checkCacheOperationThrows("replaceAsync", 1, 1);
-
-        checkCacheOperationThrows("replace", 1, 1, 1);
-
-        checkCacheOperationThrows("replaceAsync", 1, 1, 1);
-
-        checkCacheOperationThrows("getAll", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("containsKeys", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("getEntries", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("putAll", Collections.singletonMap(1, 1));
-
-        checkCacheOperationThrows("removeAll", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("getAllAsync", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("containsKeysAsync", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("getEntriesAsync", new HashSet<>(Arrays.asList(1, 2)));
-
-        checkCacheOperationThrows("putAllAsync", Collections.singletonMap(1, 1));
-
-        checkCacheOperationThrows("removeAllAsync", new HashSet<>(Arrays.asList(1, 2)));
-
         checkCacheOperationThrows("invoke", 1, ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
 
         checkCacheOperationThrows("invoke", 1, CACHE_ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java
index 5c81974..00c748e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java
@@ -96,6 +96,8 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc
      *
      */
     public void testSelectForUpdateDistributed() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9724");
+
         doTestSelectForUpdateDistributed("Person", false);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
index 796c0bb..4ea53e0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
@@ -151,6 +151,8 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT
      * @throws Exception If failed.
      */
     private void updateSingleValue(boolean singleNode, final boolean locQry) throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9540");
+
         final int VALS = 100;
 
         final int writers = 4;
@@ -377,6 +379,8 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT
      * @throws Exception If failed.
      */
     private void joinTransactional(boolean singleNode, final boolean distributedJoin) throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         final int KEYS = 100;
 
         final int writers = 4;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java
index b881f02..7076362 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java
@@ -1120,6 +1120,8 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac
      * @throws Exception If failed.
      */
     public void testQueryInsertUpdateMultithread() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
+
         ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT)
             .setIndexedTypes(Integer.class, Integer.class);
 
@@ -1196,14 +1198,17 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac
             }
         }, 1));
 
-        fut.markInitialized();
-
         try {
+            fut.markInitialized();
+
             fut.get(TX_TIMEOUT);
         }
         catch (IgniteCheckedException e) {
             onException(ex, e);
         }
+        finally {
+            phaser.forceTermination();
+        }
 
         Exception ex0 = ex.get();
 
@@ -1248,7 +1253,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac
                     try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         tx.timeout(TX_TIMEOUT);
 
-                        barrier.await();
+                        barrier.await(TX_TIMEOUT, TimeUnit.MILLISECONDS);
 
                         IgniteCache<Object, Object> cache0 = node.cache(DEFAULT_CACHE_NAME);
 
@@ -1262,7 +1267,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac
                             }
                         }
 
-                        barrier.await();
+                        barrier.await(TX_TIMEOUT, TimeUnit.MILLISECONDS);
 
                         qry = new SqlFieldsQuery("UPDATE Integer SET _val = (_key * 10)");
 
@@ -1820,7 +1825,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac
         do {
             p = phaser.arriveAndAwaitAdvance();
         }
-        while (p < phase);
+        while (p < phase && p >= 0 /* check termination */ );
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
new file mode 100644
index 0000000..46aeaa1
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
@@ -0,0 +1,441 @@
+/*
+ * 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.internal.processors.cache.mvcc;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteTransactions;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET;
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL;
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.DML;
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.PUT;
+
+/**
+ * Test basic mvcc bulk cache operations.
+ */
+public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return CacheMode.PARTITIONED;
+    }
+
+    /** */
+    private int nodesCount() {
+        return 4;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        cleanPersistenceDir();
+
+        startGridsMultiThreaded(nodesCount() - 1);
+
+        client = true;
+
+        startGrid(nodesCount() - 1);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+
+        cleanPersistenceDir();
+
+        super.afterTestsStopped();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        grid(0).createCache(cacheConfiguration(cacheMode(), FULL_SYNC, 1, 32).
+            setIndexedTypes(Integer.class, MvccTestAccount.class));
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        grid(0).destroyCache(DEFAULT_CACHE_NAME);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationGetPut() throws Exception {
+        checkOperations(GET, GET, PUT, true);
+        checkOperations(GET, GET, PUT, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationSqlPut() throws Exception {
+        checkOperations(SQL, SQL, PUT, true);
+        checkOperations(SQL, SQL, PUT, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationSqlDml() throws Exception {
+        checkOperations(SQL, SQL, DML, true);
+        checkOperations(SQL, SQL, DML, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationGetDml() throws Exception {
+        checkOperations(GET, GET, DML, true);
+        checkOperations(GET, GET, DML, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationMixedPut() throws Exception {
+        checkOperations(SQL, GET, PUT, false);
+        checkOperations(SQL, GET, PUT, true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationMixedPut2() throws Exception {
+        checkOperations(GET, SQL, PUT, false);
+        checkOperations(GET, SQL, PUT, true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationMixedDml() throws Exception {
+        checkOperations(SQL, GET, DML, false);
+        checkOperations(SQL, GET, DML, true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testRepeatableReadIsolationMixedDml2() throws Exception {
+        checkOperations(GET, SQL, DML, false);
+        checkOperations(GET, SQL, DML, true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testOperationConsistency() throws Exception {
+        checkOperationsConsistency(PUT, false);
+        checkOperationsConsistency(DML, false);
+        checkOperationsConsistency(PUT, true);
+        checkOperationsConsistency(DML, true);
+    }
+
+    /**
+     * Checks SQL and CacheAPI operation isolation consistency.
+     *
+     * @param readModeBefore read mode used before value updated.
+     * @param readModeBefore read mode used after value updated.
+     * @param writeMode write mode used for update.
+     * @throws Exception If failed.
+     */
+    private void checkOperations(ReadMode readModeBefore, ReadMode readModeAfter,
+        WriteMode writeMode, boolean readFromClient) throws Exception {
+        Ignite node1 = grid(readFromClient ? nodesCount() - 1 : 0);
+        Ignite node2 = grid(readFromClient ? 0 : nodesCount() - 1);
+
+        TestCache<Integer, MvccTestAccount> cache1 = new TestCache<>(node1.cache(DEFAULT_CACHE_NAME));
+        TestCache<Integer, MvccTestAccount> cache2 = new TestCache<>(node2.cache(DEFAULT_CACHE_NAME));
+
+        final Set<Integer> keysForUpdate = new HashSet<>(3);
+        final Set<Integer> keysForRemove = new HashSet<>(3);
+
+        final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), keysForUpdate, keysForRemove);
+
+        final Map<Integer, MvccTestAccount> initialMap = allKeys.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        final Map<Integer, MvccTestAccount> updateMap = keysForUpdate.stream().collect(Collectors.toMap(Function.identity(),
+            k -> new MvccTestAccount(k, 2))); /* Removed keys are excluded. */
+
+        cache1.cache.putAll(initialMap);
+
+        IgniteTransactions txs1 = node1.transactions();
+        IgniteTransactions txs2 = node2.transactions();
+
+        CountDownLatch updateStart = new CountDownLatch(1);
+        CountDownLatch updateFinish = new CountDownLatch(1);
+
+        // Start concurrent transactions and check isolation.
+        IgniteInternalFuture<Void> updater = GridTestUtils.runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                updateStart.await();
+
+                try (Transaction tx = txs2.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+
+                    updateEntries(cache2, updateMap, writeMode);
+                    removeEntries(cache2, keysForRemove, writeMode);
+
+                    checkContains(cache2, true, updateMap.keySet());
+                    checkContains(cache2, false, keysForRemove);
+
+                    assertEquals(updateMap, cache2.cache.getAll(allKeys));
+
+                    tx.commit();
+                }
+
+                updateFinish.countDown();
+
+                return null;
+            }
+        });
+
+        IgniteInternalFuture<Void> reader = GridTestUtils.runAsync(new Callable<Void>() {
+            @Override public Void call() throws Exception {
+                try (Transaction tx = txs1.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+                    assertEquals(initialMap, getEntries(cache1, allKeys, readModeBefore));
+
+                    checkContains(cache1, true, allKeys);
+
+                    updateStart.countDown();
+                    updateFinish.await();
+
+                    assertEquals(initialMap, getEntries(cache1, allKeys, readModeAfter));
+
+                    checkContains(cache1, true,allKeys);
+
+                    tx.commit();
+                }
+
+                return null;
+            }
+        });
+
+        try {
+            updater.get(3_000, TimeUnit.MILLISECONDS);
+            reader.get(3_000, TimeUnit.MILLISECONDS);
+        }
+        catch (Throwable e) {
+            throw new AssertionError(e);
+        }
+        finally {
+            updateStart.countDown();
+            updateFinish.countDown();
+        }
+
+        assertEquals(updateMap, cache1.cache.getAll(allKeys));
+    }
+
+    /**
+     * Generate 2 sets of keys. Each set contains primary, backup and non-affinity key for given node cache.
+     *
+     * @param cache Cache.
+     * @param keySet1 Key set.
+     * @param keySet2 Key set.
+     * @return All keys.
+     * @throws IgniteCheckedException If failed.
+     */
+    protected Set<Integer> generateKeySet(IgniteCache<Object, Object> cache, Set<Integer> keySet1,
+        Set<Integer> keySet2) throws IgniteCheckedException {
+        LinkedHashSet<Integer> allKeys = new LinkedHashSet<>();
+
+        allKeys.addAll(primaryKeys(cache, 2));
+        allKeys.addAll(backupKeys(cache, 2, 1));
+        allKeys.addAll(nearKeys(cache, 2, 1));
+
+        List<Integer> keys0 = new ArrayList<>(allKeys);
+
+        for (int i = 0; i < 6; i++) {
+            if (i % 2 == 0)
+                keySet1.add(keys0.get(i));
+            else
+                keySet2.add(keys0.get(i));
+        }
+
+        assert allKeys.size() == 6; // Expects no duplicates.
+
+        return allKeys;
+    }
+
+    /**
+     * Checks SQL and CacheAPI operation see consistent results before and after update.
+     *
+     * @throws Exception If failed.
+     */
+    private void checkOperationsConsistency(WriteMode writeMode, boolean requestFromClient) throws Exception {
+        Ignite node = grid(requestFromClient ? nodesCount() - 1 : 0);
+
+        TestCache<Integer, MvccTestAccount> cache = new TestCache<>(node.cache(DEFAULT_CACHE_NAME));
+
+        final Set<Integer> keysForUpdate = new HashSet<>(3);
+        final Set<Integer> keysForRemove = new HashSet<>(3);
+
+        final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), keysForUpdate, keysForRemove);
+
+        int updCnt = 1;
+
+        final Map<Integer, MvccTestAccount> initialVals = allKeys.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        cache.cache.putAll(initialVals);
+
+        IgniteTransactions txs = node.transactions();
+
+        Map<Integer, MvccTestAccount> updatedVals = null;
+
+        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+            Map<Integer, MvccTestAccount> vals1 = getEntries(cache, allKeys, GET);
+            Map<Integer, MvccTestAccount> vals2 = getEntries(cache, allKeys, SQL);
+
+            assertEquals(initialVals, vals1);
+            assertEquals(initialVals, vals2);
+
+            for (ReadMode readMode : new ReadMode[] {GET, SQL}) {
+                int updCnt0 = ++updCnt;
+
+                updatedVals = keysForUpdate.stream().collect(Collectors.toMap(Function.identity(),
+                    k -> new MvccTestAccount(k, updCnt0)));
+
+                updateEntries(cache, updatedVals, writeMode);
+                removeEntries(cache, keysForRemove, writeMode);
+
+                assertEquals(String.valueOf(readMode), updatedVals, getEntries(cache, allKeys, readMode));
+            }
+
+            tx.commit();
+        }
+
+        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+            assertEquals(updatedVals, getEntries(cache, allKeys, GET));
+            assertEquals(updatedVals, getEntries(cache, allKeys, SQL));
+
+            tx.commit();
+        }
+    }
+
+    /**
+     * Gets values with given read mode.
+     *
+     * @param cache Cache.
+     * @param keys Key to be read.
+     * @param readMode Read mode.
+     * @return Key-value result map.
+     */
+    protected Map<Integer, MvccTestAccount> getEntries(
+        TestCache<Integer, MvccTestAccount> cache,
+        Set<Integer> keys,
+        ReadMode readMode) {
+        switch (readMode) {
+            case GET:
+                return cache.cache.getAll(keys);
+            case SQL:
+                return getAllSql(cache);
+            default:
+                fail();
+        }
+
+        return null;
+    }
+
+    /**
+     * Updates entries with given write mode.
+     *
+     * @param cache Cache.
+     * @param entries Entries to be updated.
+     * @param writeMode Write mode.
+     */
+    protected void updateEntries(
+        TestCache<Integer, MvccTestAccount> cache,
+        Map<Integer, MvccTestAccount> entries,
+        WriteMode writeMode) {
+        switch (writeMode) {
+            case PUT: {
+                cache.cache.putAll(entries);
+
+                break;
+            }
+            case DML: {
+                for (Map.Entry<Integer, MvccTestAccount> e : entries.entrySet())
+                    mergeSql(cache, e.getKey(), e.getValue().val, e.getValue().updateCnt);
+
+                break;
+            }
+            default:
+                fail();
+        }
+    }
+
+    /**
+     * Updates entries with given write mode.
+     *
+     * @param cache Cache.
+     * @param keys Key to be deleted.
+     * @param writeMode Write mode.
+     */
+    protected void removeEntries(
+        TestCache<Integer, MvccTestAccount> cache,
+        Set<Integer> keys,
+        WriteMode writeMode) {
+        switch (writeMode) {
+            case PUT: {
+                cache.cache.removeAll(keys);
+
+                break;
+            }
+            case DML: {
+                for (Integer key : keys)
+                    removeSql(cache, key);
+
+                break;
+            }
+            default:
+                fail();
+        }
+    }
+
+    /**
+     * Check cache contains entries.
+     *
+     * @param cache Cache.
+     * @param expected Expected result.
+     * @param keys Keys to check.
+     */
+    protected void checkContains(TestCache<Integer, MvccTestAccount> cache, boolean expected, Set<Integer> keys) {
+        assertEquals(expected, cache.cache.containsKeys(keys));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
new file mode 100644
index 0000000..c782f98
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
@@ -0,0 +1,276 @@
+/*
+ * 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.internal.processors.cache.mvcc;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteTransactions;
+import org.apache.ignite.transactions.Transaction;
+import org.apache.ignite.transactions.TransactionConcurrency;
+import org.apache.ignite.transactions.TransactionIsolation;
+
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET;
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL;
+
+/**
+ * Test basic mvcc cache operation operations.
+ */
+public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsTest {
+    /** {@inheritDoc} */
+    @Override protected Map<Integer, MvccTestAccount> getEntries(
+        TestCache<Integer, MvccTestAccount> cache,
+        Set<Integer> keys,
+        ReadMode readMode) {
+
+        switch (readMode) {
+            case GET: {
+                Map<Integer, MvccTestAccount> res = new HashMap<>();
+
+                for (Integer key : keys) {
+                    MvccTestAccount val = cache.cache.get(key);
+
+                    if(val != null)
+                        res.put(key, val);
+                }
+
+                return res;
+            }
+            case SQL:
+                return getAllSql(cache);
+            default:
+                fail();
+        }
+
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    protected void updateEntries(
+        TestCache<Integer, MvccTestAccount> cache,
+        Map<Integer, MvccTestAccount> entries,
+        WriteMode writeMode) {
+        switch (writeMode) {
+            case PUT: {
+                for (Map.Entry<Integer, MvccTestAccount> e : entries.entrySet())
+                    if (e.getValue() == null)
+                        cache.cache.remove(e.getKey());
+                    else
+                        cache.cache.put(e.getKey(), e.getValue());
+
+                break;
+            }
+            case DML: {
+                for (Map.Entry<Integer, MvccTestAccount> e : entries.entrySet()) {
+                    if (e.getValue() == null)
+                        removeSql(cache, e.getKey());
+                    else
+                        mergeSql(cache, e.getKey(), e.getValue().val, e.getValue().updateCnt);
+                }
+                break;
+            }
+            default:
+                fail();
+        }
+    }
+
+    /** {@inheritDoc} */
+    protected void removeEntries(
+        TestCache<Integer, MvccTestAccount> cache,
+        Set<Integer> keys,
+        WriteMode writeMode) {
+        switch (writeMode) {
+            case PUT: {
+                for (Integer key : keys)
+                    cache.cache.remove(key);
+
+                break;
+            }
+            case DML: {
+                for (Integer key : keys)
+                    removeSql(cache, key);
+
+                break;
+            }
+            default:
+                fail();
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void checkContains(TestCache<Integer, MvccTestAccount> cache, boolean expected,
+        Set<Integer> keys) {
+        for (Integer key : keys)
+            assertEquals(expected, cache.cache.containsKey(key));
+    }
+
+    /**
+     * Check getAndPut/getAndRemove operations consistency.
+     *
+     * @throws IgniteCheckedException If failed.
+     */
+    public void testGetAndUpdateOperations() throws IgniteCheckedException {
+        Ignite node1 = grid(0);
+
+        TestCache<Integer, MvccTestAccount> cache1 = new TestCache<>(node1.cache(DEFAULT_CACHE_NAME));
+
+        final Set<Integer> keysForUpdate = new HashSet<>(3);
+        final Set<Integer> keysForRemove = new HashSet<>(3);
+
+        final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), keysForUpdate, keysForRemove);
+
+        final Map<Integer, MvccTestAccount> initialMap = keysForRemove.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        Map<Integer, MvccTestAccount> updateMap = keysForUpdate.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 3)));
+
+        cache1.cache.putAll(initialMap);
+
+        IgniteTransactions txs = node1.transactions();
+        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+            for (Integer key : keysForUpdate) {
+                MvccTestAccount newVal1 = new MvccTestAccount(key, 1);
+
+                assertNull(cache1.cache.getAndPut(key, newVal1)); // Check create.
+
+                MvccTestAccount newVal2 = new MvccTestAccount(key, 2);
+
+                assertEquals(newVal1, cache1.cache.getAndPut(key, newVal2)); // Check update.
+            }
+
+            for (Integer key : keysForRemove) {
+                assertEquals(initialMap.get(key), cache1.cache.getAndRemove(key)); // Check remove existed.
+
+                assertNull(cache1.cache.getAndRemove(key)); // Check remove non-existed.
+            }
+
+            for (Integer key : allKeys) {
+                MvccTestAccount oldVal = new MvccTestAccount(key, 2);
+                MvccTestAccount newVal = new MvccTestAccount(key, 3);
+
+                if (keysForRemove.contains(key))
+                    assertNull(cache1.cache.getAndReplace(key, newVal)); // Omit update 'null'.
+                else
+                    assertEquals(oldVal, cache1.cache.getAndReplace(key, newVal)); // Check updated.
+            }
+
+            assertEquals(updateMap, getEntries(cache1, allKeys, SQL));
+            assertEquals(updateMap, getEntries(cache1, allKeys, GET));
+
+            tx.commit();
+        }
+
+        assertEquals(updateMap, getEntries(cache1, allKeys, SQL));
+        assertEquals(updateMap, getEntries(cache1, allKeys, GET));
+    }
+
+    /**
+     * Check getAndPut/getAndRemove operations consistency.
+     *
+     * @throws IgniteCheckedException If failed.
+     */
+    public void testPutIfAbsentConsistency() throws IgniteCheckedException {
+        Ignite node1 = grid(0);
+
+        TestCache<Integer, MvccTestAccount> cache1 = new TestCache<>(node1.cache(DEFAULT_CACHE_NAME));
+
+        final Set<Integer> keysForCreate = new HashSet<>(3);
+        final Set<Integer> keysForUpdate = new HashSet<>(3);
+
+        final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), keysForCreate, keysForUpdate);
+
+        final Map<Integer, MvccTestAccount> initialMap = keysForUpdate.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        Map<Integer, MvccTestAccount> updatedMap = allKeys.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        cache1.cache.putAll(initialMap);
+
+        IgniteTransactions txs = node1.transactions();
+        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+            for (Integer key : keysForUpdate)
+                assertFalse(cache1.cache.putIfAbsent(key, new MvccTestAccount(key, 2))); // Check update.
+
+            for (Integer key : keysForCreate)
+                assertTrue(cache1.cache.putIfAbsent(key, new MvccTestAccount(key, 1))); // Check create.
+
+            assertEquals(updatedMap, getEntries(cache1, allKeys, SQL));
+
+            tx.commit();
+        }
+
+        assertEquals(updatedMap, getEntries(cache1, allKeys, SQL));
+        assertEquals(updatedMap, getEntries(cache1, allKeys, GET));
+    }
+
+    /**
+     * Check getAndPut/getAndRemove operations consistency.
+     *
+     * @throws IgniteCheckedException If failed.
+     */
+    public void testReplaceConsistency() throws IgniteCheckedException {
+        Ignite node1 = grid(0);
+
+        TestCache<Integer, MvccTestAccount> cache1 = new TestCache<>(node1.cache(DEFAULT_CACHE_NAME));
+
+        final Set<Integer> existedKeys = new HashSet<>(3);
+        final Set<Integer> nonExistedKeys = new HashSet<>(3);
+
+        final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), existedKeys, nonExistedKeys);
+
+        final Map<Integer, MvccTestAccount> initialMap = existedKeys.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        Map<Integer, MvccTestAccount> updateMap = existedKeys.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 3)));
+
+        cache1.cache.putAll(initialMap);
+
+        IgniteTransactions txs = node1.transactions();
+        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+            for (Integer key : allKeys) {
+                MvccTestAccount newVal = new MvccTestAccount(key, 2);
+
+                if(existedKeys.contains(key)) {
+                    assertTrue(cache1.cache.replace(key, new MvccTestAccount(key, 1), newVal));
+
+                    assertEquals(newVal, cache1.cache.getAndReplace(key, new MvccTestAccount(key, 3)));
+                }
+                else {
+                    assertFalse(cache1.cache.replace(key, new MvccTestAccount(key, 1), newVal));
+
+                    assertNull(cache1.cache.getAndReplace(key, new MvccTestAccount(key, 3)));
+                }
+            }
+
+            assertEquals(updateMap, getEntries(cache1, allKeys, SQL));
+            assertEquals(updateMap, getEntries(cache1, allKeys, GET));
+
+            tx.commit();
+        }
+
+        assertEquals(updateMap, getEntries(cache1, allKeys, SQL));
+        assertEquals(updateMap, getEntries(cache1, allKeys, GET));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java
index 726c4e9..21ab2e6 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccSqlTestSuite.java
@@ -42,6 +42,8 @@ import org.apache.ignite.internal.processors.cache.mvcc.CacheMvccSqlConfiguratio
 import org.apache.ignite.internal.processors.cache.mvcc.CacheMvccSqlUpdateCountersTest;
 import org.apache.ignite.internal.processors.cache.mvcc.CacheMvccSqlLockTimeoutTest;
 import org.apache.ignite.internal.processors.cache.mvcc.CacheMvccStreamingInsertTest;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccRepeatableReadBulkOpsTest;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccRepeatableReadOperationsTest;
 import org.apache.ignite.internal.processors.query.h2.GridIndexRebuildWithMvccEnabledSelfTest;
 
 /**
@@ -64,6 +66,10 @@ public class IgniteCacheMvccSqlTestSuite extends TestSuite {
 
         suite.addTestSuite(GridIndexRebuildWithMvccEnabledSelfTest.class);
 
+        // SQL vs CacheAPI consistency.
+        suite.addTestSuite(MvccRepeatableReadOperationsTest.class);
+        suite.addTestSuite(MvccRepeatableReadBulkOpsTest.class);
+
         // JDBC tests.
         suite.addTestSuite(CacheMvccSizeWithConcurrentJdbcTransactionTest.class);
         suite.addTestSuite(CacheMvccScanQueryWithConcurrentJdbcTransactionTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
index 1f600dd..5b4106a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/IgniteConfigurationParityTest.cs
@@ -81,9 +81,8 @@ namespace Apache.Ignite.Core.Tests.ApiParity
             "TimeServerPortRange",
             "IncludeProperties",
             "isAutoActivationEnabled",  // IGNITE-7301
-            "isMvccEnabled", //TODO: IGNITE-9390: Remove when Mvcc support will be added.
-            "MvccVacuumTimeInterval", //TODO: IGNITE-9390: Remove when Mvcc support will be added.
-            "MvccVacuumThreadCnt" //TODO: IGNITE-9390: Remove when Mvcc support will be added.
+            "MvccVacuumFrequency", //TODO: IGNITE-9390: Remove when Mvcc support will be added.
+            "MvccVacuumThreadCount" //TODO: IGNITE-9390: Remove when Mvcc support will be added.
         };
 
         /// <summary>


[30/50] [abbrv] ignite git commit: Added Kubernetes configs for AWS EKS

Posted by ag...@apache.org.
Added Kubernetes configs for AWS EKS


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96c271ba
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96c271ba
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96c271ba

Branch: refs/heads/ignite-5797
Commit: 96c271ba1f870db9e9017332441ace2d172e137c
Parents: 0e29b87
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Oct 1 11:34:38 2018 -0700
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Oct 1 11:34:38 2018 -0700

----------------------------------------------------------------------
 .../config/eks/ignite-account-role.yaml         | 30 ++++++++
 .../kubernetes/config/eks/ignite-namespace.yaml | 19 +++++
 .../eks/ignite-persistence-storage-class.yaml   | 25 +++++++
 .../config/eks/ignite-role-binding.yaml         | 27 +++++++
 .../config/eks/ignite-service-account.yaml      | 20 ++++++
 .../kubernetes/config/eks/ignite-service.yaml   | 37 ++++++++++
 .../config/eks/ignite-stateful-set.yaml         | 74 ++++++++++++++++++++
 .../config/eks/ignite-wal-storage-class.yaml    | 25 +++++++
 8 files changed, 257 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-account-role.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-account-role.yaml b/modules/kubernetes/config/eks/ignite-account-role.yaml
new file mode 100644
index 0000000..0071e43
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-account-role.yaml
@@ -0,0 +1,30 @@
+# 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.
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  name: ignite
+  namespace: ignite
+rules:
+- apiGroups:
+  - ""
+  resources: # Here are resources you can access
+  - pods
+  - endpoints
+  verbs: # That is what you can do with them
+  - get
+  - list
+  - watch

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-namespace.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-namespace.yaml b/modules/kubernetes/config/eks/ignite-namespace.yaml
new file mode 100644
index 0000000..e0154d4
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-namespace.yaml
@@ -0,0 +1,19 @@
+# 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.
+
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: ignite

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml b/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml
new file mode 100644
index 0000000..86d0aa3
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml
@@ -0,0 +1,25 @@
+# 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.
+
+#Amazon AWS Configuration
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+  name: ignite-persistence-storage-class  #StorageClass name
+  namespace: ignite         #Ignite namespace
+provisioner: kubernetes.io/aws-ebs
+parameters:
+  type: gp2 #Volume type io1, gp2, sc1, st1. Default: gp2
+  zones: eu-west-1a

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-role-binding.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-role-binding.yaml b/modules/kubernetes/config/eks/ignite-role-binding.yaml
new file mode 100644
index 0000000..fdef0f0
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-role-binding.yaml
@@ -0,0 +1,27 @@
+# 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.
+
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+  name: ignite
+roleRef:
+  kind: ClusterRole
+  name: ignite
+  apiGroup: rbac.authorization.k8s.io
+subjects:
+- kind: ServiceAccount
+  name: ignite
+  namespace: ignite

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-service-account.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-service-account.yaml b/modules/kubernetes/config/eks/ignite-service-account.yaml
new file mode 100644
index 0000000..ef207af
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-service-account.yaml
@@ -0,0 +1,20 @@
+# 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.
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: ignite
+  namespace: ignite

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-service.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-service.yaml b/modules/kubernetes/config/eks/ignite-service.yaml
new file mode 100644
index 0000000..23ec761
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-service.yaml
@@ -0,0 +1,37 @@
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata: 
+  # The name must be equal to TcpDiscoveryKubernetesIpFinder.serviceName
+  name: ignite
+  # The name must be equal to TcpDiscoveryKubernetesIpFinder.namespaceName
+  namespace: ignite
+spec:
+  type: LoadBalancer
+  ports:
+    - name: rest
+      port: 8080
+      targetPort: 8080
+    - name: sql
+      port: 10800
+      targetPort: 10800
+    - name: thinclients
+      port: 10900
+      targetPort: 10900
+  selector:
+    # Must be equal to the label set for Ignite pods.
+    app: ignite

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-stateful-set.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-stateful-set.yaml b/modules/kubernetes/config/eks/ignite-stateful-set.yaml
new file mode 100644
index 0000000..3ab039c
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-stateful-set.yaml
@@ -0,0 +1,74 @@
+# 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.
+
+apiVersion: apps/v1beta2
+kind: StatefulSet
+metadata:
+  name: ignite
+  namespace: ignite
+spec:
+  selector:
+    matchLabels:
+      app: ignite
+  serviceName: ignite
+  replicas: 2
+  template:
+    metadata:
+      labels:
+        app: ignite
+    spec:
+      serviceAccountName: ignite
+      containers:
+      - name: ignite
+        image: apacheignite/ignite:2.6.0
+        env:
+        - name: OPTION_LIBS
+          value: ignite-kubernetes,ignite-rest-http
+        - name: CONFIG_URI
+          value: https://raw.githubusercontent.com/apache/ignite/master/modules/kubernetes/config/example-kube-persistence-and-wal.xml
+        - name: IGNITE_QUIET
+          value: "false"
+        - name: JVM_OPTS
+          value: "-Djava.net.preferIPv4Stack=true"
+        ports:
+        - containerPort: 11211 # JDBC port number.
+        - containerPort: 47100 # communication SPI port number.
+        - containerPort: 47500 # discovery SPI port number.
+        - containerPort: 49112 # JMX port number.
+        - containerPort: 10800 # SQL port number.
+        - containerPort: 8080 # REST port number.
+        - containerPort: 10900 #Thin clients port number.
+        volumeMounts:
+        - mountPath: "/wal"
+          name: ignite-wal
+        - mountPath: "/persistence"
+          name: ignite-persistence
+  volumeClaimTemplates:
+  - metadata:
+      name: ignite-persistence
+    spec:
+      accessModes: [ "ReadWriteOnce" ]
+      storageClassName: "ignite-persistence-storage-class"
+      resources:
+        requests:
+          storage: "1Gi"
+  - metadata:
+      name: ignite-wal
+    spec:
+      accessModes: [ "ReadWriteOnce" ]
+      storageClassName: "ignite-wal-storage-class"
+      resources:
+        requests:
+          storage: "1Gi"

http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml b/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml
new file mode 100644
index 0000000..cb15a1a
--- /dev/null
+++ b/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml
@@ -0,0 +1,25 @@
+# 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.
+
+#Amazon AWS Configuration
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+  name: ignite-wal-storage-class  #StorageClass name
+  namespace: ignite #Ignite namespace
+provisioner: kubernetes.io/aws-ebs
+parameters:
+  type: gp2 #Volume type io1, gp2, sc1, st1. Default: gp2
+  zones: eu-west-1a


[23/50] [abbrv] ignite git commit: IGNITE-9736 Fixed usages of Discovery SPI listener. - Fixes #4868.

Posted by ag...@apache.org.
IGNITE-9736 Fixed usages of Discovery SPI listener. - Fixes #4868.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/29f13da6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/29f13da6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/29f13da6

Branch: refs/heads/ignite-5797
Commit: 29f13da6ea882becabd86e264ab0150074f8c20a
Parents: 9ab8ebd
Author: Pavel Kovalenko <jo...@gmail.com>
Authored: Mon Oct 1 11:52:42 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Oct 1 11:52:42 2018 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManager.java         |  7 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |  6 +-
 .../spi/discovery/DiscoverySpiListener.java     |  4 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 14 +---
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 14 +---
 ...iteMarshallerCacheClassNameConflictTest.java |  8 +-
 .../IgniteMarshallerCacheFSRestoreTest.java     |  8 +-
 ...gniteAbstractStandByClientReconnectTest.java |  6 +-
 .../discovery/AbstractDiscoverySelfTest.java    | 25 +++---
 .../ignite/testframework/GridTestUtils.java     |  3 +-
 .../zk/internal/ZookeeperDiscoveryImpl.java     | 85 +++++++-------------
 11 files changed, 72 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 5ce4cb6..19c11ac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -99,6 +99,7 @@ import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
+import org.apache.ignite.internal.util.future.IgniteFutureImpl;
 import org.apache.ignite.internal.util.lang.GridTuple6;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.CI1;
@@ -587,7 +588,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 }
             }
 
-            @Override public IgniteInternalFuture onDiscovery(
+            @Override public IgniteFuture<?> onDiscovery(
                 final int type,
                 final long topVer,
                 final ClusterNode node,
@@ -595,7 +596,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 final Map<Long, Collection<ClusterNode>> snapshots,
                 @Nullable DiscoverySpiCustomMessage spiCustomMsg
             ) {
-                GridFutureAdapter notificationFut = new GridFutureAdapter();
+                GridFutureAdapter<?> notificationFut = new GridFutureAdapter<>();
 
                 discoNtfWrk.submit(notificationFut, () -> {
                     synchronized (discoEvtMux) {
@@ -603,7 +604,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     }
                 });
 
-                return notificationFut;
+                return new IgniteFutureImpl<>(notificationFut);
             }
 
             /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java
index 98222a3..545e1a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpi.java
@@ -99,13 +99,11 @@ public interface DiscoverySpi extends IgniteSpi {
      * {@link org.apache.ignite.events.DiscoveryEvent} for a set of all possible
      * discovery events.
      * <p>
-     * Note that as of Ignite 3.0.2 this method is called <b>before</b>
-     * method {@link #spiStart(String)} is called. This is done to
-     * avoid potential window when SPI is started but the listener is
-     * not registered yet.
+     * TODO: This method should be removed from public API in Apache Ignite 3.0
      *
      * @param lsnr Listener to discovery events or {@code null} to unset the listener.
      */
+    @Deprecated
     public void setListener(@Nullable DiscoverySpiListener lsnr);
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
index 519a235..db59de0 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
@@ -21,7 +21,7 @@ import java.util.Collection;
 import java.util.Map;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.lang.IgniteFuture;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -52,7 +52,7 @@ public interface DiscoverySpiListener {
      *
      * @return A future that will be completed when notification process has finished.
      */
-    public IgniteInternalFuture onDiscovery(
+    public IgniteFuture<?> onDiscovery(
         int type,
         long topVer,
         ClusterNode node,

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index faaaff7..3b57457 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -479,12 +479,7 @@ class ClientImpl extends TcpDiscoveryImpl {
 
                 Collection<ClusterNode> top = updateTopologyHistory(topVer + 1, null);
 
-                try {
-                    lsnr.onDiscovery(EVT_NODE_FAILED, topVer, n, top, new TreeMap<>(topHist), null).get();
-                }
-                catch (IgniteCheckedException e) {
-                    throw new IgniteException("Failed to wait for discovery listener notification", e);
-                }
+                lsnr.onDiscovery(EVT_NODE_FAILED, topVer, n, top, new TreeMap<>(topHist), null).get();
             }
         }
 
@@ -2594,12 +2589,7 @@ class ClientImpl extends TcpDiscoveryImpl {
                     debugLog.debug("Discovery notification [node=" + node + ", type=" + U.gridEventName(type) +
                         ", topVer=" + topVer + ']');
 
-                try {
-                    lsnr.onDiscovery(type, topVer, node, top, new TreeMap<>(topHist), data).get();
-                }
-                catch (IgniteCheckedException e) {
-                    throw new IgniteException("Failed to wait for discovery listener notification", e);
-                }
+                lsnr.onDiscovery(type, topVer, node, top, new TreeMap<>(topHist), data).get();
             }
             else if (debugLog.isDebugEnabled())
                 debugLog.debug("Skipped discovery notification [node=" + node + ", type=" + U.gridEventName(type) +

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 778e8d7..7b0ad53 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -70,7 +70,6 @@ import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.failure.FailureContext;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
-import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.IgniteNodeAttributes;
 import org.apache.ignite.internal.IgnitionEx;
@@ -99,6 +98,7 @@ import org.apache.ignite.internal.util.worker.GridWorker;
 import org.apache.ignite.internal.util.worker.GridWorkerListener;
 import org.apache.ignite.internal.worker.WorkersRegistry;
 import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgniteProductVersion;
 import org.apache.ignite.lang.IgniteUuid;
@@ -5639,21 +5639,15 @@ class ServerImpl extends TcpDiscoveryImpl {
                     throw new IgniteException("Failed to unmarshal discovery custom message: " + msg, t);
                 }
 
-                IgniteInternalFuture fut = lsnr.onDiscovery(DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT,
+                IgniteFuture<?> fut = lsnr.onDiscovery(DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT,
                     msg.topologyVersion(),
                     node,
                     snapshot,
                     hist,
                     msgObj);
 
-                if (waitForNotification || msgObj.isMutable()) {
-                    try {
-                        fut.get();
-                    }
-                    catch (IgniteCheckedException e) {
-                        throw new IgniteException("Failed to wait for discovery listener notification", e);
-                    }
-                }
+                if (waitForNotification || msgObj.isMutable())
+                    fut.get();
 
                 if (msgObj.isMutable()) {
                     try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
index 64c7817..b3e0e45 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
@@ -31,10 +31,10 @@ import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.BinaryConfiguration;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
-import org.apache.ignite.internal.util.future.GridFinishedFuture;
+import org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.spi.discovery.DiscoverySpiCustomMessage;
 import org.apache.ignite.spi.discovery.DiscoverySpiListener;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
@@ -193,7 +193,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra
             }
 
             /** {@inheritDoc} */
-            @Override public IgniteInternalFuture onDiscovery(
+            @Override public IgniteFuture<?> onDiscovery(
                     int type,
                     long topVer,
                     ClusterNode node,
@@ -221,7 +221,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra
                 if (delegate != null)
                     return delegate.onDiscovery(type, topVer, node, topSnapshot, topHist, spiCustomMsg);
 
-                return new GridFinishedFuture();
+                return new IgniteFinishedFutureImpl<>();
             }
 
             /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
index 7aa61eb..47c01dc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheFSRestoreTest.java
@@ -34,11 +34,11 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.PersistentStoreConfiguration;
 import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
 import org.apache.ignite.internal.processors.marshaller.MappingProposedMessage;
-import org.apache.ignite.internal.util.future.GridFinishedFuture;
+import org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.spi.discovery.DiscoverySpiCustomMessage;
 import org.apache.ignite.spi.discovery.DiscoverySpiListener;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
@@ -245,7 +245,7 @@ public class IgniteMarshallerCacheFSRestoreTest extends GridCommonAbstractTest {
             }
 
             /** {@inheritDoc} */
-            @Override public IgniteInternalFuture onDiscovery(
+            @Override public IgniteFuture<?> onDiscovery(
                 int type,
                 long topVer,
                 ClusterNode node,
@@ -271,7 +271,7 @@ public class IgniteMarshallerCacheFSRestoreTest extends GridCommonAbstractTest {
                 if (delegate != null)
                     return delegate.onDiscovery(type, topVer, node, topSnapshot, topHist, spiCustomMsg);
 
-                return new GridFinishedFuture();
+                return new IgniteFinishedFutureImpl<>();
             }
 
             /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteAbstractStandByClientReconnectTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteAbstractStandByClientReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteAbstractStandByClientReconnectTest.java
index d01e11a..176d34e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteAbstractStandByClientReconnectTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/reconnect/IgniteAbstractStandByClientReconnectTest.java
@@ -31,9 +31,9 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.Event;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
 import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.spi.discovery.DiscoverySpiCustomMessage;
 import org.apache.ignite.spi.discovery.DiscoverySpiListener;
@@ -389,7 +389,7 @@ public abstract class IgniteAbstractStandByClientReconnectTest extends GridCommo
         }
 
         /** {@inheritDoc} */
-        @Override public IgniteInternalFuture onDiscovery(
+        @Override public IgniteFuture<?> onDiscovery(
             int type,
             long topVer,
             ClusterNode node,
@@ -397,7 +397,7 @@ public abstract class IgniteAbstractStandByClientReconnectTest extends GridCommo
             @Nullable Map<Long, Collection<ClusterNode>> topHist,
             @Nullable DiscoverySpiCustomMessage data
         ) {
-            IgniteInternalFuture fut = delegate.onDiscovery(type, topVer, node, topSnapshot, topHist, data);
+            IgniteFuture<?> fut = delegate.onDiscovery(type, topVer, node, topSnapshot, topHist, data);
 
             if (type == EVT_CLIENT_NODE_DISCONNECTED) {
                 try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
index e59d24a..3e0fb89 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
@@ -34,9 +34,9 @@ import javax.management.ObjectName;
 import mx4j.tools.adaptor.http.HttpAdaptor;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.util.future.GridFinishedFuture;
+import org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.marshaller.Marshaller;
 import org.apache.ignite.spi.IgniteSpi;
 import org.apache.ignite.spi.IgniteSpiAdapter;
@@ -162,7 +162,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri
         }
 
         /** {@inheritDoc} */
-        @Override public IgniteInternalFuture onDiscovery(
+        @Override public IgniteFuture<?> onDiscovery(
             int type,
             long topVer,
             ClusterNode node,
@@ -172,7 +172,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri
             if (type == EVT_NODE_METRICS_UPDATED)
                 isMetricsUpdate = true;
 
-            return new GridFinishedFuture();
+            return new IgniteFinishedFutureImpl<>();
         }
     }
 
@@ -246,7 +246,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri
                     // No-op.
                 }
 
-                @Override public IgniteInternalFuture onDiscovery(int type, long topVer, ClusterNode node,
+                @Override public IgniteFuture<?> onDiscovery(int type, long topVer, ClusterNode node,
                     Collection<ClusterNode> topSnapshot, Map<Long, Collection<ClusterNode>> topHist,
                     @Nullable DiscoverySpiCustomMessage data) {
                     // If METRICS_UPDATED came from local node
@@ -254,7 +254,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri
                         && node.id().equals(spi.getLocalNode().id()))
                         spiCnt.addAndGet(1);
 
-                    return new GridFinishedFuture();
+                    return new IgniteFinishedFutureImpl<>();
                 }
             };
 
@@ -416,16 +416,21 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri
                     }
 
                     @SuppressWarnings({"NakedNotify"})
-                    @Override public IgniteInternalFuture onDiscovery(int type, long topVer, ClusterNode node,
-                        Collection<ClusterNode> topSnapshot, Map<Long, Collection<ClusterNode>> topHist,
-                        @Nullable DiscoverySpiCustomMessage data) {
+                    @Override public IgniteFuture<?> onDiscovery(
+                        int type,
+                        long topVer,
+                        ClusterNode node,
+                        Collection<ClusterNode> topSnapshot,
+                        Map<Long, Collection<ClusterNode>> topHist,
+                        @Nullable DiscoverySpiCustomMessage data
+                    ) {
                         info("Discovery event [type=" + type + ", node=" + node + ']');
 
                         synchronized (mux) {
                             mux.notifyAll();
                         }
 
-                        return new GridFinishedFuture();
+                        return new IgniteFinishedFutureImpl<>();
                     }
                 });
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index 4195551..caa292b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -97,6 +97,7 @@ import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.LT;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.plugin.extensions.communication.Message;
@@ -160,7 +161,7 @@ public final class GridTestUtils {
         }
 
         /** {@inheritDoc} */
-        @Override public IgniteInternalFuture onDiscovery(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot, @Nullable Map<Long, Collection<ClusterNode>> topHist, @Nullable DiscoverySpiCustomMessage spiCustomMsg) {
+        @Override public IgniteFuture<?> onDiscovery(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot, @Nullable Map<Long, Collection<ClusterNode>> topHist, @Nullable DiscoverySpiCustomMessage spiCustomMsg) {
             hook.handleDiscoveryMessage(spiCustomMsg);
 
             return delegate.onDiscovery(type, topVer, node, topSnapshot, topHist, spiCustomMsg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/29f13da6/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java b/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java
index 3771c7b..3d42042 100644
--- a/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java
+++ b/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java
@@ -70,6 +70,7 @@ import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.LT;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteRunnable;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.marshaller.MarshallerUtils;
@@ -467,17 +468,12 @@ public class ZookeeperDiscoveryImpl {
         if (rtState.joined) {
             assert rtState.evtsData != null;
 
-            try {
-                lsnr.onDiscovery(EVT_CLIENT_NODE_DISCONNECTED,
-                    rtState.evtsData.topVer,
-                    locNode,
-                    rtState.top.topologySnapshot(),
-                    Collections.emptyMap(),
-                    null).get();
-            }
-            catch (IgniteCheckedException e) {
-                throw new IgniteException("Failed to wait for discovery listener notification", e);
-            }
+            lsnr.onDiscovery(EVT_CLIENT_NODE_DISCONNECTED,
+                rtState.evtsData.topVer,
+                locNode,
+                rtState.top.topologySnapshot(),
+                Collections.emptyMap(),
+                null).get();
         }
 
         try {
@@ -540,17 +536,12 @@ public class ZookeeperDiscoveryImpl {
         if (nodes.isEmpty())
             nodes = Collections.singletonList(locNode);
 
-        try {
-            lsnr.onDiscovery(EVT_NODE_SEGMENTED,
-                rtState.evtsData != null ? rtState.evtsData.topVer : 1L,
-                locNode,
-                nodes,
-                Collections.emptyMap(),
-                null).get();
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException("Failed to wait for discovery listener notification", e);
-        }
+        lsnr.onDiscovery(EVT_NODE_SEGMENTED,
+            rtState.evtsData != null ? rtState.evtsData.topVer : 1L,
+            locNode,
+            nodes,
+            Collections.emptyMap(),
+            null).get();
     }
 
     /**
@@ -2273,10 +2264,10 @@ public class ZookeeperDiscoveryImpl {
                 Collections.emptyMap(),
                 null).get();
         }
-        catch (IgniteCheckedException e) {
+        catch (IgniteException e) {
             joinFut.onDone(e);
 
-            throw new IgniteException("Failed to wait for discovery listener notification", e);
+            throw new IgniteException("Failed to wait for discovery listener notification on node join", e);
         }
 
         // Reset events (this is also notification for clients left from previous cluster).
@@ -3432,7 +3423,7 @@ public class ZookeeperDiscoveryImpl {
 
         final List<ClusterNode> topSnapshot = rtState.top.topologySnapshot();
 
-        IgniteInternalFuture fut = lsnr.onDiscovery(
+        IgniteFuture<?> fut = lsnr.onDiscovery(
             DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT,
             evtData.topologyVersion(),
             sndNode,
@@ -3441,14 +3432,8 @@ public class ZookeeperDiscoveryImpl {
             msg
         );
 
-        if (msg != null && msg.isMutable()) {
-            try {
-                fut.get();
-            }
-            catch (IgniteCheckedException e) {
-                throw new IgniteException("Failed to wait for discovery listener notification", e);
-            }
-        }
+        if (msg != null && msg.isMutable())
+            fut.get();
     }
 
     /**
@@ -3466,17 +3451,12 @@ public class ZookeeperDiscoveryImpl {
 
         final List<ClusterNode> topSnapshot = rtState.top.topologySnapshot();
 
-        try {
-            lsnr.onDiscovery(EVT_NODE_JOINED,
-                joinedEvtData.topVer,
-                joinedNode,
-                topSnapshot,
-                Collections.emptyMap(),
-                null).get();
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException("Failed to wait for discovery listener notification", e);
-        }
+        lsnr.onDiscovery(EVT_NODE_JOINED,
+            joinedEvtData.topVer,
+            joinedNode,
+            topSnapshot,
+            Collections.emptyMap(),
+            null).get();
     }
 
     /**
@@ -3502,17 +3482,12 @@ public class ZookeeperDiscoveryImpl {
 
         final List<ClusterNode> topSnapshot = rtState.top.topologySnapshot();
 
-        try {
-            lsnr.onDiscovery(EVT_NODE_FAILED,
-                topVer,
-                failedNode,
-                topSnapshot,
-                Collections.emptyMap(),
-                null).get();
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException("Failed to wait for discovery listener notification", e);
-        }
+        lsnr.onDiscovery(EVT_NODE_FAILED,
+            topVer,
+            failedNode,
+            topSnapshot,
+            Collections.emptyMap(),
+            null).get();
 
         stats.onNodeFailed();
     }


[15/50] [abbrv] ignite git commit: IGNITE-9713: [ML] Fix JavaDocs in ML Prerpocessing package

Posted by ag...@apache.org.
IGNITE-9713: [ML] Fix JavaDocs in ML Prerpocessing package

this closes #4867


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a373486f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a373486f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a373486f

Branch: refs/heads/ignite-5797
Commit: a373486f817e9c40e2eb0748b28c1d7df14e4203
Parents: f7f834b
Author: zaleslaw <za...@gmail.com>
Authored: Fri Sep 28 16:01:35 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Fri Sep 28 16:01:35 2018 +0300

----------------------------------------------------------------------
 .../ignite/ml/knn/ann/ANNClassificationModel.java     |  2 +-
 .../org/apache/ignite/ml/knn/ann/ANNModelFormat.java  |  2 +-
 .../preprocessing/encoding/EncoderPreprocessor.java   |  2 ++
 .../ml/preprocessing/encoding/EncoderTrainer.java     |  4 +---
 .../stringencoder/StringEncoderPreprocessor.java      | 14 ++++++++++++++
 5 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a373486f/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNClassificationModel.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNClassificationModel.java b/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNClassificationModel.java
index bec82a9..6ef3990 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNClassificationModel.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNClassificationModel.java
@@ -50,7 +50,7 @@ public class ANNClassificationModel extends NNClassificationModel  {
     /**
      * Build the model based on a candidates set.
      * @param centers The candidates set.
-     * @param centroindsStat
+     * @param centroindsStat The stat about centroids.
      */
     public ANNClassificationModel(LabeledVectorSet<ProbableLabel, LabeledVector> centers,
         ANNClassificationTrainer.CentroidStat centroindsStat) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a373486f/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNModelFormat.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNModelFormat.java b/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNModelFormat.java
index be09828..e0c2c3a 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNModelFormat.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/knn/ann/ANNModelFormat.java
@@ -41,7 +41,7 @@ public class ANNModelFormat extends KNNModelFormat implements Serializable {
      * @param k Amount of nearest neighbors.
      * @param measure Distance measure.
      * @param stgy kNN strategy.
-     * @param candidatesStat
+     * @param candidatesStat The stat about candidates.
      */
     public ANNModelFormat(int k,
         DistanceMeasure measure,

http://git-wip-us.apache.org/repos/asf/ignite/blob/a373486f/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderPreprocessor.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderPreprocessor.java b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderPreprocessor.java
index 7df44f3..5c60da9 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderPreprocessor.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderPreprocessor.java
@@ -25,6 +25,8 @@ import org.apache.ignite.ml.math.primitives.vector.Vector;
 /**
  * Preprocessing function that makes encoding.
  *
+ * This a base abstract class that keeps the common fields for all child encoding preprocessors.
+ *
  * @param <K> Type of a key in {@code upstream} data.
  * @param <V> Type of a value in {@code upstream} data.
  */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a373486f/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderTrainer.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderTrainer.java b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderTrainer.java
index 8b2d9b7..9a97a6d 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderTrainer.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/EncoderTrainer.java
@@ -35,9 +35,7 @@ import org.apache.ignite.ml.preprocessing.encoding.stringencoder.StringEncoderPr
 import org.jetbrains.annotations.NotNull;
 
 /**
- * Trainer of the String Encoder preprocessor.
- * The String Encoder encodes string values (categories) to double values in range [0.0, amountOfCategories)
- * where the most popular value will be presented as 0.0 and the least popular value presented with amountOfCategories-1 value.
+ * Trainer of the String Encoder and One-Hot Encoder preprocessors.
  *
  * @param <K> Type of a key in {@code upstream} data.
  * @param <V> Type of a value in {@code upstream} data.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a373486f/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/stringencoder/StringEncoderPreprocessor.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/stringencoder/StringEncoderPreprocessor.java b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/stringencoder/StringEncoderPreprocessor.java
index 12f98f6..c2474ef 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/stringencoder/StringEncoderPreprocessor.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/encoding/stringencoder/StringEncoderPreprocessor.java
@@ -28,6 +28,20 @@ import org.apache.ignite.ml.preprocessing.encoding.EncoderPreprocessor;
 /**
  * Preprocessing function that makes String encoding.
  *
+ * The String Encoder Preprocessor encodes string values (categories) to double values
+ * in range [0.0, amountOfCategories), where the most popular value will be presented as 0.0 and
+ * the least popular value presented with amountOfCategories-1 value.
+ * <p>
+ * This preprocessor can transform multiple columns which indices are handled during training process. These indexes could be defined via .withEncodedFeature(featureIndex) call.
+ * </p>
+ * <p>
+ * NOTE: it doesn’t add new column but change data in-place.
+ *</p>
+ * <p>
+ * There is only a one strategy regarding how StringEncoder will handle unseen labels
+ * when you have fit a StringEncoder on one dataset and then use it to transform another:
+ * put unseen labels in a special additional bucket, at index is equal amountOfCategories.
+ * </p>
  * @param <K> Type of a key in {@code upstream} data.
  * @param <V> Type of a value in {@code upstream} data.
  */


[22/50] [abbrv] ignite git commit: IGNITE-9569 Web Console: Fixed broken unit test.

Posted by ag...@apache.org.
IGNITE-9569 Web Console: Fixed broken unit test.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9ab8ebd7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9ab8ebd7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9ab8ebd7

Branch: refs/heads/ignite-5797
Commit: 9ab8ebd7adaa70548ba013f4d8c7de05ba48312f
Parents: 2f3b567
Author: Ilya Borisov <kl...@gmail.com>
Authored: Mon Oct 1 10:45:40 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Oct 1 10:45:40 2018 +0700

----------------------------------------------------------------------
 modules/web-console/frontend/test/unit/defaultName.filter.test.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9ab8ebd7/modules/web-console/frontend/test/unit/defaultName.filter.test.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/test/unit/defaultName.filter.test.js b/modules/web-console/frontend/test/unit/defaultName.filter.test.js
index 2eaf223..7ecbd6f 100644
--- a/modules/web-console/frontend/test/unit/defaultName.filter.test.js
+++ b/modules/web-console/frontend/test/unit/defaultName.filter.test.js
@@ -17,10 +17,9 @@
 
 import defaultName from '../../app/filters/default-name.filter';
 
-import { suite, test } from 'mocha';
 import { assert } from 'chai';
 
-const instance = defaultName[0]();
+const instance = defaultName();
 
 suite('defaultName', () => {
     test('defaultName filter', () => {


[37/50] [abbrv] ignite git commit: IGNITE-9540: MVCC: support IgniteCache.invoke method family. This closes #4832. This closes #4881.

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
index af74996..4d1145c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
@@ -41,12 +41,15 @@ import java.util.stream.Collectors;
 import javax.cache.Cache;
 import javax.cache.expiry.Duration;
 import javax.cache.expiry.TouchedExpiryPolicy;
+import javax.cache.processor.EntryProcessorException;
+import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteTransactions;
+import org.apache.ignite.cache.CacheEntryProcessor;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.query.ScanQuery;
@@ -283,6 +286,56 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testPessimisticTx3() throws Exception {
+        checkTxWithAllCaches(new CI1<IgniteCache<Integer, Integer>>() {
+            @Override public void apply(IgniteCache<Integer, Integer> cache) {
+                try {
+                    IgniteTransactions txs = cache.unwrap(Ignite.class).transactions();
+
+                    List<Integer> keys = testKeys(cache);
+
+                    for (Integer key : keys) {
+                        log.info("Test key: " + key);
+
+                        try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                            Integer val = cache.get(key);
+
+                            assertNull(val);
+
+                            Integer res = cache.invoke(key, new CacheEntryProcessor<Integer, Integer, Integer>() {
+                                @Override public Integer process(MutableEntry<Integer, Integer> entry,
+                                    Object... arguments) throws EntryProcessorException {
+
+                                    entry.setValue(key);
+
+                                    return -key;
+                                }
+                            });
+
+                            assertEquals(Integer.valueOf(-key), res);
+
+                            val = (Integer)checkAndGet(true, cache, key, GET, SCAN);
+
+                            assertEquals(key, val);
+
+                            tx.commit();
+                        }
+
+                        Integer val = (Integer)checkAndGet(false, cache, key, SCAN, GET);
+
+                        assertEquals(key, val);
+                    }
+                }
+                catch (Exception e) {
+                    throw new IgniteException(e);
+                }
+            }
+        });
+    }
+
+    /**
      * @param c Closure to run.
      * @throws Exception If failed.
      */
@@ -3055,6 +3108,34 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             assertEquals(size, cache.size());
         }
 
+        // Check rollback create.
+        for (int i = 0; i < KEYS; i++) {
+            if (i % 2 == 0) {
+                final Integer key = i;
+
+                try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                    cache.put(key, i);
+
+                    tx.rollback();
+                }
+
+                assertEquals(size, cache.size());
+            }
+        }
+
+        // Check rollback update.
+        for (int i = 0; i < KEYS; i++) {
+            final Integer key = i;
+
+            try (Transaction tx = node.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                cache.put(key, -1);
+
+                tx.rollback();
+            }
+
+            assertEquals(size, cache.size());
+        }
+
         // Check rollback remove.
         for (int i = 0; i < KEYS; i++) {
             final Integer key = i;

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
index 76f8013..dcd46ff 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/SqlTransactionsCommandsWithMvccEnabledSelfTest.java
@@ -263,33 +263,6 @@ public class SqlTransactionsCommandsWithMvccEnabledSelfTest extends AbstractSche
             return arg.getClass();
     }
 
-    /**
-     * Test that attempting to perform a cache PUT operation from within an SQL transaction fails.
-     */
-    @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
-    public void testCacheOperationsFromSqlTransaction() {
-        checkCacheOperationThrows("invoke", 1, ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invoke", 1, CACHE_ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAsync", 1, ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAsync", 1, CACHE_ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAll", Collections.singletonMap(1, CACHE_ENTRY_PROC), X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAll", Collections.singleton(1), CACHE_ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAll", Collections.singleton(1), ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAllAsync", Collections.singletonMap(1, CACHE_ENTRY_PROC),
-            X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAllAsync", Collections.singleton(1), CACHE_ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-
-        checkCacheOperationThrows("invokeAllAsync", Collections.singleton(1), ENTRY_PROC, X.EMPTY_OBJECT_ARRAY);
-    }
-
     /** */
     private final static EntryProcessor<Integer, Integer, Object> ENTRY_PROC =
         new EntryProcessor<Integer, Integer, Object>() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
index 4ea53e0..bcbfbc2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java
@@ -151,7 +151,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT
      * @throws Exception If failed.
      */
     private void updateSingleValue(boolean singleNode, final boolean locQry) throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-9540");
+        fail("https://issues.apache.org/jira/browse/IGNITE-9470");
 
         final int VALS = 100;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
index 46aeaa1..5ec96e4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java
@@ -18,6 +18,8 @@
 package org.apache.ignite.internal.processors.cache.mvcc;
 
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -26,12 +28,22 @@ import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import javax.cache.processor.EntryProcessorException;
+import javax.cache.processor.EntryProcessorResult;
+import javax.cache.processor.MutableEntry;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteTransactions;
+import org.apache.ignite.cache.CacheEntryProcessor;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.testframework.GridTestUtils;
@@ -41,6 +53,7 @@ import org.apache.ignite.transactions.TransactionIsolation;
 
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET;
+import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.INVOKE;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.DML;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.PUT;
@@ -103,6 +116,14 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testRepeatableReadIsolationInvoke() throws Exception {
+        checkOperations(GET, GET, WriteMode.INVOKE, true);
+        checkOperations(GET, GET, WriteMode.INVOKE, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testRepeatableReadIsolationSqlPut() throws Exception {
         checkOperations(SQL, SQL, PUT, true);
         checkOperations(SQL, SQL, PUT, false);
@@ -111,6 +132,14 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testRepeatableReadIsolationSqlInvoke() throws Exception {
+        checkOperations(SQL, SQL, WriteMode.INVOKE, true);
+        checkOperations(SQL, SQL, WriteMode.INVOKE, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testRepeatableReadIsolationSqlDml() throws Exception {
         checkOperations(SQL, SQL, DML, true);
         checkOperations(SQL, SQL, DML, false);
@@ -130,6 +159,8 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
     public void testRepeatableReadIsolationMixedPut() throws Exception {
         checkOperations(SQL, GET, PUT, false);
         checkOperations(SQL, GET, PUT, true);
+        checkOperations(SQL, GET, WriteMode.INVOKE, false);
+        checkOperations(SQL, GET, WriteMode.INVOKE, true);
     }
 
     /**
@@ -138,6 +169,8 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
     public void testRepeatableReadIsolationMixedPut2() throws Exception {
         checkOperations(GET, SQL, PUT, false);
         checkOperations(GET, SQL, PUT, true);
+        checkOperations(GET, SQL, WriteMode.INVOKE, false);
+        checkOperations(GET, SQL, WriteMode.INVOKE, true);
     }
 
     /**
@@ -162,15 +195,72 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
     public void testOperationConsistency() throws Exception {
         checkOperationsConsistency(PUT, false);
         checkOperationsConsistency(DML, false);
+        checkOperationsConsistency(WriteMode.INVOKE, false);
         checkOperationsConsistency(PUT, true);
         checkOperationsConsistency(DML, true);
+        checkOperationsConsistency(WriteMode.INVOKE, true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvokeConsistency() throws Exception {
+        Ignite node = grid(/*requestFromClient ? nodesCount() - 1 :*/ 0);
+
+        TestCache<Integer, MvccTestAccount> cache = new TestCache<>(node.cache(DEFAULT_CACHE_NAME));
+
+        final Set<Integer> keys1 = new HashSet<>(3);
+        final Set<Integer> keys2 = new HashSet<>(3);
+
+        Set<Integer> allKeys = generateKeySet(cache.cache, keys1, keys2);
+
+        final Map<Integer, MvccTestAccount> map1 = keys1.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        final Map<Integer, MvccTestAccount> map2 = keys2.stream().collect(
+            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+        assertEquals(0, cache.cache.size());
+
+        updateEntries(cache, map1, WriteMode.INVOKE);
+        assertEquals(3, cache.cache.size());
+
+        updateEntries(cache, map1, WriteMode.INVOKE);
+        assertEquals(3, cache.cache.size());
+
+        getEntries(cache, allKeys, INVOKE);
+        assertEquals(3, cache.cache.size());
+
+        updateEntries(cache, map2, WriteMode.INVOKE);
+        assertEquals(6, cache.cache.size());
+
+        getEntries(cache, keys2, INVOKE);
+        assertEquals(6, cache.cache.size());
+
+        removeEntries(cache, keys1, WriteMode.INVOKE);
+        assertEquals(3, cache.cache.size());
+
+        removeEntries(cache, keys1, WriteMode.INVOKE);
+        assertEquals(3, cache.cache.size());
+
+        getEntries(cache, allKeys, INVOKE);
+        assertEquals(3, cache.cache.size());
+
+        updateEntries(cache, map1, WriteMode.INVOKE);
+        assertEquals(6, cache.cache.size());
+
+        removeEntries(cache, allKeys, WriteMode.INVOKE);
+        assertEquals(0, cache.cache.size());
+
+        getEntries(cache, allKeys, INVOKE);
+        assertEquals(0, cache.cache.size());
     }
 
     /**
      * Checks SQL and CacheAPI operation isolation consistency.
      *
      * @param readModeBefore read mode used before value updated.
-     * @param readModeBefore read mode used after value updated.
+     * @param readModeAfter read mode used after value updated.
      * @param writeMode write mode used for update.
      * @throws Exception If failed.
      */
@@ -206,20 +296,23 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
             @Override public Void call() throws Exception {
                 updateStart.await();
 
+                assertEquals(initialMap.size(), cache2.cache.size());
+
                 try (Transaction tx = txs2.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+                    tx.timeout(TX_TIMEOUT);
 
                     updateEntries(cache2, updateMap, writeMode);
                     removeEntries(cache2, keysForRemove, writeMode);
 
-                    checkContains(cache2, true, updateMap.keySet());
-                    checkContains(cache2, false, keysForRemove);
-
                     assertEquals(updateMap, cache2.cache.getAll(allKeys));
 
                     tx.commit();
                 }
+                finally {
+                    updateFinish.countDown();
+                }
 
-                updateFinish.countDown();
+                assertEquals(updateMap.size(), cache2.cache.size());
 
                 return null;
             }
@@ -270,7 +363,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
      * @return All keys.
      * @throws IgniteCheckedException If failed.
      */
-    protected Set<Integer> generateKeySet(IgniteCache<Object, Object> cache, Set<Integer> keySet1,
+    protected Set<Integer> generateKeySet(IgniteCache<?, ?> cache, Set<Integer> keySet1,
         Set<Integer> keySet2) throws IgniteCheckedException {
         LinkedHashSet<Integer> allKeys = new LinkedHashSet<>();
 
@@ -302,50 +395,72 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
 
         TestCache<Integer, MvccTestAccount> cache = new TestCache<>(node.cache(DEFAULT_CACHE_NAME));
 
-        final Set<Integer> keysForUpdate = new HashSet<>(3);
-        final Set<Integer> keysForRemove = new HashSet<>(3);
 
-        final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), keysForUpdate, keysForRemove);
+            final Set<Integer> keysForUpdate = new HashSet<>(3);
+            final Set<Integer> keysForRemove = new HashSet<>(3);
 
-        int updCnt = 1;
+            final Set<Integer> allKeys = generateKeySet(grid(0).cache(DEFAULT_CACHE_NAME), keysForUpdate, keysForRemove);
 
-        final Map<Integer, MvccTestAccount> initialVals = allKeys.stream().collect(
-            Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+        try {
+            int updCnt = 1;
+
+            final Map<Integer, MvccTestAccount> initialVals = allKeys.stream().collect(
+                Collectors.toMap(k -> k, k -> new MvccTestAccount(k, 1)));
+
+            updateEntries(cache, initialVals, writeMode);
+
+            assertEquals(initialVals.size(), cache.cache.size());
+
+            IgniteTransactions txs = node.transactions();
+
+            Map<Integer, MvccTestAccount> updatedVals = null;
 
-        cache.cache.putAll(initialVals);
+            try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+                Map<Integer, MvccTestAccount> vals1 = getEntries(cache, allKeys, GET);
+                Map<Integer, MvccTestAccount> vals2 = getEntries(cache, allKeys, SQL);
+                Map<Integer, MvccTestAccount> vals3 = getEntries(cache, allKeys, ReadMode.INVOKE);
 
-        IgniteTransactions txs = node.transactions();
+                assertEquals(initialVals, vals1);
+                assertEquals(initialVals, vals2);
+                assertEquals(initialVals, vals3);
 
-        Map<Integer, MvccTestAccount> updatedVals = null;
+                assertEquals(initialVals.size(), cache.cache.size());
 
-        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
-            Map<Integer, MvccTestAccount> vals1 = getEntries(cache, allKeys, GET);
-            Map<Integer, MvccTestAccount> vals2 = getEntries(cache, allKeys, SQL);
+                for (ReadMode readMode : new ReadMode[] {GET, SQL, INVOKE}) {
+                    int updCnt0 = ++updCnt;
 
-            assertEquals(initialVals, vals1);
-            assertEquals(initialVals, vals2);
+                    updatedVals = allKeys.stream().collect(Collectors.toMap(Function.identity(),
+                        k -> new MvccTestAccount(k, updCnt0)));
 
-            for (ReadMode readMode : new ReadMode[] {GET, SQL}) {
-                int updCnt0 = ++updCnt;
+                    updateEntries(cache, updatedVals, writeMode);
+                    assertEquals(allKeys.size(), cache.cache.size());
 
-                updatedVals = keysForUpdate.stream().collect(Collectors.toMap(Function.identity(),
-                    k -> new MvccTestAccount(k, updCnt0)));
+                    removeEntries(cache, keysForRemove, writeMode);
 
-                updateEntries(cache, updatedVals, writeMode);
-                removeEntries(cache, keysForRemove, writeMode);
+                    for (Integer key : keysForRemove)
+                        updatedVals.remove(key);
 
-                assertEquals(String.valueOf(readMode), updatedVals, getEntries(cache, allKeys, readMode));
+                    assertEquals(String.valueOf(readMode), updatedVals, getEntries(cache, allKeys, readMode));
+                }
+
+                tx.commit();
             }
 
-            tx.commit();
-        }
+            try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
+                assertEquals(updatedVals, getEntries(cache, allKeys, GET));
+                assertEquals(updatedVals, getEntries(cache, allKeys, SQL));
+                assertEquals(updatedVals, getEntries(cache, allKeys, INVOKE));
 
-        try (Transaction tx = txs.txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
-            assertEquals(updatedVals, getEntries(cache, allKeys, GET));
-            assertEquals(updatedVals, getEntries(cache, allKeys, SQL));
+                tx.commit();
+            }
 
-            tx.commit();
+            assertEquals(updatedVals.size(), cache.cache.size());
+        }
+        finally {
+            cache.cache.removeAll(keysForUpdate);
         }
+
+        assertEquals(0, cache.cache.size());
     }
 
     /**
@@ -365,6 +480,18 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
                 return cache.cache.getAll(keys);
             case SQL:
                 return getAllSql(cache);
+            case INVOKE: {
+                Map<Integer, MvccTestAccount> res = new HashMap<>();
+
+                CacheEntryProcessor<Integer, MvccTestAccount, MvccTestAccount> ep = new GetEntryProcessor<>();
+
+                Map<Integer, EntryProcessorResult<MvccTestAccount>> invokeRes = cache.cache.invokeAll(keys, ep);
+
+                for (Map.Entry<Integer, EntryProcessorResult<MvccTestAccount>> e : invokeRes.entrySet())
+                    res.put(e.getKey(), e.getValue().get());
+
+                return res;
+            }
             default:
                 fail();
         }
@@ -395,6 +522,19 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
 
                 break;
             }
+            case INVOKE: {
+                CacheEntryProcessor<Integer, MvccTestAccount, MvccTestAccount> ep =
+                    new GetAndPutEntryProcessor<Integer, MvccTestAccount>(){
+                    /** {@inheritDoc} */
+                    @Override MvccTestAccount newValForKey(Integer key) {
+                        return entries.get(key);
+                    }
+                };
+
+                cache.cache.invokeAll(entries.keySet(), ep);
+
+                break;
+            }
             default:
                 fail();
         }
@@ -423,6 +563,13 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
 
                 break;
             }
+            case INVOKE: {
+                CacheEntryProcessor<Integer, MvccTestAccount, MvccTestAccount> ep = new RemoveEntryProcessor<>();
+
+                cache.cache.invokeAll(keys, ep);
+
+                break;
+            }
             default:
                 fail();
         }
@@ -438,4 +585,52 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest {
     protected void checkContains(TestCache<Integer, MvccTestAccount> cache, boolean expected, Set<Integer> keys) {
         assertEquals(expected, cache.cache.containsKeys(keys));
     }
+
+    /**
+     * Applies get operation.
+     */
+    static class GetEntryProcessor<K, V> implements CacheEntryProcessor<K, V, V> {
+        /** {@inheritDoc} */
+        @Override public V process(MutableEntry<K, V> entry,
+            Object... arguments) throws EntryProcessorException {
+            return entry.getValue();
+        }
+    }
+
+    /**
+     * Applies remove operation.
+     */
+    static class RemoveEntryProcessor<K, V, R> implements CacheEntryProcessor<K, V, R> {
+        /** {@inheritDoc} */
+        @Override public R process(MutableEntry<K, V> entry,
+            Object... arguments) throws EntryProcessorException {
+            entry.remove();
+
+            return null;
+        }
+    }
+
+    /**
+     * Applies get and put operation.
+     */
+    static class GetAndPutEntryProcessor<K, V> implements CacheEntryProcessor<K, V, V> {
+        /** {@inheritDoc} */
+        @Override public V process(MutableEntry<K, V> entry,
+            Object... args) throws EntryProcessorException {
+            V newVal = !F.isEmpty(args) ? (V)args[0] : newValForKey(entry.getKey());
+
+            V oldVal = entry.getValue();
+            entry.setValue(newVal);
+
+            return oldVal;
+        }
+
+        /**
+         * @param key Key.
+         * @return New value.
+         */
+        V newValForKey(K key){
+            throw new UnsupportedOperationException();
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
index c782f98..618d910 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java
@@ -22,9 +22,12 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
+import javax.cache.processor.EntryProcessorException;
+import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteTransactions;
+import org.apache.ignite.cache.CacheEntryProcessor;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -55,8 +58,24 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT
 
                 return res;
             }
+
             case SQL:
                 return getAllSql(cache);
+
+            case INVOKE: {
+                Map<Integer, MvccTestAccount> res = new HashMap<>();
+
+                CacheEntryProcessor<Integer, MvccTestAccount, MvccTestAccount> ep = new GetEntryProcessor();
+
+                for (Integer key : keys) {
+                    MvccTestAccount val = cache.cache.invoke(key, ep);
+
+                    if(val != null)
+                        res.put(key, val);
+                }
+
+                return res;
+            }
             default:
                 fail();
         }
@@ -65,7 +84,7 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT
     }
 
     /** {@inheritDoc} */
-    protected void updateEntries(
+    @Override protected void updateEntries(
         TestCache<Integer, MvccTestAccount> cache,
         Map<Integer, MvccTestAccount> entries,
         WriteMode writeMode) {
@@ -79,6 +98,7 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT
 
                 break;
             }
+
             case DML: {
                 for (Map.Entry<Integer, MvccTestAccount> e : entries.entrySet()) {
                     if (e.getValue() == null)
@@ -88,13 +108,23 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT
                 }
                 break;
             }
+
+            case INVOKE: {
+                GetAndPutEntryProcessor<Integer, MvccTestAccount> ep = new GetAndPutEntryProcessor<>();
+
+                for (final Map.Entry<Integer, MvccTestAccount> e : entries.entrySet())
+                    cache.cache.invoke(e.getKey(), ep, e.getValue());
+
+                break;
+            }
+
             default:
                 fail();
         }
     }
 
     /** {@inheritDoc} */
-    protected void removeEntries(
+    @Override protected void removeEntries(
         TestCache<Integer, MvccTestAccount> cache,
         Set<Integer> keys,
         WriteMode writeMode) {
@@ -111,6 +141,14 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT
 
                 break;
             }
+            case INVOKE: {
+                CacheEntryProcessor<Integer, MvccTestAccount, MvccTestAccount> ep = new RemoveEntryProcessor<>();
+
+                for (Integer key : keys)
+                    cache.cache.invoke(key, ep);
+
+                break;
+            }
             default:
                 fail();
         }


[05/50] [abbrv] ignite git commit: IGNITE-9711: [ML] Remove IgniteThread wrapper from ml examples

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
index e99494b..0c8b562 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
@@ -33,7 +33,6 @@ import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerTrainer;
 import org.apache.ignite.ml.preprocessing.normalization.NormalizationTrainer;
 import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Change classification algorithm that was used in {@link Step_5_Scaling} from decision tree to kNN
@@ -55,80 +54,74 @@ public class Step_6_KNN {
         System.out.println(">>> Tutorial step 6 (kNN) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_6_KNN.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here.
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
-                    );
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
-                        .fit(
-                            ignite,
-                            dataCache,
-                            imputingPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
-                        .withP(1)
-                        .fit(
-                            ignite,
-                            dataCache,
-                            minMaxScalerPreprocessor
-                        );
-
-                    KNNClassificationTrainer trainer = new KNNClassificationTrainer();
-
-                    // Train decision tree model.
-                    NNClassificationModel mdl = trainer.fit(
-                        ignite,
-                        dataCache,
-                        normalizationPreprocessor,
-                        lbExtractor
-                    ).withK(1).withStrategy(NNStrategy.WEIGHTED);
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
 
-                    System.out.println("\n>>> Trained model: " + mdl);
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    double accuracy = Evaluator.evaluate(
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here.
+                    .fit(ignite,
                         dataCache,
-                        mdl,
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        featureExtractor
+                );
+
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
+                        dataCache,
+                        strEncoderPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
+                IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
+                    .fit(
+                        ignite,
+                        dataCache,
+                        imputingPreprocessor
+                    );
 
-                    System.out.println(">>> Tutorial step 6 (kNN) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
+                IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
+                    .withP(1)
+                    .fit(
+                        ignite,
+                        dataCache,
+                        minMaxScalerPreprocessor
+                    );
 
-            igniteThread.start();
-            igniteThread.join();
+                KNNClassificationTrainer trainer = new KNNClassificationTrainer();
+
+                // Train decision tree model.
+                NNClassificationModel mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    normalizationPreprocessor,
+                    lbExtractor
+                ).withK(1).withStrategy(NNStrategy.WEIGHTED);
+
+                System.out.println("\n>>> Trained model: " + mdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    mdl,
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 6 (kNN) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
index 2ce2b27..c6d033c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
@@ -34,7 +34,6 @@ import org.apache.ignite.ml.selection.split.TrainTestDatasetSplitter;
 import org.apache.ignite.ml.selection.split.TrainTestSplit;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * The highest accuracy in the previous example ({@link Step_6_KNN}) is the result of
@@ -57,86 +56,79 @@ public class Step_7_Split_train_test {
         System.out.println(">>> Tutorial step 7 (split to train and test) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_7_Split_train_test.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
-                        .split(0.75);
-
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here.
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
+
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+
+                TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
+                    .split(0.75);
+
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here.
+                    .fit(ignite,
+                        dataCache,
+                        featureExtractor
+                );
+
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
+                        dataCache,
+                        strEncoderPreprocessor
                     );
 
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
-                        .fit(
-                            ignite,
-                            dataCache,
-                            imputingPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
-                        .withP(1)
-                        .fit(
-                            ignite,
-                            dataCache,
-                            minMaxScalerPreprocessor
-                        );
-
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
-
-                    // Train decision tree model.
-                    DecisionTreeNode mdl = trainer.fit(
+                IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
+                    .fit(
                         ignite,
                         dataCache,
-                        split.getTrainFilter(),
-                        normalizationPreprocessor,
-                        lbExtractor
+                        imputingPreprocessor
                     );
 
-                    System.out.println("\n>>> Trained model: " + mdl);
-
-                    double accuracy = Evaluator.evaluate(
+                IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
+                    .withP(1)
+                    .fit(
+                        ignite,
                         dataCache,
-                        split.getTestFilter(),
-                        mdl,
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        minMaxScalerPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
-
-                    System.out.println(">>> Tutorial step 7 (split to train and test) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(5, 0);
+
+                // Train decision tree model.
+                DecisionTreeNode mdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    split.getTrainFilter(),
+                    normalizationPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + mdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    split.getTestFilter(),
+                    mdl,
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 7 (split to train and test) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
index 83c2cca..d83e14a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
@@ -36,7 +36,6 @@ import org.apache.ignite.ml.selection.split.TrainTestDatasetSplitter;
 import org.apache.ignite.ml.selection.split.TrainTestSplit;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * To choose the best hyperparameters the cross-validation will be used in this example.
@@ -69,137 +68,130 @@ public class Step_8_CV {
         System.out.println(">>> Tutorial step 8 (cross-validation) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_8_CV.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
-                        .split(0.75);
-
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here.
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
-                    );
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare".
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
 
-                    IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
-                        .fit(
-                            ignite,
-                            dataCache,
-                            imputingPreprocessor
-                        );
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    // Tune hyperparams with K-fold Cross-Validation on the split training set.
-                    int[] pSet = new int[]{1, 2};
-                    int[] maxDeepSet = new int[]{1, 2, 3, 4, 5, 10, 20};
-                    int bestP = 1;
-                    int bestMaxDeep = 1;
-                    double avg = Double.MIN_VALUE;
-
-                    for(int p: pSet){
-                        for(int maxDeep: maxDeepSet){
-                            IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor
-                                = new NormalizationTrainer<Integer, Object[]>()
-                                .withP(p)
-                                .fit(
-                                    ignite,
-                                    dataCache,
-                                    minMaxScalerPreprocessor
-                                );
-
-                            DecisionTreeClassificationTrainer trainer
-                                = new DecisionTreeClassificationTrainer(maxDeep, 0);
-
-                            CrossValidation<DecisionTreeNode, Double, Integer, Object[]> scoreCalculator
-                                = new CrossValidation<>();
-
-                            double[] scores = scoreCalculator.score(
-                                trainer,
-                                new Accuracy<>(),
-                                ignite,
-                                dataCache,
-                                split.getTrainFilter(),
-                                normalizationPreprocessor,
-                                lbExtractor,
-                                3
-                            );
+                TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
+                    .split(0.75);
 
-                            System.out.println("Scores are: " + Arrays.toString(scores));
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here.
+                    .fit(ignite,
+                        dataCache,
+                        featureExtractor
+                );
 
-                            final double currAvg = Arrays.stream(scores).average().orElse(Double.MIN_VALUE);
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
+                        dataCache,
+                        strEncoderPreprocessor
+                    );
 
-                            if(currAvg > avg) {
-                                avg = currAvg;
-                                bestP = p;
-                                bestMaxDeep = maxDeep;
-                            }
+                IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
+                    .fit(
+                        ignite,
+                        dataCache,
+                        imputingPreprocessor
+                    );
 
-                            System.out.println("Avg is: " + currAvg + " with p: " + p + " with maxDeep: " + maxDeep);
-                        }
-                    }
+                // Tune hyperparams with K-fold Cross-Validation on the split training set.
+                int[] pSet = new int[]{1, 2};
+                int[] maxDeepSet = new int[]{1, 2, 3, 4, 5, 10, 20};
+                int bestP = 1;
+                int bestMaxDeep = 1;
+                double avg = Double.MIN_VALUE;
+
+                for(int p: pSet){
+                    for(int maxDeep: maxDeepSet){
+                        IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor
+                            = new NormalizationTrainer<Integer, Object[]>()
+                            .withP(p)
+                            .fit(
+                                ignite,
+                                dataCache,
+                                minMaxScalerPreprocessor
+                            );
 
-                    System.out.println("Train with p: " + bestP + " and maxDeep: " + bestMaxDeep);
+                        DecisionTreeClassificationTrainer trainer
+                            = new DecisionTreeClassificationTrainer(maxDeep, 0);
 
-                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
-                        .withP(bestP)
-                        .fit(
+                        CrossValidation<DecisionTreeNode, Double, Integer, Object[]> scoreCalculator
+                            = new CrossValidation<>();
+
+                        double[] scores = scoreCalculator.score(
+                            trainer,
+                            new Accuracy<>(),
                             ignite,
                             dataCache,
-                            minMaxScalerPreprocessor
+                            split.getTrainFilter(),
+                            normalizationPreprocessor,
+                            lbExtractor,
+                            3
                         );
 
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(bestMaxDeep, 0);
-
-                    // Train decision tree model.
-                    DecisionTreeNode bestMdl = trainer.fit(
-                        ignite,
-                        dataCache,
-                        split.getTrainFilter(),
-                        normalizationPreprocessor,
-                        lbExtractor
-                    );
-
-                    System.out.println("\n>>> Trained model: " + bestMdl);
+                        System.out.println("Scores are: " + Arrays.toString(scores));
 
-                    double accuracy = Evaluator.evaluate(
-                        dataCache,
-                        split.getTestFilter(),
-                        bestMdl,
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
-                    );
+                        final double currAvg = Arrays.stream(scores).average().orElse(Double.MIN_VALUE);
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
+                        if(currAvg > avg) {
+                            avg = currAvg;
+                            bestP = p;
+                            bestMaxDeep = maxDeep;
+                        }
 
-                    System.out.println(">>> Tutorial step 8 (cross-validation) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
+                        System.out.println("Avg is: " + currAvg + " with p: " + p + " with maxDeep: " + maxDeep);
+                    }
                 }
-            });
 
-            igniteThread.start();
+                System.out.println("Train with p: " + bestP + " and maxDeep: " + bestMaxDeep);
+
+                IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
+                    .withP(bestP)
+                    .fit(
+                        ignite,
+                        dataCache,
+                        minMaxScalerPreprocessor
+                    );
 
-            igniteThread.join();
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(bestMaxDeep, 0);
+
+                // Train decision tree model.
+                DecisionTreeNode bestMdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    split.getTrainFilter(),
+                    normalizationPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + bestMdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    split.getTestFilter(),
+                    bestMdl,
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 8 (cross-validation) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
index 73a0303..594c0eb 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
@@ -38,7 +38,6 @@ import org.apache.ignite.ml.selection.split.TrainTestDatasetSplitter;
 import org.apache.ignite.ml.selection.split.TrainTestSplit;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * To choose the best hyperparameters the cross-validation with {@link ParamGrid} will be used in this example.
@@ -71,122 +70,115 @@ public class Step_8_CV_with_Param_Grid {
         System.out.println(">>> Tutorial step 8 (cross-validation with param grid) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_8_CV_with_Param_Grid.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare" .
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
-                        .split(0.75);
-
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here.
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
-                        .fit(
-                            ignite,
-                            dataCache,
-                            imputingPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
-                        .withP(2)
-                        .fit(
-                            ignite,
-                            dataCache,
-                            minMaxScalerPreprocessor
-                        );
-
-                    // Tune hyperparams with K-fold Cross-Validation on the split training set.
-
-                    DecisionTreeClassificationTrainer trainerCV = new DecisionTreeClassificationTrainer();
-
-                    CrossValidation<DecisionTreeNode, Double, Integer, Object[]> scoreCalculator
-                        = new CrossValidation<>();
-
-                    ParamGrid paramGrid = new ParamGrid()
-                        .addHyperParam("maxDeep", new Double[]{1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 10.0})
-                        .addHyperParam("minImpurityDecrease", new Double[]{0.0, 0.25, 0.5});
-
-                    CrossValidationResult crossValidationRes = scoreCalculator.score(
-                        trainerCV,
-                        new Accuracy<>(),
-                        ignite,
-                        dataCache,
-                        split.getTrainFilter(),
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        3,
-                        paramGrid
-                    );
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
 
-                    System.out.println("Train with maxDeep: " + crossValidationRes.getBest("maxDeep")
-                        + " and minImpurityDecrease: " + crossValidationRes.getBest("minImpurityDecrease"));
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare" .
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
 
-                    DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer()
-                        .withMaxDeep(crossValidationRes.getBest("maxDeep"))
-                        .withMinImpurityDecrease(crossValidationRes.getBest("minImpurityDecrease"));
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
 
-                    System.out.println(crossValidationRes);
+                TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
+                    .split(0.75);
 
-                    System.out.println("Best score: " + Arrays.toString(crossValidationRes.getBestScore()));
-                    System.out.println("Best hyper params: " + crossValidationRes.getBestHyperParams());
-                    System.out.println("Best average score: " + crossValidationRes.getBestAvgScore());
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here.
+                    .fit(ignite,
+                        dataCache,
+                        featureExtractor
+                    );
 
-                    crossValidationRes.getScoringBoard().forEach((hyperParams, score)
-                        -> System.out.println("Score " + Arrays.toString(score) + " for hyper params " + hyperParams));
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
+                        dataCache,
+                        strEncoderPreprocessor
+                    );
 
-                    // Train decision tree model.
-                    DecisionTreeNode bestMdl = trainer.fit(
+                IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
+                    .fit(
                         ignite,
                         dataCache,
-                        split.getTrainFilter(),
-                        normalizationPreprocessor,
-                        lbExtractor
+                        imputingPreprocessor
                     );
 
-                    System.out.println("\n>>> Trained model: " + bestMdl);
-
-                    double accuracy = Evaluator.evaluate(
+                IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
+                    .withP(2)
+                    .fit(
+                        ignite,
                         dataCache,
-                        split.getTestFilter(),
-                        bestMdl,
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        minMaxScalerPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
-
-                    System.out.println(">>> Tutorial step 8 (cross-validation with param grid) example started.");
-                } catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+                // Tune hyperparams with K-fold Cross-Validation on the split training set.
+
+                DecisionTreeClassificationTrainer trainerCV = new DecisionTreeClassificationTrainer();
+
+                CrossValidation<DecisionTreeNode, Double, Integer, Object[]> scoreCalculator
+                    = new CrossValidation<>();
+
+                ParamGrid paramGrid = new ParamGrid()
+                    .addHyperParam("maxDeep", new Double[]{1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 10.0})
+                    .addHyperParam("minImpurityDecrease", new Double[]{0.0, 0.25, 0.5});
+
+                CrossValidationResult crossValidationRes = scoreCalculator.score(
+                    trainerCV,
+                    new Accuracy<>(),
+                    ignite,
+                    dataCache,
+                    split.getTrainFilter(),
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    3,
+                    paramGrid
+                );
+
+                System.out.println("Train with maxDeep: " + crossValidationRes.getBest("maxDeep")
+                    + " and minImpurityDecrease: " + crossValidationRes.getBest("minImpurityDecrease"));
+
+                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer()
+                    .withMaxDeep(crossValidationRes.getBest("maxDeep"))
+                    .withMinImpurityDecrease(crossValidationRes.getBest("minImpurityDecrease"));
+
+                System.out.println(crossValidationRes);
+
+                System.out.println("Best score: " + Arrays.toString(crossValidationRes.getBestScore()));
+                System.out.println("Best hyper params: " + crossValidationRes.getBestHyperParams());
+                System.out.println("Best average score: " + crossValidationRes.getBestAvgScore());
+
+                crossValidationRes.getScoringBoard().forEach((hyperParams, score)
+                    -> System.out.println("Score " + Arrays.toString(score) + " for hyper params " + hyperParams));
+
+                // Train decision tree model.
+                DecisionTreeNode bestMdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    split.getTrainFilter(),
+                    normalizationPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + bestMdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    split.getTestFilter(),
+                    bestMdl,
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 8 (cross-validation with param grid) example started.");
+            } catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
index 088caf7..4e1e005 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
@@ -39,7 +39,6 @@ import org.apache.ignite.ml.selection.scoring.evaluator.Evaluator;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.selection.split.TrainTestDatasetSplitter;
 import org.apache.ignite.ml.selection.split.TrainTestSplit;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Change classification algorithm that was used in {@link Step_8_CV_with_Param_Grid} from decision tree to logistic
@@ -62,173 +61,166 @@ public class Step_9_Go_to_LogReg {
         System.out.println(">>> Tutorial step 9 (logistic regression) example started.");
 
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                Step_9_Go_to_LogReg.class.getSimpleName(), () -> {
-                try {
-                    IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
-
-                    // Defines first preprocessor that extracts features from an upstream data.
-                    // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare"
-                    IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
-                        = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
-
-                    IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
-
-                    TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
-                        .split(0.75);
-
-                    IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
-                        .withEncoderType(EncoderType.STRING_ENCODER)
-                        .withEncodedFeature(1)
-                        .withEncodedFeature(6) // <--- Changed index here
-                        .fit(ignite,
-                            dataCache,
-                            featureExtractor
+            try {
+                IgniteCache<Integer, Object[]> dataCache = TitanicUtils.readPassengers(ignite);
+
+                // Defines first preprocessor that extracts features from an upstream data.
+                // Extracts "pclass", "sibsp", "parch", "sex", "embarked", "age", "fare"
+                IgniteBiFunction<Integer, Object[], Object[]> featureExtractor
+                    = (k, v) -> new Object[]{v[0], v[3], v[4], v[5], v[6], v[8], v[10]};
+
+                IgniteBiFunction<Integer, Object[], Double> lbExtractor = (k, v) -> (double) v[1];
+
+                TrainTestSplit<Integer, Object[]> split = new TrainTestDatasetSplitter<Integer, Object[]>()
+                    .split(0.75);
+
+                IgniteBiFunction<Integer, Object[], Vector> strEncoderPreprocessor = new EncoderTrainer<Integer, Object[]>()
+                    .withEncoderType(EncoderType.STRING_ENCODER)
+                    .withEncodedFeature(1)
+                    .withEncodedFeature(6) // <--- Changed index here
+                    .fit(ignite,
+                        dataCache,
+                        featureExtractor
+                );
+
+                IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
+                    .fit(ignite,
+                        dataCache,
+                        strEncoderPreprocessor
                     );
 
-                    IgniteBiFunction<Integer, Object[], Vector> imputingPreprocessor = new ImputerTrainer<Integer, Object[]>()
-                        .fit(ignite,
-                            dataCache,
-                            strEncoderPreprocessor
-                        );
-
-                    IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
-                        .fit(
-                            ignite,
-                            dataCache,
-                            imputingPreprocessor
-                        );
-
-                    // Tune hyperparams with K-fold Cross-Validation on the split training set.
-                    int[] pSet = new int[]{1, 2};
-                    int[] maxIterationsSet = new int[]{ 100, 1000};
-                    int[] batchSizeSet = new int[]{100, 10};
-                    int[] locIterationsSet = new int[]{10, 100};
-                    double[] learningRateSet = new double[]{0.1, 0.2, 0.5};
-
-                    int bestP = 1;
-                    int bestMaxIterations = 100;
-                    int bestBatchSize = 10;
-                    int bestLocIterations = 10;
-                    double bestLearningRate = 0.0;
-                    double avg = Double.MIN_VALUE;
-
-                    for(int p: pSet){
-                        for(int maxIterations: maxIterationsSet) {
-                            for (int batchSize : batchSizeSet) {
-                                for (int locIterations : locIterationsSet) {
-                                    for (double learningRate : learningRateSet) {
-                                        IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor
-                                            = new NormalizationTrainer<Integer, Object[]>()
-                                            .withP(p)
-                                            .fit(
-                                                ignite,
-                                                dataCache,
-                                                minMaxScalerPreprocessor
-                                            );
-
-                                        LogisticRegressionSGDTrainer<?> trainer
-                                            = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                                            new SimpleGDUpdateCalculator(learningRate),
-                                            SimpleGDParameterUpdate::sumLocal,
-                                            SimpleGDParameterUpdate::avg
-                                        ), maxIterations, batchSize, locIterations, 123L);
-
-                                        CrossValidation<LogisticRegressionModel, Double, Integer, Object[]>
-                                            scoreCalculator = new CrossValidation<>();
-
-                                        double[] scores = scoreCalculator.score(
-                                            trainer,
-                                            new Accuracy<>(),
+                IgniteBiFunction<Integer, Object[], Vector> minMaxScalerPreprocessor = new MinMaxScalerTrainer<Integer, Object[]>()
+                    .fit(
+                        ignite,
+                        dataCache,
+                        imputingPreprocessor
+                    );
+
+                // Tune hyperparams with K-fold Cross-Validation on the split training set.
+                int[] pSet = new int[]{1, 2};
+                int[] maxIterationsSet = new int[]{ 100, 1000};
+                int[] batchSizeSet = new int[]{100, 10};
+                int[] locIterationsSet = new int[]{10, 100};
+                double[] learningRateSet = new double[]{0.1, 0.2, 0.5};
+
+                int bestP = 1;
+                int bestMaxIterations = 100;
+                int bestBatchSize = 10;
+                int bestLocIterations = 10;
+                double bestLearningRate = 0.0;
+                double avg = Double.MIN_VALUE;
+
+                for(int p: pSet){
+                    for(int maxIterations: maxIterationsSet) {
+                        for (int batchSize : batchSizeSet) {
+                            for (int locIterations : locIterationsSet) {
+                                for (double learningRate : learningRateSet) {
+                                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor
+                                        = new NormalizationTrainer<Integer, Object[]>()
+                                        .withP(p)
+                                        .fit(
                                             ignite,
                                             dataCache,
-                                            split.getTrainFilter(),
-                                            normalizationPreprocessor,
-                                            lbExtractor,
-                                            3
+                                            minMaxScalerPreprocessor
                                         );
 
-                                        System.out.println("Scores are: " + Arrays.toString(scores));
-
-                                        final double currAvg = Arrays.stream(scores).average().orElse(Double.MIN_VALUE);
-
-                                        if (currAvg > avg) {
-                                            avg = currAvg;
-                                            bestP = p;
-                                            bestMaxIterations = maxIterations;
-                                            bestBatchSize = batchSize;
-                                            bestLearningRate = learningRate;
-                                            bestLocIterations = locIterations;
-                                        }
-
-                                        System.out.println("Avg is: " + currAvg
-                                            + " with p: " + p
-                                            + " with maxIterations: " + maxIterations
-                                            + " with batchSize: " + batchSize
-                                            + " with learningRate: " + learningRate
-                                            + " with locIterations: " + locIterations
-                                        );
+                                    LogisticRegressionSGDTrainer<?> trainer
+                                        = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
+                                        new SimpleGDUpdateCalculator(learningRate),
+                                        SimpleGDParameterUpdate::sumLocal,
+                                        SimpleGDParameterUpdate::avg
+                                    ), maxIterations, batchSize, locIterations, 123L);
+
+                                    CrossValidation<LogisticRegressionModel, Double, Integer, Object[]>
+                                        scoreCalculator = new CrossValidation<>();
+
+                                    double[] scores = scoreCalculator.score(
+                                        trainer,
+                                        new Accuracy<>(),
+                                        ignite,
+                                        dataCache,
+                                        split.getTrainFilter(),
+                                        normalizationPreprocessor,
+                                        lbExtractor,
+                                        3
+                                    );
+
+                                    System.out.println("Scores are: " + Arrays.toString(scores));
+
+                                    final double currAvg = Arrays.stream(scores).average().orElse(Double.MIN_VALUE);
+
+                                    if (currAvg > avg) {
+                                        avg = currAvg;
+                                        bestP = p;
+                                        bestMaxIterations = maxIterations;
+                                        bestBatchSize = batchSize;
+                                        bestLearningRate = learningRate;
+                                        bestLocIterations = locIterations;
                                     }
+
+                                    System.out.println("Avg is: " + currAvg
+                                        + " with p: " + p
+                                        + " with maxIterations: " + maxIterations
+                                        + " with batchSize: " + batchSize
+                                        + " with learningRate: " + learningRate
+                                        + " with locIterations: " + locIterations
+                                    );
                                 }
                             }
                         }
                     }
+                }
 
-                    System.out.println("Train "
-                        + " with p: " + bestP
-                        + " with maxIterations: " + bestMaxIterations
-                        + " with batchSize: " + bestBatchSize
-                        + " with learningRate: " + bestLearningRate
-                        + " with locIterations: " + bestLocIterations
-                    );
-
-                    IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
-                        .withP(bestP)
-                        .fit(
-                            ignite,
-                            dataCache,
-                            minMaxScalerPreprocessor
-                        );
-
-                    LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                        new SimpleGDUpdateCalculator(bestLearningRate),
-                        SimpleGDParameterUpdate::sumLocal,
-                        SimpleGDParameterUpdate::avg
-                    ), bestMaxIterations,  bestBatchSize, bestLocIterations, 123L);
-
-                    System.out.println(">>> Perform the training to get the model.");
-                    LogisticRegressionModel bestMdl = trainer.fit(
+                System.out.println("Train "
+                    + " with p: " + bestP
+                    + " with maxIterations: " + bestMaxIterations
+                    + " with batchSize: " + bestBatchSize
+                    + " with learningRate: " + bestLearningRate
+                    + " with locIterations: " + bestLocIterations
+                );
+
+                IgniteBiFunction<Integer, Object[], Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Object[]>()
+                    .withP(bestP)
+                    .fit(
                         ignite,
                         dataCache,
-                        split.getTrainFilter(),
-                        normalizationPreprocessor,
-                        lbExtractor
-                    );
-
-                    System.out.println("\n>>> Trained model: " + bestMdl);
-
-                    double accuracy = Evaluator.evaluate(
-                        dataCache,
-                        split.getTestFilter(),
-                        bestMdl,
-                        normalizationPreprocessor,
-                        lbExtractor,
-                        new Accuracy<>()
+                        minMaxScalerPreprocessor
                     );
 
-                    System.out.println("\n>>> Accuracy " + accuracy);
-                    System.out.println("\n>>> Test Error " + (1 - accuracy));
-
-                    System.out.println(">>> Tutorial step 9 (logistic regression) example completed.");
-                }
-                catch (FileNotFoundException e) {
-                    e.printStackTrace();
-                }
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+                LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
+                    new SimpleGDUpdateCalculator(bestLearningRate),
+                    SimpleGDParameterUpdate::sumLocal,
+                    SimpleGDParameterUpdate::avg
+                ), bestMaxIterations,  bestBatchSize, bestLocIterations, 123L);
+
+                System.out.println(">>> Perform the training to get the model.");
+                LogisticRegressionModel bestMdl = trainer.fit(
+                    ignite,
+                    dataCache,
+                    split.getTrainFilter(),
+                    normalizationPreprocessor,
+                    lbExtractor
+                );
+
+                System.out.println("\n>>> Trained model: " + bestMdl);
+
+                double accuracy = Evaluator.evaluate(
+                    dataCache,
+                    split.getTestFilter(),
+                    bestMdl,
+                    normalizationPreprocessor,
+                    lbExtractor,
+                    new Accuracy<>()
+                );
+
+                System.out.println("\n>>> Accuracy " + accuracy);
+                System.out.println("\n>>> Test Error " + (1 - accuracy));
+
+                System.out.println(">>> Tutorial step 9 (logistic regression) example completed.");
+            }
+            catch (FileNotFoundException e) {
+                e.printStackTrace();
+            }
         }
     }
 }


[13/50] [abbrv] ignite git commit: IGNITE-7764: MVCC: cache API support. This closes #4725.

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index 4d5fa13..a83a93f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -42,8 +42,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
 import org.apache.ignite.internal.processors.cache.GridCacheReturn;
 import org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
-import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockCancelledException;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedUnlockRequest;
@@ -61,6 +59,10 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSing
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -68,6 +70,7 @@ import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.lang.IgnitePair;
 import org.apache.ignite.internal.util.typedef.C2;
+import org.apache.ignite.internal.util.typedef.CI1;
 import org.apache.ignite.internal.util.typedef.CI2;
 import org.apache.ignite.internal.util.typedef.CX1;
 import org.apache.ignite.internal.util.typedef.F;
@@ -186,13 +189,14 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
         if (keyCheck)
             validateCacheKey(key);
 
-        GridNearTxLocal tx = ctx.tm().threadLocalTx(ctx);
+        GridNearTxLocal tx = ctx.mvccEnabled() ? MvccUtils.tx(ctx.kernalContext()) : ctx.tm().threadLocalTx(ctx);
 
         final CacheOperationContext opCtx = ctx.operationContextPerCall();
 
         final boolean recovery = opCtx != null && opCtx.recovery();
 
-        if (tx != null && !tx.implicit() && !skipTx) {
+        // Get operation bypass Tx in Mvcc mode.
+        if (!ctx.mvccEnabled() && tx != null && !tx.implicit() && !skipTx) {
             return asyncOp(tx, new AsyncOp<V>() {
                 @Override public IgniteInternalFuture<V> op(GridNearTxLocal tx, AffinityTopologyVersion readyTopVer) {
                     IgniteInternalFuture<Map<Object, Object>> fut = tx.getAllAsync(ctx,
@@ -230,6 +234,26 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
 
         subjId = ctx.subjectIdPerCall(subjId, opCtx);
 
+        MvccSnapshot mvccSnapshot = null;
+        MvccQueryTracker mvccTracker = null;
+
+        if (ctx.mvccEnabled()) {
+            try {
+                if (tx != null)
+                    mvccSnapshot = MvccUtils.requestSnapshot(ctx, tx);
+                else {
+                    mvccTracker = MvccUtils.mvccTracker(ctx, null);
+
+                    mvccSnapshot = mvccTracker.snapshot();
+                }
+
+                assert mvccSnapshot != null;
+            }
+            catch (IgniteCheckedException ex) {
+                return new GridFinishedFuture<>(ex);
+            }
+        }
+
         GridPartitionedSingleGetFuture fut = new GridPartitionedSingleGetFuture(ctx,
             ctx.toCacheKeyObject(key),
             topVer,
@@ -243,10 +267,21 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
             needVer,
             /*keepCacheObjects*/false,
             opCtx != null && opCtx.recovery(),
-            null);
+            mvccSnapshot);
 
         fut.init();
 
+        if(mvccTracker != null){
+            final MvccQueryTracker mvccTracker0 = mvccTracker;
+
+            fut.listen(new CI1<IgniteInternalFuture<Object>>() {
+                @Override public void apply(IgniteInternalFuture<Object> future) {
+                    if(future.isDone())
+                        mvccTracker0.onDone();
+                }
+            });
+        }
+
         return (IgniteInternalFuture<V>)fut;
     }
 
@@ -270,13 +305,15 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
         if (keyCheck)
             validateCacheKeys(keys);
 
-        GridNearTxLocal tx = ctx.tm().threadLocalTx(ctx);
+        GridNearTxLocal tx = (ctx.mvccEnabled()) ? MvccUtils.tx(ctx.kernalContext()) : ctx.tm().threadLocalTx(ctx);
 
         final CacheOperationContext opCtx = ctx.operationContextPerCall();
 
-        if (tx != null && !tx.implicit() && !skipTx) {
+        if (!ctx.mvccEnabled() && tx != null && !tx.implicit() && !skipTx) {
             return asyncOp(tx, new AsyncOp<Map<K, V>>(keys) {
-                @Override public IgniteInternalFuture<Map<K, V>> op(GridNearTxLocal tx, AffinityTopologyVersion readyTopVer) {
+                /** {@inheritDoc} */
+                @Override public IgniteInternalFuture<Map<K, V>> op(GridNearTxLocal tx,
+                    AffinityTopologyVersion readyTopVer) {
                     return tx.getAllAsync(ctx,
                         readyTopVer,
                         ctx.cacheKeysView(keys),
@@ -290,14 +327,34 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
             }, opCtx, /*retry*/false);
         }
 
-        AffinityTopologyVersion topVer = tx == null ? ctx.affinity().affinityTopologyVersion() : tx.topologyVersion();
-
         subjId = ctx.subjectIdPerCall(subjId, opCtx);
 
-        return loadAsync(
+        MvccSnapshot mvccSnapshot = null;
+        MvccQueryTracker mvccTracker = null;
+
+        if (ctx.mvccEnabled()) {
+            try {
+                if (tx != null)
+                    mvccSnapshot = MvccUtils.requestSnapshot(ctx, tx);
+                else {
+                    mvccTracker = MvccUtils.mvccTracker(ctx, null);
+
+                    mvccSnapshot = mvccTracker.snapshot();
+                }
+
+                assert mvccSnapshot != null;
+            }
+            catch (IgniteCheckedException ex) {
+                return new GridFinishedFuture(ex);
+            }
+        }
+
+        AffinityTopologyVersion topVer = tx == null ? ctx.affinity().affinityTopologyVersion() : tx.topologyVersion();
+
+        IgniteInternalFuture<Map<K, V>> fut = loadAsync(
             ctx.cacheKeysView(keys),
             opCtx == null || !opCtx.skipStore(),
-            forcePrimary,
+            forcePrimary ,
             topVer,
             subjId,
             taskName,
@@ -305,46 +362,23 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
             recovery,
             skipVals ? null : expiryPolicy(opCtx != null ? opCtx.expiry() : null),
             skipVals,
-            needVer);
-    }
-
-    /**
-     * @param keys Keys to load.
-     * @param readThrough Read through flag.
-     * @param forcePrimary Force get from primary node flag.
-     * @param topVer Topology version.
-     * @param subjId Subject ID.
-     * @param taskName Task name.
-     * @param deserializeBinary Deserialize binary flag.
-     * @param expiryPlc Expiry policy.
-     * @param skipVals Skip values flag.
-     * @param needVer Need version.
-     * @return Loaded values.
-     */
-    private IgniteInternalFuture<Map<K, V>> loadAsync(
-        @Nullable Collection<KeyCacheObject> keys,
-        boolean readThrough,
-        boolean forcePrimary,
-        AffinityTopologyVersion topVer,
-        @Nullable UUID subjId,
-        String taskName,
-        boolean deserializeBinary,
-        boolean recovery,
-        @Nullable IgniteCacheExpiryPolicy expiryPlc,
-        boolean skipVals,
-        boolean needVer) {
-        return loadAsync(keys,
-            readThrough,
-            forcePrimary,
-            topVer, subjId,
-            taskName,
-            deserializeBinary,
-            recovery,
-            expiryPlc,
-            skipVals,
             needVer,
             false,
-            null);
+            mvccSnapshot);
+
+        if(mvccTracker != null){
+            final MvccQueryTracker mvccTracker0 = mvccTracker;
+
+            fut.listen(new CI1<IgniteInternalFuture<Map<K, V>>>() {
+                /** {@inheritDoc} */
+                @Override public void apply(IgniteInternalFuture<Map<K, V>> future) {
+                    if(future.isDone())
+                        mvccTracker0.onDone();
+                }
+            });
+        }
+
+        return fut;
     }
 
     /**
@@ -445,7 +479,9 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
 
                 for (KeyCacheObject key : keys) {
                     if (readNoEntry) {
-                        CacheDataRow row = ctx.offheap().read(ctx, key);
+                        CacheDataRow row = mvccSnapshot != null ?
+                            ctx.offheap().mvccRead(ctx, key, mvccSnapshot) :
+                            ctx.offheap().read(ctx, key);
 
                         if (row != null) {
                             long expireTime = row.expireTime();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index b167f26..85a48a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -287,10 +287,15 @@ public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureA
 
         boolean queryMapped = false;
 
-        for (GridDistributedTxMapping m : F.view(tx.mappings().mappings(), CU.FILTER_QUERY_MAPPING)) {
+        assert !tx.implicitSingle() || tx.queryEnlisted(); // Non-mvcc implicit-single tx goes fast commit way.
+
+        Collection<GridDistributedTxMapping> txMappings = !tx.implicitSingle() ? tx.mappings().mappings()
+            : Collections.singleton(tx.mappings().singleMapping());
+
+        for (GridDistributedTxMapping m : F.view(txMappings, CU.FILTER_QUERY_MAPPING)) {
             GridDistributedTxMapping nodeMapping = mappings.get(m.primary().id());
 
-            if(nodeMapping == null)
+            if (nodeMapping == null)
                 mappings.put(m.primary().id(), m);
 
             txMapping.addMapping(F.asList(m.primary()));

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxAbstractEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxAbstractEnlistFuture.java
index f484bd6..11f98ca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxAbstractEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxAbstractEnlistFuture.java
@@ -42,10 +42,10 @@ import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
 import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.CI1;
-import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.lang.IgniteReducer;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -53,11 +53,8 @@ import org.jetbrains.annotations.Nullable;
 /**
  *
  */
-public abstract class GridNearTxAbstractEnlistFuture extends GridCacheCompoundIdentityFuture<Long> implements
-    GridCacheVersionedFuture<Long> {
-    /** */
-    private static final long serialVersionUID = -6069985059301497282L;
-
+public abstract class GridNearTxAbstractEnlistFuture<T> extends GridCacheCompoundIdentityFuture<T> implements
+    GridCacheVersionedFuture<T> {
     /** Done field updater. */
     private static final AtomicIntegerFieldUpdater<GridNearTxAbstractEnlistFuture> DONE_UPD =
         AtomicIntegerFieldUpdater.newUpdater(GridNearTxAbstractEnlistFuture.class, "done");
@@ -117,10 +114,11 @@ public abstract class GridNearTxAbstractEnlistFuture extends GridCacheCompoundId
      * @param cctx Cache context.
      * @param tx Transaction.
      * @param timeout Timeout.
+     * @param rdc Compound future reducer.
      */
     public GridNearTxAbstractEnlistFuture(
-        GridCacheContext<?, ?> cctx, GridNearTxLocal tx, long timeout) {
-        super(CU.longReducer());
+        GridCacheContext<?, ?> cctx, GridNearTxLocal tx, long timeout, @Nullable IgniteReducer<T, T> rdc) {
+        super(rdc);
 
         assert cctx != null;
         assert tx != null;
@@ -300,8 +298,6 @@ public abstract class GridNearTxAbstractEnlistFuture extends GridCacheCompoundId
             throw new IgniteCheckedException("Future is done.");
     }
 
-
-
     /**
      */
     private void mapOnTopology() {
@@ -359,7 +355,7 @@ public abstract class GridNearTxAbstractEnlistFuture extends GridCacheCompoundId
     }
 
     /** {@inheritDoc} */
-    @Override protected boolean processFailure(Throwable err, IgniteInternalFuture<Long> fut) {
+    @Override protected boolean processFailure(Throwable err, IgniteInternalFuture<T> fut) {
         if (ex != null || !EX_UPD.compareAndSet(this, null, err))
             ex.addSuppressed(err);
 
@@ -367,7 +363,7 @@ public abstract class GridNearTxAbstractEnlistFuture extends GridCacheCompoundId
     }
 
     /** {@inheritDoc} */
-    @Override public boolean onDone(@Nullable Long res, @Nullable Throwable err, boolean cancelled) {
+    @Override public boolean onDone(@Nullable T res, @Nullable Throwable err, boolean cancelled) {
         if (!DONE_UPD.compareAndSet(this, 0, 1))
             return false;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
new file mode 100644
index 0000000..8d85bd9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
@@ -0,0 +1,683 @@
+/*
+ * 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.internal.processors.cache.distributed.near;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheReturn;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxAbstractEnlistFuture;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxEnlistFuture;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxRemote;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotWithoutTxs;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.query.EnlistOperation;
+import org.apache.ignite.internal.processors.query.UpdateSourceIterator;
+import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
+import org.apache.ignite.internal.util.tostring.GridToStringExclude;
+import org.apache.ignite.internal.util.typedef.CI1;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.jetbrains.annotations.Nullable;
+
+import static org.apache.ignite.internal.processors.cache.distributed.dht.NearTxResultHandler.createResponse;
+import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_OP_COUNTER_NA;
+import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
+import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
+
+/**
+ * A future tracking requests for remote nodes transaction enlisting and locking produces by cache API operations.
+ */
+public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuture<GridCacheReturn> {
+    /** Default batch size. */
+    public static final int DFLT_BATCH_SIZE = 1024;
+
+    /** SkipCntr field updater. */
+    private static final AtomicIntegerFieldUpdater<GridNearTxEnlistFuture> SKIP_UPD =
+        AtomicIntegerFieldUpdater.newUpdater(GridNearTxEnlistFuture.class, "skipCntr");
+
+    /** Marker object. */
+    private static final Object FINISHED = new Object();
+
+    /** Source iterator. */
+    @GridToStringExclude
+    private final UpdateSourceIterator<?> it;
+
+    /** Batch size. */
+    private int batchSize;
+
+    /** */
+    private AtomicInteger batchCntr = new AtomicInteger();
+
+    /** */
+    @SuppressWarnings("unused")
+    @GridToStringExclude
+    private volatile int skipCntr;
+
+    /** Future result. */
+    @GridToStringExclude
+    private volatile GridCacheReturn res;
+
+    /** */
+    private final Map<UUID, Batch> batches = new ConcurrentHashMap<>();
+
+    /** Row extracted from iterator but not yet used. */
+    private Object peek;
+
+    /** Topology locked flag. */
+    private boolean topLocked;
+
+    /** Ordered batch sending flag. */
+    private final boolean sequential;
+
+    /** Filter. */
+    private final CacheEntryPredicate filter;
+
+    /** Need previous value flag. */
+    private final boolean needRes;
+
+    /**
+     * @param cctx Cache context.
+     * @param tx Transaction.
+     * @param timeout Timeout.
+     * @param it Rows iterator.
+     * @param batchSize Batch size.
+     * @param sequential Sequential locking flag.
+     * @param filter Filter.
+     * @param needRes Need previous value flag.
+     */
+    public GridNearTxEnlistFuture(GridCacheContext<?, ?> cctx,
+        GridNearTxLocal tx,
+        long timeout,
+        UpdateSourceIterator<?> it,
+        int batchSize,
+        boolean sequential,
+        @Nullable CacheEntryPredicate filter,
+        boolean needRes) {
+        super(cctx, tx, timeout, null);
+
+        this.it = it;
+        this.batchSize = batchSize > 0 ? batchSize : DFLT_BATCH_SIZE;
+        this.sequential = sequential;
+        this.filter = filter;
+        this.needRes = needRes;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void map(boolean topLocked) {
+        this.topLocked = topLocked;
+
+        sendNextBatches(null);
+    }
+
+    /**
+     * Continue iterating the data rows and form new batches.
+     *
+     * @param nodeId Node that is ready for a new batch.
+     */
+    private void sendNextBatches(@Nullable UUID nodeId) {
+        try {
+            Collection<Batch> next = continueLoop(nodeId);
+
+            if (next == null)
+                return;
+
+            boolean first = (nodeId != null);
+
+            for (Batch batch : next) {
+                ClusterNode node = batch.node();
+
+                sendBatch(node, batch, first);
+
+                if (!node.isLocal())
+                    first = false;
+            }
+        }
+        catch (Throwable e) {
+            onDone(e);
+
+            if (e instanceof Error)
+                throw (Error)e;
+        }
+    }
+
+    /**
+     * Iterate data rows and form batches.
+     *
+     * @param nodeId Id of node acknowledged the last batch.
+     * @return Collection of newly completed batches.
+     * @throws IgniteCheckedException If failed.
+     */
+    private Collection<Batch> continueLoop(@Nullable UUID nodeId) throws IgniteCheckedException {
+        if (nodeId != null)
+            batches.remove(nodeId);
+
+        // Accumulate number of batches released since we got here.
+        // Let only one thread do the looping.
+        if (isDone() || SKIP_UPD.getAndIncrement(this) != 0)
+            return null;
+
+        ArrayList<Batch> res = null;
+        Batch batch = null;
+
+        boolean flush = false;
+
+        EnlistOperation op = it.operation();
+
+        while (true) {
+            while (hasNext0()) {
+                checkCompleted();
+
+                Object cur = next0();
+
+                KeyCacheObject key = cctx.toCacheKeyObject(op.isDeleteOrLock() ? cur : ((IgniteBiTuple)cur).getKey());
+
+                List<ClusterNode> nodes = cctx.affinity().nodesByKey(key, topVer);
+
+                ClusterNode node;
+
+                if (F.isEmpty(nodes) || ((node = nodes.get(0)) == null))
+                    throw new ClusterTopologyCheckedException("Failed to get primary node " +
+                        "[topVer=" + topVer + ", key=" + key + ']');
+
+                tx.markQueryEnlisted(null);
+
+                if (!sequential)
+                    batch = batches.get(node.id());
+                else if (batch != null && !batch.node().equals(node))
+                    res = markReady(res, batch);
+
+                if (batch == null)
+                    batches.put(node.id(), batch = new Batch(node));
+
+                if (batch.ready()) {
+                    // Can't advance further at the moment.
+                    batch = null;
+
+                    peek = cur;
+
+                    it.beforeDetach();
+
+                    flush = true;
+
+                    break;
+                }
+
+                batch.add(op.isDeleteOrLock() ? key : cur,
+                    op != EnlistOperation.LOCK && cctx.affinityNode() && (cctx.isReplicated() || nodes.indexOf(cctx.localNode()) > 0));
+
+                if (batch.size() == batchSize)
+                    res = markReady(res, batch);
+            }
+
+            if (SKIP_UPD.decrementAndGet(this) == 0)
+                break;
+
+            skipCntr = 1;
+        }
+
+        if (flush)
+            return res;
+
+        // No data left - flush incomplete batches.
+        for (Batch batch0 : batches.values()) {
+            if (!batch0.ready()) {
+                if (res == null)
+                    res = new ArrayList<>();
+
+                batch0.ready(true);
+
+                res.add(batch0);
+            }
+        }
+
+        if (batches.isEmpty())
+            onDone(this.res);
+
+        return res;
+    }
+
+    /** */
+    private Object next0() {
+        if (!hasNext0())
+            throw new NoSuchElementException();
+
+        Object cur;
+
+        if ((cur = peek) != null)
+            peek = null;
+        else
+            cur = it.next();
+
+        return cur;
+    }
+
+    /** */
+    private boolean hasNext0() {
+        if (peek == null && !it.hasNext())
+            peek = FINISHED;
+
+        return peek != FINISHED;
+    }
+
+    /**
+     * Add batch to batch collection if it is ready.
+     *
+     * @param batches Collection of batches.
+     * @param batch Batch to be added.
+     */
+    private ArrayList<Batch> markReady(ArrayList<Batch> batches, Batch batch) {
+        if (!batch.ready()) {
+            batch.ready(true);
+
+            if (batches == null)
+                batches = new ArrayList<>();
+
+            batches.add(batch);
+        }
+
+        return batches;
+    }
+
+    /**
+     * @param primaryId Primary node id.
+     * @param rows Rows.
+     * @param dhtVer Dht version assigned at primary node.
+     * @param dhtFutId Dht future id assigned at primary node.
+     */
+    private void processBatchLocalBackupKeys(UUID primaryId, List<Object> rows, GridCacheVersion dhtVer,
+        IgniteUuid dhtFutId) {
+        assert dhtVer != null;
+        assert dhtFutId != null;
+
+        EnlistOperation op = it.operation();
+
+        assert op != EnlistOperation.LOCK;
+
+        boolean keysOnly = op.isDeleteOrLock();
+
+        final ArrayList<KeyCacheObject> keys = new ArrayList<>(rows.size());
+        final ArrayList<Message> vals = keysOnly ? null : new ArrayList<>(rows.size());
+
+        for (Object row : rows) {
+            if (keysOnly)
+                keys.add(cctx.toCacheKeyObject(row));
+            else {
+                keys.add(cctx.toCacheKeyObject(((IgniteBiTuple)row).getKey()));
+                vals.add(cctx.toCacheObject(((IgniteBiTuple)row).getValue()));
+            }
+        }
+
+        try {
+            GridDhtTxRemote dhtTx = cctx.tm().tx(dhtVer);
+
+            if (dhtTx == null) {
+                dhtTx = new GridDhtTxRemote(cctx.shared(),
+                    cctx.localNodeId(),
+                    dhtFutId,
+                    primaryId,
+                    lockVer,
+                    topVer,
+                    dhtVer,
+                    null,
+                    cctx.systemTx(),
+                    cctx.ioPolicy(),
+                    PESSIMISTIC,
+                    REPEATABLE_READ,
+                    false,
+                    tx.remainingTime(),
+                    -1,
+                    this.tx.subjectId(),
+                    this.tx.taskNameHash(),
+                    false);
+
+                dhtTx.mvccSnapshot(new MvccSnapshotWithoutTxs(mvccSnapshot.coordinatorVersion(),
+                    mvccSnapshot.counter(), MVCC_OP_COUNTER_NA, mvccSnapshot.cleanupVersion()));
+
+                dhtTx = cctx.tm().onCreated(null, dhtTx);
+
+                if (dhtTx == null || !cctx.tm().onStarted(dhtTx)) {
+                    throw new IgniteTxRollbackCheckedException("Failed to update backup " +
+                        "(transaction has been completed): " + dhtVer);
+                }
+            }
+
+            dhtTx.mvccEnlistBatch(cctx, it.operation(), keys, vals, mvccSnapshot.withoutActiveTransactions());
+        }
+        catch (IgniteCheckedException e) {
+            onDone(e);
+
+            return;
+        }
+
+        sendNextBatches(primaryId);
+    }
+
+    /**
+     *
+     * @param node Node.
+     * @param batch Batch.
+     * @param first First mapping flag.
+     */
+    private void sendBatch(ClusterNode node, Batch batch, boolean first) throws IgniteCheckedException {
+        updateMappings(node);
+
+        boolean clientFirst = first && cctx.localNode().isClient() && !topLocked && !tx.hasRemoteLocks();
+
+        int batchId = batchCntr.incrementAndGet();
+
+        if (node.isLocal())
+            enlistLocal(batchId, node.id(), batch);
+        else
+            sendBatch(batchId, node.id(), batch, clientFirst);
+    }
+
+    /**
+     * Send batch request to remote data node.
+     *
+     * @param batchId Id of a batch mini-future.
+     * @param nodeId Node id.
+     * @param batchFut Mini-future for the batch.
+     * @param clientFirst {@code true} if originating node is client and it is a first request to any data node.
+     */
+    private void sendBatch(int batchId, UUID nodeId, Batch batchFut, boolean clientFirst) throws IgniteCheckedException {
+        assert batchFut != null;
+
+        GridNearTxEnlistRequest req = new GridNearTxEnlistRequest(cctx.cacheId(),
+            threadId,
+            futId,
+            batchId,
+            tx.subjectId(),
+            topVer,
+            lockVer,
+            mvccSnapshot,
+            clientFirst,
+            remainingTime(),
+            tx.remainingTime(),
+            tx.taskNameHash(),
+            batchFut.rows(),
+            it.operation(),
+            needRes,
+            filter
+        );
+
+        sendRequest(req, nodeId);
+    }
+
+    /**
+     * @param req Request.
+     * @param nodeId Remote node ID
+     * @throws IgniteCheckedException if failed to send.
+     */
+    private void sendRequest(GridCacheMessage req, UUID nodeId) throws IgniteCheckedException {
+        IgniteInternalFuture<?> txSync = cctx.tm().awaitFinishAckAsync(nodeId, tx.threadId());
+
+        if (txSync == null || txSync.isDone())
+            cctx.io().send(nodeId, req, cctx.ioPolicy());
+        else
+            txSync.listen(new CI1<IgniteInternalFuture<?>>() {
+                @Override public void apply(IgniteInternalFuture<?> future) {
+                    try {
+                        cctx.io().send(nodeId, req, cctx.ioPolicy());
+                    }
+                    catch (IgniteCheckedException e) {
+                        GridNearTxEnlistFuture.this.onDone(e);
+                    }
+                }
+            });
+    }
+
+    /**
+     * Enlist batch of entries to the transaction on local node.
+     *
+     * @param batchId Id of a batch mini-future.
+     * @param nodeId Node id.
+     * @param batch Batch.
+     */
+    private void enlistLocal(int batchId, UUID nodeId, Batch batch) throws IgniteCheckedException {
+        Collection<Object> rows = batch.rows();
+
+        GridDhtTxEnlistFuture fut = new GridDhtTxEnlistFuture(nodeId,
+            lockVer,
+            mvccSnapshot,
+            threadId,
+            futId,
+            batchId,
+            tx,
+            remainingTime(),
+            cctx,
+            rows,
+            it.operation(),
+            filter,
+            needRes);
+
+        updateLocalFuture(fut);
+
+        fut.listen(new CI1<IgniteInternalFuture<GridCacheReturn>>() {
+            @Override public void apply(IgniteInternalFuture<GridCacheReturn> fut) {
+                try {
+                    clearLocalFuture((GridDhtTxAbstractEnlistFuture)fut);
+
+                    GridNearTxEnlistResponse res = fut.error() == null ? createResponse(fut) : null;
+
+                    if (checkResponse(nodeId, res, fut.error()))
+                        sendNextBatches(nodeId);
+                }
+                catch (IgniteCheckedException e) {
+                    checkResponse(nodeId, null, e);
+                }
+                finally {
+                    CU.unwindEvicts(cctx);
+                }
+            }
+        });
+
+        fut.init();
+    }
+
+    /**
+     * @param nodeId Sender node id.
+     * @param res Response.
+     */
+    public void onResult(UUID nodeId, GridNearTxEnlistResponse res) {
+        if (checkResponse(nodeId, res, res.error())) {
+
+            Batch batch = batches.get(nodeId);
+
+            if (batch != null && !F.isEmpty(batch.localBackupRows()) && res.dhtFutureId() != null)
+                processBatchLocalBackupKeys(nodeId, batch.localBackupRows(), res.dhtVersion(), res.dhtFutureId());
+            else
+                sendNextBatches(nodeId);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean onNodeLeft(UUID nodeId) {
+        if (batches.keySet().contains(nodeId)) {
+            if (log.isDebugEnabled())
+                log.debug("Found unacknowledged batch for left node [nodeId=" + nodeId + ", fut=" +
+                    this + ']');
+
+            ClusterTopologyCheckedException topEx = new ClusterTopologyCheckedException("Failed to enlist keys " +
+                "(primary node left grid, retry transaction if possible) [node=" + nodeId + ']');
+
+            topEx.retryReadyFuture(cctx.shared().nextAffinityReadyFuture(topVer));
+
+            processFailure(topEx, null);
+
+            batches.remove(nodeId);
+
+            if (batches.isEmpty()) // Wait for all pending requests.
+                onDone();
+
+        }
+
+        if (log.isDebugEnabled())
+            log.debug("Future does not have mapping for left node (ignoring) [nodeId=" + nodeId +
+                ", fut=" + this + ']');
+
+        return false;
+    }
+
+    /**
+     * @param nodeId Originating node ID.
+     * @param res Response.
+     * @param err Exception.
+     * @return {@code True} if future was completed by this call.
+     */
+    @SuppressWarnings("unchecked")
+    public boolean checkResponse(UUID nodeId, GridNearTxEnlistResponse res, Throwable err) {
+        assert res != null || err != null : this;
+
+        if (err == null && res.error() != null)
+            err = res.error();
+
+        if (X.hasCause(err, ClusterTopologyCheckedException.class))
+            tx.removeMapping(nodeId);
+
+        if (err != null)
+            processFailure(err, null);
+
+        if (ex != null) {
+            batches.remove(nodeId);
+
+            if (batches.isEmpty()) // Wait for all pending requests.
+                onDone();
+
+            return false;
+        }
+
+        assert res != null;
+
+        this.res = res.result();
+
+        assert this.res != null && (this.res.emptyResult() || needRes || !this.res.success());
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(GridNearTxEnlistFuture.class, this, super.toString());
+    }
+
+    /**
+     * A batch of rows
+     */
+    private static class Batch {
+        /** Node ID. */
+        @GridToStringExclude
+        private final ClusterNode node;
+
+        /** Rows. */
+        private List<Object> rows = new ArrayList<>();
+
+        /** Local backup rows. */
+        private List<Object> locBkpRows;
+
+        /** Readiness flag. Set when batch is full or no new rows are expected. */
+        private boolean ready;
+
+        /**
+         * @param node Cluster node.
+         */
+        private Batch(ClusterNode node) {
+            this.node = node;
+        }
+
+        /**
+         * @return Node.
+         */
+        public ClusterNode node() {
+            return node;
+        }
+
+        /**
+         * Adds a row.
+         *
+         * @param row Row.
+         * @param localBackup {@code true}, when the row key has local backup.
+         */
+        public void add(Object row, boolean localBackup) {
+            rows.add(row);
+
+            if (localBackup) {
+                if (locBkpRows == null)
+                    locBkpRows = new ArrayList<>();
+
+                locBkpRows.add(row);
+            }
+        }
+
+        /**
+         * @return number of rows.
+         */
+        public int size() {
+            return rows.size();
+        }
+
+        /**
+         * @return Collection of rows.
+         */
+        public Collection<Object> rows() {
+            return rows;
+        }
+
+        /**
+         * @return Collection of local backup rows.
+         */
+        public List<Object> localBackupRows() {
+            return locBkpRows;
+        }
+
+        /**
+         * @return Readiness flag.
+         */
+        public boolean ready() {
+            return ready;
+        }
+
+        /**
+         * Sets readiness flag.
+         *
+         * @param ready Flag value.
+         */
+        public void ready(boolean ready) {
+            this.ready = ready;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
new file mode 100644
index 0000000..1d87023
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
@@ -0,0 +1,642 @@
+/*
+ * 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.internal.processors.cache.distributed.near;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.UUID;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.GridDirectTransient;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.CacheObjectContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.query.EnlistOperation;
+import org.apache.ignite.internal.util.tostring.GridToStringExclude;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
+import org.apache.ignite.plugin.extensions.communication.MessageReader;
+import org.apache.ignite.plugin.extensions.communication.MessageWriter;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Request to enlist into transaction and acquire locks for entries produced with Cache API operations.
+ *
+ * One request per batch of entries is used.
+ */
+public class GridNearTxEnlistRequest extends GridCacheIdMessage {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private long threadId;
+
+    /** Future id. */
+    private IgniteUuid futId;
+
+    /** */
+    private boolean clientFirst;
+
+    /** */
+    private int miniId;
+
+    /** */
+    private UUID subjId;
+
+    /** */
+    private AffinityTopologyVersion topVer;
+
+    /** */
+    private GridCacheVersion lockVer;
+
+    /** Mvcc snapshot. */
+    private MvccSnapshot mvccSnapshot;
+
+    /** */
+    private long timeout;
+
+    /** */
+    private long txTimeout;
+
+    /** */
+    private int taskNameHash;
+
+    /** Rows to enlist. */
+    @GridDirectTransient
+    private Collection<Object> rows;
+
+    /** Serialized rows keys. */
+    @GridToStringExclude
+    private KeyCacheObject[] keys;
+
+    /** Serialized rows values. */
+    @GridToStringExclude
+    private CacheObject[] values;
+
+    /** Enlist operation. */
+    private EnlistOperation op;
+
+    /** Filter. */
+    @GridToStringExclude
+    private CacheEntryPredicate filter;
+
+    /** Need previous value flag. */
+    private boolean needRes;
+
+    /**
+     * Default constructor.
+     */
+    public GridNearTxEnlistRequest() {
+        // No-op.
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param cacheId Cache id.
+     * @param threadId Thread id.
+     * @param futId Future id.
+     * @param miniId Mini-future id.
+     * @param subjId Transaction subject id.
+     * @param topVer Topology version.
+     * @param lockVer Lock version.
+     * @param mvccSnapshot Mvcc snapshot.
+     * @param clientFirst First client request flag.
+     * @param timeout Timeout.
+     * @param txTimeout Tx timeout.
+     * @param taskNameHash Task name hash.
+     * @param rows Rows.
+     * @param op Operation.
+     * @param filter Filter.
+     */
+    GridNearTxEnlistRequest(int cacheId,
+        long threadId,
+        IgniteUuid futId,
+        int miniId,
+        UUID subjId,
+        AffinityTopologyVersion topVer,
+        GridCacheVersion lockVer,
+        MvccSnapshot mvccSnapshot,
+        boolean clientFirst,
+        long timeout,
+        long txTimeout,
+        int taskNameHash,
+        Collection<Object> rows,
+        EnlistOperation op,
+        boolean needRes,
+        @Nullable CacheEntryPredicate filter) {
+        this.txTimeout = txTimeout;
+        this.filter = filter;
+        this.cacheId = cacheId;
+        this.threadId = threadId;
+        this.futId = futId;
+        this.miniId = miniId;
+        this.subjId = subjId;
+        this.topVer = topVer;
+        this.lockVer = lockVer;
+        this.mvccSnapshot = mvccSnapshot;
+        this.clientFirst = clientFirst;
+        this.timeout = timeout;
+        this.taskNameHash = taskNameHash;
+        this.rows = rows;
+        this.op = op;
+        this.needRes = needRes;
+    }
+
+    /**
+     * @return Thread id.
+     */
+    public long threadId() {
+        return threadId;
+    }
+
+    /**
+     * @return Future id.
+     */
+    public IgniteUuid futureId() {
+        return futId;
+    }
+
+    /**
+     * @return Mini future ID.
+     */
+    public int miniId() {
+        return miniId;
+    }
+
+    /**
+     * @return Subject id.
+     */
+    public UUID subjectId() {
+        return subjId;
+    }
+
+    /**
+     * @return Topology version.
+     */
+    @Override public AffinityTopologyVersion topologyVersion() {
+        return topVer;
+    }
+
+    /**
+     * @return Lock version.
+     */
+    public GridCacheVersion version() {
+        return lockVer;
+    }
+
+    /**
+     * @return MVCC snapshot.
+     */
+    public MvccSnapshot mvccSnapshot() {
+        return mvccSnapshot;
+    }
+
+    /**
+     * @return Timeout milliseconds.
+     */
+    public long timeout() {
+        return timeout;
+    }
+
+    /**
+     * @return Tx timeout milliseconds.
+     */
+    public long txTimeout() {
+        return txTimeout;
+    }
+
+    /**
+     * @return Task name hash.
+     */
+    public int taskNameHash() {
+        return taskNameHash;
+    }
+
+    /**
+     * @return {@code True} if this is the first client request.
+     */
+    public boolean firstClientRequest() {
+        return clientFirst;
+    }
+
+    /**
+     * @return Collection of rows.
+     */
+    public Collection<Object> rows() {
+        return rows;
+    }
+
+    /**
+     * @return Operation.
+     */
+    public EnlistOperation operation() {
+        return op;
+    }
+
+    /**
+     * @return Need result flag.
+     */
+    public boolean needRes() {
+        return needRes;
+    }
+
+    /**
+     * @return Filter.
+     */
+    public CacheEntryPredicate filter() {
+        return filter;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
+        super.prepareMarshal(ctx);
+
+        GridCacheContext cctx = ctx.cacheContext(cacheId);
+        CacheObjectContext objCtx = cctx.cacheObjectContext();
+
+        if (rows != null && keys == null) {
+            keys = new KeyCacheObject[rows.size()];
+
+            int i = 0;
+
+            boolean keysOnly = op.isDeleteOrLock();
+
+            values = keysOnly ? null : new CacheObject[keys.length];
+
+            for (Object row : rows) {
+                Object key, val = null;
+
+                if (keysOnly)
+                    key = row;
+                else {
+                    key = ((IgniteBiTuple)row).getKey();
+                    val = ((IgniteBiTuple)row).getValue();
+                }
+
+                assert key != null && (keysOnly || val != null) : "key=" + key + ", val=" + val;
+
+                KeyCacheObject key0 = cctx.toCacheKeyObject(key);
+
+                assert key0 != null;
+
+                key0.prepareMarshal(objCtx);
+
+                keys[i] = key0;
+
+                if (!keysOnly) {
+                    CacheObject val0 = cctx.toCacheObject(val);
+
+                    assert val0 != null;
+
+                    val0.prepareMarshal(objCtx);
+
+                    values[i] = val0;
+                }
+
+                i++;
+            }
+        }
+
+        if (filter != null)
+            filter.prepareMarshal(cctx);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
+        super.finishUnmarshal(ctx, ldr);
+
+        if (keys != null) {
+            rows = new ArrayList<>(keys.length);
+
+            CacheObjectContext objCtx = ctx.cacheContext(cacheId).cacheObjectContext();
+
+            for (int i = 0; i < keys.length; i++) {
+                keys[i].finishUnmarshal(objCtx, ldr);
+
+                if (op.isDeleteOrLock())
+                    rows.add(keys[i]);
+                else {
+                    if (values[i] != null)
+                        values[i].finishUnmarshal(objCtx, ldr);
+
+                    rows.add(new IgniteBiTuple<>(keys[i], values[i]));
+                }
+            }
+
+            keys = null;
+            values = null;
+        }
+
+        if (filter != null)
+            filter.finishUnmarshal(ctx.cacheContext(cacheId), ldr);
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
+        writer.setBuffer(buf);
+
+        if (!super.writeTo(buf, writer))
+            return false;
+
+        if (!writer.isHeaderWritten()) {
+            if (!writer.writeHeader(directType(), fieldsCount()))
+                return false;
+
+            writer.onHeaderWritten();
+        }
+
+        switch (writer.state()) {
+            case 3:
+                if (!writer.writeBoolean("clientFirst", clientFirst))
+                    return false;
+
+                writer.incrementState();
+
+            case 4:
+                if (!writer.writeMessage("filter", filter))
+                    return false;
+
+                writer.incrementState();
+
+            case 5:
+                if (!writer.writeIgniteUuid("futId", futId))
+                    return false;
+
+                writer.incrementState();
+
+            case 6:
+                if (!writer.writeObjectArray("keys", keys, MessageCollectionItemType.MSG))
+                    return false;
+
+                writer.incrementState();
+
+            case 7:
+                if (!writer.writeMessage("lockVer", lockVer))
+                    return false;
+
+                writer.incrementState();
+
+            case 8:
+                if (!writer.writeInt("miniId", miniId))
+                    return false;
+
+                writer.incrementState();
+
+            case 9:
+                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
+                    return false;
+
+                writer.incrementState();
+
+            case 10:
+                if (!writer.writeBoolean("needRes", needRes))
+                    return false;
+
+                writer.incrementState();
+
+            case 11:
+                if (!writer.writeByte("op", op != null ? (byte)op.ordinal() : -1))
+                    return false;
+
+                writer.incrementState();
+
+            case 12:
+                if (!writer.writeUuid("subjId", subjId))
+                    return false;
+
+                writer.incrementState();
+
+            case 13:
+                if (!writer.writeInt("taskNameHash", taskNameHash))
+                    return false;
+
+                writer.incrementState();
+
+            case 14:
+                if (!writer.writeLong("threadId", threadId))
+                    return false;
+
+                writer.incrementState();
+
+            case 15:
+                if (!writer.writeLong("timeout", timeout))
+                    return false;
+
+                writer.incrementState();
+
+            case 16:
+                if (!writer.writeMessage("topVer", topVer))
+                    return false;
+
+                writer.incrementState();
+
+            case 17:
+                if (!writer.writeLong("txTimeout", txTimeout))
+                    return false;
+
+                writer.incrementState();
+
+            case 18:
+                if (!writer.writeObjectArray("values", values, MessageCollectionItemType.MSG))
+                    return false;
+
+                writer.incrementState();
+
+        }
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
+        reader.setBuffer(buf);
+
+        if (!reader.beforeMessageRead())
+            return false;
+
+        if (!super.readFrom(buf, reader))
+            return false;
+
+        switch (reader.state()) {
+            case 3:
+                clientFirst = reader.readBoolean("clientFirst");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 4:
+                filter = reader.readMessage("filter");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 5:
+                futId = reader.readIgniteUuid("futId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 6:
+                keys = reader.readObjectArray("keys", MessageCollectionItemType.MSG, KeyCacheObject.class);
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 7:
+                lockVer = reader.readMessage("lockVer");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 8:
+                miniId = reader.readInt("miniId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 9:
+                mvccSnapshot = reader.readMessage("mvccSnapshot");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 10:
+                needRes = reader.readBoolean("needRes");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 11:
+                byte opOrd;
+
+                opOrd = reader.readByte("op");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                op = EnlistOperation.fromOrdinal(opOrd);
+
+                reader.incrementState();
+
+            case 12:
+                subjId = reader.readUuid("subjId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 13:
+                taskNameHash = reader.readInt("taskNameHash");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 14:
+                threadId = reader.readLong("threadId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 15:
+                timeout = reader.readLong("timeout");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 16:
+                topVer = reader.readMessage("topVer");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 17:
+                txTimeout = reader.readLong("txTimeout");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 18:
+                values = reader.readObjectArray("values", MessageCollectionItemType.MSG, CacheObject.class);
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+        }
+
+        return reader.afterMessageRead(GridNearTxEnlistRequest.class);
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte fieldsCount() {
+        return 19;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean addDeploymentInfo() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public short directType() {
+        return 159;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(GridNearTxEnlistRequest.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistResponse.java
new file mode 100644
index 0000000..4f4bbb6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistResponse.java
@@ -0,0 +1,372 @@
+/*
+ * 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.internal.processors.cache.distributed.near;
+
+import java.nio.ByteBuffer;
+import java.util.Collection;
+import java.util.Set;
+import java.util.UUID;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.GridDirectCollection;
+import org.apache.ignite.internal.GridDirectTransient;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
+import org.apache.ignite.internal.processors.cache.GridCacheReturn;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.ExceptionAware;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
+import org.apache.ignite.plugin.extensions.communication.MessageReader;
+import org.apache.ignite.plugin.extensions.communication.MessageWriter;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * A response to {@link GridNearTxEnlistRequest}.
+ */
+public class GridNearTxEnlistResponse extends GridCacheIdMessage implements ExceptionAware {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Future ID. */
+    private IgniteUuid futId;
+
+    /** Error. */
+    @GridDirectTransient
+    private Throwable err;
+
+    /** Serialized error. */
+    private byte[] errBytes;
+
+    /** Mini future id. */
+    private int miniId;
+
+    /** Result. */
+    private GridCacheReturn res;
+
+    /** */
+    private GridCacheVersion lockVer;
+
+    /** */
+    private GridCacheVersion dhtVer;
+
+    /** */
+    private IgniteUuid dhtFutId;
+
+    /** New DHT nodes involved into transaction. */
+    @GridDirectCollection(UUID.class)
+    private Collection<UUID> newDhtNodes;
+
+    /**
+     * Default constructor.
+     */
+    public GridNearTxEnlistResponse() {
+        // No-op.
+    }
+
+    /**
+     * Constructor for normal result.
+     *
+     * @param cacheId Cache id.
+     * @param futId Future id.
+     * @param miniId Mini future id.
+     * @param lockVer Lock version.
+     * @param res Result.
+     * @param dhtVer Dht version.
+     * @param dhtFutId Dht future id.
+     * @param newDhtNodes New DHT nodes involved into transaction.
+     */
+    public GridNearTxEnlistResponse(int cacheId,
+        IgniteUuid futId,
+        int miniId,
+        GridCacheVersion lockVer,
+        GridCacheReturn res,
+        GridCacheVersion dhtVer,
+        IgniteUuid dhtFutId,
+        Set<UUID> newDhtNodes) {
+        this.cacheId = cacheId;
+        this.futId = futId;
+        this.miniId = miniId;
+        this.lockVer = lockVer;
+        this.res = res;
+        this.dhtVer = dhtVer;
+        this.dhtFutId = dhtFutId;
+        this.newDhtNodes = newDhtNodes;
+    }
+
+    /**
+     * Constructor for error result.
+     *
+     * @param cacheId Cache id.
+     * @param futId Future id.
+     * @param miniId Mini future id.
+     * @param lockVer Lock version.
+     * @param err Error.
+     */
+    public GridNearTxEnlistResponse(int cacheId, IgniteUuid futId, int miniId, GridCacheVersion lockVer,
+        Throwable err) {
+        this.cacheId = cacheId;
+        this.futId = futId;
+        this.miniId = miniId;
+        this.lockVer = lockVer;
+        this.err = err;
+    }
+
+    /**
+     * @return Loc version.
+     */
+    public GridCacheVersion version() {
+        return lockVer;
+    }
+
+    /**
+     * @return Future id.
+     */
+    public IgniteUuid futureId() {
+        return futId;
+    }
+
+    /**
+     * @return Mini future id.
+     */
+    public int miniId() {
+        return miniId;
+    }
+
+    /**
+     * @return Result.
+     */
+    public GridCacheReturn result() {
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public Throwable error() {
+        return err;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean addDeploymentInfo() {
+        return false;
+    }
+
+    /**
+     * @return Dht version.
+     */
+    public GridCacheVersion dhtVersion() {
+        return dhtVer;
+    }
+
+    /**
+     * @return Dht future id.
+     */
+    public IgniteUuid dhtFutureId() {
+        return dhtFutId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte fieldsCount() {
+        return 11;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
+        writer.setBuffer(buf);
+
+        if (!super.writeTo(buf, writer))
+            return false;
+
+        if (!writer.isHeaderWritten()) {
+            if (!writer.writeHeader(directType(), fieldsCount()))
+                return false;
+
+            writer.onHeaderWritten();
+        }
+
+        switch (writer.state()) {
+            case 3:
+                if (!writer.writeIgniteUuid("dhtFutId", dhtFutId))
+                    return false;
+
+                writer.incrementState();
+
+            case 4:
+                if (!writer.writeMessage("dhtVer", dhtVer))
+                    return false;
+
+                writer.incrementState();
+
+            case 5:
+                if (!writer.writeByteArray("errBytes", errBytes))
+                    return false;
+
+                writer.incrementState();
+
+            case 6:
+                if (!writer.writeIgniteUuid("futId", futId))
+                    return false;
+
+                writer.incrementState();
+
+            case 7:
+                if (!writer.writeMessage("lockVer", lockVer))
+                    return false;
+
+                writer.incrementState();
+
+            case 8:
+                if (!writer.writeInt("miniId", miniId))
+                    return false;
+
+                writer.incrementState();
+
+            case 9:
+                if (!writer.writeCollection("newDhtNodes", newDhtNodes, MessageCollectionItemType.UUID))
+                    return false;
+
+                writer.incrementState();
+
+            case 10:
+                if (!writer.writeMessage("res", res))
+                    return false;
+
+                writer.incrementState();
+
+        }
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
+        reader.setBuffer(buf);
+
+        if (!reader.beforeMessageRead())
+            return false;
+
+        if (!super.readFrom(buf, reader))
+            return false;
+
+        switch (reader.state()) {
+            case 3:
+                dhtFutId = reader.readIgniteUuid("dhtFutId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 4:
+                dhtVer = reader.readMessage("dhtVer");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 5:
+                errBytes = reader.readByteArray("errBytes");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 6:
+                futId = reader.readIgniteUuid("futId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 7:
+                lockVer = reader.readMessage("lockVer");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 8:
+                miniId = reader.readInt("miniId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 9:
+                newDhtNodes = reader.readCollection("newDhtNodes", MessageCollectionItemType.UUID);
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 10:
+                res = reader.readMessage("res");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+        }
+
+        return reader.afterMessageRead(GridNearTxEnlistResponse.class);
+    }
+
+    /** {@inheritDoc} */
+    @Override public short directType() {
+        return 160;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
+        super.prepareMarshal(ctx);
+
+        GridCacheContext cctx = ctx.cacheContext(cacheId);
+
+        if (err != null && errBytes == null)
+            errBytes = U.marshal(ctx.marshaller(), err);
+
+        if (res != null)
+            res.prepareMarshal(cctx);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
+        super.finishUnmarshal(ctx, ldr);
+
+        GridCacheContext cctx = ctx.cacheContext(cacheId);
+
+        if (errBytes != null)
+            err = U.unmarshal(ctx, errBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+
+        if (res != null)
+            res.finishUnmarshal(cctx, ldr);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(GridNearTxEnlistResponse.class, this);
+    }
+}


[36/50] [abbrv] ignite git commit: IGNITE-9691 testConcurrentAuthorize uses outdated assumption about exception message - updated test assumptions to accommodate changes in the implementation -- verified with diffs overview, clean rebuild and trial execu

Posted by ag...@apache.org.
IGNITE-9691 testConcurrentAuthorize uses outdated assumption about exception message
- updated test assumptions to accommodate changes in the implementation
-- verified with diffs overview, clean rebuild and trial execution of modified tests on my machine - Fixes #4828.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/71836d95
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/71836d95
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/71836d95

Branch: refs/heads/ignite-5797
Commit: 71836d95a13dfbee2e152c0a071488bf0d7d0802
Parents: 46fe9ed
Author: Oleg Ignatenko <oi...@gridgain.com>
Authored: Wed Oct 3 13:28:40 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Oct 3 13:28:40 2018 +0300

----------------------------------------------------------------------
 .../AuthenticationProcessorNodeRestartTest.java | 340 +++++++++----------
 1 file changed, 157 insertions(+), 183 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/71836d95/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java
index 7496cfe..6f10aa7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/authentication/AuthenticationProcessorNodeRestartTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.authentication;
 
 import java.util.Random;
-import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.configuration.DataRegionConfiguration;
@@ -46,10 +45,10 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe
     private static final int RESTARTS = 10;
 
     /** Client node. */
-    protected static final int CLI_NODE = NODES_COUNT - 1;
+    private static final int CLI_NODE = NODES_COUNT - 1;
 
     /** Authorization context for default user. */
-    protected AuthorizationContext actxDflt;
+    private AuthorizationContext actxDflt;
 
     /** Random. */
     private static final Random RND = new Random(System.currentTimeMillis());
@@ -111,53 +110,51 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe
 
         final AtomicInteger usrCnt = new AtomicInteger();
 
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                AuthorizationContext.context(actxDflt);
+        GridTestUtils.runMultiThreaded(() -> {
+            AuthorizationContext.context(actxDflt);
 
-                String user = "test" + usrCnt.getAndIncrement();
+            String user = "test" + usrCnt.getAndIncrement();
 
-                try {
-                    int state = 0;
-                    while (!restartFut.isDone()) {
-                        try {
-                            switch (state) {
-                                case 0:
-                                    grid(CLI_NODE).context().authentication().addUser(user, "passwd_" + user);
+            try {
+                int state = 0;
+                while (!restartFut.isDone()) {
+                    try {
+                        switch (state) {
+                            case 0:
+                                grid(CLI_NODE).context().authentication().addUser(user, "passwd_" + user);
 
-                                    break;
-
-                                case 1:
-                                    grid(CLI_NODE).context().authentication().updateUser(user, "new_passwd_" + user);
+                                break;
 
-                                    break;
+                            case 1:
+                                grid(CLI_NODE).context().authentication().updateUser(user, "new_passwd_" + user);
 
-                                case 2:
-                                    grid(CLI_NODE).context().authentication().removeUser(user);
+                                break;
 
-                                    break;
+                            case 2:
+                                grid(CLI_NODE).context().authentication().removeUser(user);
 
-                                default:
-                                    fail("Invalid state: " + state);
-                            }
+                                break;
 
-                            state = ++state > 2 ? 0 : state;
-                        }
-                        catch (UserManagementException e) {
-                            U.error(log, e);
-                            fail("Unexpected exception on user operation");
-                        }
-                        catch (IgniteCheckedException e) {
-                            // Reconnect
-                            U.error(log, e);
+                            default:
+                                fail("Invalid state: " + state);
                         }
+
+                        state = ++state > 2 ? 0 : state;
+                    }
+                    catch (UserManagementException e) {
+                        U.error(log, e);
+                        fail("Unexpected exception on user operation");
+                    }
+                    catch (IgniteCheckedException e) {
+                        // Reconnect
+                        U.error(log, e);
                     }
-                }
-                catch (Exception e) {
-                    U.error(log, "Unexpected exception on concurrent add/remove: " + user, e);
-                    fail();
                 }
             }
+            catch (Exception e) {
+                U.error(log, "Unexpected exception on concurrent add/remove: " + user, e);
+                fail();
+            }
         }, 10, "user-op");
 
         restartFut.get();
@@ -174,88 +171,90 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe
         for (int i = 0; i < testUsersCnt; ++i)
             grid(CLI_NODE).context().authentication().addUser("test" + i, "passwd_test" + i);
 
-        final IgniteInternalFuture restartFut = GridTestUtils.runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    for (int i = 0; i < RESTARTS; ++i) {
-                        int nodeIdx = RND.nextInt(NODES_COUNT - 1);
+        final IgniteInternalFuture restartFut = GridTestUtils.runAsync(() -> {
+            try {
+                for (int i = 0; i < RESTARTS; ++i) {
+                    int nodeIdx = RND.nextInt(NODES_COUNT - 1);
 
-                        stopGrid(nodeIdx);
+                    stopGrid(nodeIdx);
 
-                        U.sleep(500);
+                    U.sleep(500);
 
-                        startGrid(nodeIdx);
+                    startGrid(nodeIdx);
 
-                        U.sleep(500);
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace(System.err);
-                    fail("Unexpected exception on server restart: " + e.getMessage());
+                    U.sleep(500);
                 }
             }
+            catch (Exception e) {
+                e.printStackTrace(System.err);
+                fail("Unexpected exception on server restart: " + e.getMessage());
+            }
         });
 
         final AtomicInteger usrCnt = new AtomicInteger();
 
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                String user = "test" + usrCnt.getAndIncrement();
+        GridTestUtils.runMultiThreaded(() -> {
+            String user = "test" + usrCnt.getAndIncrement();
 
-                try {
-                    while (!restartFut.isDone()) {
-                        AuthorizationContext actx = grid(CLI_NODE).context().authentication()
-                            .authenticate(user, "passwd_" + user);
+            try {
+                while (!restartFut.isDone()) {
+                    AuthorizationContext actx = grid(CLI_NODE).context().authentication()
+                        .authenticate(user, "passwd_" + user);
 
-                        assertNotNull(actx);
-                    }
+                    assertNotNull(actx);
                 }
-                catch (IgniteCheckedException e) {
-                    // Skip exception if server down.
-                    if (!e.getMessage().contains("Failed to send message (node may have left the grid or "
-                        + "TCP connection cannot be established due to firewall issues)")) {
-                        e.printStackTrace();
-                        fail("Unexpected exception: " + e.getMessage());
-                    }
-                }
-                catch (Exception e) {
+            }
+            catch (IgniteCheckedException e) {
+                // Skip exception if server down.
+                if (!serverDownMessage(e.getMessage())) {
                     e.printStackTrace();
                     fail("Unexpected exception: " + e.getMessage());
                 }
             }
+            catch (Exception e) {
+                e.printStackTrace();
+                fail("Unexpected exception: " + e.getMessage());
+            }
         }, testUsersCnt, "user-op");
 
         restartFut.get();
     }
 
     /**
+     * Exception messages from {@code org.apache.ignite.internal.managers.communication.GridIoManager#send}.
+     */
+    private boolean serverDownMessage(String text) {
+        return text.contains("Failed to send message (node may have left the grid or "
+            + "TCP connection cannot be established due to firewall issues)")
+            || text.contains("Failed to send message, node left");
+    }
+
+    /**
      * @return Future.
      */
-    protected IgniteInternalFuture restartCoordinator() {
-        return GridTestUtils.runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    int restarts = 0;
-
-                    while (restarts < RESTARTS) {
-                        for (int i = 0; i < CLI_NODE; ++i, ++restarts) {
-                            if (restarts >= RESTARTS)
-                                break;
+    private IgniteInternalFuture restartCoordinator() {
+        return GridTestUtils.runAsync(() -> {
+            try {
+                int restarts = 0;
 
-                            stopGrid(i);
+                while (restarts < RESTARTS) {
+                    for (int i = 0; i < CLI_NODE; ++i, ++restarts) {
+                        if (restarts >= RESTARTS)
+                            break;
 
-                            U.sleep(500);
+                        stopGrid(i);
 
-                            startGrid(i);
+                        U.sleep(500);
 
-                            U.sleep(500);
-                        }
+                        startGrid(i);
+
+                        U.sleep(500);
                     }
                 }
-                catch (Exception e) {
-                    U.error(log, "Unexpected exception on coordinator restart", e);
-                    fail();
-                }
+            }
+            catch (Exception e) {
+                U.error(log, "Unexpected exception on coordinator restart", e);
+                fail();
             }
         });
     }
@@ -266,45 +265,41 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe
     public void test1kUsersNodeRestartServer() throws Exception {
         final AtomicInteger usrCnt = new AtomicInteger();
 
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                AuthorizationContext.context(actxDflt);
+        GridTestUtils.runMultiThreaded(() -> {
+            AuthorizationContext.context(actxDflt);
 
-                try {
-                    while (usrCnt.get() < 200) {
-                        String user = "test" + usrCnt.getAndIncrement();
+            try {
+                while (usrCnt.get() < 200) {
+                    String user = "test" + usrCnt.getAndIncrement();
 
-                        System.out.println("+++ CREATE  " + user);
-                        grid(0).context().authentication().addUser(user, "init");
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace();
-                    fail("Unexpected exception on add / remove");
+                    System.out.println("+++ CREATE  " + user);
+                    grid(0).context().authentication().addUser(user, "init");
                 }
             }
+            catch (Exception e) {
+                e.printStackTrace();
+                fail("Unexpected exception on add / remove");
+            }
         }, 3, "user-op");
 
         usrCnt.set(0);
 
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                AuthorizationContext.context(actxDflt);
+        GridTestUtils.runMultiThreaded(() -> {
+            AuthorizationContext.context(actxDflt);
 
-                try {
-                    while (usrCnt.get() < 200) {
-                        String user = "test" + usrCnt.getAndIncrement();
+            try {
+                while (usrCnt.get() < 200) {
+                    String user = "test" + usrCnt.getAndIncrement();
 
-                        System.out.println("+++ ALTER " + user);
+                    System.out.println("+++ ALTER " + user);
 
-                        grid(0).context().authentication().updateUser(user, "passwd_" + user);
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace();
-                    fail("Unexpected exception on add / remove");
+                    grid(0).context().authentication().updateUser(user, "passwd_" + user);
                 }
             }
+            catch (Exception e) {
+                e.printStackTrace();
+                fail("Unexpected exception on add / remove");
+            }
         }, 3, "user-op");
 
         System.out.println("+++ STOP");
@@ -322,50 +317,30 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     public void testConcurrentAddUpdateRemoveNodeRestartServer() throws Exception {
-        final IgniteInternalFuture restartFut = GridTestUtils.runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    for (int i = 0; i < RESTARTS; ++i) {
-                        stopGrid(1);
-
-                        U.sleep(500);
-
-                        startGrid(1);
-
-                        U.sleep(500);
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace(System.err);
-                    fail("Unexpected exception on server restart: " + e.getMessage());
-                }
-            }
-        });
+        IgniteInternalFuture restartFut = loopServerRestarts();
 
         AuthorizationContext.context(actxDflt);
 
         final AtomicInteger usrCnt = new AtomicInteger();
 
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                AuthorizationContext.context(actxDflt);
+        GridTestUtils.runMultiThreaded(() -> {
+            AuthorizationContext.context(actxDflt);
 
-                String user = "test" + usrCnt.getAndIncrement();
+            String user = "test" + usrCnt.getAndIncrement();
 
-                try {
-                    while (!restartFut.isDone()) {
-                        grid(CLI_NODE).context().authentication().addUser(user, "init");
+            try {
+                while (!restartFut.isDone()) {
+                    grid(CLI_NODE).context().authentication().addUser(user, "init");
 
-                        grid(CLI_NODE).context().authentication().updateUser(user, "passwd_" + user);
+                    grid(CLI_NODE).context().authentication().updateUser(user, "passwd_" + user);
 
-                        grid(CLI_NODE).context().authentication().removeUser(user);
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace();
-                    fail("Unexpected exception on add / remove");
+                    grid(CLI_NODE).context().authentication().removeUser(user);
                 }
             }
+            catch (Exception e) {
+                e.printStackTrace();
+                fail("Unexpected exception on add / remove");
+            }
         }, 10, "user-op");
 
         restartFut.get();
@@ -375,52 +350,51 @@ public class AuthenticationProcessorNodeRestartTest extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     public void testConcurrentFailedOperationNodeRestartServer() throws Exception {
-        final IgniteInternalFuture restartFut = GridTestUtils.runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    for (int i = 0; i < RESTARTS; ++i) {
-                        stopGrid(1);
-
-                        U.sleep(500);
-
-                        startGrid(1);
-
-                        U.sleep(500);
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace(System.err);
-                    fail("Unexpected exception on server restart: " + e.getMessage());
-                }
-            }
-        });
+        IgniteInternalFuture restartFut = loopServerRestarts();
 
         AuthorizationContext.context(actxDflt);
 
         grid(CLI_NODE).context().authentication().addUser("test", "test");
 
-        GridTestUtils.runMultiThreaded(new Runnable() {
-            @Override public void run() {
-                AuthorizationContext.context(actxDflt);
+        GridTestUtils.runMultiThreaded(() -> {
+            AuthorizationContext.context(actxDflt);
 
-                try {
-                    while (!restartFut.isDone()) {
-                        GridTestUtils.assertThrows(log, new Callable<Object>() {
-                            @Override public Object call() throws Exception {
-                                grid(CLI_NODE).context().authentication().addUser("test", "test");
+            try {
+                while (!restartFut.isDone()) {
+                    GridTestUtils.assertThrows(log, () -> {
+                        grid(CLI_NODE).context().authentication().addUser("test", "test");
 
-                                return null;
-                            }
-                        }, UserManagementException.class, "User already exists");
-                    }
-                }
-                catch (Exception e) {
-                    e.printStackTrace();
-                    fail("Unexpected error on failed operation");
+                        return null;
+                    }, UserManagementException.class, "User already exists");
                 }
             }
+            catch (Exception e) {
+                e.printStackTrace();
+                fail("Unexpected error on failed operation");
+            }
         }, 10, "user-op");
 
         restartFut.get();
     }
+
+    /** */
+    private IgniteInternalFuture loopServerRestarts() {
+        return GridTestUtils.runAsync(() -> {
+            try {
+                for (int i = 0; i < RESTARTS; ++i) {
+                    stopGrid(1);
+
+                    U.sleep(500);
+
+                    startGrid(1);
+
+                    U.sleep(500);
+                }
+            }
+            catch (Exception e) {
+                e.printStackTrace(System.err);
+                fail("Unexpected exception on server restart: " + e.getMessage());
+            }
+        });
+    }
 }


[48/50] [abbrv] ignite git commit: Lock tracing

Posted by ag...@apache.org.
Lock tracing


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/aa868808
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/aa868808
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/aa868808

Branch: refs/heads/ignite-5797
Commit: aa8688084226ad4f1ee27319c3a1bde4f34f9bc9
Parents: 987ba6b
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Oct 4 17:09:09 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 17:09:09 2018 +0300

----------------------------------------------------------------------
 .../distributed/GridDistributedLockRequest.java | 25 ++++++++++++++--
 .../GridDistributedLockResponse.java            | 31 +++++++++++++++++---
 .../distributed/dht/GridDhtLockFuture.java      |  6 +++-
 .../distributed/dht/GridDhtLockRequest.java     | 11 +++++--
 .../distributed/dht/GridDhtLockResponse.java    | 27 +++++++++++++----
 .../dht/GridDhtTransactionalCacheAdapter.java   | 25 ++++++++++------
 .../cache/distributed/dht/GridDhtTxLocal.java   |  2 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  2 --
 .../colocated/GridDhtColocatedLockFuture.java   |  6 +++-
 .../distributed/near/GridNearLockFuture.java    |  6 +++-
 .../distributed/near/GridNearLockRequest.java   | 10 +++++--
 .../distributed/near/GridNearLockResponse.java  |  8 +++--
 .../processors/trace/IgniteTraceAware.java      | 11 ++++++-
 13 files changed, 135 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index 25a557c..8858e97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -29,6 +29,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
+import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -41,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  * Lock request message.
  */
-public class GridDistributedLockRequest extends GridDistributedBaseMessage {
+public class GridDistributedLockRequest extends GridDistributedBaseMessage implements IgniteTraceAware {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -99,6 +101,9 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
     /** Additional flags. */
     private byte flags;
 
+    /** */
+    private EventsTrace evtsTrace;
+
     /**
      * Empty constructor.
      */
@@ -139,7 +144,8 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
         int txSize,
         boolean skipStore,
         boolean keepBinary,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
         super(lockVer, keyCnt, addDepInfo);
 
@@ -163,6 +169,21 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage {
 
         skipStore(skipStore);
         keepBinary(keepBinary);
+
+        this.evtsTrace = evtsTrace;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void recordTracePoint(TracePoint pt) {
+        if (evtsTrace != null)
+            evtsTrace.recordTracePoint(pt);
+    }
+
+    /**
+     * @return Node trace.
+     */
+    public EventsTrace nodeTrace() {
+        return evtsTrace;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index 4b21896..55470fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -28,6 +28,8 @@ import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
+import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -41,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  * Lock response message.
  */
-public class GridDistributedLockResponse extends GridDistributedBaseMessage {
+public class GridDistributedLockResponse extends GridDistributedBaseMessage implements IgniteTraceAware {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -60,6 +62,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
     @GridDirectCollection(CacheObject.class)
     private List<CacheObject> vals;
 
+    /** */
+    private EventsTrace evtsTrace;
+
     /**
      * Empty constructor (required by {@link Externalizable}).
      */
@@ -67,6 +72,16 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
         /* No-op. */
     }
 
+    /** {@inheritDoc} */
+    @Override public void recordTracePoint(TracePoint pt) {
+        if (evtsTrace != null)
+            evtsTrace.recordTracePoint(pt);
+    }
+
+    public EventsTrace nodeTrace() {
+        return evtsTrace;
+    }
+
     /**
      * @param cacheId Cache ID.
      * @param lockVer Lock version.
@@ -78,7 +93,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
         GridCacheVersion lockVer,
         IgniteUuid futId,
         int cnt,
-        boolean addDepInfo) {
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
         super(lockVer, cnt, addDepInfo);
 
         assert futId != null;
@@ -87,6 +104,8 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
         this.futId = futId;
 
         vals = new ArrayList<>(cnt);
+
+        this.evtsTrace = evtsTrace;
     }
 
     /**
@@ -100,7 +119,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
         GridCacheVersion lockVer,
         IgniteUuid futId,
         Throwable err,
-        boolean addDepInfo) {
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
         super(lockVer, 0, addDepInfo);
 
         assert futId != null;
@@ -123,7 +144,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage {
         IgniteUuid futId,
         int cnt,
         Throwable err,
-        boolean addDepInfo) {
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
         super(lockVer, cnt, addDepInfo);
 
         assert futId != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index ef369cf..6cb86c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -63,6 +63,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.dr.GridDrType;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -555,6 +556,8 @@ public final class GridDhtLockFuture extends GridCacheCompoundIdentityFuture<Boo
             if (mini != null) {
                 assert mini.node().id().equals(nodeId);
 
+                tx.collectNodeTrace(nodeId, res.nodeTrace());
+
                 mini.onResult(res);
 
                 return;
@@ -946,7 +949,8 @@ public final class GridDhtLockFuture extends GridCacheCompoundIdentityFuture<Boo
                             skipStore,
                             cctx.store().configured(),
                             keepBinary,
-                            cctx.deploymentEnabled());
+                            cctx.deploymentEnabled(),
+                            tx.nodeTrace() != null ? new EventsTrace() : null);
 
                         try {
                             for (ListIterator<GridDhtCacheEntry> it = dhtMapping.listIterator(); it.hasNext(); ) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
index 1ac5818..0ec7096 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.GridLeanMap;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -147,7 +148,8 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
         boolean skipStore,
         boolean storeUsed,
         boolean keepBinary,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
         super(cacheId,
             nodeId,
@@ -164,13 +166,14 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
             txSize,
             skipStore,
             keepBinary,
-            addDepInfo);
+            addDepInfo,
+            evtsTrace);
 
         this.topVer = topVer;
 
         storeUsed(storeUsed);
 
-        nearKeys = nearCnt == 0 ? Collections.<KeyCacheObject>emptyList() : new ArrayList<KeyCacheObject>(nearCnt);
+        nearKeys = nearCnt == 0 ? Collections.emptyList() : new ArrayList<>(nearCnt);
         invalidateEntries = new BitSet(dhtCnt == 0 ? nearCnt : dhtCnt);
 
         assert miniId != null;
@@ -179,6 +182,8 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
         this.subjId = subjId;
         this.taskNameHash = taskNameHash;
         this.accessTtl = accessTtl;
+
+        recordTracePoint(TracePoint.DHT_LOCK_REQUEST_CREATED);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
index 87abd6c..9f9ff6d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -32,6 +32,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -77,9 +78,16 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
      * @param cnt Key count.
      * @param addDepInfo Deployment info.
      */
-    public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid miniId, int cnt,
-        boolean addDepInfo) {
-        super(cacheId, lockVer, futId, cnt, addDepInfo);
+    public GridDhtLockResponse(
+        int cacheId,
+        GridCacheVersion lockVer,
+        IgniteUuid futId,
+        IgniteUuid miniId,
+        int cnt,
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
+        super(cacheId, lockVer, futId, cnt, addDepInfo, evtsTrace);
 
         assert miniId != null;
 
@@ -93,9 +101,16 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
      * @param err Error.
      * @param addDepInfo
      */
-    public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid miniId,
-        Throwable err, boolean addDepInfo) {
-        super(cacheId, lockVer, futId, err, addDepInfo);
+    public GridDhtLockResponse(
+        int cacheId,
+        GridCacheVersion lockVer,
+        IgniteUuid futId,
+        IgniteUuid miniId,
+        Throwable err,
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
+        super(cacheId, lockVer, futId, err, addDepInfo, evtsTrace);
 
         assert miniId != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 52638c0..2bc0f2d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -528,7 +528,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
             req.futureId(),
             req.miniId(),
             e,
-            ctx.deploymentEnabled());
+            ctx.deploymentEnabled(),
+            req.nodeTrace());
 
         try {
             ctx.io().send(nodeId, res, ctx.ioPolicy());
@@ -563,7 +564,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
 
         try {
             res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(), cnt,
-                ctx.deploymentEnabled());
+                ctx.deploymentEnabled(), req.nodeTrace());
 
             dhtTx = startRemoteTx(nodeId, req, res);
             nearTx = isNearEnabled(cacheCfg) ? near().startRemoteTx(nodeId, req) : null;
@@ -590,7 +591,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
             U.error(log, err, e);
 
             res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(),
-                new IgniteTxRollbackCheckedException(err, e), ctx.deploymentEnabled());
+                new IgniteTxRollbackCheckedException(err, e), ctx.deploymentEnabled(), req.nodeTrace());
 
             fail = true;
         }
@@ -603,7 +604,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                 req.version(),
                 req.futureId(),
                 req.miniId(),
-                new IgniteCheckedException(err, e), ctx.deploymentEnabled());
+                new IgniteCheckedException(err, e), ctx.deploymentEnabled(),
+                req.nodeTrace());
 
             fail = true;
         }
@@ -1334,9 +1336,11 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
      * @param topVer Remap version.
      * @return Response.
      */
-    private GridNearLockResponse sendClientLockRemapResponse(ClusterNode nearNode,
+    private GridNearLockResponse sendClientLockRemapResponse(
+        ClusterNode nearNode,
         GridNearLockRequest req,
-        AffinityTopologyVersion topVer) {
+        AffinityTopologyVersion topVer
+    ) {
         assert topVer != null;
 
         GridNearLockResponse res = new GridNearLockResponse(
@@ -1348,7 +1352,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
             0,
             null,
             topVer,
-            ctx.deploymentEnabled());
+            ctx.deploymentEnabled(),
+            req.nodeTrace());
 
         try {
             ctx.io().send(nearNode, res, ctx.ioPolicy());
@@ -1394,7 +1399,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                 entries.size(),
                 err,
                 null,
-                ctx.deploymentEnabled());
+                ctx.deploymentEnabled(),
+                tx.nodeTrace());
 
             if (err == null) {
                 res.pending(localDhtPendingVersions(entries, mappedVer));
@@ -1504,7 +1510,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                 entries.size(),
                 e,
                 null,
-                ctx.deploymentEnabled());
+                ctx.deploymentEnabled(),
+                tx.nodeTrace());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index 751ec3f..f3f3112 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -355,7 +355,7 @@ public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements GridCacheMa
             return chainOnePhasePrepare(fut);
         }
 
-        this.eventsTrace = eventsTrace;
+        eventsTrace = req.nodeTrace();
 
         if (state() != PREPARING) {
             if (!state(PREPARING)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 887c76b..523e6a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -41,7 +41,6 @@ import org.apache.ignite.internal.IgniteDiagnosticPrepareContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheInvokeEntry;
 import org.apache.ignite.internal.processors.cache.CacheLockCandidates;
 import org.apache.ignite.internal.processors.cache.CacheObject;
@@ -69,7 +68,6 @@ import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
-import org.apache.ignite.internal.processors.cache.transactions.TxCounters;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.dr.GridDrType;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index 9dbb8be..fc504a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -61,6 +61,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.transactions.TxDeadlock;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -486,6 +487,8 @@ public final class GridDhtColocatedLockFuture extends GridCacheCompoundIdentityF
         if (mini != null) {
             assert mini.node().id().equals(nodeId);
 
+            tx.collectNodeTrace(nodeId, res.nodeTrace());
+
             mini.onResult(res);
 
             return true;
@@ -1073,7 +1076,8 @@ public final class GridDhtColocatedLockFuture extends GridCacheCompoundIdentityF
                                         keepBinary,
                                         clientFirst,
                                         false,
-                                        cctx.deploymentEnabled());
+                                        cctx.deploymentEnabled(),
+                                        cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
 
                                     mapping.request(req);
                                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 6cd4514..9b26e77 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -57,6 +57,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.transactions.TxDeadlock;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -525,6 +526,8 @@ public final class GridNearLockFuture extends GridCacheCompoundIdentityFuture<Bo
             if (log.isDebugEnabled())
                 log.debug("Found mini future for response [mini=" + mini + ", res=" + res + ']');
 
+            tx.collectNodeTrace(nodeId, res.nodeTrace());
+
             mini.onResult(res);
 
             if (log.isDebugEnabled())
@@ -1123,7 +1126,8 @@ public final class GridNearLockFuture extends GridCacheCompoundIdentityFuture<Bo
                                                 keepBinary,
                                                 clientFirst,
                                                 true,
-                                                cctx.deploymentEnabled());
+                                                cctx.deploymentEnabled(),
+                                                cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
 
                                             mapping.request(req);
                                         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
index f736cae..009d928 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
@@ -29,6 +29,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
+import org.apache.ignite.internal.processors.trace.IgniteTraceAware.TracePoint;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -141,7 +143,8 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
         boolean keepBinary,
         boolean firstClientReq,
         boolean nearCache,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
         super(
             cacheId,
@@ -159,7 +162,8 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
             txSize,
             skipStore,
             keepBinary,
-            addDepInfo);
+            addDepInfo,
+            evtsTrace);
 
         assert topVer.compareTo(AffinityTopologyVersion.ZERO) > 0;
 
@@ -175,6 +179,8 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
         setFlag(firstClientReq, FIRST_CLIENT_REQ_FLAG_MASK);
         setFlag(retVal, NEED_RETURN_VALUE_FLAG_MASK);
         setFlag(nearCache, NEAR_CACHE_FLAG_MASK);
+
+        recordTracePoint(TracePoint.NEAR_LOCK_REQUEST_CREATED);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
index e88f0a0..2bbe861 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
@@ -26,6 +26,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -90,9 +91,10 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
         int cnt,
         Throwable err,
         AffinityTopologyVersion clientRemapVer,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
-        super(cacheId, lockVer, futId, cnt, err, addDepInfo);
+        super(cacheId, lockVer, futId, cnt, err, addDepInfo, evtsTrace);
 
         assert miniId != 0;
 
@@ -104,6 +106,8 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
         if (filterRes)
             this.filterRes = new boolean[cnt];
+
+        recordTracePoint(TracePoint.NEAR_LOCK_RESPONSE_CREATED);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
index 4356a3c..b61b8c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
@@ -32,14 +32,23 @@ public interface IgniteTraceAware {
         MSG_NIO_RECEIVE,
         MSG_NIO_SEND,
         MSG_LISTENER_INVOKE,
+        NEAR_LOCK_REQUEST_CREATED,
+        NEAR_LOCK_RESPONSE_CREATED,
         NEAR_PREPARE_REQUEST_CREATED,
         NEAR_PREPARE_RESPONSE_CREATED,
+        DHT_LOCK_REQUEST_CREATED,
+        DHT_LOCK_RESPONSE_CREATED,
         DHT_PREPARE_REQUEST_CREATED,
         DHT_PREPARE_RESPONSE_CREATED,
         NEAR_FINISH_REQUEST_CREATED,
         NEAR_FINISH_RESPONSE_CREATED,
         DHT_FINISH_REQUEST_CREATED,
-        DHT_FINISH_RESPONSE_CREATED;
+        DHT_FINISH_RESPONSE_CREATED,
+        TX_LOCAL_WRITE_BEGIN,
+        TX_LOCAL_WRITE_END,
+        TX_LOCAL_WAL_SYNC_BEGIN,
+        TX_LOCAL_WAL_SYNC_END,
+        ;
 
         /** */
         private static final TracePoint[] VALS = values();


[46/50] [abbrv] ignite git commit: Fixed compilation

Posted by ag...@apache.org.
Fixed compilation


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3dd9a3ae
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3dd9a3ae
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3dd9a3ae

Branch: refs/heads/ignite-5797
Commit: 3dd9a3ae4ff8f9c646893f437eafda3e52914ebd
Parents: ec2526f
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Oct 4 16:22:09 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 16:22:09 2018 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtTxFinishRequest.java | 14 --------------
 .../cache/distributed/dht/GridDhtTxPrepareFuture.java |  1 +
 .../distributed/dht/GridDhtTxPrepareRequest.java      | 14 --------------
 .../near/GridNearOptimisticTxPrepareFuture.java       |  2 +-
 .../near/GridNearPessimisticTxPrepareFuture.java      |  2 +-
 .../distributed/near/GridNearTxFinishRequest.java     | 14 --------------
 .../distributed/near/GridNearTxPrepareResponse.java   | 14 --------------
 .../cache/transactions/IgniteTxHandler.java           |  3 ++-
 8 files changed, 5 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index 96cf37c..c305f97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -436,12 +436,6 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 writer.incrementState();
 
-            case 27:
-                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
-                    return false;
-
-                writer.incrementState();
-
             case 28:
                 if (!writer.writeCollection("updCntrs", updCntrs, MessageCollectionItemType.MSG))
                     return false;
@@ -516,14 +510,6 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 reader.incrementState();
 
-            case 27:
-                mvccSnapshot = reader.readMessage("mvccSnapshot");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
             case 28:
                 updCntrs = reader.readCollection("updCntrs", MessageCollectionItemType.MSG);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 185093d..887c76b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -41,6 +41,7 @@ import org.apache.ignite.internal.IgniteDiagnosticPrepareContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheInvokeEntry;
 import org.apache.ignite.internal.processors.cache.CacheLockCandidates;
 import org.apache.ignite.internal.processors.cache.CacheObject;

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index e8d6bbd..37ba055 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -486,12 +486,6 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
 
                 writer.incrementState();
 
-            case 29:
-                if (!writer.writeBoolean("skipCompletedVers", skipCompletedVers))
-                    return false;
-
-                writer.incrementState();
-
             case 30:
                 if (!writer.writeUuid("subjId", subjId))
                     return false;
@@ -610,14 +604,6 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
 
                 reader.incrementState();
 
-            case 29:
-                skipCompletedVers = reader.readBoolean("skipCompletedVers");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
             case 30:
                 subjId = reader.readUuid("subjId");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index 42ec5ca..0bd85a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -578,7 +578,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
                     m.clientFirst(),
                     true,
                     tx.activeCachesDeploymentEnabled(),
-                    cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null));
+                    cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
 
                 for (IgniteTxEntry txEntry : m.entries()) {
                     if (txEntry.op() == TRANSFORM)

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index 37fd8de..5a4f7cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -234,7 +234,7 @@ public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureA
             false,
             true,
             tx.activeCachesDeploymentEnabled(),
-            cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null));
+            cctx.kernalContext().trace().tracingEnabled() ? new EventsTrace() : null);
 
         req.queryUpdate(m.queryUpdate());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index 56200eb..eb9c371 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -198,12 +198,6 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 writer.incrementState();
 
-            case 22:
-                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
-                    return false;
-
-                writer.incrementState();
-
         }
 
         return true;
@@ -228,14 +222,6 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 reader.incrementState();
 
-            case 22:
-                mvccSnapshot = reader.readMessage("mvccSnapshot");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
         }
 
         return reader.afterMessageRead(GridNearTxFinishRequest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index 2f259e2..bc6a021 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@ -435,12 +435,6 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeMessage("writeVer", writeVer))
-                    return false;
-
-                writer.incrementState();
-
-            case 20:
                 if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
                     return false;
 
@@ -535,14 +529,6 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 reader.incrementState();
 
             case 20:
-                writeVer = reader.readMessage("writeVer");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 20:
                 mvccSnapshot = reader.readMessage("mvccSnapshot");
 
                 if (!reader.isLastRead())

http://git-wip-us.apache.org/repos/asf/ignite/blob/3dd9a3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index 7630136..44ce649 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -634,7 +634,8 @@ public class IgniteTxHandler {
             e,
             null,
             req.onePhaseCommit(),
-            req.deployInfo() != null);
+            req.deployInfo() != null,
+            null);
 
         try {
             ctx.io().send(node.id(), res, req.policy());


[29/50] [abbrv] ignite git commit: IGNITE-8251 Reduce testPageEviction run time - Fixes #4577.

Posted by ag...@apache.org.
IGNITE-8251 Reduce testPageEviction run time - Fixes #4577.

Signed-off-by: Dmitriy Pavlov <dp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0e29b873
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0e29b873
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0e29b873

Branch: refs/heads/ignite-5797
Commit: 0e29b873b8c13ba3bb3dbb1307567eaffd41e3b4
Parents: caa4b0a
Author: uday <ud...@gmail.com>
Authored: Mon Oct 1 19:31:18 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Mon Oct 1 19:31:18 2018 +0300

----------------------------------------------------------------------
 .../GridCachePreloadingEvictionsSelfTest.java   | 21 ++++++--------------
 .../paged/PageEvictionAbstractTest.java         |  4 ++--
 2 files changed, 8 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0e29b873/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index f134852..f9042ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.IgniteKernal;
@@ -58,7 +57,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
 public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest {
     /** */
     private static final String VALUE = createValue();
-    public static final CachePeekMode[] ALL_PEEK_MODES = new CachePeekMode[]{CachePeekMode.ALL};
+    public static final CachePeekMode[] ALL_PEEK_MODES = new CachePeekMode[] {CachePeekMode.ALL};
 
     /** */
     private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -219,22 +218,14 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     private void checkCachesConsistency(Ignite ignite1, Ignite ignite2) throws Exception {
-        IgniteKernal g1 = (IgniteKernal) ignite1;
-        IgniteKernal g2 = (IgniteKernal) ignite2;
+        IgniteKernal g1 = (IgniteKernal)ignite1;
+        IgniteKernal g2 = (IgniteKernal)ignite2;
 
         GridCacheAdapter<Integer, Object> cache1 = g1.internalCache(DEFAULT_CACHE_NAME);
         GridCacheAdapter<Integer, Object> cache2 = g2.internalCache(DEFAULT_CACHE_NAME);
 
-        for (int i = 0; i < 3; i++) {
-            if (cache1.size(ALL_PEEK_MODES) != cache2.size(ALL_PEEK_MODES)) {
-                U.warn(log, "Sizes do not match (will retry in 1000 ms) [s1=" + cache1.size(ALL_PEEK_MODES) +
-                    ", s2=" + cache2.size(ALL_PEEK_MODES) + ']');
-
-                U.sleep(1000);
-            }
-            else
-                break;
-        }
+        // Sleeping to allow the cache sizes to settle down.
+        U.sleep(3000);
 
         info("Cache1 size: " + cache1.size(ALL_PEEK_MODES));
         info("Cache2 size: " + cache2.size(ALL_PEEK_MODES));
@@ -261,4 +252,4 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
         return sb.toString();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0e29b873/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
index 072ca7f..cb0875f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
@@ -40,13 +40,13 @@ public class PageEvictionAbstractTest extends GridCommonAbstractTest {
     protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** Offheap size for memory policy. */
-    private static final int SIZE = 96 * 1024 * 1024;
+    private static final int SIZE = 20 * 1024 * 1024;
 
     /** Page size. */
     static final int PAGE_SIZE = 2048;
 
     /** Number of entries. */
-    static final int ENTRIES = 80_000;
+    static final int ENTRIES = 12_000;
 
     /** Empty pages pool size. */
     private static final int EMPTY_PAGES_POOL_SIZE = 100;


[32/50] [abbrv] ignite git commit: IGNITE-9761 Fixed deadlock in WAL manager - Fixes #4890.

Posted by ag...@apache.org.
IGNITE-9761 Fixed deadlock in WAL manager - Fixes #4890.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bd07c835
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bd07c835
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bd07c835

Branch: refs/heads/ignite-5797
Commit: bd07c83583807714757ed033901bf885c9a77b24
Parents: 4572137
Author: Anton Kalashnikov <ka...@yandex.ru>
Authored: Tue Oct 2 18:26:20 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Oct 2 18:26:20 2018 +0300

----------------------------------------------------------------------
 .../wal/aware/SegmentArchivedStorage.java       |  8 ++--
 .../persistence/wal/aware/SegmentAware.java     |  9 +++++
 .../wal/aware/SegmentLockStorage.java           | 27 +++++--------
 .../wal/aware/SegmentObservable.java            | 10 ++---
 .../persistence/wal/aware/SegmentAwareTest.java | 42 +++++++++++++++++++-
 5 files changed, 70 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bd07c835/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentArchivedStorage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentArchivedStorage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentArchivedStorage.java
index 1ed607e..c526ae1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentArchivedStorage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentArchivedStorage.java
@@ -63,10 +63,12 @@ class SegmentArchivedStorage extends SegmentObservable {
     /**
      * @param lastAbsArchivedIdx New value of last archived segment index.
      */
-    synchronized void setLastArchivedAbsoluteIndex(long lastAbsArchivedIdx) {
-        this.lastAbsArchivedIdx = lastAbsArchivedIdx;
+    void setLastArchivedAbsoluteIndex(long lastAbsArchivedIdx) {
+        synchronized (this) {
+            this.lastAbsArchivedIdx = lastAbsArchivedIdx;
 
-        notifyAll();
+            notifyAll();
+        }
 
         notifyObservers(lastAbsArchivedIdx);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/bd07c835/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
index 6ba0399..e46d93f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
@@ -220,6 +220,15 @@ public class SegmentAware {
     }
 
     /**
+     * Visible for test.
+     *
+     * @param absIdx Segment absolute index. segment later, use {@link #releaseWorkSegment} for unlock</li> </ul>
+     */
+    void lockWorkSegment(long absIdx) {
+        segmentLockStorage.lockWorkSegment(absIdx);
+    }
+
+    /**
      * @param absIdx Segment absolute index.
      */
     public void releaseWorkSegment(long absIdx) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/bd07c835/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentLockStorage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentLockStorage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentLockStorage.java
index 2e145e7..f638d4d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentLockStorage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentLockStorage.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.wal.aware;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 import org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager;
 
 /**
@@ -29,7 +29,7 @@ public class SegmentLockStorage extends SegmentObservable {
      * Maps absolute segment index to locks counter. Lock on segment protects from archiving segment and may come from
      * {@link FileWriteAheadLogManager.RecordsIterator} during WAL replay. Map itself is guarded by <code>this</code>.
      */
-    private Map<Long, Integer> locked = new HashMap<>();
+    private Map<Long, Integer> locked = new ConcurrentHashMap<>();
 
     /**
      * Check if WAL segment locked (protected from move to archive)
@@ -37,7 +37,7 @@ public class SegmentLockStorage extends SegmentObservable {
      * @param absIdx Index for check reservation.
      * @return {@code True} if index is locked.
      */
-    public synchronized boolean locked(long absIdx) {
+    public boolean locked(long absIdx) {
         return locked.containsKey(absIdx);
     }
 
@@ -47,12 +47,8 @@ public class SegmentLockStorage extends SegmentObservable {
      * segment later, use {@link #releaseWorkSegment} for unlock</li> </ul>
      */
     @SuppressWarnings("NonPrivateFieldAccessedInSynchronizedContext")
-    synchronized boolean lockWorkSegment(long absIdx) {
-        Integer cur = locked.get(absIdx);
-
-        cur = cur == null ? 1 : cur + 1;
-
-        locked.put(absIdx, cur);
+    boolean lockWorkSegment(long absIdx) {
+        locked.compute(absIdx, (idx, count) -> count == null ? 1 : count + 1);
 
         return false;
     }
@@ -61,15 +57,12 @@ public class SegmentLockStorage extends SegmentObservable {
      * @param absIdx Segment absolute index.
      */
     @SuppressWarnings("NonPrivateFieldAccessedInSynchronizedContext")
-    synchronized void releaseWorkSegment(long absIdx) {
-        Integer cur = locked.get(absIdx);
-
-        assert cur != null && cur >= 1 : "cur=" + cur + ", absIdx=" + absIdx;
+    void releaseWorkSegment(long absIdx) {
+        locked.compute(absIdx, (idx, count) -> {
+            assert count != null && count >= 1 : "cur=" + count + ", absIdx=" + absIdx;
 
-        if (cur == 1)
-            locked.remove(absIdx);
-        else
-            locked.put(absIdx, cur - 1);
+            return count == 1 ? null : count - 1;
+        });
 
         notifyObservers(absIdx);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/bd07c835/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentObservable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentObservable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentObservable.java
index ba5ad30..3e91504 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentObservable.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentObservable.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.wal.aware;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.function.Consumer;
 
 /**
@@ -26,12 +26,12 @@ import java.util.function.Consumer;
  */
 public abstract class SegmentObservable {
     /** Observers for handle changes of archived index. */
-    private final List<Consumer<Long>> observers = new ArrayList<>();
+    private final Queue<Consumer<Long>> observers = new ConcurrentLinkedQueue<>();
 
     /**
      * @param observer Observer for notification about segment's changes.
      */
-    synchronized void addObserver(Consumer<Long> observer) {
+    void addObserver(Consumer<Long> observer) {
         observers.add(observer);
     }
 
@@ -40,7 +40,7 @@ public abstract class SegmentObservable {
      *
      * @param segmentId Segment which was been changed.
      */
-    synchronized void notifyObservers(long segmentId) {
+    void notifyObservers(long segmentId) {
         observers.forEach(observer -> observer.accept(segmentId));
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/bd07c835/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
index 7840b09..0869356 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
@@ -31,6 +31,46 @@ import static org.junit.Assert.assertThat;
  * Test for {@link SegmentAware}.
  */
 public class SegmentAwareTest extends TestCase {
+
+    /**
+     * Checking to avoid deadlock SegmentArchivedStorage.markAsMovedToArchive -> SegmentLockStorage.locked <->
+     * SegmentLockStorage.releaseWorkSegment -> SegmentArchivedStorage.onSegmentUnlocked
+     *
+     * @throws IgniteCheckedException if failed.
+     */
+    public void testAvoidDeadlockArchiverAndLockStorage() throws IgniteCheckedException {
+        SegmentAware aware = new SegmentAware(10, false);
+
+        int iterationCnt = 100_000;
+        int segmentToHandle = 1;
+
+        IgniteInternalFuture archiverThread = GridTestUtils.runAsync(() -> {
+            int i = iterationCnt;
+
+            while (i-- > 0) {
+                try {
+                    aware.markAsMovedToArchive(segmentToHandle);
+                }
+                catch (IgniteInterruptedCheckedException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+
+        IgniteInternalFuture lockerThread = GridTestUtils.runAsync(() -> {
+            int i = iterationCnt;
+
+            while (i-- > 0) {
+                aware.lockWorkSegment(segmentToHandle);
+
+                aware.releaseWorkSegment(segmentToHandle);
+            }
+        });
+
+        archiverThread.get();
+        lockerThread.get();
+    }
+
     /**
      * Waiting finished when work segment is set.
      */
@@ -435,7 +475,7 @@ public class SegmentAwareTest extends TestCase {
     public void testLastCompressedIdxProperOrdering() throws IgniteInterruptedCheckedException {
         SegmentAware aware = new SegmentAware(10, true);
 
-        for (int i = 0; i < 5 ; i++) {
+        for (int i = 0; i < 5; i++) {
             aware.setLastArchivedAbsoluteIndex(i);
             aware.waitNextSegmentToCompress();
         }


[28/50] [abbrv] ignite git commit: IGNITE-9741 Fix SegmentArchivedStorage and SegmentCompressStorage remain `iterrupted` after de-activation occurs before activation - Fixes #4878.

Posted by ag...@apache.org.
IGNITE-9741 Fix SegmentArchivedStorage and SegmentCompressStorage remain `iterrupted` after de-activation occurs before activation - Fixes #4878.

Signed-off-by: Dmitriy Govorukhin <dm...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/caa4b0aa
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/caa4b0aa
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/caa4b0aa

Branch: refs/heads/ignite-5797
Commit: caa4b0aa9d117d08d78186c82627b23b1d21fb5e
Parents: 2f9faf1
Author: Anton Kalashnikov <ka...@yandex.ru>
Authored: Mon Oct 1 17:39:24 2018 +0300
Committer: Dmitriy Govorukhin <dm...@gmail.com>
Committed: Mon Oct 1 17:39:24 2018 +0300

----------------------------------------------------------------------
 .../wal/FileWriteAheadLogManager.java           |  7 +-
 .../IgniteClusterActivateDeactivateTest.java    | 86 +++++++++++++++++---
 2 files changed, 78 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/caa4b0aa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
index 8388bb2..28d9b07 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
@@ -323,7 +323,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     private final SegmentFileInputFactory segmentFileInputFactory;
 
     /** Holder of actual information of latest manipulation on WAL segments. */
-    private final SegmentAware segmentAware;
+    private volatile SegmentAware segmentAware;
 
     /** Updater for {@link #currHnd}, used for verify there are no concurrent update for current log segment handle */
     private static final AtomicReferenceFieldUpdater<FileWriteAheadLogManager, FileWriteHandle> CURR_HND_UPD =
@@ -422,7 +422,6 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
 
         evt = ctx.event();
         failureProcessor = ctx.failure();
-        segmentAware = new SegmentAware(dsCfg.getWalSegments(), dsCfg.isWalCompactionEnabled());
     }
 
     /**
@@ -480,6 +479,8 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
 
             IgniteBiTuple<Long, Long> tup = scanMinMaxArchiveIndices();
 
+            segmentAware = new SegmentAware(dsCfg.getWalSegments(), dsCfg.isWalCompactionEnabled());
+
             segmentAware.lastTruncatedArchiveIdx(tup == null ? -1 : tup.get1() - 1);
 
             long lastAbsArchivedIdx = tup == null ? -1 : tup.get2();
@@ -2412,7 +2413,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     private abstract static class FileHandle {
         /** I/O interface for read/write operations with file */
         SegmentIO fileIO;
-        
+
         /** Segment idx corresponded to fileIo*/
         final long segmentIdx;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/caa4b0aa/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
index f6b4ddd..87d7d16 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
@@ -72,6 +72,8 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
     /** Non-persistent data region name. */
     private static final String NO_PERSISTENCE_REGION = "no-persistence-region";
+    /** */
+    private static final int DEFAULT_CACHES_COUNT = 2;
 
     /** */
     boolean client;
@@ -122,6 +124,8 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
         memCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration()
             .setMaxSize(150L * 1024 * 1024)
             .setPersistenceEnabled(persistenceEnabled()));
+        memCfg.setWalSegments(2);
+        memCfg.setWalSegmentSize(512 * 1024);
 
         memCfg.setDataRegionConfigurations(new DataRegionConfiguration()
             .setMaxSize(150L * 1024 * 1024)
@@ -227,7 +231,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
             assertTrue(ignite(i).cluster().active());
 
         for (int i = 0; i < srvs + clients; i++) {
-            for (int c = 0; c < 2; c++)
+            for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
                 checkCache(ignite(i), CACHE_NAME_PREFIX + c, true);
 
             checkCache(ignite(i), CU.UTILITY_CACHE_NAME, true);
@@ -239,7 +243,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         startGrid(srvs + clients);
 
-        for (int c = 0; c < 2; c++)
+        for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
             checkCache(ignite(srvs + clients), CACHE_NAME_PREFIX + c, true);
 
         checkCaches(srvs + clients + 1, CACHES);
@@ -248,18 +252,76 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         startGrid(srvs + clients + 1);
 
-        for (int c = 0; c < 2; c++)
+        for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
             checkCache(ignite(srvs + clients + 1), CACHE_NAME_PREFIX + c, false);
 
         checkCaches(srvs + clients + 2, CACHES);
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testReActivateSimple_5_Servers_4_Clients_FromClient() throws Exception {
+        reactivateSimple(5, 4, 6);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testReActivateSimple_5_Servers_4_Clients_FromServer() throws Exception {
+        reactivateSimple(5, 4, 0);
+    }
+
+    /**
+     * @param srvs Number of servers.
+     * @param clients Number of clients.
+     * @param activateFrom Index of node stating activation.
+     * @throws Exception If failed.
+     */
+    public void reactivateSimple(int srvs, int clients, int activateFrom) throws Exception {
+        activateSimple(srvs, clients, activateFrom);
+
+        rolloverSegmentAtLeastTwice(activateFrom);
+
+        for (int i = 0; i < srvs + clients; i++) {
+            for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
+                checkCache(ignite(i), CACHE_NAME_PREFIX + c, true);
+
+            checkCache(ignite(i), CU.UTILITY_CACHE_NAME, true);
+        }
+
+        ignite(activateFrom).cluster().active(false);
+
+        ignite(activateFrom).cluster().active(true);
+
+        rolloverSegmentAtLeastTwice(activateFrom);
+
+        for (int i = 0; i < srvs + clients; i++) {
+            for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
+                checkCache(ignite(i), CACHE_NAME_PREFIX + c, true);
+
+            checkCache(ignite(i), CU.UTILITY_CACHE_NAME, true);
+        }
+    }
+
+    /**
+     * Work directory have 2 segments by default. This method do full circle.
+     */
+    private void rolloverSegmentAtLeastTwice(int activateFrom) {
+        for (int c = 0; c < DEFAULT_CACHES_COUNT; c++) {
+            IgniteCache<Object, Object> cache = ignite(activateFrom).cache(CACHE_NAME_PREFIX + c);
+            //this should be enough including free-,meta- page and etc.
+            for (int i = 0; i < 1000; i++)
+                cache.put(i, i);
+        }
+    }
+
+    /**
      * @param nodes Number of nodes.
      * @param caches Number of caches.
      */
     final void checkCaches(int nodes, int caches) {
-        for (int i  = 0; i < nodes; i++) {
+        for (int i = 0; i < nodes; i++) {
             for (int c = 0; c < caches; c++) {
                 IgniteCache<Integer, Integer> cache = ignite(i).cache(CACHE_NAME_PREFIX + c);
 
@@ -322,7 +384,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
         activeFut.get();
         startFut.get();
 
-        for (int c = 0; c < 2; c++)
+        for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
             checkCache(ignite(2), CACHE_NAME_PREFIX + c, true);
 
         if (withNewCache) {
@@ -379,7 +441,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
         }
 
         if (blockMsgNodes.length == 0)
-            blockMsgNodes = new int[]{1};
+            blockMsgNodes = new int[] {1};
 
         final AffinityTopologyVersion STATE_CHANGE_TOP_VER = new AffinityTopologyVersion(srvs + clients, minorVer);
 
@@ -474,7 +536,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         ignite(2).cluster().active(true);
 
-        for (int c = 0; c < 2; c++)
+        for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
             checkCache(ignite(2), CACHE_NAME_PREFIX + c, true);
 
         if (withNewCache) {
@@ -646,7 +708,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
         }
 
         for (int i = 0; i < srvs; i++) {
-            for (int c = 0; c < 2; c++)
+            for (int c = 0; c < DEFAULT_CACHES_COUNT; c++)
                 checkCache(ignite(i), CACHE_NAME_PREFIX + c, true);
         }
 
@@ -939,7 +1001,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
     public void testInactiveTopologyChanges() throws Exception {
         testSpi = true;
 
-        testSpiRecord = new Class[]{GridDhtPartitionsSingleMessage.class, GridDhtPartitionsFullMessage.class};
+        testSpiRecord = new Class[] {GridDhtPartitionsSingleMessage.class, GridDhtPartitionsFullMessage.class};
 
         active = false;
 
@@ -1141,13 +1203,13 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         client = false;
 
-        IgniteInternalFuture startFut1 = GridTestUtils.runAsync((Callable) () -> {
+        IgniteInternalFuture startFut1 = GridTestUtils.runAsync((Callable)() -> {
             startGrid(4);
 
             return null;
         }, "start-node1");
 
-        IgniteInternalFuture startFut2 = GridTestUtils.runAsync((Callable) () -> {
+        IgniteInternalFuture startFut2 = GridTestUtils.runAsync((Callable)() -> {
             startGrid(5);
 
             return null;
@@ -1184,7 +1246,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         final int nodes = 2;
 
-        IgniteEx crd = (IgniteEx) startGrids(nodes);
+        IgniteEx crd = (IgniteEx)startGrids(nodes);
 
         crd.cluster().active(true);
 


[19/50] [abbrv] ignite git commit: IGNITE-9693 Scale up wal compression workers to increase performance - Fixes #4831.

Posted by ag...@apache.org.
IGNITE-9693 Scale up wal compression workers to increase performance - Fixes #4831.

Signed-off-by: Ivan Rakov <ir...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/036bd074
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/036bd074
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/036bd074

Branch: refs/heads/ignite-5797
Commit: 036bd074d8bfd25a2c4c463a60dde00604d11b9d
Parents: a748090
Author: Ivan Daschinskiy <iv...@gmail.com>
Authored: Fri Sep 28 18:03:45 2018 +0300
Committer: Ivan Rakov <ir...@apache.org>
Committed: Fri Sep 28 18:10:01 2018 +0300

----------------------------------------------------------------------
 .../apache/ignite/IgniteSystemProperties.java   |   5 +
 .../pagemem/wal/IgniteWriteAheadLogManager.java |   3 +-
 .../GridCacheDatabaseSharedManager.java         |  11 +-
 .../wal/FileWriteAheadLogManager.java           | 208 ++++++++++++-------
 .../wal/FsyncModeFileWriteAheadLogManager.java  |   7 +-
 .../persistence/wal/aware/SegmentAware.java     |  28 ++-
 .../wal/aware/SegmentCompressStorage.java       |  80 +++++--
 ...PdsReserveWalSegmentsWithCompactionTest.java |  34 +++
 .../persistence/pagemem/NoOpWALManager.java     |   2 +-
 .../persistence/wal/aware/SegmentAwareTest.java |  90 +++++---
 .../ignite/testsuites/IgnitePdsTestSuite2.java  |   2 +
 11 files changed, 324 insertions(+), 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 5932de0..01fb02a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -901,6 +901,11 @@ public final class IgniteSystemProperties {
     public static final String IGNITE_THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE = "IGNITE_THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE";
 
     /**
+     * Count of WAL compressor worker threads. Default value is 4.
+     */
+    public static final String IGNITE_WAL_COMPRESSOR_WORKER_THREAD_CNT = "IGNITE_WAL_COMPRESSOR_WORKER_THREAD_CNT";
+
+    /**
      * Whenever read load balancing is enabled, that means 'get' requests will be distributed between primary and backup
      * nodes if it is possible and {@link CacheConfiguration#readFromBackup} is {@code true}.
      *

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java
index 12fd3e9..4ffa347 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java
@@ -86,9 +86,8 @@ public interface IgniteWriteAheadLogManager extends GridCacheSharedManager, Igni
      * Invoke this method to reserve WAL history since provided pointer and prevent it's deletion.
      *
      * @param start WAL pointer.
-     * @throws IgniteException If failed to reserve.
      */
-    public boolean reserve(WALPointer start) throws IgniteCheckedException;
+    public boolean reserve(WALPointer start);
 
     /**
      * Invoke this method to release WAL history since provided pointer that was previously reserved.

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 158c3b1..5e0b7cb 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -1758,16 +1758,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
         if (ptr == null)
             return false;
 
-        boolean reserved;
-
-        try {
-            reserved = cctx.wal().reserve(ptr);
-        }
-        catch (IgniteCheckedException e) {
-            U.error(log, "Error while trying to reserve history", e);
-
-            reserved = false;
-        }
+        boolean reserved = cctx.wal().reserve(ptr);
 
         if (reserved)
             reservedForPreloading.put(new T2<>(grpId, partId), new T2<>(cntr, ptr));

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
index 5d165fd..43dfb8f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
@@ -134,6 +134,7 @@ import static java.nio.file.StandardOpenOption.READ;
 import static java.nio.file.StandardOpenOption.WRITE;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_CHECKPOINT_TRIGGER_ARCHIVE_SIZE_PERCENTAGE;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE;
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_COMPRESSOR_WORKER_THREAD_CNT;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_MMAP;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_SEGMENT_SYNC_TIMEOUT;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_SERIALIZER_VERSION;
@@ -257,6 +258,12 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     private static final double THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE =
         IgniteSystemProperties.getDouble(IGNITE_THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE, 0.5);
 
+    /**
+     * Number of WAL compressor worker threads.
+     */
+    private final int WAL_COMPRESSOR_WORKER_THREAD_CNT =
+            IgniteSystemProperties.getInteger(IGNITE_WAL_COMPRESSOR_WORKER_THREAD_CNT, 4);
+
     /** */
     private final boolean alwaysWriteFullPages;
 
@@ -415,7 +422,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
 
         evt = ctx.event();
         failureProcessor = ctx.failure();
-        segmentAware = new SegmentAware(dsCfg.getWalSegments());
+        segmentAware = new SegmentAware(dsCfg.getWalSegments(), dsCfg.isWalCompactionEnabled());
     }
 
     /**
@@ -486,7 +493,8 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
                 segmentAware.setLastArchivedAbsoluteIndex(lastAbsArchivedIdx);
 
             if (dsCfg.isWalCompactionEnabled()) {
-                compressor = new FileCompressor();
+                if (compressor == null)
+                    compressor = new FileCompressor(log);
 
                 if (decompressor == null) {  // Preventing of two file-decompressor thread instantiations.
                     decompressor = new FileDecompressor(log);
@@ -895,7 +903,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     }
 
     /** {@inheritDoc} */
-    @Override public boolean reserve(WALPointer start) throws IgniteCheckedException {
+    @Override public boolean reserve(WALPointer start) {
         assert start != null && start instanceof FileWALPointer : "Invalid start pointer: " + start;
 
         if (mode == WALMode.NONE)
@@ -1005,7 +1013,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     /** {@inheritDoc} */
     @Override public void notchLastCheckpointPtr(WALPointer ptr) {
         if (compressor != null)
-            compressor.keepUncompressedIdxFrom(((FileWALPointer)ptr).index());
+            segmentAware.keepUncompressedIdxFrom(((FileWALPointer)ptr).index());
     }
 
     /** {@inheritDoc} */
@@ -1910,16 +1918,13 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
      * Responsible for compressing WAL archive segments.
      * Also responsible for deleting raw copies of already compressed WAL archive segments if they are not reserved.
      */
-    private class FileCompressor extends Thread {
-        /** Current thread stopping advice. */
-        private volatile boolean stopped;
-
-        /** All segments prior to this (inclusive) can be compressed. */
-        private volatile long minUncompressedIdxToKeep = -1L;
+    private class FileCompressor extends FileCompressorWorker {
+        /** Workers queue. */
+        List<FileCompressorWorker> workers = new ArrayList<>();
 
         /** */
-        FileCompressor() {
-            super("wal-file-compressor%" + cctx.igniteInstanceName());
+        FileCompressor(IgniteLogger log) {
+            super(0, log);
         }
 
         /** */
@@ -1927,7 +1932,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
             File[] toDel = walArchiveDir.listFiles(WAL_SEGMENT_TEMP_FILE_COMPACTED_FILTER);
 
             for (File f : toDel) {
-                if (stopped)
+                if (isCancelled())
                     return;
 
                 f.delete();
@@ -1936,82 +1941,118 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
             FileDescriptor[] alreadyCompressed = scan(walArchiveDir.listFiles(WAL_SEGMENT_FILE_COMPACTED_FILTER));
 
             if (alreadyCompressed.length > 0)
-                segmentAware.lastCompressedIdx(alreadyCompressed[alreadyCompressed.length - 1].idx());
+                segmentAware.onSegmentCompressed(alreadyCompressed[alreadyCompressed.length - 1].idx());
+
+            for (int i = 1; i < calculateThreadCount(); i++) {
+                FileCompressorWorker worker = new FileCompressorWorker(i, log);
+
+                worker.start();
+
+                workers.add(worker);
+            }
         }
 
         /**
-         * @param idx Minimum raw segment index that should be preserved from deletion.
+         * Calculate optimal additional compressor worker threads count. If quarter of proc threads greater
+         * than WAL_COMPRESSOR_WORKER_THREAD_CNT, use this value. Otherwise, reduce number of threads.
+         *
+         * @return Optimal number of compressor threads.
          */
-        void keepUncompressedIdxFrom(long idx) {
-            minUncompressedIdxToKeep = idx;
+        private int calculateThreadCount() {
+            int procNum = Runtime.getRuntime().availableProcessors();
+
+            // If quarter of proc threads greater than WAL_COMPRESSOR_WORKER_THREAD_CNT,
+            // use this value. Otherwise, reduce number of threads.
+            if (procNum >> 2 >= WAL_COMPRESSOR_WORKER_THREAD_CNT)
+                return WAL_COMPRESSOR_WORKER_THREAD_CNT;
+            else
+                return procNum >> 2;
         }
 
-        /**
-         * Pessimistically tries to reserve segment for compression in order to avoid concurrent truncation.
-         * Waits if there's no segment to archive right now.
-         */
-        private long tryReserveNextSegmentOrWait() throws IgniteCheckedException {
-            long segmentToCompress = segmentAware.waitNextSegmentToCompress();
 
-            boolean reserved = reserve(new FileWALPointer(segmentToCompress, 0, 0));
+        /** {@inheritDoc} */
+        @Override public void body() throws InterruptedException, IgniteInterruptedCheckedException{
+            init();
 
-            return reserved ? segmentToCompress : -1;
+            super.body0();
         }
 
         /**
-         * Deletes raw WAL segments if they aren't locked and already have compressed copies of themselves.
+         * @throws IgniteInterruptedCheckedException If failed to wait for thread shutdown.
          */
-        private void deleteObsoleteRawSegments() {
-            FileDescriptor[] descs = scan(walArchiveDir.listFiles(WAL_SEGMENT_COMPACTED_OR_RAW_FILE_FILTER));
+        private void shutdown() throws IgniteInterruptedCheckedException {
+            synchronized (this) {
+                for (FileCompressorWorker worker: workers)
+                    U.cancel(worker);
 
-            Set<Long> indices = new HashSet<>();
-            Set<Long> duplicateIndices = new HashSet<>();
+                for (FileCompressorWorker worker: workers)
+                    U.join(worker);
 
-            for (FileDescriptor desc : descs) {
-                if (!indices.add(desc.idx))
-                    duplicateIndices.add(desc.idx);
+                U.cancel(this);
             }
 
-            for (FileDescriptor desc : descs) {
-                if (desc.isCompressed())
-                    continue;
+            U.join(this);
+        }
+    }
 
-                // Do not delete reserved or locked segment and any segment after it.
-                if (segmentReservedOrLocked(desc.idx))
-                    return;
+    /** */
+    private class FileCompressorWorker extends GridWorker {
+        /** */
+        private Thread thread;
 
-                if (desc.idx < minUncompressedIdxToKeep && duplicateIndices.contains(desc.idx)) {
-                    if (!desc.file.delete())
-                        U.warn(log, "Failed to remove obsolete WAL segment (make sure the process has enough rights): " +
-                            desc.file.getAbsolutePath() + ", exists: " + desc.file.exists());
-                }
-            }
+        /** */
+        FileCompressorWorker(int idx,  IgniteLogger log) {
+            super(cctx.igniteInstanceName(), "wal-file-compressor-%" + cctx.igniteInstanceName() + "%-" + idx, log);
+        }
+
+        /** */
+        void start() {
+            thread = new IgniteThread(this);
+
+            thread.start();
+        }
+
+        /**
+         * Pessimistically tries to reserve segment for compression in order to avoid concurrent truncation.
+         * Waits if there's no segment to archive right now.
+         */
+        private long tryReserveNextSegmentOrWait() throws IgniteInterruptedCheckedException{
+            long segmentToCompress = segmentAware.waitNextSegmentToCompress();
+
+            boolean reserved = reserve(new FileWALPointer(segmentToCompress, 0, 0));
+
+            return reserved ? segmentToCompress : -1;
         }
 
         /** {@inheritDoc} */
-        @Override public void run() {
-            init();
+        @Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException {
+            body0();
+        }
 
-            while (!Thread.currentThread().isInterrupted() && !stopped) {
-                long currReservedSegment = -1;
+        /** */
+        private void body0() {
+            while (!isCancelled()) {
+                long segIdx = -1L;
 
                 try {
-                    deleteObsoleteRawSegments();
+                    segIdx = tryReserveNextSegmentOrWait();
 
-                    currReservedSegment = tryReserveNextSegmentOrWait();
-                    if (currReservedSegment == -1)
+                    if (segIdx <= segmentAware.lastCompressedIdx())
                         continue;
 
-                    File tmpZip = new File(walArchiveDir, FileDescriptor.fileName(currReservedSegment)
-                        + FilePageStoreManager.ZIP_SUFFIX + FilePageStoreManager.TMP_SUFFIX);
+                    deleteObsoleteRawSegments();
+
+                    File tmpZip = new File(walArchiveDir, FileDescriptor.fileName(segIdx)
+                            + FilePageStoreManager.ZIP_SUFFIX + FilePageStoreManager.TMP_SUFFIX);
 
-                    File zip = new File(walArchiveDir, FileDescriptor.fileName(currReservedSegment) + FilePageStoreManager.ZIP_SUFFIX);
+                    File zip = new File(walArchiveDir, FileDescriptor.fileName(segIdx) + FilePageStoreManager.ZIP_SUFFIX);
+
+                    File raw = new File(walArchiveDir, FileDescriptor.fileName(segIdx));
 
-                    File raw = new File(walArchiveDir, FileDescriptor.fileName(currReservedSegment));
                     if (!Files.exists(raw.toPath()))
                         throw new IgniteCheckedException("WAL archive segment is missing: " + raw);
 
-                    compressSegmentToFile(currReservedSegment, raw, tmpZip);
+                    compressSegmentToFile(segIdx, raw, tmpZip);
 
                     Files.move(tmpZip.toPath(), zip.toPath());
 
@@ -2022,27 +2063,27 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
 
                         if (evt.isRecordable(EVT_WAL_SEGMENT_COMPACTED)) {
                             evt.record(new WalSegmentCompactedEvent(
-                                cctx.discovery().localNode(),
-                                currReservedSegment,
-                                zip.getAbsoluteFile())
+                                    cctx.localNode(),
+                                    segIdx,
+                                    zip.getAbsoluteFile())
                             );
                         }
                     }
 
-                    segmentAware.lastCompressedIdx(currReservedSegment);
+                    segmentAware.onSegmentCompressed(segIdx);
                 }
                 catch (IgniteInterruptedCheckedException ignore) {
                     Thread.currentThread().interrupt();
                 }
                 catch (IgniteCheckedException | IOException e) {
-                    U.error(log, "Compression of WAL segment [idx=" + currReservedSegment +
-                        "] was skipped due to unexpected error", e);
+                    U.error(log, "Compression of WAL segment [idx=" + segIdx +
+                            "] was skipped due to unexpected error", e);
 
-                    segmentAware.lastCompressedIdx(currReservedSegment);
+                    segmentAware.onSegmentCompressed(segIdx);
                 }
                 finally {
-                    if (currReservedSegment != -1)
-                        release(new FileWALPointer(currReservedSegment, 0, 0));
+                    if (segIdx != -1L)
+                        release(new FileWALPointer(segIdx, 0, 0));
                 }
             }
         }
@@ -2053,7 +2094,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
          * @param zip Zip file.
          */
         private void compressSegmentToFile(long nextSegment, File raw, File zip)
-            throws IOException, IgniteCheckedException {
+                throws IOException, IgniteCheckedException {
             int segmentSerializerVer;
 
             try (FileIO fileIO = ioFactory.create(raw)) {
@@ -2083,7 +2124,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
                 };
 
                 try (SingleSegmentLogicalRecordsIterator iter = new SingleSegmentLogicalRecordsIterator(
-                    log, cctx, ioFactory, BUF_SIZE, nextSegment, walArchiveDir, appendToZipC)) {
+                        log, cctx, ioFactory, BUF_SIZE, nextSegment, walArchiveDir, appendToZipC)) {
 
                     while (iter.hasNextX())
                         iter.nextX();
@@ -2102,7 +2143,7 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
          * @param ser Record Serializer.
          */
         @NotNull private ByteBuffer prepareSwitchSegmentRecordBuffer(long nextSegment, RecordSerializer ser)
-            throws IgniteCheckedException {
+                throws IgniteCheckedException {
             SwitchSegmentRecord switchRecord = new SwitchSegmentRecord();
 
             int switchRecordSize = ser.size(switchRecord);
@@ -2117,16 +2158,33 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
         }
 
         /**
-         * @throws IgniteInterruptedCheckedException If failed to wait for thread shutdown.
+         * Deletes raw WAL segments if they aren't locked and already have compressed copies of themselves.
          */
-        private void shutdown() throws IgniteInterruptedCheckedException {
-            synchronized (this) {
-                stopped = true;
+        private void deleteObsoleteRawSegments() {
+            FileDescriptor[] descs = scan(walArchiveDir.listFiles(WAL_SEGMENT_COMPACTED_OR_RAW_FILE_FILTER));
 
-                notifyAll();
+            Set<Long> indices = new HashSet<>();
+            Set<Long> duplicateIndices = new HashSet<>();
+
+            for (FileDescriptor desc : descs) {
+                if (!indices.add(desc.idx))
+                    duplicateIndices.add(desc.idx);
             }
 
-            U.join(this);
+            for (FileDescriptor desc : descs) {
+                if (desc.isCompressed())
+                    continue;
+
+                // Do not delete reserved or locked segment and any segment after it.
+                if (segmentReservedOrLocked(desc.idx))
+                    return;
+
+                if (desc.idx < segmentAware.keepUncompressedIdxFrom() && duplicateIndices.contains(desc.idx)) {
+                    if (desc.file.exists() && !desc.file.delete())
+                        U.warn(log, "Failed to remove obsolete WAL segment (make sure the process has enough rights): " +
+                                desc.file.getAbsolutePath() + ", exists: " + desc.file.exists());
+                }
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
index df8f4de..1c0325e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FsyncModeFileWriteAheadLogManager.java
@@ -783,7 +783,7 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda
     }
 
     /** {@inheritDoc} */
-    @Override public boolean reserve(WALPointer start) throws IgniteCheckedException {
+    @Override public boolean reserve(WALPointer start) {
         assert start != null && start instanceof FileWALPointer : "Invalid start pointer: " + start;
 
         if (mode == WALMode.NONE)
@@ -791,8 +791,7 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda
 
         FileArchiver archiver0 = archiver;
 
-        if (archiver0 == null)
-            throw new IgniteCheckedException("Could not reserve WAL segment: archiver == null");
+        assert archiver0 != null : "Could not reserve WAL segment: archiver == null";
 
         archiver0.reserve(((FileWALPointer)start).index());
 
@@ -1912,7 +1911,7 @@ public class FsyncModeFileWriteAheadLogManager extends GridCacheSharedManagerAda
          * Pessimistically tries to reserve segment for compression in order to avoid concurrent truncation.
          * Waits if there's no segment to archive right now.
          */
-        private long tryReserveNextSegmentOrWait() throws InterruptedException, IgniteCheckedException {
+        private long tryReserveNextSegmentOrWait() throws InterruptedException {
             long segmentToCompress = lastCompressedIdx + 1;
 
             synchronized (this) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
index 3379b74..6ba0399 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAware.java
@@ -36,15 +36,17 @@ public class SegmentAware {
     /** Manages last archived index, emulates archivation in no-archiver mode. */
     private final SegmentArchivedStorage segmentArchivedStorage = buildArchivedStorage(segmentLockStorage);
     /** Storage of actual information about current index of compressed segments. */
-    private final SegmentCompressStorage segmentCompressStorage = buildCompressStorage(segmentArchivedStorage);
+    private final SegmentCompressStorage segmentCompressStorage;
     /** Storage of absolute current segment index. */
     private final SegmentCurrentStateStorage segmentCurrStateStorage;
 
     /**
      * @param walSegmentsCnt Total WAL segments count.
+     * @param compactionEnabled Is wal compaction enabled.
      */
-    public SegmentAware(int walSegmentsCnt) {
+    public SegmentAware(int walSegmentsCnt, boolean compactionEnabled) {
         segmentCurrStateStorage = buildCurrentStateStorage(walSegmentsCnt, segmentArchivedStorage);
+        segmentCompressStorage = buildCompressStorage(segmentArchivedStorage, compactionEnabled);
     }
 
     /**
@@ -108,12 +110,12 @@ public class SegmentAware {
     }
 
     /**
-     * Force set last compressed segment.
+     * Callback after segment compression finish.
      *
-     * @param lastCompressedIdx Segment which was last compressed.
+     * @param compressedIdx Index of compressed segment.
      */
-    public void lastCompressedIdx(long lastCompressedIdx) {
-        segmentCompressStorage.lastCompressedIdx(lastCompressedIdx);
+    public void onSegmentCompressed(long compressedIdx) {
+        segmentCompressStorage.onSegmentCompressed(compressedIdx);
     }
 
     /**
@@ -124,6 +126,20 @@ public class SegmentAware {
     }
 
     /**
+     * @param idx Minimum raw segment index that should be preserved from deletion.
+     */
+    public void keepUncompressedIdxFrom(long idx) {
+        segmentCompressStorage.keepUncompressedIdxFrom(idx);
+    }
+
+    /**
+     * @return  Minimum raw segment index that should be preserved from deletion.
+     */
+    public long keepUncompressedIdxFrom() {
+        return segmentCompressStorage.keepUncompressedIdxFrom();
+    }
+
+    /**
      * Update current WAL index.
      *
      * @param curAbsWalIdx New current WAL index.

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java
index 30c9a2d..174fb46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java
@@ -18,6 +18,10 @@
 package org.apache.ignite.internal.processors.cache.persistence.wal.aware;
 
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Queue;
 
 /**
  * Storage of actual information about current index of compressed segments.
@@ -25,25 +29,50 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 public class SegmentCompressStorage {
     /** Flag of interrupt waiting on this object. */
     private volatile boolean interrupted;
+
     /** Manages last archived index, emulates archivation in no-archiver mode. */
     private final SegmentArchivedStorage segmentArchivedStorage;
+
+    /** If WAL compaction enabled. */
+    private final boolean compactionEnabled;
+
     /** Last successfully compressed segment. */
     private volatile long lastCompressedIdx = -1L;
 
+    /** Last enqueued to compress segment. */
+    private long lastEnqueuedToCompressIdx = -1L;
+
+    /** Segments to compress queue. */
+    private final Queue<Long> segmentsToCompress = new ArrayDeque<>();
+
+    /** List of currently compressing segments. */
+    private final List<Long> compressingSegments = new ArrayList<>();
+
+    /** Compressed segment with maximal index. */
+    private long lastMaxCompressedIdx = -1L;
+
+    /** Min uncompressed index to keep. */
+    private volatile long minUncompressedIdxToKeep = -1L;
+
     /**
      * @param segmentArchivedStorage Storage of last archived segment.
+     * @param compactionEnabled If WAL compaction enabled.
      */
-    private SegmentCompressStorage(SegmentArchivedStorage segmentArchivedStorage) {
+    private SegmentCompressStorage(SegmentArchivedStorage segmentArchivedStorage, boolean compactionEnabled) {
         this.segmentArchivedStorage = segmentArchivedStorage;
 
+        this.compactionEnabled = compactionEnabled;
+
         this.segmentArchivedStorage.addObserver(this::onSegmentArchived);
     }
 
     /**
      * @param segmentArchivedStorage Storage of last archived segment.
+     * @param compactionEnabled If WAL compaction enabled.
      */
-    static SegmentCompressStorage buildCompressStorage(SegmentArchivedStorage segmentArchivedStorage) {
-        SegmentCompressStorage storage = new SegmentCompressStorage(segmentArchivedStorage);
+    static SegmentCompressStorage buildCompressStorage(SegmentArchivedStorage segmentArchivedStorage,
+                                                       boolean compactionEnabled) {
+        SegmentCompressStorage storage = new SegmentCompressStorage(segmentArchivedStorage, compactionEnabled);
 
         segmentArchivedStorage.addObserver(storage::onSegmentArchived);
 
@@ -51,12 +80,20 @@ public class SegmentCompressStorage {
     }
 
     /**
-     * Force set last compressed segment.
+     * Callback after segment compression finish.
      *
-     * @param lastCompressedIdx Segment which was last compressed.
+     * @param compressedIdx Index of compressed segment.
      */
-    void lastCompressedIdx(long lastCompressedIdx) {
-        this.lastCompressedIdx = lastCompressedIdx;
+    synchronized void onSegmentCompressed(long compressedIdx) {
+        if (compressedIdx > lastMaxCompressedIdx)
+            lastMaxCompressedIdx = compressedIdx;
+
+        compressingSegments.remove(compressedIdx);
+
+        if (!compressingSegments.isEmpty())
+            this.lastCompressedIdx = Math.min(lastMaxCompressedIdx, compressingSegments.get(0) - 1);
+        else
+            this.lastCompressedIdx = lastMaxCompressedIdx;
     }
 
     /**
@@ -71,13 +108,8 @@ public class SegmentCompressStorage {
      * there's no segment to archive right now.
      */
     synchronized long nextSegmentToCompressOrWait() throws IgniteInterruptedCheckedException {
-        long segmentToCompress = lastCompressedIdx + 1;
-
         try {
-            while (
-                segmentToCompress > segmentArchivedStorage.lastArchivedAbsoluteIndex()
-                    && !interrupted
-                )
+            while (segmentsToCompress.peek() == null && !interrupted)
                 wait();
         }
         catch (InterruptedException e) {
@@ -86,7 +118,11 @@ public class SegmentCompressStorage {
 
         checkInterrupted();
 
-        return segmentToCompress;
+        Long idx = segmentsToCompress.poll();
+
+        compressingSegments.add(idx);
+
+        return idx == null ? -1L : idx;
     }
 
     /**
@@ -110,7 +146,23 @@ public class SegmentCompressStorage {
      * Callback for waking up compressor when new segment is archived.
      */
     private synchronized void onSegmentArchived(long lastAbsArchivedIdx) {
+        while (lastEnqueuedToCompressIdx < lastAbsArchivedIdx && compactionEnabled)
+            segmentsToCompress.add(++lastEnqueuedToCompressIdx);
+
         notifyAll();
     }
 
+    /**
+     * @param idx Minimum raw segment index that should be preserved from deletion.
+     */
+    void keepUncompressedIdxFrom(long idx) {
+        minUncompressedIdxToKeep = idx;
+    }
+
+    /**
+     * @return  Minimum raw segment index that should be preserved from deletion.
+     */
+    long keepUncompressedIdxFrom() {
+        return minUncompressedIdxToKeep;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsWithCompactionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsWithCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsWithCompactionTest.java
new file mode 100644
index 0000000..bc34f29
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsReserveWalSegmentsWithCompactionTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.internal.processors.cache.persistence.db;
+
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class IgnitePdsReserveWalSegmentsWithCompactionTest extends IgnitePdsReserveWalSegmentsTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        cfg.getDataStorageConfiguration().setWalCompactionEnabled(true);
+
+        return cfg;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/NoOpWALManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/NoOpWALManager.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/NoOpWALManager.java
index 811a231..df89419 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/NoOpWALManager.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/NoOpWALManager.java
@@ -68,7 +68,7 @@ public class NoOpWALManager implements IgniteWriteAheadLogManager {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean reserve(WALPointer start) throws IgniteCheckedException {
+    @Override public boolean reserve(WALPointer start) {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
index 8287684..7840b09 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java
@@ -31,13 +31,12 @@ import static org.junit.Assert.assertThat;
  * Test for {@link SegmentAware}.
  */
 public class SegmentAwareTest extends TestCase {
-
     /**
      * Waiting finished when work segment is set.
      */
     public void testFinishAwaitSegment_WhenExactWaitingSegmentWasSet() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegment(5));
 
@@ -53,7 +52,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishAwaitSegment_WhenGreaterThanWaitingSegmentWasSet() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegment(5));
 
@@ -69,7 +68,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishAwaitSegment_WhenNextSegmentEqualToWaitingOne() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegment(5));
 
@@ -91,7 +90,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishAwaitSegment_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegment(5));
 
@@ -107,7 +106,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitSegmentForArchive_WhenWorkSegmentIncremented() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.curAbsWalIdx(5);
         aware.setLastArchivedAbsoluteIndex(4);
@@ -126,7 +125,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitSegmentForArchive_WhenWorkSegmentGreaterValue() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.curAbsWalIdx(5);
         aware.setLastArchivedAbsoluteIndex(4);
@@ -145,7 +144,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitSegmentForArchive_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.curAbsWalIdx(5);
         aware.setLastArchivedAbsoluteIndex(4);
@@ -164,7 +163,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testCorrectCalculateNextSegmentIndex() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.curAbsWalIdx(5);
 
@@ -180,7 +179,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitNextAbsoluteIndex_WhenMarkAsArchivedFirstSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(2);
+        SegmentAware aware = new SegmentAware(2, false);
 
         aware.curAbsWalIdx(1);
         aware.setLastArchivedAbsoluteIndex(-1);
@@ -199,7 +198,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitNextAbsoluteIndex_WhenSetToArchivedFirst() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(2);
+        SegmentAware aware = new SegmentAware(2, false);
 
         aware.curAbsWalIdx(1);
         aware.setLastArchivedAbsoluteIndex(-1);
@@ -218,7 +217,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitNextAbsoluteIndex_WhenOnlyForceInterruptWasCall() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(2);
+        SegmentAware aware = new SegmentAware(2, false);
 
         aware.curAbsWalIdx(2);
         aware.setLastArchivedAbsoluteIndex(-1);
@@ -243,7 +242,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishSegmentArchived_WhenSetExactWaitingSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegmentArchived(5));
 
@@ -257,9 +256,9 @@ public class SegmentAwareTest extends TestCase {
     /**
      * Waiting finished when segment archived.
      */
-    public void testFinishSegmentArchived_WhenMarkExactWatingSegment() throws IgniteCheckedException, InterruptedException {
+    public void testFinishSegmentArchived_WhenMarkExactWaitingSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegmentArchived(5));
 
@@ -273,9 +272,9 @@ public class SegmentAwareTest extends TestCase {
     /**
      * Waiting finished when segment archived.
      */
-    public void testFinishSegmentArchived_WhenSetGreaterThanWatingSegment() throws IgniteCheckedException, InterruptedException {
+    public void testFinishSegmentArchived_WhenSetGreaterThanWaitingSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegmentArchived(5));
 
@@ -289,9 +288,9 @@ public class SegmentAwareTest extends TestCase {
     /**
      * Waiting finished when segment archived.
      */
-    public void testFinishSegmentArchived_WhenMarkGreaterThanWatingSegment() throws IgniteCheckedException, InterruptedException {
+    public void testFinishSegmentArchived_WhenMarkGreaterThanWaitingSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         IgniteInternalFuture future = awaitThread(() -> aware.awaitSegmentArchived(5));
 
@@ -307,7 +306,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishSegmentArchived_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.curAbsWalIdx(5);
         aware.setLastArchivedAbsoluteIndex(4);
@@ -326,7 +325,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testMarkAsMovedToArchive_WhenReleaseLockedSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.checkCanReadArchiveOrReserveWorkSegment(5);
 
@@ -344,7 +343,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testMarkAsMovedToArchive_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
         aware.checkCanReadArchiveOrReserveWorkSegment(5);
 
         IgniteInternalFuture future = awaitThread(() -> aware.markAsMovedToArchive(5));
@@ -364,9 +363,9 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitSegmentToCompress_WhenSetLastArchivedSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, true);
 
-        aware.lastCompressedIdx(5);
+        aware.onSegmentCompressed(5);
 
         IgniteInternalFuture future = awaitThread(aware::waitNextSegmentToCompress);
 
@@ -382,9 +381,9 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitSegmentToCompress_WhenMarkLastArchivedSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, true);
 
-        aware.lastCompressedIdx(5);
+        aware.onSegmentCompressed(5);
 
         IgniteInternalFuture future = awaitThread(aware::waitNextSegmentToCompress);
 
@@ -400,9 +399,9 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testCorrectCalculateNextCompressSegment() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, true);
 
-        aware.lastCompressedIdx(5);
+        aware.onSegmentCompressed(5);
         aware.setLastArchivedAbsoluteIndex(6);
         aware.lastTruncatedArchiveIdx(7);
 
@@ -418,8 +417,8 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testFinishWaitSegmentToCompress_WhenInterruptWasCall() throws IgniteCheckedException, InterruptedException {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
-        aware.lastCompressedIdx(5);
+        SegmentAware aware = new SegmentAware(10, true);
+        aware.onSegmentCompressed(5);
 
         IgniteInternalFuture future = awaitThread(aware::waitNextSegmentToCompress);
 
@@ -431,11 +430,34 @@ public class SegmentAwareTest extends TestCase {
     }
 
     /**
+     * Tests that {@link SegmentAware#onSegmentCompressed} returns segments in proper order.
+     */
+    public void testLastCompressedIdxProperOrdering() throws IgniteInterruptedCheckedException {
+        SegmentAware aware = new SegmentAware(10, true);
+
+        for (int i = 0; i < 5 ; i++) {
+            aware.setLastArchivedAbsoluteIndex(i);
+            aware.waitNextSegmentToCompress();
+        }
+
+        aware.onSegmentCompressed(0);
+
+        aware.onSegmentCompressed(4);
+        assertEquals(0, aware.lastCompressedIdx());
+        aware.onSegmentCompressed(1);
+        assertEquals(1, aware.lastCompressedIdx());
+        aware.onSegmentCompressed(3);
+        assertEquals(1, aware.lastCompressedIdx());
+        aware.onSegmentCompressed(2);
+        assertEquals(4, aware.lastCompressedIdx());
+    }
+
+    /**
      * Segment reserve correctly.
      */
     public void testReserveCorrectly() {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         //when: reserve one segment twice and one segment once.
         aware.reserve(5);
@@ -478,7 +500,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testAssertFail_WhenReleaseUnreservedSegment() {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.reserve(5);
         try {
@@ -497,7 +519,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testReserveWorkSegmentCorrectly() {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         //when: lock one segment twice.
         aware.checkCanReadArchiveOrReserveWorkSegment(5);
@@ -530,7 +552,7 @@ public class SegmentAwareTest extends TestCase {
      */
     public void testAssertFail_WhenReleaseUnreservedWorkSegment() {
         //given: thread which awaited segment.
-        SegmentAware aware = new SegmentAware(10);
+        SegmentAware aware = new SegmentAware(10, false);
 
         aware.checkCanReadArchiveOrReserveWorkSegment(5);
         try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/036bd074/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
index a9f2601..7631834 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteOf
 import org.apache.ignite.internal.processors.cache.persistence.baseline.IgniteOnlineNodeOutOfBaselineFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsRebalancingOnNotStableTopologyTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsReserveWalSegmentsTest;
+import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsReserveWalSegmentsWithCompactionTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsWholeClusterRestartTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.SlowHistoricalRebalanceSmallHistoryTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.checkpoint.IgniteCheckpointDirtyPagesForLowLoadTest;
@@ -156,6 +157,7 @@ public class IgnitePdsTestSuite2 extends TestSuite {
         suite.addTestSuite(IgnitePdsExchangeDuringCheckpointTest.class);
 
         suite.addTestSuite(IgnitePdsReserveWalSegmentsTest.class);
+        suite.addTestSuite(IgnitePdsReserveWalSegmentsWithCompactionTest.class);
 
         // new style folders with generated consistent ID test
         suite.addTestSuite(IgniteUidAsConsistentIdMigrationTest.class);


[07/50] [abbrv] ignite git commit: IGNITE-9711: [ML] Remove IgniteThread wrapper from ml examples

Posted by ag...@apache.org.
IGNITE-9711: [ML] Remove IgniteThread wrapper from ml examples

this closes #4849


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/609266fe
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/609266fe
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/609266fe

Branch: refs/heads/ignite-5797
Commit: 609266fe2797c07599a893625f933740a25d049d
Parents: c7227cf
Author: YuriBabak <y....@gmail.com>
Authored: Fri Sep 28 11:57:58 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Fri Sep 28 11:57:58 2018 +0300

----------------------------------------------------------------------
 .../clustering/KMeansClusterizationExample.java |  75 +++--
 .../ml/knn/ANNClassificationExample.java        |  97 +++---
 .../ml/knn/KNNClassificationExample.java        |  69 ++---
 .../examples/ml/knn/KNNRegressionExample.java   |  79 +++--
 .../examples/ml/nn/MLPTrainerExample.java       | 130 ++++----
 .../LinearRegressionLSQRTrainerExample.java     |  56 ++--
 ...ssionLSQRTrainerWithMinMaxScalerExample.java |  69 ++---
 .../LinearRegressionSGDTrainerExample.java      |  65 ++--
 .../LogisticRegressionSGDTrainerExample.java    |  84 +++---
 ...gressionMultiClassClassificationExample.java | 169 +++++------
 .../ml/selection/cv/CrossValidationExample.java |  58 ++--
 .../split/TrainTestDatasetSplitterExample.java  |  69 ++---
 .../binary/SVMBinaryClassificationExample.java  |  79 +++--
 .../SVMMultiClassClassificationExample.java     | 151 +++++-----
 ...ecisionTreeClassificationTrainerExample.java |  74 ++---
 .../DecisionTreeRegressionTrainerExample.java   |  63 ++--
 .../GDBOnTreesClassificationTrainerExample.java |  58 ++--
 .../GDBOnTreesRegressionTrainerExample.java     |  55 ++--
 .../RandomForestClassificationExample.java      |  76 +++--
 .../RandomForestRegressionExample.java          |  91 +++---
 .../ml/tutorial/Step_1_Read_and_Learn.java      |  61 ++--
 .../examples/ml/tutorial/Step_2_Imputing.java   |  71 ++---
 .../examples/ml/tutorial/Step_3_Categorial.java |  96 +++---
 .../Step_3_Categorial_with_One_Hot_Encoder.java |  98 +++---
 .../ml/tutorial/Step_4_Add_age_fare.java        |  98 +++---
 .../examples/ml/tutorial/Step_5_Scaling.java    | 125 ++++----
 .../tutorial/Step_5_Scaling_with_Pipeline.java  |  77 +++--
 .../ignite/examples/ml/tutorial/Step_6_KNN.java | 127 ++++----
 .../ml/tutorial/Step_7_Split_train_test.java    | 136 ++++-----
 .../ignite/examples/ml/tutorial/Step_8_CV.java  | 218 +++++++-------
 .../ml/tutorial/Step_8_CV_with_Param_Grid.java  | 200 ++++++-------
 .../ml/tutorial/Step_9_Go_to_LogReg.java        | 296 +++++++++----------
 32 files changed, 1507 insertions(+), 1763 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
index 152375a..567775b 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/clustering/KMeansClusterizationExample.java
@@ -30,7 +30,6 @@ import org.apache.ignite.ml.clustering.kmeans.KMeansTrainer;
 import org.apache.ignite.ml.math.Tracer;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run KMeans clustering algorithm ({@link KMeansTrainer}) over distributed dataset.
@@ -55,58 +54,52 @@ public class KMeansClusterizationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                KMeansClusterizationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                KMeansTrainer trainer = new KMeansTrainer()
-                    .withSeed(7867L);
+            KMeansTrainer trainer = new KMeansTrainer()
+                .withSeed(7867L);
 
-                KMeansModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            KMeansModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> KMeans centroids");
-                Tracer.showAscii(mdl.getCenters()[0]);
-                Tracer.showAscii(mdl.getCenters()[1]);
-                System.out.println(">>>");
+            System.out.println(">>> KMeans centroids");
+            Tracer.showAscii(mdl.getCenters()[0]);
+            Tracer.showAscii(mdl.getCenters()[1]);
+            System.out.println(">>>");
 
-                System.out.println(">>> -----------------------------------");
-                System.out.println(">>> | Predicted cluster\t| Real Label\t|");
-                System.out.println(">>> -----------------------------------");
+            System.out.println(">>> -----------------------------------");
+            System.out.println(">>> | Predicted cluster\t| Real Label\t|");
+            System.out.println(">>> -----------------------------------");
 
-                int amountOfErrors = 0;
-                int totalAmount = 0;
+            int amountOfErrors = 0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
+                    double prediction = mdl.apply(new DenseVector(inputs));
 
-                        totalAmount++;
-                        if (groundTruth != prediction)
-                            amountOfErrors++;
+                    totalAmount++;
+                    if (groundTruth != prediction)
+                        amountOfErrors++;
 
-                        System.out.printf(">>> | %.4f\t\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
-
-                    System.out.println(">>> ---------------------------------");
+                    System.out.printf(">>> | %.4f\t\t\t| %.4f\t\t|\n", prediction, groundTruth);
+                }
 
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+                System.out.println(">>> ---------------------------------");
 
-                    System.out.println(">>> KMeans clustering algorithm over cached dataset usage example completed.");
-                }
-            });
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> KMeans clustering algorithm over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/knn/ANNClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/knn/ANNClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/knn/ANNClassificationExample.java
index 8a2d786..c9490fc 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/knn/ANNClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/knn/ANNClassificationExample.java
@@ -34,7 +34,6 @@ import org.apache.ignite.ml.math.distances.EuclideanDistance;
 import org.apache.ignite.ml.math.distances.ManhattanDistance;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run ANN multi-class classification trainer ({@link ANNClassificationTrainer}) over distributed dataset.
@@ -59,73 +58,67 @@ public class ANNClassificationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                ANNClassificationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = getTestCache(ignite);
+            IgniteCache<Integer, double[]> dataCache = getTestCache(ignite);
 
-                ANNClassificationTrainer trainer = new ANNClassificationTrainer()
-                    .withDistance(new ManhattanDistance())
-                    .withK(50)
-                    .withMaxIterations(1000)
-                    .withSeed(1234L)
-                    .withEpsilon(1e-2);
+            ANNClassificationTrainer trainer = new ANNClassificationTrainer()
+                .withDistance(new ManhattanDistance())
+                .withK(50)
+                .withMaxIterations(1000)
+                .withSeed(1234L)
+                .withEpsilon(1e-2);
 
-                long startTrainingTime = System.currentTimeMillis();
+            long startTrainingTime = System.currentTimeMillis();
 
-                NNClassificationModel knnMdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                ).withK(5)
-                    .withDistanceMeasure(new EuclideanDistance())
-                    .withStrategy(NNStrategy.WEIGHTED);
+            NNClassificationModel knnMdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            ).withK(5)
+                .withDistanceMeasure(new EuclideanDistance())
+                .withStrategy(NNStrategy.WEIGHTED);
 
-                long endTrainingTime = System.currentTimeMillis();
+            long endTrainingTime = System.currentTimeMillis();
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
-
-                int amountOfErrors = 0;
-                int totalAmount = 0;
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                long totalPredictionTime = 0L;
+            int amountOfErrors = 0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            long totalPredictionTime = 0L;
 
-                        long startPredictionTime = System.currentTimeMillis();
-                        double prediction = knnMdl.apply(new DenseVector(inputs));
-                        long endPredictionTime = System.currentTimeMillis();
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        totalPredictionTime += (endPredictionTime - startPredictionTime);
+                    long startPredictionTime = System.currentTimeMillis();
+                    double prediction = knnMdl.apply(new DenseVector(inputs));
+                    long endPredictionTime = System.currentTimeMillis();
 
-                        totalAmount++;
-                        if (groundTruth != prediction)
-                            amountOfErrors++;
+                    totalPredictionTime += (endPredictionTime - startPredictionTime);
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    totalAmount++;
+                    if (groundTruth != prediction)
+                        amountOfErrors++;
 
-                    System.out.println(">>> ---------------------------------");
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
+                }
 
-                    System.out.println("Training costs = " + (endTrainingTime - startTrainingTime));
-                    System.out.println("Prediction costs = " + totalPredictionTime);
+                System.out.println(">>> ---------------------------------");
 
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double) totalAmount));
-                    System.out.println(totalAmount);
+                System.out.println("Training costs = " + (endTrainingTime - startTrainingTime));
+                System.out.println("Prediction costs = " + totalPredictionTime);
 
-                    System.out.println(">>> ANN multi-class classification algorithm over cached dataset usage example completed.");
-                }
-            });
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double) totalAmount));
+                System.out.println(totalAmount);
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> ANN multi-class classification algorithm over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
index cf285a4..5cbb2ad 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNClassificationExample.java
@@ -31,7 +31,6 @@ import org.apache.ignite.ml.knn.classification.NNStrategy;
 import org.apache.ignite.ml.math.distances.EuclideanDistance;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run kNN multi-class classification trainer ({@link KNNClassificationTrainer}) over distributed dataset.
@@ -56,54 +55,48 @@ public class KNNClassificationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                KNNClassificationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                KNNClassificationTrainer trainer = new KNNClassificationTrainer();
+            KNNClassificationTrainer trainer = new KNNClassificationTrainer();
 
-                NNClassificationModel knnMdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                ).withK(3)
-                    .withDistanceMeasure(new EuclideanDistance())
-                    .withStrategy(NNStrategy.WEIGHTED);
+            NNClassificationModel knnMdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            ).withK(3)
+                .withDistanceMeasure(new EuclideanDistance())
+                .withStrategy(NNStrategy.WEIGHTED);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
-
-                int amountOfErrors = 0;
-                int totalAmount = 0;
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            int amountOfErrors = 0;
+            int totalAmount = 0;
 
-                        double prediction = knnMdl.apply(new DenseVector(inputs));
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        totalAmount++;
-                        if (groundTruth != prediction)
-                            amountOfErrors++;
+                    double prediction = knnMdl.apply(new DenseVector(inputs));
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    totalAmount++;
+                    if (groundTruth != prediction)
+                        amountOfErrors++;
 
-                    System.out.println(">>> ---------------------------------");
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
+                }
 
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double) totalAmount));
+                System.out.println(">>> ---------------------------------");
 
-                    System.out.println(">>> kNN multi-class classification algorithm over cached dataset usage example completed.");
-                }
-            });
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double) totalAmount));
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> kNN multi-class classification algorithm over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
index 78f38c8..3969f0c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/knn/KNNRegressionExample.java
@@ -31,7 +31,6 @@ import org.apache.ignite.ml.knn.regression.KNNRegressionTrainer;
 import org.apache.ignite.ml.math.distances.ManhattanDistance;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run kNN regression trainer ({@link KNNRegressionTrainer}) over distributed dataset.
@@ -57,61 +56,55 @@ public class KNNRegressionExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                KNNRegressionExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                KNNRegressionTrainer trainer = new KNNRegressionTrainer();
+            KNNRegressionTrainer trainer = new KNNRegressionTrainer();
 
-                KNNRegressionModel knnMdl = (KNNRegressionModel) trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                ).withK(5)
-                    .withDistanceMeasure(new ManhattanDistance())
-                    .withStrategy(NNStrategy.WEIGHTED);
+            KNNRegressionModel knnMdl = (KNNRegressionModel) trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            ).withK(5)
+                .withDistanceMeasure(new ManhattanDistance())
+                .withStrategy(NNStrategy.WEIGHTED);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
-
-                int totalAmount = 0;
-                // Calculate mean squared error (MSE)
-                double mse = 0.0;
-                // Calculate mean absolute error (MAE)
-                double mae = 0.0;
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            int totalAmount = 0;
+            // Calculate mean squared error (MSE)
+            double mse = 0.0;
+            // Calculate mean absolute error (MAE)
+            double mae = 0.0;
 
-                        double prediction = knnMdl.apply(new DenseVector(inputs));
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        mse += Math.pow(prediction - groundTruth, 2.0);
-                        mae += Math.abs(prediction - groundTruth);
+                    double prediction = knnMdl.apply(new DenseVector(inputs));
 
-                        totalAmount++;
+                    mse += Math.pow(prediction - groundTruth, 2.0);
+                    mae += Math.abs(prediction - groundTruth);
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    totalAmount++;
 
-                    System.out.println(">>> ---------------------------------");
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
+                }
 
-                    mse = mse / totalAmount;
-                    System.out.println("\n>>> Mean squared error (MSE) " + mse);
+                System.out.println(">>> ---------------------------------");
 
-                    mae = mae / totalAmount;
-                    System.out.println("\n>>> Mean absolute error (MAE) " + mae);
+                mse = mse / totalAmount;
+                System.out.println("\n>>> Mean squared error (MSE) " + mse);
 
-                    System.out.println(">>> kNN regression over cached dataset usage example completed.");
-                }
-            });
+                mae = mae / totalAmount;
+                System.out.println("\n>>> Mean absolute error (MAE) " + mae);
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> kNN regression over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/nn/MLPTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/nn/MLPTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/nn/MLPTrainerExample.java
index 3e5a98c..6d5745e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/nn/MLPTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/nn/MLPTrainerExample.java
@@ -34,7 +34,6 @@ import org.apache.ignite.ml.nn.architecture.MLPArchitecture;
 import org.apache.ignite.ml.optimization.LossFunctions;
 import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate;
 import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Example of using distributed {@link MultilayerPerceptron}.
@@ -70,76 +69,65 @@ public class MLPTrainerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            // Create IgniteThread, we must work with SparseDistributedMatrix inside IgniteThread
-            // because we create ignite cache internally.
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                MLPTrainerExample.class.getSimpleName(), () -> {
-
-                // Create cache with training data.
-                CacheConfiguration<Integer, LabeledPoint> trainingSetCfg = new CacheConfiguration<>();
-                trainingSetCfg.setName("TRAINING_SET");
-                trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
-
-                IgniteCache<Integer, LabeledPoint> trainingSet = ignite.createCache(trainingSetCfg);
-
-                // Fill cache with training data.
-                trainingSet.put(0, new LabeledPoint(0, 0, 0));
-                trainingSet.put(1, new LabeledPoint(0, 1, 1));
-                trainingSet.put(2, new LabeledPoint(1, 0, 1));
-                trainingSet.put(3, new LabeledPoint(1, 1, 0));
-
-                // Define a layered architecture.
-                MLPArchitecture arch = new MLPArchitecture(2).
-                    withAddedLayer(10, true, Activators.RELU).
-                    withAddedLayer(1, false, Activators.SIGMOID);
-
-                // Define a neural network trainer.
-                MLPTrainer<SimpleGDParameterUpdate> trainer = new MLPTrainer<>(
-                    arch,
-                    LossFunctions.MSE,
-                    new UpdatesStrategy<>(
-                        new SimpleGDUpdateCalculator(0.1),
-                        SimpleGDParameterUpdate::sumLocal,
-                        SimpleGDParameterUpdate::avg
-                    ),
-                    3000,
-                    4,
-                    50,
-                    123L
-                );
-
-                // Train neural network and get multilayer perceptron model.
-                MultilayerPerceptron mlp = trainer.fit(
-                    ignite,
-                    trainingSet,
-                    (k, v) -> VectorUtils.of(v.x, v.y),
-                    (k, v) -> new double[] {v.lb}
-                );
-
-                int totalCnt = 4;
-                int failCnt = 0;
-
-                // Calculate score.
-                for (int i = 0; i < 4; i++) {
-                    LabeledPoint pnt = trainingSet.get(i);
-                    Matrix predicted = mlp.apply(new DenseMatrix(new double[][] {{pnt.x, pnt.y}}));
-
-                    double predictedVal = predicted.get(0, 0);
-                    double lbl = pnt.lb;
-                    System.out.printf(">>> key: %d\t\t predicted: %.4f\t\tlabel: %.4f\n", i, predictedVal, lbl);
-                    failCnt += Math.abs(predictedVal - lbl) < 0.5 ? 0 : 1;
-                }
-
-                double failRatio = (double)failCnt / totalCnt;
-
-                System.out.println("\n>>> Fail percentage: " + (failRatio * 100) + "%.");
-
-                System.out.println("\n>>> Distributed multilayer perceptron example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            // Create cache with training data.
+            CacheConfiguration<Integer, LabeledPoint> trainingSetCfg = new CacheConfiguration<>();
+            trainingSetCfg.setName("TRAINING_SET");
+            trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
+
+            IgniteCache<Integer, LabeledPoint> trainingSet = ignite.createCache(trainingSetCfg);
+
+            // Fill cache with training data.
+            trainingSet.put(0, new LabeledPoint(0, 0, 0));
+            trainingSet.put(1, new LabeledPoint(0, 1, 1));
+            trainingSet.put(2, new LabeledPoint(1, 0, 1));
+            trainingSet.put(3, new LabeledPoint(1, 1, 0));
+
+            // Define a layered architecture.
+            MLPArchitecture arch = new MLPArchitecture(2).
+                withAddedLayer(10, true, Activators.RELU).
+                withAddedLayer(1, false, Activators.SIGMOID);
+
+            // Define a neural network trainer.
+            MLPTrainer<SimpleGDParameterUpdate> trainer = new MLPTrainer<>(
+                arch,
+                LossFunctions.MSE,
+                new UpdatesStrategy<>(
+                    new SimpleGDUpdateCalculator(0.1),
+                    SimpleGDParameterUpdate::sumLocal,
+                    SimpleGDParameterUpdate::avg
+                ),
+                3000,
+                4,
+                50,
+                123L
+            );
+
+            // Train neural network and get multilayer perceptron model.
+            MultilayerPerceptron mlp = trainer.fit(
+                ignite,
+                trainingSet,
+                (k, v) -> VectorUtils.of(v.x, v.y),
+                (k, v) -> new double[] {v.lb}
+            );
+
+            int totalCnt = 4;
+            int failCnt = 0;
+
+            // Calculate score.
+            for (int i = 0; i < 4; i++) {
+                LabeledPoint pnt = trainingSet.get(i);
+                Matrix predicted = mlp.apply(new DenseMatrix(new double[][] {{pnt.x, pnt.y}}));
+
+                double predictedVal = predicted.get(0, 0);
+                double lbl = pnt.lb;
+                System.out.printf(">>> key: %d\t\t predicted: %.4f\t\tlabel: %.4f\n", i, predictedVal, lbl);
+                failCnt += Math.abs(predictedVal - lbl) < 0.5 ? 0 : 1;
+            }
+
+            double failRatio = (double)failCnt / totalCnt;
+
+            System.out.println("\n>>> Fail percentage: " + (failRatio * 100) + "%.");
+            System.out.println("\n>>> Distributed multilayer perceptron example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
index 6ac445c..862a37f 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerExample.java
@@ -29,7 +29,6 @@ import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run linear regression model based on <a href="http://web.stanford.edu/group/SOL/software/lsqr/">LSQR algorithm</a>
@@ -110,47 +109,40 @@ public class LinearRegressionLSQRTrainerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                LinearRegressionLSQRTrainerExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                System.out.println(">>> Create new linear regression trainer object.");
-                LinearRegressionLSQRTrainer trainer = new LinearRegressionLSQRTrainer();
+            System.out.println(">>> Create new linear regression trainer object.");
+            LinearRegressionLSQRTrainer trainer = new LinearRegressionLSQRTrainer();
 
-                System.out.println(">>> Perform the training to get the model.");
-                LinearRegressionModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            System.out.println(">>> Perform the training to get the model.");
+            LinearRegressionModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> Linear regression model: " + mdl);
+            System.out.println(">>> Linear regression model: " + mdl);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
+                    double prediction = mdl.apply(new DenseVector(inputs));
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
                 }
+            }
 
-                System.out.println(">>> ---------------------------------");
+            System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
index 320d464..5692cb3 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionLSQRTrainerWithMinMaxScalerExample.java
@@ -32,7 +32,6 @@ import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerPreprocessor
 import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run linear regression model based on <a href="http://web.stanford.edu/group/SOL/software/lsqr/">LSQR algorithm</a>
@@ -116,55 +115,47 @@ public class LinearRegressionLSQRTrainerWithMinMaxScalerExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                LinearRegressionLSQRTrainerWithMinMaxScalerExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, Vector> dataCache = new TestCache(ignite).getVectors(data);
+            IgniteCache<Integer, Vector> dataCache = new TestCache(ignite).getVectors(data);
 
-                System.out.println(">>> Create new minmaxscaling trainer object.");
-                MinMaxScalerTrainer<Integer, Vector> normalizationTrainer = new MinMaxScalerTrainer<>();
+            System.out.println(">>> Create new minmaxscaling trainer object.");
+            MinMaxScalerTrainer<Integer, Vector> normalizationTrainer = new MinMaxScalerTrainer<>();
 
-                System.out.println(">>> Perform the training to get the minmaxscaling preprocessor.");
-                IgniteBiFunction<Integer, Vector, Vector> preprocessor = normalizationTrainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> {
-                        double[] arr = v.asArray();
-                        return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
-                    }
-                );
+            System.out.println(">>> Perform the training to get the minmaxscaling preprocessor.");
+            IgniteBiFunction<Integer, Vector, Vector> preprocessor = normalizationTrainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> {
+                    double[] arr = v.asArray();
+                    return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
+                }
+            );
 
-                System.out.println(">>> Create new linear regression trainer object.");
-                LinearRegressionLSQRTrainer trainer = new LinearRegressionLSQRTrainer();
+            System.out.println(">>> Create new linear regression trainer object.");
+            LinearRegressionLSQRTrainer trainer = new LinearRegressionLSQRTrainer();
 
-                System.out.println(">>> Perform the training to get the model.");
-                LinearRegressionModel mdl = trainer.fit(ignite, dataCache, preprocessor, (k, v) -> v.get(0));
+            System.out.println(">>> Perform the training to get the model.");
+            LinearRegressionModel mdl = trainer.fit(ignite, dataCache, preprocessor, (k, v) -> v.get(0));
 
-                System.out.println(">>> Linear regression model: " + mdl);
+            System.out.println(">>> Linear regression model: " + mdl);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                try (QueryCursor<Cache.Entry<Integer, Vector>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, Vector> observation : observations) {
-                        Integer key = observation.getKey();
-                        Vector val = observation.getValue();
-                        double groundTruth = val.get(0);
+            try (QueryCursor<Cache.Entry<Integer, Vector>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, Vector> observation : observations) {
+                    Integer key = observation.getKey();
+                    Vector val = observation.getValue();
+                    double groundTruth = val.get(0);
 
-                        double prediction = mdl.apply(preprocessor.apply(key, val));
+                    double prediction = mdl.apply(preprocessor.apply(key, val));
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
                 }
+            }
 
-                System.out.println(">>> ---------------------------------");
-
-                System.out.println(">>> Linear regression model with minmaxscaling preprocessor over cache based dataset usage example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> Linear regression model with minmaxscaling preprocessor over cache based dataset usage example completed.");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
index 9fdc0df..1e9bd5a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/LinearRegressionSGDTrainerExample.java
@@ -32,7 +32,6 @@ import org.apache.ignite.ml.optimization.updatecalculators.RPropParameterUpdate;
 import org.apache.ignite.ml.optimization.updatecalculators.RPropUpdateCalculator;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionSGDTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run linear regression model based on  based on
@@ -114,52 +113,44 @@ public class LinearRegressionSGDTrainerExample {
         // Start ignite grid.
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                LinearRegressionSGDTrainerExample.class.getSimpleName(), () -> {
 
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                System.out.println(">>> Create new linear regression trainer object.");
-                LinearRegressionSGDTrainer<?> trainer = new LinearRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                    new RPropUpdateCalculator(),
-                    RPropParameterUpdate::sumLocal,
-                    RPropParameterUpdate::avg
-                ), 100000,  10, 100, 123L);
+            System.out.println(">>> Create new linear regression trainer object.");
+            LinearRegressionSGDTrainer<?> trainer = new LinearRegressionSGDTrainer<>(new UpdatesStrategy<>(
+                new RPropUpdateCalculator(),
+                RPropParameterUpdate::sumLocal,
+                RPropParameterUpdate::avg
+            ), 100000,  10, 100, 123L);
 
-                System.out.println(">>> Perform the training to get the model.");
-                LinearRegressionModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            System.out.println(">>> Perform the training to get the model.");
+            LinearRegressionModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> Linear regression model: " + mdl);
+            System.out.println(">>> Linear regression model: " + mdl);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
+                    double prediction = mdl.apply(new DenseVector(inputs));
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
                 }
+            }
 
-                System.out.println(">>> ---------------------------------");
-
-                System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
index 0a6ff01..8d4218d 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
@@ -32,7 +32,6 @@ import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpda
 import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
 import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionModel;
 import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionSGDTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run logistic regression model based on <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent">
@@ -57,69 +56,62 @@ public class LogisticRegressionSGDTrainerExample {
         // Start ignite grid.
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                LogisticRegressionSGDTrainerExample.class.getSimpleName(), () -> {
 
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                System.out.println(">>> Create new logistic regression trainer object.");
-                LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                    new SimpleGDUpdateCalculator(0.2),
-                    SimpleGDParameterUpdate::sumLocal,
-                    SimpleGDParameterUpdate::avg
-                ), 100000,  10, 100, 123L);
+            System.out.println(">>> Create new logistic regression trainer object.");
+            LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
+                new SimpleGDUpdateCalculator(0.2),
+                SimpleGDParameterUpdate::sumLocal,
+                SimpleGDParameterUpdate::avg
+            ), 100000,  10, 100, 123L);
 
-                System.out.println(">>> Perform the training to get the model.");
-                LogisticRegressionModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            System.out.println(">>> Perform the training to get the model.");
+            LogisticRegressionModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> Logistic regression model: " + mdl);
+            System.out.println(">>> Logistic regression model: " + mdl);
 
-                int amountOfErrors = 0;
-                int totalAmount = 0;
+            int amountOfErrors = 0;
+            int totalAmount = 0;
 
-                // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
-                int[][] confusionMtx = {{0, 0}, {0, 0}};
+            // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
+            int[][] confusionMtx = {{0, 0}, {0, 0}};
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
+                    double prediction = mdl.apply(new DenseVector(inputs));
 
-                        totalAmount++;
-                        if(groundTruth != prediction)
-                            amountOfErrors++;
+                    totalAmount++;
+                    if(groundTruth != prediction)
+                        amountOfErrors++;
 
-                        int idx1 = (int)prediction;
-                        int idx2 = (int)groundTruth;
+                    int idx1 = (int)prediction;
+                    int idx2 = (int)groundTruth;
 
-                        confusionMtx[idx1][idx2]++;
+                    confusionMtx[idx1][idx2]++;
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
-
-                    System.out.println(">>> ---------------------------------");
-
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
                 }
 
-                System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
                 System.out.println(">>> ---------------------------------");
 
-                System.out.println(">>> Logistic regression model over partitioned dataset usage example completed.");
-            });
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+            }
 
-            igniteThread.start();
+            System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
+            System.out.println(">>> ---------------------------------");
 
-            igniteThread.join();
+            System.out.println(">>> Logistic regression model over partitioned dataset usage example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/multiclass/LogRegressionMultiClassClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/multiclass/LogRegressionMultiClassClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/multiclass/LogRegressionMultiClassClassificationExample.java
index e670f01..ff2761a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/multiclass/LogRegressionMultiClassClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/multiclass/LogRegressionMultiClassClassificationExample.java
@@ -35,7 +35,6 @@ import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalcula
 import org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerTrainer;
 import org.apache.ignite.ml.regressions.logistic.multiclass.LogRegressionMultiClassModel;
 import org.apache.ignite.ml.regressions.logistic.multiclass.LogRegressionMultiClassTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run Logistic Regression multi-class classification trainer ({@link LogRegressionMultiClassModel}) over distributed
@@ -62,115 +61,109 @@ public class LogRegressionMultiClassClassificationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                LogRegressionMultiClassClassificationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, Vector> dataCache = new TestCache(ignite).getVectors(data);
+            IgniteCache<Integer, Vector> dataCache = new TestCache(ignite).getVectors(data);
 
-                LogRegressionMultiClassTrainer<?> trainer = new LogRegressionMultiClassTrainer<>()
-                    .withUpdatesStgy(new UpdatesStrategy<>(
-                            new SimpleGDUpdateCalculator(0.2),
-                            SimpleGDParameterUpdate::sumLocal,
-                            SimpleGDParameterUpdate::avg
-                        ))
-                    .withAmountOfIterations(100000)
-                    .withAmountOfLocIterations(10)
-                    .withBatchSize(100)
-                    .withSeed(123L);
+            LogRegressionMultiClassTrainer<?> trainer = new LogRegressionMultiClassTrainer<>()
+                .withUpdatesStgy(new UpdatesStrategy<>(
+                        new SimpleGDUpdateCalculator(0.2),
+                        SimpleGDParameterUpdate::sumLocal,
+                        SimpleGDParameterUpdate::avg
+                    ))
+                .withAmountOfIterations(100000)
+                .withAmountOfLocIterations(10)
+                .withBatchSize(100)
+                .withSeed(123L);
 
-                LogRegressionMultiClassModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> {
-                        double[] arr = v.asArray();
-                        return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
-                    },
-                    (k, v) -> v.get(0)
-                );
+            LogRegressionMultiClassModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> {
+                    double[] arr = v.asArray();
+                    return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
+                },
+                (k, v) -> v.get(0)
+            );
 
-                System.out.println(">>> SVM Multi-class model");
-                System.out.println(mdl.toString());
+            System.out.println(">>> SVM Multi-class model");
+            System.out.println(mdl.toString());
 
-                MinMaxScalerTrainer<Integer, Vector> normalizationTrainer = new MinMaxScalerTrainer<>();
+            MinMaxScalerTrainer<Integer, Vector> normalizationTrainer = new MinMaxScalerTrainer<>();
 
-                IgniteBiFunction<Integer, Vector, Vector> preprocessor = normalizationTrainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> {
-                        double[] arr = v.asArray();
-                        return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
-                    }
-                );
-
-                LogRegressionMultiClassModel mdlWithNormalization = trainer.fit(
-                    ignite,
-                    dataCache,
-                    preprocessor,
-                    (k, v) -> v.get(0)
-                );
+            IgniteBiFunction<Integer, Vector, Vector> preprocessor = normalizationTrainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> {
+                    double[] arr = v.asArray();
+                    return VectorUtils.of(Arrays.copyOfRange(arr, 1, arr.length));
+                }
+            );
 
-                System.out.println(">>> Logistic Regression Multi-class model with minmaxscaling");
-                System.out.println(mdlWithNormalization.toString());
+            LogRegressionMultiClassModel mdlWithNormalization = trainer.fit(
+                ignite,
+                dataCache,
+                preprocessor,
+                (k, v) -> v.get(0)
+            );
 
-                System.out.println(">>> ----------------------------------------------------------------");
-                System.out.println(">>> | Prediction\t| Prediction with Normalization\t| Ground Truth\t|");
-                System.out.println(">>> ----------------------------------------------------------------");
+            System.out.println(">>> Logistic Regression Multi-class model with minmaxscaling");
+            System.out.println(mdlWithNormalization.toString());
 
-                int amountOfErrors = 0;
-                int amountOfErrorsWithNormalization = 0;
-                int totalAmount = 0;
+            System.out.println(">>> ----------------------------------------------------------------");
+            System.out.println(">>> | Prediction\t| Prediction with Normalization\t| Ground Truth\t|");
+            System.out.println(">>> ----------------------------------------------------------------");
 
-                // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
-                int[][] confusionMtx = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
-                int[][] confusionMtxWithNormalization = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+            int amountOfErrors = 0;
+            int amountOfErrorsWithNormalization = 0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, Vector>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, Vector> observation : observations) {
-                        double[] val = observation.getValue().asArray();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
+            int[][] confusionMtx = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+            int[][] confusionMtxWithNormalization = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
-                        double predictionWithNormalization = mdlWithNormalization.apply(new DenseVector(inputs));
+            try (QueryCursor<Cache.Entry<Integer, Vector>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, Vector> observation : observations) {
+                    double[] val = observation.getValue().asArray();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        totalAmount++;
+                    double prediction = mdl.apply(new DenseVector(inputs));
+                    double predictionWithNormalization = mdlWithNormalization.apply(new DenseVector(inputs));
 
-                        // Collect data for model
-                        if(groundTruth != prediction)
-                            amountOfErrors++;
+                    totalAmount++;
 
-                        int idx1 = (int)prediction == 1 ? 0 : ((int)prediction == 3 ? 1 : 2);
-                        int idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
+                    // Collect data for model
+                    if(groundTruth != prediction)
+                        amountOfErrors++;
 
-                        confusionMtx[idx1][idx2]++;
+                    int idx1 = (int)prediction == 1 ? 0 : ((int)prediction == 3 ? 1 : 2);
+                    int idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
 
-                        // Collect data for model with minmaxscaling
-                        if(groundTruth != predictionWithNormalization)
-                            amountOfErrorsWithNormalization++;
+                    confusionMtx[idx1][idx2]++;
 
-                        idx1 = (int)predictionWithNormalization == 1 ? 0 : ((int)predictionWithNormalization == 3 ? 1 : 2);
-                        idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
+                    // Collect data for model with minmaxscaling
+                    if(groundTruth != predictionWithNormalization)
+                        amountOfErrorsWithNormalization++;
 
-                        confusionMtxWithNormalization[idx1][idx2]++;
+                    idx1 = (int)predictionWithNormalization == 1 ? 0 : ((int)predictionWithNormalization == 3 ? 1 : 2);
+                    idx2 = (int)groundTruth == 1 ? 0 : ((int)groundTruth == 3 ? 1 : 2);
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t\t\t\t\t| %.4f\t\t|\n", prediction, predictionWithNormalization, groundTruth);
-                    }
-                    System.out.println(">>> ----------------------------------------------------------------");
-                    System.out.println("\n>>> -----------------Logistic Regression model-------------");
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
-                    System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
+                    confusionMtxWithNormalization[idx1][idx2]++;
 
-                    System.out.println("\n>>> -----------------Logistic Regression model with Normalization-------------");
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrorsWithNormalization);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrorsWithNormalization / (double)totalAmount));
-                    System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtxWithNormalization));
-
-                    System.out.println(">>> Logistic Regression Multi-class classification model over cached dataset usage example completed.");
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t\t\t\t\t| %.4f\t\t|\n", prediction, predictionWithNormalization, groundTruth);
                 }
-            });
+                System.out.println(">>> ----------------------------------------------------------------");
+                System.out.println("\n>>> -----------------Logistic Regression model-------------");
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+                System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
+
+                System.out.println("\n>>> -----------------Logistic Regression model with Normalization-------------");
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrorsWithNormalization);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrorsWithNormalization / (double)totalAmount));
+                System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtxWithNormalization));
 
-            igniteThread.start();
-            igniteThread.join();
+                System.out.println(">>> Logistic Regression Multi-class classification model over cached dataset usage example completed.");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/selection/cv/CrossValidationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/selection/cv/CrossValidationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/selection/cv/CrossValidationExample.java
index eb4c8f3..25ce156 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/selection/cv/CrossValidationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/selection/cv/CrossValidationExample.java
@@ -24,13 +24,11 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ml.tree.DecisionTreeClassificationTrainerExample;
 import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.selection.cv.CrossValidation;
 import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
 import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
 import org.apache.ignite.ml.tree.DecisionTreeNode;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run <a href="https://en.wikipedia.org/wiki/Decision_tree">decision tree</a> classification with
@@ -54,46 +52,38 @@ public class CrossValidationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                DecisionTreeClassificationTrainerExample.class.getSimpleName(), () -> {
+            // Create cache with training data.
+            CacheConfiguration<Integer, LabeledPoint> trainingSetCfg = new CacheConfiguration<>();
+            trainingSetCfg.setName("TRAINING_SET");
+            trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
 
-                // Create cache with training data.
-                CacheConfiguration<Integer, LabeledPoint> trainingSetCfg = new CacheConfiguration<>();
-                trainingSetCfg.setName("TRAINING_SET");
-                trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
+            IgniteCache<Integer, LabeledPoint> trainingSet = ignite.createCache(trainingSetCfg);
 
-                IgniteCache<Integer, LabeledPoint> trainingSet = ignite.createCache(trainingSetCfg);
+            Random rnd = new Random(0);
 
-                Random rnd = new Random(0);
+            // Fill training data.
+            for (int i = 0; i < 1000; i++)
+                trainingSet.put(i, generatePoint(rnd));
 
-                // Fill training data.
-                for (int i = 0; i < 1000; i++)
-                    trainingSet.put(i, generatePoint(rnd));
+            // Create classification trainer.
+            DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(4, 0);
 
-                // Create classification trainer.
-                DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(4, 0);
+            CrossValidation<DecisionTreeNode, Double, Integer, LabeledPoint> scoreCalculator
+                = new CrossValidation<>();
 
-                CrossValidation<DecisionTreeNode, Double, Integer, LabeledPoint> scoreCalculator
-                    = new CrossValidation<>();
+            double[] scores = scoreCalculator.score(
+                trainer,
+                new Accuracy<>(),
+                ignite,
+                trainingSet,
+                (k, v) -> VectorUtils.of(v.x, v.y),
+                (k, v) -> v.lb,
+                4
+            );
 
-                double[] scores = scoreCalculator.score(
-                    trainer,
-                    new Accuracy<>(),
-                    ignite,
-                    trainingSet,
-                    (k, v) -> VectorUtils.of(v.x, v.y),
-                    (k, v) -> v.lb,
-                    4
-                );
+            System.out.println(">>> Accuracy: " + Arrays.toString(scores));
 
-                System.out.println(">>> Accuracy: " + Arrays.toString(scores));
-
-                System.out.println(">>> Cross validation score calculator example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> Cross validation score calculator example completed.");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
index fa1c2ca..8b104f5 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/selection/split/TrainTestDatasetSplitterExample.java
@@ -31,7 +31,6 @@ import org.apache.ignite.ml.regressions.linear.LinearRegressionLSQRTrainer;
 import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
 import org.apache.ignite.ml.selection.split.TrainTestDatasetSplitter;
 import org.apache.ignite.ml.selection.split.TrainTestSplit;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run linear regression model over dataset split on train and test subsets ({@link TrainTestDatasetSplitter}).
@@ -113,55 +112,47 @@ public class TrainTestDatasetSplitterExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                TrainTestDatasetSplitterExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                System.out.println(">>> Create new linear regression trainer object.");
-                LinearRegressionLSQRTrainer trainer = new LinearRegressionLSQRTrainer();
+            System.out.println(">>> Create new linear regression trainer object.");
+            LinearRegressionLSQRTrainer trainer = new LinearRegressionLSQRTrainer();
 
-                System.out.println(">>> Create new training dataset splitter object.");
-                TrainTestSplit<Integer, double[]> split = new TrainTestDatasetSplitter<Integer, double[]>()
-                    .split(0.75);
+            System.out.println(">>> Create new training dataset splitter object.");
+            TrainTestSplit<Integer, double[]> split = new TrainTestDatasetSplitter<Integer, double[]>()
+                .split(0.75);
 
-                System.out.println(">>> Perform the training to get the model.");
-                LinearRegressionModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    split.getTrainFilter(),
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            System.out.println(">>> Perform the training to get the model.");
+            LinearRegressionModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                split.getTrainFilter(),
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> Linear regression model: " + mdl);
+            System.out.println(">>> Linear regression model: " + mdl);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                ScanQuery<Integer, double[]> qry = new ScanQuery<>();
-                qry.setFilter(split.getTestFilter());
+            ScanQuery<Integer, double[]> qry = new ScanQuery<>();
+            qry.setFilter(split.getTestFilter());
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(qry)) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(qry)) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
+                    double prediction = mdl.apply(new DenseVector(inputs));
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
                 }
+            }
 
-                System.out.println(">>> ---------------------------------");
-
-                System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
-            });
-
-            igniteThread.start();
-
-            igniteThread.join();
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/609266fe/examples/src/main/java/org/apache/ignite/examples/ml/svm/binary/SVMBinaryClassificationExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/svm/binary/SVMBinaryClassificationExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/svm/binary/SVMBinaryClassificationExample.java
index f71db2d..c219441 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/svm/binary/SVMBinaryClassificationExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/svm/binary/SVMBinaryClassificationExample.java
@@ -29,7 +29,6 @@ import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
 import org.apache.ignite.ml.math.primitives.vector.impl.DenseVector;
 import org.apache.ignite.ml.svm.SVMLinearBinaryClassificationModel;
 import org.apache.ignite.ml.svm.SVMLinearBinaryClassificationTrainer;
-import org.apache.ignite.thread.IgniteThread;
 
 /**
  * Run SVM binary-class classification model ({@link SVMLinearBinaryClassificationModel}) over distributed dataset.
@@ -54,64 +53,58 @@ public class SVMBinaryClassificationExample {
         try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
             System.out.println(">>> Ignite grid started.");
 
-            IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
-                SVMBinaryClassificationExample.class.getSimpleName(), () -> {
-                IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
+            IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
-                SVMLinearBinaryClassificationTrainer trainer = new SVMLinearBinaryClassificationTrainer();
+            SVMLinearBinaryClassificationTrainer trainer = new SVMLinearBinaryClassificationTrainer();
 
-                SVMLinearBinaryClassificationModel mdl = trainer.fit(
-                    ignite,
-                    dataCache,
-                    (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
-                    (k, v) -> v[0]
-                );
+            SVMLinearBinaryClassificationModel mdl = trainer.fit(
+                ignite,
+                dataCache,
+                (k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)),
+                (k, v) -> v[0]
+            );
 
-                System.out.println(">>> SVM model " + mdl);
+            System.out.println(">>> SVM model " + mdl);
 
-                System.out.println(">>> ---------------------------------");
-                System.out.println(">>> | Prediction\t| Ground Truth\t|");
-                System.out.println(">>> ---------------------------------");
-
-                int amountOfErrors = 0;
-                int totalAmount = 0;
+            System.out.println(">>> ---------------------------------");
+            System.out.println(">>> | Prediction\t| Ground Truth\t|");
+            System.out.println(">>> ---------------------------------");
 
-                // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
-                int[][] confusionMtx = {{0, 0}, {0, 0}};
+            int amountOfErrors = 0;
+            int totalAmount = 0;
 
-                try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
-                    for (Cache.Entry<Integer, double[]> observation : observations) {
-                        double[] val = observation.getValue();
-                        double[] inputs = Arrays.copyOfRange(val, 1, val.length);
-                        double groundTruth = val[0];
+            // Build confusion matrix. See https://en.wikipedia.org/wiki/Confusion_matrix
+            int[][] confusionMtx = {{0, 0}, {0, 0}};
 
-                        double prediction = mdl.apply(new DenseVector(inputs));
+            try (QueryCursor<Cache.Entry<Integer, double[]>> observations = dataCache.query(new ScanQuery<>())) {
+                for (Cache.Entry<Integer, double[]> observation : observations) {
+                    double[] val = observation.getValue();
+                    double[] inputs = Arrays.copyOfRange(val, 1, val.length);
+                    double groundTruth = val[0];
 
-                        totalAmount++;
-                        if(groundTruth != prediction)
-                            amountOfErrors++;
+                    double prediction = mdl.apply(new DenseVector(inputs));
 
-                        int idx1 = prediction == 0.0 ? 0 : 1;
-                        int idx2 = groundTruth == 0.0 ? 0 : 1;
+                    totalAmount++;
+                    if(groundTruth != prediction)
+                        amountOfErrors++;
 
-                        confusionMtx[idx1][idx2]++;
+                    int idx1 = prediction == 0.0 ? 0 : 1;
+                    int idx2 = groundTruth == 0.0 ? 0 : 1;
 
-                        System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
-                    }
+                    confusionMtx[idx1][idx2]++;
 
-                    System.out.println(">>> ---------------------------------");
-
-                    System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
-                    System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+                    System.out.printf(">>> | %.4f\t\t| %.4f\t\t|\n", prediction, groundTruth);
                 }
 
-                System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
+                System.out.println(">>> ---------------------------------");
+
+                System.out.println("\n>>> Absolute amount of errors " + amountOfErrors);
+                System.out.println("\n>>> Accuracy " + (1 - amountOfErrors / (double)totalAmount));
+            }
 
-                System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
-            });
+            System.out.println("\n>>> Confusion matrix is " + Arrays.deepToString(confusionMtx));
 
-            igniteThread.start();
-            igniteThread.join();
+            System.out.println(">>> Linear regression model over cache based dataset usage example completed.");
         }
     }
 


[04/50] [abbrv] ignite git commit: IGNITE-9253: Rename activation/deactivation commands for REST API. - Fixes #4525.

Posted by ag...@apache.org.
IGNITE-9253: Rename activation/deactivation commands for REST API. - Fixes #4525.

Signed-off-by: shroman <rs...@yahoo.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c7227cf1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c7227cf1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c7227cf1

Branch: refs/heads/ignite-5797
Commit: c7227cf117b826fff013f757531c2737d6fc94de
Parents: 5aef881
Author: shroman <rs...@yahoo.com>
Authored: Fri Sep 28 17:56:06 2018 +0900
Committer: shroman <rs...@yahoo.com>
Committed: Fri Sep 28 17:56:06 2018 +0900

----------------------------------------------------------------------
 .../JettyRestProcessorAbstractSelfTest.java     | 21 ++++++++-------
 .../processors/rest/GridRestCommand.java        | 12 +++++++--
 .../processors/rest/GridRestProcessor.java      |  2 ++
 .../cluster/GridChangeStateCommandHandler.java  | 25 +++++++++++------
 .../protocols/tcp/GridTcpRestNioListener.java   |  6 ++---
 .../http/jetty/GridJettyRestHandler.java        | 28 +++++++++++---------
 6 files changed, 60 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c7227cf1/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index f39c280..a972bc3 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -850,8 +850,12 @@ public abstract class JettyRestProcessorAbstractSelfTest extends JettyRestProces
     public void testDeactivateActivate() throws Exception {
         assertClusterState(true);
 
-        changeClusterState(false);
-        changeClusterState(true);
+        changeClusterState(GridRestCommand.CLUSTER_DEACTIVATE);
+        changeClusterState(GridRestCommand.CLUSTER_ACTIVATE);
+
+        // same for deprecated.
+        changeClusterState(GridRestCommand.CLUSTER_INACTIVE);
+        changeClusterState(GridRestCommand.CLUSTER_ACTIVE);
 
         initCache();
     }
@@ -2797,7 +2801,7 @@ public abstract class JettyRestProcessorAbstractSelfTest extends JettyRestProces
          * @return This helper for chaining method calls.
          */
         public VisorGatewayArgument forNode(ClusterNode node) {
-            put("p1", node != null ? node.id().toString() :  null);
+            put("p1", node != null ? node.id().toString() : null);
 
             return this;
         }
@@ -2991,18 +2995,17 @@ public abstract class JettyRestProcessorAbstractSelfTest extends JettyRestProces
     /**
      * Change cluster state and test new state.
      *
-     * @param state Desired state.
+     * @param cmd Command.
      * @throws Exception If failed.
      */
-    private void changeClusterState(boolean state) throws Exception {
-        GridRestCommand cmd = state ? GridRestCommand.CLUSTER_ACTIVE : GridRestCommand.CLUSTER_INACTIVE;
-
+    private void changeClusterState(GridRestCommand cmd) throws Exception {
         String ret = content(null, cmd);
 
         JsonNode res = jsonResponse(ret);
 
-        assertTrue(res.isNull());
+        assertFalse(res.isNull());
+        assertTrue(res.asText().startsWith(cmd.key()));
 
-        assertClusterState(state);
+        assertClusterState(cmd == GridRestCommand.CLUSTER_ACTIVATE || cmd == GridRestCommand.CLUSTER_ACTIVE);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7227cf1/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestCommand.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestCommand.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestCommand.java
index 265fe40..587ed2e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestCommand.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestCommand.java
@@ -159,13 +159,21 @@ public enum GridRestCommand {
     /** Close query. */
     CLOSE_SQL_QUERY("qrycls"),
 
-    /** */
+    /** @deprecated Use {@link #CLUSTER_ACTIVATE} instead. */
+    @Deprecated
     CLUSTER_ACTIVE("active"),
 
-    /** */
+    /** @deprecated Use {@link #CLUSTER_DEACTIVATE} instead. */
+    @Deprecated
     CLUSTER_INACTIVE("inactive"),
 
     /** */
+    CLUSTER_ACTIVATE("activate"),
+
+    /** */
+    CLUSTER_DEACTIVATE("deactivate"),
+
+    /** */
     CLUSTER_CURRENT_STATE("currentstate"),
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7227cf1/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
index b6c1310..30d2f0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
@@ -890,6 +890,8 @@ public class GridRestProcessor extends GridProcessorAdapter {
 
             case CLUSTER_ACTIVE:
             case CLUSTER_INACTIVE:
+            case CLUSTER_ACTIVATE:
+            case CLUSTER_DEACTIVATE:
                 perm = SecurityPermission.ADMIN_OPS;
 
                 break;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7227cf1/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cluster/GridChangeStateCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cluster/GridChangeStateCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cluster/GridChangeStateCommandHandler.java
index 619be34..c9b5a12 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cluster/GridChangeStateCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cluster/GridChangeStateCommandHandler.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.handlers.cluster;
 
 import java.util.Collection;
-
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.rest.GridRestCommand;
@@ -31,8 +30,10 @@ import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 
+import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_ACTIVATE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_ACTIVE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_CURRENT_STATE;
+import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_DEACTIVATE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_INACTIVE;
 
 /**
@@ -41,7 +42,7 @@ import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER
 public class GridChangeStateCommandHandler extends GridRestCommandHandlerAdapter {
     /** Commands. */
     private static final Collection<GridRestCommand> commands =
-        U.sealList(CLUSTER_ACTIVE, CLUSTER_INACTIVE, CLUSTER_CURRENT_STATE);
+        U.sealList(CLUSTER_ACTIVATE, CLUSTER_DEACTIVATE, CLUSTER_CURRENT_STATE, CLUSTER_ACTIVE, CLUSTER_INACTIVE);
 
     /**
      * @param ctx Context.
@@ -64,13 +65,21 @@ public class GridChangeStateCommandHandler extends GridRestCommandHandlerAdapter
         final GridRestResponse res = new GridRestResponse();
 
         try {
-            if (req.command().equals(CLUSTER_CURRENT_STATE)) {
-                Boolean currentState = ctx.state().publicApiActiveState(false);
-
-                res.setResponse(currentState);
+            switch (req.command()) {
+                case CLUSTER_CURRENT_STATE:
+                    Boolean currentState = ctx.state().publicApiActiveState(false);
+
+                    res.setResponse(currentState);
+                    break;
+                case CLUSTER_ACTIVE:
+                case CLUSTER_INACTIVE:
+                    log.warning(req.command().key() + " is deprecated. Use newer commands.");
+                default:
+                    ctx.grid().cluster().active(req.active());
+
+                    res.setResponse(req.command().key() + " started");
+                    break;
             }
-            else
-                ctx.grid().active(req.active());
 
             fut.onDone(res);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7227cf1/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
index 23c25c7..d4d2b07 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
@@ -72,8 +72,8 @@ import static org.apache.ignite.internal.processors.rest.GridRestCommand.EXE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.NODE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.NOOP;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.TOPOLOGY;
-import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_ACTIVE;
-import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_INACTIVE;
+import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_ACTIVATE;
+import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_DEACTIVATE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_CURRENT_STATE;
 import static org.apache.ignite.internal.processors.rest.client.message.GridClientCacheRequest.GridCacheOperation.APPEND;
 import static org.apache.ignite.internal.processors.rest.client.message.GridClientCacheRequest.GridCacheOperation.CAS;
@@ -366,7 +366,7 @@ public class GridTcpRestNioListener extends GridNioServerListenerAdapter<GridCli
             }
             else {
                 restChangeReq.active(req.active());
-                restChangeReq.command(req.active() ? CLUSTER_ACTIVE : CLUSTER_INACTIVE);
+                restChangeReq.command(req.active() ? CLUSTER_ACTIVATE : CLUSTER_DEACTIVATE);
             }
 
             restReq = restChangeReq;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c7227cf1/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
index 12dc0dd..03bed69 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.processors.rest.protocols.http.jetty;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.BufferedInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -40,7 +42,6 @@ import javax.servlet.ServletOutputStream;
 import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
@@ -64,11 +65,8 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.plugin.security.SecurityCredentials;
-
 import org.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.handler.AbstractHandler;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_REST_GETALL_AS_ARRAY;
@@ -77,9 +75,10 @@ import static org.apache.ignite.internal.processors.rest.GridRestCommand.CACHE_C
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CACHE_GET_ALL;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CACHE_PUT_ALL;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CACHE_REMOVE_ALL;
-import static org.apache.ignite.internal.processors.rest.GridRestCommand.EXECUTE_SQL_QUERY;
+import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_ACTIVATE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_ACTIVE;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.CLUSTER_CURRENT_STATE;
+import static org.apache.ignite.internal.processors.rest.GridRestCommand.EXECUTE_SQL_QUERY;
 import static org.apache.ignite.internal.processors.rest.GridRestResponse.STATUS_FAILED;
 
 /**
@@ -110,10 +109,10 @@ public class GridJettyRestHandler extends AbstractHandler {
     /** */
     private static final String WRITE_SYNCHRONIZATION_MODE_PARAM = "writeSynchronizationMode";
 
-    /**@deprecated Should be replaced with AUTHENTICATION + token in IGNITE 3.0 */
+    /** @deprecated Should be replaced with AUTHENTICATION + token in IGNITE 3.0 */
     private static final String IGNITE_LOGIN = "ignite.login";
 
-    /**@deprecated Should be replaced with AUTHENTICATION + token in IGNITE 3.0 */
+    /** @deprecated Should be replaced with AUTHENTICATION + token in IGNITE 3.0 */
     private static final String IGNITE_PASSWORD = "ignite.password";
 
     /** */
@@ -425,7 +424,7 @@ public class GridJettyRestHandler extends AbstractHandler {
             cmdRes = new GridRestResponse(STATUS_FAILED, e.getMessage());
         }
 
-        try(ServletOutputStream os = res.getOutputStream()) {
+        try (ServletOutputStream os = res.getOutputStream()) {
             try {
                 // Try serialize.
                 jsonMapper.writeValue(NULL_OUTPUT_STREAM, cmdRes);
@@ -740,13 +739,17 @@ public class GridJettyRestHandler extends AbstractHandler {
 
             case CLUSTER_ACTIVE:
             case CLUSTER_INACTIVE:
+            case CLUSTER_ACTIVATE:
+            case CLUSTER_DEACTIVATE:
             case CLUSTER_CURRENT_STATE: {
                 GridRestChangeStateRequest restReq0 = new GridRestChangeStateRequest();
 
                 if (cmd == CLUSTER_CURRENT_STATE)
                     restReq0.reqCurrentState();
+                else if (cmd == CLUSTER_ACTIVE || cmd == CLUSTER_ACTIVATE)
+                    restReq0.active(true);
                 else
-                    restReq0.active(cmd == CLUSTER_ACTIVE);
+                    restReq0.active(false);
 
                 restReq = restReq0;
 
@@ -911,14 +914,14 @@ public class GridJettyRestHandler extends AbstractHandler {
     }
 
     /**
-     *
      * @param params Parameters.
      * @param userParam Parameter name to take user name.
      * @param pwdParam Parameter name to take password.
      * @param restReq Request to add credentials if any.
      * @return {@code true} If params contains credentials.
      */
-    private boolean credentials(Map<String, Object> params, String userParam, String pwdParam, GridRestRequest restReq) {
+    private boolean credentials(Map<String, Object> params, String userParam, String pwdParam,
+        GridRestRequest restReq) {
         boolean hasCreds = params.containsKey(userParam) || params.containsKey(pwdParam);
 
         if (hasCreds) {
@@ -939,7 +942,8 @@ public class GridJettyRestHandler extends AbstractHandler {
      * @param params Parameters map.
      * @return Values.
      */
-    protected List<Object> values(String type, String keyPrefix, Map<String, Object> params) throws IgniteCheckedException {
+    protected List<Object> values(String type, String keyPrefix,
+        Map<String, Object> params) throws IgniteCheckedException {
         assert keyPrefix != null;
 
         List<Object> vals = new LinkedList<>();


[20/50] [abbrv] ignite git commit: IGNITE-9731 Fixed NPE on concurrent WAL flush - Fixes #4863.

Posted by ag...@apache.org.
IGNITE-9731 Fixed NPE on concurrent WAL flush - Fixes #4863.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/69adfd5e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/69adfd5e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/69adfd5e

Branch: refs/heads/ignite-5797
Commit: 69adfd5e94530457525bd0403182f577b418ca95
Parents: 036bd07
Author: Anton Kalashnikov <ka...@yandex.ru>
Authored: Fri Sep 28 18:20:00 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Sep 28 18:22:48 2018 +0300

----------------------------------------------------------------------
 .../wal/FileWriteAheadLogManager.java           |  10 +-
 .../db/wal/WalRolloverRecordLoggingTest.java    | 156 +++++++++++++++++++
 .../IgnitePdsWithIndexingCoreTestSuite.java     |   2 +
 3 files changed, 165 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/69adfd5e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
index 43dfb8f..8388bb2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
@@ -2412,19 +2412,23 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     private abstract static class FileHandle {
         /** I/O interface for read/write operations with file */
         SegmentIO fileIO;
+        
+        /** Segment idx corresponded to fileIo*/
+        final long segmentIdx;
 
         /**
-         * @param fileIO I/O interface for read/write operations of FileHandle.         *
+         * @param fileIO I/O interface for read/write operations of FileHandle.
          */
-        private FileHandle(SegmentIO fileIO) {
+        private FileHandle(@NotNull SegmentIO fileIO) {
             this.fileIO = fileIO;
+            segmentIdx = fileIO.getSegmentId();
         }
 
         /**
          * @return Absolute WAL segment file index (incremental counter).
          */
         public long getSegmentId(){
-            return fileIO.getSegmentId();
+            return segmentIdx;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/69adfd5e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
new file mode 100644
index 0000000..67caf63
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java
@@ -0,0 +1,156 @@
+/*
+ * 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.internal.processors.cache.persistence.db.wal;
+
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.failure.StopNodeOrHaltFailureHandler;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.pagemem.wal.record.CheckpointRecord;
+import org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_PATH;
+import static org.apache.ignite.configuration.WALMode.LOG_ONLY;
+/**
+ *
+ */
+public class WalRolloverRecordLoggingTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** */
+    private static class RolloverRecord extends CheckpointRecord {
+        /** */
+        private RolloverRecord() {
+            super(null);
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean rollOver() {
+            return true;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String name) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(name);
+
+        cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(IP_FINDER));
+
+        cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+            .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+                .setPersistenceEnabled(true)
+                .setMaxSize(40 * 1024 * 1024))
+            .setWalMode(LOG_ONLY)
+            .setWalSegmentSize(4 * 1024 * 1024)
+            .setWalArchivePath(DFLT_WAL_PATH));
+
+        cfg.setFailureHandler(new StopNodeOrHaltFailureHandler(false, 0));
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        stopAllGrids();
+
+        cleanPersistenceDir();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+
+        cleanPersistenceDir();
+    }
+
+    /** */
+    public void testAvoidInfinityWaitingOnRolloverOfSegment() throws Exception {
+        IgniteEx ig = startGrid(0);
+
+        ig.cluster().active(true);
+
+        IgniteCache<Integer, Integer> cache = ig.getOrCreateCache(DEFAULT_CACHE_NAME);
+
+        long startTime = U.currentTimeMillis();
+        long duration = 5_000;
+
+        IgniteInternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(
+            () -> {
+                ThreadLocalRandom random = ThreadLocalRandom.current();
+
+                while (U.currentTimeMillis() - startTime < duration)
+                    cache.put(random.nextInt(100_000), random.nextInt(100_000));
+            },
+            8, "cache-put-thread");
+
+        Thread t = new Thread(() -> {
+            do {
+                try {
+                    U.sleep(100);
+                }
+                catch (IgniteInterruptedCheckedException e) {
+                    // No-op.
+                }
+
+                ig.context().cache().context().database().wakeupForCheckpoint("test");
+            } while (U.currentTimeMillis() - startTime < duration);
+        });
+
+        t.start();
+
+        IgniteWriteAheadLogManager walMgr = ig.context().cache().context().wal();
+
+        IgniteCacheDatabaseSharedManager dbMgr = ig.context().cache().context().database();
+
+        RolloverRecord rec = new RolloverRecord();
+
+        do {
+            try {
+                dbMgr.checkpointReadLock();
+
+                try {
+                    walMgr.log(rec);
+                }
+                finally {
+                    dbMgr.checkpointReadUnlock();
+                }
+            }
+            catch (IgniteCheckedException e) {
+                log.error(e.getMessage(), e);
+            }
+        } while (U.currentTimeMillis() - startTime < duration);
+
+        fut.get();
+
+        t.join();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/69adfd5e/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
index 2989ccd..caea388 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingCoreTestSuite.java
@@ -40,6 +40,7 @@ import org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteWalR
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteWalRecoveryWithCompactionTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalPathsTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRecoveryTxLogicalRecordsTest;
+import org.apache.ignite.internal.processors.cache.persistence.db.wal.WalRolloverRecordLoggingTest;
 
 /**
  * Test suite for tests that cover core PDS features and depend on indexing module.
@@ -59,6 +60,7 @@ public class IgnitePdsWithIndexingCoreTestSuite extends TestSuite {
         suite.addTestSuite(PersistenceDirectoryWarningLoggingTest.class);
         suite.addTestSuite(WalPathsTest.class);
         suite.addTestSuite(WalRecoveryTxLogicalRecordsTest.class);
+        suite.addTestSuite(WalRolloverRecordLoggingTest.class);
 
         suite.addTestSuite(IgniteWalRecoveryTest.class);
         suite.addTestSuite(IgniteWalRecoveryWithCompactionTest.class);


[14/50] [abbrv] ignite git commit: IGNITE-7764: MVCC: cache API support. This closes #4725.

Posted by ag...@apache.org.
IGNITE-7764: MVCC: cache API support. This closes #4725.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f7f834bf
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f7f834bf
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f7f834bf

Branch: refs/heads/ignite-5797
Commit: f7f834bfaf8c4170ab852e829554c8ab5b373b77
Parents: 6f39115
Author: AMRepo <an...@gmail.com>
Authored: Fri Sep 28 15:57:24 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Sep 28 15:57:24 2018 +0300

----------------------------------------------------------------------
 .../ignite/codegen/MessageCodeGenerator.java    |   6 +-
 .../communication/GridIoMessageFactory.java     |  14 +-
 .../processors/cache/GridCacheAdapter.java      |  29 +-
 .../processors/cache/GridCacheEntryEx.java      |  12 +-
 .../processors/cache/GridCacheMapEntry.java     | 164 +++--
 .../cache/GridCacheUpdateTxResult.java          |  23 +-
 .../cache/IgniteCacheOffheapManager.java        |  24 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    |  48 +-
 .../processors/cache/IgniteCacheProxyImpl.java  |   2 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   | 134 +++-
 .../dht/GridDhtTxAbstractEnlistFuture.java      |  72 +-
 .../distributed/dht/GridDhtTxEnlistFuture.java  | 147 ++++
 .../dht/GridDhtTxQueryAbstractEnlistFuture.java |  83 +++
 .../dht/GridDhtTxQueryEnlistFuture.java         |  23 +-
 .../dht/GridDhtTxQueryResultsEnlistFuture.java  |  37 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   4 +
 .../dht/GridPartitionedSingleGetFuture.java     |   3 +-
 .../distributed/dht/NearTxResultHandler.java    | 128 ++++
 .../dht/colocated/GridDhtColocatedCache.java    | 138 ++--
 .../GridNearPessimisticTxPrepareFuture.java     |   9 +-
 .../near/GridNearTxAbstractEnlistFuture.java    |  20 +-
 .../near/GridNearTxEnlistFuture.java            | 683 +++++++++++++++++++
 .../near/GridNearTxEnlistRequest.java           | 642 +++++++++++++++++
 .../near/GridNearTxEnlistResponse.java          | 372 ++++++++++
 .../cache/distributed/near/GridNearTxLocal.java | 416 +++++++++--
 .../GridNearTxQueryAbstractEnlistFuture.java    |  36 +
 .../near/GridNearTxQueryEnlistFuture.java       |   4 +-
 .../near/GridNearTxQueryEnlistResponse.java     |   3 +-
 .../GridNearTxQueryResultsEnlistFuture.java     |   5 +-
 .../GridNearTxQueryResultsEnlistResponse.java   |   2 +-
 .../cache/mvcc/MvccProcessorImpl.java           |   3 +-
 .../cache/mvcc/MvccQueryTrackerImpl.java        |  10 +-
 .../persistence/GridCacheOffheapManager.java    |  15 +-
 .../transactions/IgniteTxLocalAdapter.java      |   5 +-
 .../cache/transactions/IgniteTxManager.java     |   6 +-
 .../cache/tree/mvcc/data/MvccUpdateDataRow.java |  88 ++-
 .../cache/tree/mvcc/data/ResultType.java        |   4 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   7 +-
 .../IgniteCacheTxIteratorSelfTest.java          |  10 +
 ...vccAbstractBasicCoordinatorFailoverTest.java |  25 +-
 ...acheMvccAbstractCoordinatorFailoverTest.java |  21 -
 .../mvcc/CacheMvccAbstractFeatureTest.java      |   2 +-
 .../cache/mvcc/CacheMvccAbstractTest.java       | 132 ++--
 .../cache/mvcc/CacheMvccTransactionsTest.java   | 596 +++++++---------
 .../DataStreamProcessorMvccSelfTest.java        |   5 +
 .../configvariations/ConfigVariations.java      |   1 -
 .../query/h2/DhtResultSetEnlistFuture.java      |   4 +-
 .../query/h2/NearResultSetEnlistFuture.java     |   3 -
 ...sactionsCommandsWithMvccEnabledSelfTest.java |  78 +--
 ...cheMvccSelectForUpdateQueryAbstractTest.java |   2 +
 .../mvcc/CacheMvccSqlQueriesAbstractTest.java   |   4 +
 .../mvcc/CacheMvccSqlTxQueriesAbstractTest.java |  15 +-
 .../mvcc/MvccRepeatableReadBulkOpsTest.java     | 441 ++++++++++++
 .../mvcc/MvccRepeatableReadOperationsTest.java  | 276 ++++++++
 .../testsuites/IgniteCacheMvccSqlTestSuite.java |   6 +
 .../ApiParity/IgniteConfigurationParityTest.cs  |   5 +-
 56 files changed, 4168 insertions(+), 879 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index 9512bae..bcb9ef4 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@ -38,12 +38,14 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 import java.util.UUID;
-import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.GridCodegenConverter;
 import org.apache.ignite.internal.GridDirectCollection;
 import org.apache.ignite.internal.GridDirectMap;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.IgniteCodeGeneratingFail;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse;
+import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
@@ -168,7 +170,7 @@ public class MessageCodeGenerator {
 
 //        gen.generateAll(true);
 
-//        gen.generateAndWrite(GridNearTxQueryResultsEnlistRequest.class);
+        gen.generateAndWrite(GridNearTxEnlistResponse.class);
 
 //        gen.generateAndWrite(GridNearAtomicUpdateRequest.class);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 41c75be..389d8c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -110,6 +110,8 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;
@@ -1066,7 +1068,17 @@ public class GridIoMessageFactory implements MessageFactory {
 
                 break;
 
-            // [-3..119] [124..129] [-23..-27] [-36..-55]- this
+            case 159:
+                msg = new GridNearTxEnlistRequest();
+
+                break;
+
+            case 160:
+                msg = new GridNearTxEnlistResponse();
+
+                break;
+
+                // [-3..119] [124..129] [-23..-27] [-36..-55]- this
             // [120..123] - DR
             // [-4..-22, -30..-35] - SQL
             // [2048..2053] - Snapshots

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 476b083..cf9337b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -154,7 +154,9 @@ import static org.apache.ignite.internal.processors.dr.GridDrType.DR_NONE;
 import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER;
 import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
+import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
+import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
 
 /**
  * Adapter for different cache implementations.
@@ -1940,6 +1942,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         }
 
         if (tx == null || tx.implicit()) {
+            assert !ctx.mvccEnabled() || mvccSnapshot != null;
+
             Map<KeyCacheObject, EntryGetResult> misses = null;
 
             Set<GridCacheEntryEx> newLocalEntries = null;
@@ -1978,7 +1982,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                             boolean skipEntry = readNoEntry;
 
                             if (readNoEntry) {
-                                CacheDataRow row = mvccSnapshot != null ? ctx.offheap().mvccRead(ctx, key, mvccSnapshot) :
+                                CacheDataRow row = mvccSnapshot != null ?
+                                    ctx.offheap().mvccRead(ctx, key, mvccSnapshot) :
                                     ctx.offheap().read(ctx, key);
 
                                 if (row != null) {
@@ -3411,7 +3416,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKeys(keys);
 
-        //TODO IGNITE-7764
+        //TODO: IGNITE-9324: add explicit locks support.
         MvccUtils.verifyMvccOperationSupport(ctx, "Lock");
 
         IgniteInternalFuture<Boolean> fut = lockAllAsync(keys, timeout);
@@ -3442,7 +3447,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (keyCheck)
             validateCacheKey(key);
 
-        //TODO IGNITE-7764
+        //TODO: IGNITE-9324: add explicit locks support.
         MvccUtils.verifyMvccOperationSupport(ctx, "Lock");
 
         return lockAllAsync(Collections.singletonList(key), timeout);
@@ -4213,11 +4218,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                     true,
                     op.single(),
                     ctx.systemTx() ? ctx : null,
-                    OPTIMISTIC,
-                    READ_COMMITTED,
+                    ctx.mvccEnabled() ? PESSIMISTIC : OPTIMISTIC,
+                    ctx.mvccEnabled() ? REPEATABLE_READ : READ_COMMITTED,
                     tCfg.getDefaultTxTimeout(),
                     !ctx.skipStore(),
-                    false,
+                    ctx.mvccEnabled(),
                     0,
                     null
                 );
@@ -4315,11 +4320,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                     true,
                     op.single(),
                     ctx.systemTx() ? ctx : null,
-                    OPTIMISTIC,
-                    READ_COMMITTED,
+                    ctx.mvccEnabled() ? PESSIMISTIC : OPTIMISTIC,
+                    ctx.mvccEnabled() ? REPEATABLE_READ : READ_COMMITTED,
                     txCfg.getDefaultTxTimeout(),
                     !skipStore,
-                    false,
+                    ctx.mvccEnabled(),
                     0,
                     null);
 
@@ -4996,11 +5001,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                 true,
                 op.single(),
                 ctx.systemTx() ? ctx : null,
-                OPTIMISTIC,
-                READ_COMMITTED,
+                ctx.mvccEnabled() ? PESSIMISTIC : OPTIMISTIC,
+                ctx.mvccEnabled() ? REPEATABLE_READ : READ_COMMITTED,
                 CU.transactionConfiguration(ctx, ctx.kernalContext().config()).getDefaultTxTimeout(),
                 opCtx == null || !opCtx.skipStore(),
-                false,
+                ctx.mvccEnabled(),
                 0,
                 null);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 18fa820..2e96a9c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -352,6 +352,8 @@ public interface GridCacheEntryEx {
      * @param op Cache operation.
      * @param needHistory Whether to collect rows created or affected by the current tx.
      * @param noCreate Entry should not be created when enabled, e.g. SQL INSERT.
+     * @param filter Filter.
+     * @param retVal Previous value return flag.
      * @return Tuple containing success flag and old value. If success is {@code false},
      *      then value is {@code null}.
      * @throws IgniteCheckedException If storing value failed.
@@ -366,7 +368,9 @@ public interface GridCacheEntryEx {
         MvccSnapshot mvccVer,
         GridCacheOperation op,
         boolean needHistory,
-        boolean noCreate) throws IgniteCheckedException, GridCacheEntryRemovedException;
+        boolean noCreate,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException, GridCacheEntryRemovedException;
 
     /**
      * @param tx Cache transaction.
@@ -374,6 +378,8 @@ public interface GridCacheEntryEx {
      * @param topVer Topology version.
      * @param mvccVer Mvcc version.
      * @param needHistory Whether to collect rows created or affected by the current tx.
+     * @param filter Filter.
+     * @param retVal Previous value return flag.
      * @return Tuple containing success flag and old value. If success is {@code false},
      *      then value is {@code null}.
      * @throws IgniteCheckedException If storing value failed.
@@ -384,7 +390,9 @@ public interface GridCacheEntryEx {
         UUID affNodeId,
         AffinityTopologyVersion topVer,
         MvccSnapshot mvccVer,
-        boolean needHistory) throws IgniteCheckedException, GridCacheEntryRemovedException;
+        boolean needHistory,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException, GridCacheEntryRemovedException;
 
     /**
      * @param tx Transaction adapter.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 8fe559d..f58a3dc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -67,6 +67,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter;
 import org.apache.ignite.internal.processors.cache.transactions.TxCounters;
+import org.apache.ignite.internal.processors.cache.tree.mvcc.data.MvccUpdateDataRow;
 import org.apache.ignite.internal.processors.cache.tree.mvcc.data.MvccUpdateResult;
 import org.apache.ignite.internal.processors.cache.tree.mvcc.data.ResultType;
 import org.apache.ignite.internal.processors.cache.version.GridCacheLazyPlainVersionedEntry;
@@ -1046,7 +1047,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         MvccSnapshot mvccVer,
         GridCacheOperation op,
         boolean needHistory,
-        boolean noCreate) throws IgniteCheckedException, GridCacheEntryRemovedException {
+        boolean noCreate,
+        CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException, GridCacheEntryRemovedException {
         assert tx != null;
 
         final boolean valid = valid(tx.topologyVersion());
@@ -1087,7 +1090,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             assert val != null;
 
             res = cctx.offheap().mvccUpdate(
-                this, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate);
+                this, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate, filter, retVal);
 
             assert res != null;
 
@@ -1100,7 +1103,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
             if (res.resultType() == ResultType.VERSION_MISMATCH)
                 throw new IgniteSQLException("Mvcc version mismatch.", CONCURRENT_UPDATE);
-            else if (noCreate && res.resultType() == ResultType.PREV_NULL)
+            else if (res.resultType() == ResultType.FILTERED || (noCreate && res.resultType() == ResultType.PREV_NULL))
                 return new GridCacheUpdateTxResult(false);
             else if (res.resultType() == ResultType.LOCKED) {
                 unlockEntry();
@@ -1112,7 +1115,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 IgniteInternalFuture<?> lockFut = cctx.kernalContext().coordinators().waitFor(cctx, lockVer);
 
                 lockFut.listen(new MvccUpdateLockListener(tx, this, affNodeId, topVer, val, ttl0, mvccVer,
-                    op, needHistory, noCreate, resFut));
+                    op, needHistory, noCreate, filter, retVal, resFut));
 
                 return new GridCacheUpdateTxResult(false, resFut);
             }
@@ -1141,17 +1144,18 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 counters.incrementUpdateCounter(cctx.cacheId(), partition());
             }
 
-            if (cctx.group().persistenceEnabled() && cctx.group().walEnabled())
+            if (cctx.group().persistenceEnabled() && cctx.group().walEnabled()) {
                 logPtr = cctx.shared().wal().log(new DataRecord(new DataEntry(
-                        cctx.cacheId(),
-                        key,
-                        val,
-                        res.resultType() == ResultType.PREV_NULL ? CREATE : UPDATE,
-                        tx.nearXidVersion(),
-                        newVer,
-                        expireTime,
-                        key.partition(),
-                        0L)));
+                    cctx.cacheId(),
+                    key,
+                    val,
+                    res.resultType() == ResultType.PREV_NULL ? CREATE : UPDATE,
+                    tx.nearXidVersion(),
+                    newVer,
+                    expireTime,
+                    key.partition(),
+                    0L)));
+            }
 
             update(val, expireTime, ttl, newVer, true);
 
@@ -1172,6 +1176,14 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         GridCacheUpdateTxResult updRes = valid ? new GridCacheUpdateTxResult(true, 0L, logPtr) :
             new GridCacheUpdateTxResult(false, logPtr);
 
+        CacheDataRow oldRow = ((MvccUpdateDataRow)res).oldRow();
+
+        if(retVal && (res.resultType() == ResultType.PREV_NOT_NULL || res.resultType() == ResultType.VERSION_FOUND)) {
+            assert oldRow != null;
+
+            updRes.prevValue(oldRow.value());
+        }
+
         updRes.mvccHistory(res.history());
 
         return updRes;
@@ -1183,7 +1195,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         UUID affNodeId,
         AffinityTopologyVersion topVer,
         MvccSnapshot mvccVer,
-        boolean needHistory) throws IgniteCheckedException, GridCacheEntryRemovedException {
+        boolean needHistory,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException, GridCacheEntryRemovedException {
         assert tx != null;
         assert mvccVer != null;
 
@@ -1204,13 +1218,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
             assert newVer != null : "Failed to get write version for tx: " + tx;
 
-            res = cctx.offheap().mvccRemove(this, mvccVer, tx.local(), needHistory);
+            res = cctx.offheap().mvccRemove(this, mvccVer, tx.local(), needHistory, filter, retVal);
 
             assert res != null;
 
             if (res.resultType() == ResultType.VERSION_MISMATCH)
                 throw new IgniteSQLException("Mvcc version mismatch.", CONCURRENT_UPDATE);
-            else if (res.resultType() == ResultType.PREV_NULL)
+            else if (res.resultType() == ResultType.PREV_NULL || res.resultType() == ResultType.FILTERED)
                 return new GridCacheUpdateTxResult(false);
             else if (res.resultType() == ResultType.LOCKED) {
                 unlockEntry();
@@ -1222,7 +1236,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 IgniteInternalFuture<?> lockFut = cctx.kernalContext().coordinators().waitFor(cctx, lockVer);
 
                 lockFut.listen(new MvccRemoveLockListener(tx, this, affNodeId, topVer, mvccVer, needHistory,
-                    resFut));
+                    resFut, retVal, filter));
 
                 return new GridCacheUpdateTxResult(false, resFut);
             }
@@ -1265,6 +1279,14 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         GridCacheUpdateTxResult updRes = valid ? new GridCacheUpdateTxResult(true, 0L, logPtr) :
             new GridCacheUpdateTxResult(false, logPtr);
 
+        CacheDataRow oldRow = ((MvccUpdateDataRow)res).oldRow();
+
+        if(retVal && (res.resultType() == ResultType.PREV_NOT_NULL || res.resultType() == ResultType.VERSION_FOUND)) {
+            assert oldRow != null;
+
+            updRes.prevValue(oldRow.value());
+        }
+
         updRes.mvccHistory(res.history());
 
         return updRes;
@@ -2264,12 +2286,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             if (updateMetrics &&
                 updateRes.outcome().updateReadMetrics() &&
                 needVal)
-                    cctx.cache().metrics0().onRead(oldVal != null);
+                cctx.cache().metrics0().onRead(oldVal != null);
 
             if (updateMetrics && INVOKE_NO_OP.equals(updateRes.outcome()) && (transformOp || updateRes.transformed()))
                 cctx.cache().metrics0().onReadOnlyInvoke(oldVal != null);
             else if (updateMetrics && REMOVE_NO_VAL.equals(updateRes.outcome())
-                    && (transformOp || updateRes.transformed()))
+                && (transformOp || updateRes.transformed()))
                 cctx.cache().metrics0().onInvokeRemove(oldVal != null);
 
             switch (updateRes.outcome()) {
@@ -3521,11 +3543,11 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                     // Detach value before index update.
                     val = cctx.kernalContext().cacheObjects().prepareForCache(val, cctx);
 
-                if (val != null) {
-                    if (cctx.mvccEnabled())
-                        cctx.offheap().mvccInitialValue(this, val, newVer, expTime);
-                    else
-                        storeValue(val, expTime, newVer);
+                    if (val != null) {
+                        if (cctx.mvccEnabled())
+                            cctx.offheap().mvccInitialValue(this, val, newVer, expTime);
+                        else
+                            storeValue(val, expTime, newVer);
 
                         if (deletedUnlocked())
                             deletedUnlocked(false);
@@ -4157,12 +4179,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /**
-     * Stores value inoffheap.*
+     * Stores value in off-heap.
+     *
      * @param val Value.
      * @param expireTime Expire time.
      * @param ver New entry version.
      * @param predicate Optional predicate.
-     *
      * @return {@code True} if storage was modified.
      * @throws IgniteCheckedException If update failed.
      */
@@ -4299,7 +4321,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             if (detached())
                 return rawGet();
 
-            for (;;) {
+            for (; ; ) {
                 GridCacheEntryEx e = cctx.cache().peekEx(key);
 
                 if (e == null)
@@ -4806,7 +4828,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                 if (transformed)
                     cctx.cache().metrics0().onInvokeRemove(hasOldVal);
-            } else if (op == READ && transformed)
+            }
+            else if (op == READ && transformed)
                 cctx.cache().metrics0().onReadOnlyInvoke(hasOldVal);
             else {
                 cctx.cache().metrics0().onWrite();
@@ -4940,6 +4963,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         /** */
         private final GridFutureAdapter<GridCacheUpdateTxResult> resFut;
 
+        /** Need previous value flag. */
+        private final boolean needVal;
+
+        /** Filter. */
+        private final CacheEntryPredicate filter;
+
         /** */
         private GridCacheMapEntry entry;
 
@@ -4950,7 +4979,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             AffinityTopologyVersion topVer,
             MvccSnapshot mvccVer,
             boolean needHistory,
-            GridFutureAdapter<GridCacheUpdateTxResult> resFut) {
+            GridFutureAdapter<GridCacheUpdateTxResult> resFut,
+            boolean retVal,
+            @Nullable CacheEntryPredicate filter) {
             this.tx = tx;
             this.entry = entry;
             this.topVer = topVer;
@@ -4958,6 +4989,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             this.mvccVer = mvccVer;
             this.needHistory = needHistory;
             this.resFut = resFut;
+            this.needVal = retVal;
+            this.filter = filter;
         }
 
         /** {@inheritDoc} */
@@ -4989,8 +5022,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 cctx.shared().database().checkpointReadLock();
 
                 try {
-                    res = cctx.offheap().mvccRemove(entry, mvccVer, tx.local(), needHistory);
-                } finally {
+                    res = cctx.offheap().mvccRemove(entry, mvccVer, tx.local(), needHistory, filter, needVal);
+                }
+                finally {
                     cctx.shared().database().checkpointReadUnlock();
                 }
 
@@ -5001,7 +5035,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                     return;
                 }
-                else if (res.resultType() == ResultType.PREV_NULL) {
+                else if (res.resultType() == ResultType.PREV_NULL || res.resultType() == ResultType.FILTERED) {
                     resFut.onDone(new GridCacheUpdateTxResult(false));
 
                     return;
@@ -5034,15 +5068,15 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                 if (cctx.group().persistenceEnabled() && cctx.group().walEnabled())
                     logPtr = cctx.shared().wal().log(new DataRecord(new DataEntry(
-                            cctx.cacheId(),
-                            entry.key(),
-                            null,
-                            DELETE,
-                            tx.nearXidVersion(),
-                            tx.writeVersion(),
-                            0,
-                            entry.key().partition(),
-                            0)));
+                        cctx.cacheId(),
+                        entry.key(),
+                        null,
+                        DELETE,
+                        tx.nearXidVersion(),
+                        tx.writeVersion(),
+                        0,
+                        entry.key().partition(),
+                        0)));
 
                 entry.update(null, 0, 0, newVer, true);
 
@@ -5209,6 +5243,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         /** */
         private final boolean noCreate;
 
+        /** Filter. */
+        private final CacheEntryPredicate filter;
+
+        /** Need previous value flag.*/
+        private final boolean needVal;
+
         /** */
         MvccUpdateLockListener(IgniteInternalTx tx,
             GridCacheMapEntry entry,
@@ -5220,6 +5260,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             GridCacheOperation op,
             boolean needHistory,
             boolean noCreate,
+            CacheEntryPredicate filter,
+            boolean needVal,
             GridFutureAdapter<GridCacheUpdateTxResult> resFut) {
             this.tx = tx;
             this.entry = entry;
@@ -5231,6 +5273,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             this.op = op;
             this.needHistory = needHistory;
             this.noCreate = noCreate;
+            this.filter = filter;
+            this.needVal = needVal;
             this.resFut = resFut;
         }
 
@@ -5279,8 +5323,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                 try {
                     res = cctx.offheap().mvccUpdate(
-                        entry, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate);
-                } finally {
+                        entry, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate, filter, needVal);
+                }
+                finally {
                     cctx.shared().database().checkpointReadUnlock();
                 }
 
@@ -5329,15 +5374,15 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                 if (cctx.group().persistenceEnabled() && cctx.group().walEnabled())
                     logPtr = cctx.shared().wal().log(new DataRecord(new DataEntry(
-                            cctx.cacheId(),
-                            entry.key(),
-                            val,
-                            res.resultType() == ResultType.PREV_NULL ? CREATE : UPDATE,
-                            tx.nearXidVersion(),
-                            newVer,
-                            expireTime,
-                            entry.key().partition(),
-                            0L)));
+                        cctx.cacheId(),
+                        entry.key(),
+                        val,
+                        res.resultType() == ResultType.PREV_NULL ? CREATE : UPDATE,
+                        tx.nearXidVersion(),
+                        newVer,
+                        expireTime,
+                        entry.key().partition(),
+                        0L)));
 
                 entry.update(val, expireTime, ttl, newVer, true);
 
@@ -6007,8 +6052,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             @Nullable IgniteBiTuple<Object, Exception> invokeRes,
             boolean readFromStore,
             boolean transformed)
-            throws IgniteCheckedException
-        {
+            throws IgniteCheckedException {
             GridCacheContext cctx = entry.context();
 
             final CacheObject oldVal = entry.val;
@@ -6059,7 +6103,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 }
             }
             else {
-               newSysTtl = newTtl = conflictCtx.ttl();
+                newSysTtl = newTtl = conflictCtx.ttl();
                 newSysExpireTime = newExpireTime = conflictCtx.expireTime();
             }
 
@@ -6166,8 +6210,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             @Nullable IgniteBiTuple<Object, Exception> invokeRes,
             boolean readFromStore,
             boolean transformed)
-            throws IgniteCheckedException
-        {
+            throws IgniteCheckedException {
             GridCacheContext cctx = entry.context();
 
             CacheObject oldVal = entry.val;
@@ -6264,8 +6307,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         private GridCacheVersionConflictContext<?, ?> resolveConflict(
             CacheObject newVal,
             @Nullable IgniteBiTuple<Object, Exception> invokeRes)
-            throws IgniteCheckedException
-        {
+            throws IgniteCheckedException {
             GridCacheContext cctx = entry.context();
 
             // Cache is conflict-enabled.
@@ -6437,7 +6479,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             }
             catch (Exception e) {
                 if (e instanceof UnregisteredClassException || e instanceof UnregisteredBinaryTypeException)
-                    throw (IgniteException) e;
+                    throw (IgniteException)e;
 
                 writeObj = invokeEntry.valObj;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
index b646cf9..4543dfd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
@@ -40,14 +40,17 @@ public class GridCacheUpdateTxResult {
     private GridLongList mvccWaitTxs;
 
     /** */
-    private  GridFutureAdapter<GridCacheUpdateTxResult> fut;
+    private GridFutureAdapter<GridCacheUpdateTxResult> fut;
 
     /** */
     private WALPointer logPtr;
 
-    /** */
+    /** Mvcc history. */
     private List<MvccLinkAwareSearchRow> mvccHistory;
 
+    /** Previous value. */
+    private CacheObject prevVal;
+
     /**
      * Constructor.
      *
@@ -158,6 +161,22 @@ public class GridCacheUpdateTxResult {
         this.mvccHistory = mvccHistory;
     }
 
+    /**
+     *
+     * @return Previous value.
+     */
+    @Nullable  public CacheObject prevValue() {
+        return prevVal;
+    }
+
+    /**
+     *
+     * @param prevVal Previous value.
+     */
+    public void prevValue( @Nullable  CacheObject prevVal) {
+        this.prevVal = prevVal;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridCacheUpdateTxResult.class, this);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
index b4b6c9b..f576cc5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
@@ -276,6 +276,8 @@ public interface IgniteCacheOffheapManager {
      * @param primary {@code True} if on primary node.
      * @param needHistory Flag to collect history.
      * @param noCreate Flag indicating that row should not be created if absent.
+     * @param filter Filter.
+     * @param retVal Flag to return previous value.
      * @return Update result.
      * @throws IgniteCheckedException If failed.
      */
@@ -287,13 +289,17 @@ public interface IgniteCacheOffheapManager {
         MvccSnapshot mvccSnapshot,
         boolean primary,
         boolean needHistory,
-        boolean noCreate) throws IgniteCheckedException;
+        boolean noCreate,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException;
 
     /**
      * @param entry Entry.
      * @param mvccSnapshot MVCC snapshot.
      * @param primary {@code True} if on primary node.
      * @param needHistory Flag to collect history.
+     * @param filter Filter.
+     * @param retVal Flag to return previous value.
      * @return Update result.
      * @throws IgniteCheckedException If failed.
      */
@@ -301,7 +307,9 @@ public interface IgniteCacheOffheapManager {
         GridCacheMapEntry entry,
         MvccSnapshot mvccSnapshot,
         boolean primary,
-        boolean needHistory) throws IgniteCheckedException;
+        boolean needHistory,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException;
 
     /**
      * @param entry Entry.
@@ -788,9 +796,11 @@ public interface IgniteCacheOffheapManager {
          * @param ver Version.
          * @param expireTime Expire time.
          * @param mvccSnapshot MVCC snapshot.
+         * @param filter Filter.
          * @param primary {@code True} if update is executed on primary node.
          * @param needHistory Flag to collect history.
          * @param noCreate Flag indicating that row should not be created if absent.
+         * @param retVal Flag to return previous value.
          * @return Update result.
          * @throws IgniteCheckedException If failed.
          */
@@ -801,16 +811,20 @@ public interface IgniteCacheOffheapManager {
             GridCacheVersion ver,
             long expireTime,
             MvccSnapshot mvccSnapshot,
+            @Nullable CacheEntryPredicate filter,
             boolean primary,
             boolean needHistory,
-            boolean noCreate) throws IgniteCheckedException;
+            boolean noCreate,
+            boolean retVal) throws IgniteCheckedException;
 
         /**
          * @param cctx Cache context.
          * @param key Key.
          * @param mvccSnapshot MVCC snapshot.
+         * @param filter Filter.
          * @param primary {@code True} if update is executed on primary node.
          * @param needHistory Flag to collect history.
+         * @param retVal Flag to return previous value.
          * @return List of transactions to wait for.
          * @throws IgniteCheckedException If failed.
          */
@@ -818,8 +832,10 @@ public interface IgniteCacheOffheapManager {
             GridCacheContext cctx,
             KeyCacheObject key,
             MvccSnapshot mvccSnapshot,
+            @Nullable CacheEntryPredicate filter,
             boolean primary,
-            boolean needHistory) throws IgniteCheckedException;
+            boolean needHistory,
+            boolean retVal) throws IgniteCheckedException;
 
         /**
          * @param cctx Cache context.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index 11e67d3..e0b9c06 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -514,7 +514,9 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
         MvccSnapshot mvccSnapshot,
         boolean primary,
         boolean needHistory,
-        boolean noCreate) throws IgniteCheckedException {
+        boolean noCreate,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException {
         if (entry.detached() || entry.isNear())
             return null;
 
@@ -526,9 +528,11 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
             ver,
             expireTime,
             mvccSnapshot,
+            filter,
             primary,
             needHistory,
-            noCreate);
+            noCreate,
+            retVal);
     }
 
     /** {@inheritDoc} */
@@ -536,7 +540,9 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
         GridCacheMapEntry entry,
         MvccSnapshot mvccSnapshot,
         boolean primary,
-        boolean needHistory) throws IgniteCheckedException {
+        boolean needHistory,
+        @Nullable CacheEntryPredicate filter,
+        boolean retVal) throws IgniteCheckedException {
         if (entry.detached() || entry.isNear())
             return null;
 
@@ -545,8 +551,10 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
         return dataStore(entry.localPartition()).mvccRemove(entry.context(),
             entry.key(),
             mvccSnapshot,
+            filter,
             primary,
-            needHistory);
+            needHistory,
+            retVal);
     }
 
     /** {@inheritDoc} */
@@ -1848,9 +1856,11 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
             GridCacheVersion ver,
             long expireTime,
             MvccSnapshot mvccSnapshot,
+            @Nullable CacheEntryPredicate filter,
             boolean primary,
             boolean needHistory,
-            boolean noCreate) throws IgniteCheckedException {
+            boolean noCreate,
+            boolean retVal) throws IgniteCheckedException {
             assert mvccSnapshot != null;
             assert primary || !needHistory;
 
@@ -1866,7 +1876,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 key.valueBytes(coCtx);
                 val.valueBytes(coCtx);
 
-                MvccUpdateDataRow updateRow = new MvccUpdateDataRow(
+                 MvccUpdateDataRow updateRow = new MvccUpdateDataRow(
                     cctx,
                     key,
                     val,
@@ -1875,11 +1885,13 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                     expireTime,
                     mvccSnapshot,
                     null,
+                    filter,
                     primary,
                     false,
                     needHistory,
                     // we follow fast update visit flow here if row cannot be created by current operation
-                    noCreate);
+                    noCreate,
+                    retVal);
 
                 assert cctx.shared().database().checkpointLockIsHeldByThread();
 
@@ -1890,17 +1902,15 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 if (res == ResultType.LOCKED // cannot update locked
                     || res == ResultType.VERSION_MISMATCH) // cannot update on write conflict
                     return updateRow;
-                else if (res == ResultType.VERSION_FOUND) {
+                else if (res == ResultType.VERSION_FOUND || // exceptional case
+                        res == ResultType.FILTERED || // Operation should be skipped.
+                        (res == ResultType.PREV_NULL && noCreate)  // No op.
+                    ) {
                     // Do nothing, except cleaning up not needed versions
                     cleanup(cctx, updateRow.cleanupRows());
 
                     return updateRow;
                 }
-                else if (res == ResultType.PREV_NULL && noCreate) {
-                    cleanup(cctx, updateRow.cleanupRows());
-
-                    return updateRow;
-                }
 
                 CacheDataRow oldRow = null;
 
@@ -1961,8 +1971,10 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
         @Override public MvccUpdateResult mvccRemove(GridCacheContext cctx,
             KeyCacheObject key,
             MvccSnapshot mvccSnapshot,
+            @Nullable CacheEntryPredicate filter,
             boolean primary,
-            boolean needHistory) throws IgniteCheckedException {
+            boolean needHistory,
+            boolean retVal) throws IgniteCheckedException {
             assert mvccSnapshot != null;
             assert primary || mvccSnapshot.activeTransactions().size() == 0 : mvccSnapshot;
             assert primary || !needHistory;
@@ -1987,10 +1999,12 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                     0,
                     mvccSnapshot,
                     null,
+                    filter,
                     primary,
                     false,
                     needHistory,
-                    true);
+                    true,
+                    retVal);
 
                 assert cctx.shared().database().checkpointLockIsHeldByThread();
 
@@ -2001,7 +2015,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 if (res == ResultType.LOCKED // cannot update locked
                     || res == ResultType.VERSION_MISMATCH) // cannot update on write conflict
                     return updateRow;
-                else if (res == ResultType.VERSION_FOUND) {
+                else if (res == ResultType.VERSION_FOUND || res == ResultType.FILTERED) {
                     // Do nothing, except cleaning up not needed versions
                     cleanup(cctx, updateRow.cleanupRows());
 
@@ -2051,9 +2065,11 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                     0,
                     mvccSnapshot,
                     null,
+                    null,
                     true,
                     true,
                     false,
+                    false,
                     false);
 
                 assert cctx.shared().database().checkpointLockIsHeldByThread();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
index 225fa81..4989efb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
@@ -348,7 +348,7 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
 
     /** {@inheritDoc} */
     @Override public Lock lockAll(final Collection<? extends K> keys) {
-        //TODO IGNITE-7764
+        //TODO: IGNITE-9324: add explicit locks support.
         MvccUtils.verifyMvccOperationSupport(ctx, "Lock");
 
         return new CacheLockImpl<>(ctx.gate(), delegate, ctx.operationContextPerCall(), keys);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 4480dae..52638c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -60,6 +60,9 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLock
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistFuture;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryEnlistFuture;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryEnlistRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryEnlistResponse;
@@ -188,7 +191,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
 
         ctx.io().addCacheHandler(ctx.cacheId(), GridNearTxQueryEnlistResponse.class, new CI2<UUID, GridNearTxQueryEnlistResponse>() {
             @Override public void apply(UUID nodeId, GridNearTxQueryEnlistResponse req) {
-                processNearEnlistResponse(nodeId, req);
+                processNearTxQueryEnlistResponse(nodeId, req);
             }
         });
 
@@ -216,7 +219,21 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
         ctx.io().addCacheHandler(ctx.cacheId(), GridNearTxQueryResultsEnlistResponse.class,
             new CI2<UUID, GridNearTxQueryResultsEnlistResponse>() {
                 @Override public void apply(UUID nodeId, GridNearTxQueryResultsEnlistResponse req) {
-                    processNearTxEnlistResponse(nodeId, req);
+                    processNearTxQueryResultsEnlistResponse(nodeId, req);
+                }
+            });
+
+        ctx.io().addCacheHandler(ctx.cacheId(), GridNearTxEnlistRequest.class,
+            new CI2<UUID, GridNearTxEnlistRequest>() {
+                @Override public void apply(UUID nodeId, GridNearTxEnlistRequest req) {
+                    processNearTxEnlistRequest(nodeId, req);
+                }
+            });
+
+        ctx.io().addCacheHandler(ctx.cacheId(), GridNearTxEnlistResponse.class,
+            new CI2<UUID, GridNearTxEnlistResponse>() {
+                @Override public void apply(UUID nodeId, GridNearTxEnlistResponse msg) {
+                    processNearTxEnlistResponse(nodeId, msg);
                 }
             });
 
@@ -756,17 +773,6 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
 
     /**
      * @param nodeId Node ID.
-     * @param res Response.
-     */
-    private void processNearEnlistResponse(UUID nodeId, final GridNearTxQueryEnlistResponse res) {
-        GridNearTxQueryEnlistFuture fut = (GridNearTxQueryEnlistFuture)ctx.mvcc().versionedFuture(res.version(), res.futureId());
-
-        if (fut != null)
-            fut.onResult(nodeId, res);
-    }
-
-    /**
-     * @param nodeId Node ID.
      * @param req Request.
      */
     private void processNearLockRequest(UUID nodeId, GridNearLockRequest req) {
@@ -801,7 +807,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
         IgniteInternalFuture<?> f;
 
         if (req.firstClientRequest()) {
-            for (;;) {
+            for (; ; ) {
                 if (waitForExchangeFuture(nearNode, req))
                     return;
 
@@ -1079,9 +1085,9 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
                 if (top != null && needRemap(req.topologyVersion(), top.readyTopologyVersion())) {
                     if (log.isDebugEnabled()) {
                         log.debug("Client topology version mismatch, need remap lock request [" +
-                                "reqTopVer=" + req.topologyVersion() +
-                                ", locTopVer=" + top.readyTopologyVersion() +
-                                ", req=" + req + ']');
+                            "reqTopVer=" + req.topologyVersion() +
+                            ", locTopVer=" + top.readyTopologyVersion() +
+                            ", req=" + req + ']');
                     }
 
                     GridNearLockResponse res = sendClientLockRemapResponse(nearNode,
@@ -1124,7 +1130,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
 
                         if (tx == null || !tx.init()) {
                             String msg = "Failed to acquire lock (transaction has been completed): " +
-                                    req.version();
+                                req.version();
 
                             U.warn(log, msg);
 
@@ -1401,7 +1407,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
 
                 int i = 0;
 
-                for (ListIterator<GridCacheEntryEx> it = entries.listIterator(); it.hasNext();) {
+                for (ListIterator<GridCacheEntryEx> it = entries.listIterator(); it.hasNext(); ) {
                     GridCacheEntryEx e = it.next();
 
                     assert e != null;
@@ -1995,6 +2001,71 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
     }
 
     /**
+     * @param nodeId Node ID.
+     * @param req Request.
+     */
+    private void processNearTxEnlistRequest(UUID nodeId, final GridNearTxEnlistRequest req) {
+        assert nodeId != null;
+        assert req != null;
+
+        ClusterNode nearNode = ctx.discovery().node(nodeId);
+
+        GridDhtTxLocal tx;
+
+        try {
+            tx = initTxTopologyVersion(nodeId,
+                nearNode,
+                req.version(),
+                req.futureId(),
+                req.miniId(),
+                req.firstClientRequest(),
+                req.topologyVersion(),
+                req.threadId(),
+                req.txTimeout(),
+                req.subjectId(),
+                req.taskNameHash());
+        }
+        catch (IgniteCheckedException | IgniteException ex) {
+            GridNearTxEnlistResponse res = new GridNearTxEnlistResponse(req.cacheId(),
+                req.futureId(),
+                req.miniId(),
+                req.version(),
+                ex);
+
+            try {
+                ctx.io().send(nearNode, res, ctx.ioPolicy());
+            }
+            catch (IgniteCheckedException e) {
+                U.error(log, "Failed to send near enlist response [" +
+                    "txId=" + req.version() +
+                    ", node=" + nodeId +
+                    ", res=" + res + ']', e);
+            }
+
+            return;
+        }
+
+        GridDhtTxEnlistFuture fut = new GridDhtTxEnlistFuture(
+            nodeId,
+            req.version(),
+            req.mvccSnapshot(),
+            req.threadId(),
+            req.futureId(),
+            req.miniId(),
+            tx,
+            req.timeout(),
+            ctx,
+            req.rows(),
+            req.operation(),
+            req.filter(),
+            req.needRes());
+
+        fut.listen(NearTxResultHandler.instance());
+
+        fut.init();
+    }
+
+    /**
      * @param nodeId Near node id.
      * @param nearNode Near node.
      * @param nearLockVer Near lock version.
@@ -2125,7 +2196,30 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
      * @param nodeId Node ID.
      * @param res Response.
      */
-    private void processNearTxEnlistResponse(UUID nodeId, final GridNearTxQueryResultsEnlistResponse res) {
+    private void processNearTxEnlistResponse(UUID nodeId, final GridNearTxEnlistResponse res) {
+        GridNearTxEnlistFuture fut = (GridNearTxEnlistFuture)
+            ctx.mvcc().versionedFuture(res.version(), res.futureId());
+
+        if (fut != null)
+            fut.onResult(nodeId, res);
+    }
+
+    /**
+     * @param nodeId Node ID.
+     * @param res Response.
+     */
+    private void processNearTxQueryEnlistResponse(UUID nodeId, final GridNearTxQueryEnlistResponse res) {
+        GridNearTxQueryEnlistFuture fut = (GridNearTxQueryEnlistFuture)ctx.mvcc().versionedFuture(res.version(), res.futureId());
+
+        if (fut != null)
+            fut.onResult(nodeId, res);
+    }
+
+    /**
+     * @param nodeId Node ID.
+     * @param res Response.
+     */
+    private void processNearTxQueryResultsEnlistResponse(UUID nodeId, final GridNearTxQueryResultsEnlistResponse res) {
         GridNearTxQueryResultsEnlistFuture fut = (GridNearTxQueryResultsEnlistFuture)
             ctx.mvcc().versionedFuture(res.version(), res.futureId());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
index ad164e7..64f966d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
@@ -37,6 +37,7 @@ import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.pagemem.wal.WALPointer;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheEntryInfoCollection;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
@@ -77,11 +78,10 @@ import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 /**
- * Abstract future processing transaction enlisting and locking
- * of entries produced with DML and SELECT FOR UPDATE queries.
+ * Abstract future processing transaction enlisting and locking.
  */
-public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapter<Long>
-    implements DhtLockFuture<Long> {
+public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAdapter<T>
+    implements DhtLockFuture<T> {
     /** Done field updater. */
     private static final AtomicIntegerFieldUpdater<GridDhtTxAbstractEnlistFuture> DONE_UPD =
         AtomicIntegerFieldUpdater.newUpdater(GridDhtTxAbstractEnlistFuture.class, "done");
@@ -134,9 +134,6 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
     /** */
     protected final MvccSnapshot mvccSnapshot;
 
-    /** Processed entries count. */
-    protected long cnt;
-
     /** New DHT nodes. */
     protected Set<UUID> newDhtNodes = Collections.newSetFromMap(new ConcurrentHashMap<>());
 
@@ -146,6 +143,9 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
     /** Near lock version. */
     protected final GridCacheVersion nearLockVer;
 
+    /** Filter. */
+    private final CacheEntryPredicate filter;
+
     /** Timeout object. */
     @GridToStringExclude
     protected LockTimeoutObject timeoutObj;
@@ -202,6 +202,7 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
      * @param tx Transaction.
      * @param timeout Lock acquisition timeout.
      * @param cctx Cache context.
+     * @param filter Filter.
      */
     protected GridDhtTxAbstractEnlistFuture(UUID nearNodeId,
         GridCacheVersion nearLockVer,
@@ -212,7 +213,8 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
         @Nullable int[] parts,
         GridDhtTxLocalAdapter tx,
         long timeout,
-        GridCacheContext<?, ?> cctx) {
+        GridCacheContext<?, ?> cctx,
+        @Nullable CacheEntryPredicate filter) {
         assert tx != null;
         assert timeout >= 0;
         assert nearNodeId != null;
@@ -229,6 +231,7 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
         this.timeout = timeout;
         this.tx = tx;
         this.parts = parts;
+        this.filter = filter;
 
         lockVer = tx.xidVersion();
 
@@ -238,12 +241,38 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
     }
 
     /**
+     * Gets source to be updated iterator.
+     *
      * @return iterator.
      * @throws IgniteCheckedException If failed.
      */
     protected abstract UpdateSourceIterator<?> createIterator() throws IgniteCheckedException;
 
     /**
+     * Gets query result.
+     *
+     * @return Query result.
+     */
+    protected abstract T result0();
+
+    /**
+     * Gets need previous value flag.
+     *
+     * @return {@code True} if previous value is required.
+     */
+    public boolean needResult() {
+        return false;
+    }
+
+    /**
+     * Entry processed callback.
+     *
+     * @param key Entry key.
+     * @param res Update result.
+     */
+    protected abstract void onEntryProcessed(KeyCacheObject key, GridCacheUpdateTxResult res);
+
+    /**
      *
      */
     public void init() {
@@ -291,14 +320,14 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
 
         boolean added = cctx.mvcc().addFuture(this, futId);
 
-        assert added;
-
         if (isDone()) {
             cctx.mvcc().removeFuture(futId);
 
             return;
         }
 
+        assert added;
+
         if (timeoutObj != null)
             cctx.time().addTimeoutObject(timeoutObj);
 
@@ -310,12 +339,15 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
             if (!it.hasNext()) {
                 U.close(it, log);
 
-                onDone(0L);
+                onDone(result0());
 
                 return;
             }
 
-            tx.addActiveCache(cctx, false);
+            if(!tx.implicitSingle())
+                tx.addActiveCache(cctx, false);
+            else // Nothing to do for single update.
+                assert tx.txState().cacheIds().contains(cctx.cacheId()) && tx.txState().cacheIds().size() == 1;
 
             this.it = it;
         }
@@ -391,7 +423,9 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
                                         cctx.localNodeId(),
                                         topVer,
                                         mvccSnapshot,
-                                        isMoving(key.partition()));
+                                        isMoving(key.partition()),
+                                        filter,
+                                        needResult());
 
                                     break;
 
@@ -407,7 +441,9 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
                                         mvccSnapshot,
                                         op.cacheOperation(),
                                         isMoving(key.partition()),
-                                        op.noCreate());
+                                        op.noCreate(),
+                                        filter,
+                                        needResult());
 
                                     break;
 
@@ -493,7 +529,7 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
                     }
 
                     if (noPendingRequests()) {
-                        onDone(cnt);
+                        onDone(result0());
 
                         return;
                     }
@@ -569,11 +605,11 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
         if (ptr0 != null)
             walPtr = ptr0;
 
+        onEntryProcessed(entry.key(), updRes);
+
         if (!updRes.success())
             return;
 
-        cnt++;
-
         if (op != EnlistOperation.LOCK)
             addToBatch(entry.key(), val, updRes.mvccHistory(), entry.context().cacheId());
     }
@@ -980,7 +1016,7 @@ public abstract class GridDhtTxAbstractEnlistFuture extends GridCacheFutureAdapt
     }
 
     /** {@inheritDoc} */
-    @Override public boolean onDone(@Nullable Long res, @Nullable Throwable err) {
+    @Override public boolean onDone(@Nullable T res, @Nullable Throwable err) {
         assert res != null || err != null;
 
         if (!DONE_UPD.compareAndSet(this, 0, 1))

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
new file mode 100644
index 0000000..58d6b15
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
@@ -0,0 +1,147 @@
+/*
+ * 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.internal.processors.cache.distributed.dht;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.UUID;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheReturn;
+import org.apache.ignite.internal.processors.cache.GridCacheUpdateTxResult;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.query.EnlistOperation;
+import org.apache.ignite.internal.processors.query.UpdateSourceIterator;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.lang.IgniteUuid;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Future processing transaction enlisting and locking of entries produces by cache API operations.
+ */
+public final class GridDhtTxEnlistFuture extends GridDhtTxAbstractEnlistFuture<GridCacheReturn> implements UpdateSourceIterator<Object> {
+    /** Enlist operation. */
+    private EnlistOperation op;
+
+    /** Source iterator. */
+    private Iterator<Object> it;
+
+    /** Future result. */
+    private GridCacheReturn res;
+
+    /** Need result flag. If {@code True} previous value should be returned as well. */
+    private boolean needRes;
+
+    /**
+     * Constructor.
+     *
+     * @param nearNodeId Near node ID.
+     * @param nearLockVer Near lock version.
+     * @param mvccSnapshot Mvcc snapshot.
+     * @param threadId Thread ID.
+     * @param nearFutId Near future id.
+     * @param nearMiniId Near mini future id.
+     * @param tx Transaction.
+     * @param timeout Lock acquisition timeout.
+     * @param cctx Cache context.
+     * @param rows Collection of rows.
+     * @param op Operation.
+     * @param filter Filter.
+     * @param needRes Return previous value flag.
+     */
+    public GridDhtTxEnlistFuture(UUID nearNodeId,
+        GridCacheVersion nearLockVer,
+        MvccSnapshot mvccSnapshot,
+        long threadId,
+        IgniteUuid nearFutId,
+        int nearMiniId,
+        GridDhtTxLocalAdapter tx,
+        long timeout,
+        GridCacheContext<?, ?> cctx,
+        Collection<Object> rows,
+        EnlistOperation op,
+        @Nullable CacheEntryPredicate filter,
+        boolean needRes) {
+        super(nearNodeId,
+            nearLockVer,
+            mvccSnapshot,
+            threadId,
+            nearFutId,
+            nearMiniId,
+            null,
+            tx,
+            timeout,
+            cctx,
+            filter);
+
+        this.op = op;
+        this.needRes = needRes;
+
+        it = rows.iterator();
+
+        res = new GridCacheReturn(cctx.localNodeId().equals(nearNodeId), false);
+
+        skipNearNodeUpdates = true;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected UpdateSourceIterator<?> createIterator() throws IgniteCheckedException {
+        return this;
+    }
+
+    /** {@inheritDoc} */
+    @Override @Nullable protected GridCacheReturn result0() {
+        return res;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void onEntryProcessed(KeyCacheObject key, GridCacheUpdateTxResult txRes) {
+        if (needRes && txRes.success())
+            res.set(cctx, txRes.prevValue(), txRes.success(), true);
+        else
+            res.success(txRes.success());
+    }
+
+    /** {@inheritDoc} */
+    public boolean needResult() {
+        return needRes;
+    }
+
+    /** {@inheritDoc} */
+    @Override public EnlistOperation operation() {
+        return op;
+    }
+
+    /** {@inheritDoc} */
+    public boolean hasNextX() {
+        return it.hasNext();
+    }
+
+    /** {@inheritDoc} */
+    public Object nextX() {
+        return it.next();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(GridDhtTxEnlistFuture.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryAbstractEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryAbstractEnlistFuture.java
new file mode 100644
index 0000000..0a26d75
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryAbstractEnlistFuture.java
@@ -0,0 +1,83 @@
+/*
+ * 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.internal.processors.cache.distributed.dht;
+
+import java.util.UUID;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheUpdateTxResult;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.lang.IgniteUuid;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Abstract future processing transaction enlisting and locking of entries produced with DML and SELECT FOR UPDATE
+ * queries.
+ */
+public abstract class GridDhtTxQueryAbstractEnlistFuture extends GridDhtTxAbstractEnlistFuture<Long> {
+    /** Processed entries count. */
+    protected long cnt;
+
+    /**
+     * Constructor.
+     *
+     * @param nearNodeId Near node ID.
+     * @param nearLockVer Near lock version.
+     * @param mvccSnapshot Mvcc snapshot.
+     * @param threadId Thread ID.
+     * @param nearFutId Near future id.
+     * @param nearMiniId Near mini future id.
+     * @param parts Partitions.
+     * @param tx Transaction.
+     * @param timeout Lock acquisition timeout.
+     * @param cctx Cache context.
+     */
+    protected GridDhtTxQueryAbstractEnlistFuture(UUID nearNodeId,
+        GridCacheVersion nearLockVer,
+        MvccSnapshot mvccSnapshot,
+        long threadId,
+        IgniteUuid nearFutId,
+        int nearMiniId,
+        @Nullable int[] parts,
+        GridDhtTxLocalAdapter tx,
+        long timeout,
+        GridCacheContext<?, ?> cctx) {
+        super(nearNodeId,
+            nearLockVer,
+            mvccSnapshot,
+            threadId,
+            nearFutId,
+            nearMiniId,
+            null,
+            tx,
+            timeout,
+            cctx, null);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected Long result0() {
+        return cnt;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void onEntryProcessed(KeyCacheObject key, GridCacheUpdateTxResult res) {
+        if(res.success())
+            cnt++;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistFuture.java
index dd30855..ed792f0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistFuture.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
-import java.util.Objects;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@ -29,9 +28,9 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
 
 /**
- * Cache lock future.
+ * Cache query lock future.
  */
-public final class GridDhtTxQueryEnlistFuture extends GridDhtTxAbstractEnlistFuture {
+public final class GridDhtTxQueryEnlistFuture extends GridDhtTxQueryAbstractEnlistFuture {
     /** Involved cache ids. */
     private final int[] cacheIds;
 
@@ -116,24 +115,6 @@ public final class GridDhtTxQueryEnlistFuture extends GridDhtTxAbstractEnlistFut
     }
 
     /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        GridDhtTxQueryEnlistFuture future = (GridDhtTxQueryEnlistFuture)o;
-
-        return Objects.equals(futId, future.futId);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        return futId.hashCode();
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridDhtTxQueryEnlistFuture.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryResultsEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryResultsEnlistFuture.java
index b3d15d4..c6140fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryResultsEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryResultsEnlistFuture.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import java.util.Collection;
 import java.util.Iterator;
-import java.util.Objects;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@ -34,13 +33,11 @@ import org.apache.ignite.lang.IgniteUuid;
  * Future processing transaction enlisting and locking of entries
  * produces by complex DML queries with reduce step.
  */
-public final class GridDhtTxQueryResultsEnlistFuture extends GridDhtTxAbstractEnlistFuture implements UpdateSourceIterator<Object> {
-    /** */
-    private static final long serialVersionUID = -4933550335145438798L;
-    /** */
+public final class GridDhtTxQueryResultsEnlistFuture extends GridDhtTxQueryAbstractEnlistFuture implements UpdateSourceIterator<Object> {
+    /** Enlist operation. */
     private EnlistOperation op;
 
-    /** */
+    /** Source iterator. */
     private Iterator<Object> it;
 
     /**
@@ -91,29 +88,6 @@ public final class GridDhtTxQueryResultsEnlistFuture extends GridDhtTxAbstractEn
     }
 
     /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        GridDhtTxQueryResultsEnlistFuture future = (GridDhtTxQueryResultsEnlistFuture)o;
-
-        return Objects.equals(futId, future.futId);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        return futId.hashCode();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridDhtTxQueryResultsEnlistFuture.class, this);
-    }
-
-    /** {@inheritDoc} */
     @Override public EnlistOperation operation() {
         return op;
     }
@@ -127,4 +101,9 @@ public final class GridDhtTxQueryResultsEnlistFuture extends GridDhtTxAbstractEn
     @Override public Object nextX() {
         return it.next();
     }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(GridDhtTxQueryResultsEnlistFuture.class, this);
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
index 6662a1c..9883f6d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
@@ -440,6 +440,8 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
                                         ctx.localNodeId(),
                                         topologyVersion(),
                                         snapshot,
+                                        false,
+                                        null,
                                         false);
 
                                     break;
@@ -456,6 +458,8 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
                                         snapshot,
                                         op.cacheOperation(),
                                         false,
+                                        false,
+                                        null,
                                         false);
 
                                     break;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index f5689f9..5d3bef2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -389,7 +389,8 @@ public class GridPartitionedSingleGetFuture extends GridCacheFutureAdapter<Objec
                 boolean skipEntry = readNoEntry;
 
                 if (readNoEntry) {
-                    CacheDataRow row = mvccSnapshot != null ? cctx.offheap().mvccRead(cctx, key, mvccSnapshot) :
+                    CacheDataRow row = mvccSnapshot != null ?
+                        cctx.offheap().mvccRead(cctx, key, mvccSnapshot) :
                         cctx.offheap().read(cctx, key);
 
                     if (row != null) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/NearTxResultHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/NearTxResultHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/NearTxResultHandler.java
new file mode 100644
index 0000000..0bc00e1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/NearTxResultHandler.java
@@ -0,0 +1,128 @@
+/*
+ * 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.internal.processors.cache.distributed.dht;
+
+import java.util.UUID;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheReturn;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.util.lang.GridClosureException;
+import org.apache.ignite.internal.util.typedef.CI1;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteUuid;
+
+/**
+ * Response factory.
+ */
+public final class NearTxResultHandler implements CI1<IgniteInternalFuture<GridCacheReturn>> {
+    /** */
+    private static final long serialVersionUID = 0;
+
+    /** Singleton instance.*/
+    private static final NearTxResultHandler INSTANCE = new NearTxResultHandler();
+
+    /** Constructor. */
+    private NearTxResultHandler() {
+    }
+
+    /**
+     * @return Handler instance.
+     */
+    public static NearTxResultHandler instance() {
+        return INSTANCE;
+    }
+
+    /**
+     * Response factory method.
+     *
+     * @param future Enlist future.
+     * @return Enlist response.
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T createResponse(IgniteInternalFuture<?> future) {
+        assert future != null;
+
+        Class<?> clazz = future.getClass();
+
+        if (clazz == GridDhtTxEnlistFuture.class)
+            return (T)createResponse((GridDhtTxEnlistFuture)future);
+        else
+            throw new IllegalStateException();
+    }
+
+    /**
+     * Response factory method.
+     *
+     * @param fut Enlist future.
+     * @return Enlist response.
+     */
+    public static GridNearTxEnlistResponse createResponse(GridDhtTxEnlistFuture fut) {
+        try {
+            GridCacheReturn res = fut.get();
+
+            GridCacheVersion ver = null;
+            IgniteUuid id = null;
+
+            if (fut.hasNearNodeUpdates) {
+                ver = fut.cctx.tm().mappedVersion(fut.nearLockVer);
+
+                id = fut.futId;
+            }
+
+            return new GridNearTxEnlistResponse(fut.cctx.cacheId(), fut.nearFutId, fut.nearMiniId,
+                fut.nearLockVer, res, ver, id, fut.newDhtNodes);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridNearTxEnlistResponse(fut.cctx.cacheId(), fut.nearFutId, fut.nearMiniId, fut.nearLockVer, e);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void apply(IgniteInternalFuture<GridCacheReturn> fut0) {
+        GridDhtTxAbstractEnlistFuture fut = (GridDhtTxAbstractEnlistFuture)fut0;
+
+        GridCacheContext<?, ?> cctx = fut.cctx;
+        GridDhtTxLocal tx = (GridDhtTxLocal)fut.tx;
+        UUID nearNodeId = fut.nearNodeId;
+
+        GridNearTxEnlistResponse res = createResponse(fut);
+
+        try {
+            cctx.io().send(nearNodeId, res, cctx.ioPolicy());
+        }
+        catch (IgniteCheckedException e) {
+            U.error(fut.log, "Failed to send near enlist response (will rollback transaction) [" +
+                "tx=" + CU.txString(tx) +
+                ", node=" + nearNodeId +
+                ", res=" + res + ']', e);
+
+            try {
+                tx.rollbackDhtLocalAsync();
+            }
+            catch (Throwable e1) {
+                e.addSuppressed(e1);
+            }
+
+            throw new GridClosureException(e);
+        }
+    }
+}


[38/50] [abbrv] ignite git commit: IGNITE-9540: MVCC: support IgniteCache.invoke method family. This closes #4832. This closes #4881.

Posted by ag...@apache.org.
IGNITE-9540: MVCC: support IgniteCache.invoke method family. This closes #4832. This closes #4881.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dab050ac
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dab050ac
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dab050ac

Branch: refs/heads/ignite-5797
Commit: dab050acc31bf74f7c159c1cb9c5a8faa966f4f7
Parents: 71836d9
Author: AMRepo <an...@gmail.com>
Authored: Wed Oct 3 15:50:07 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Oct 3 15:50:07 2018 +0300

----------------------------------------------------------------------
 .../ignite/codegen/MessageCodeGenerator.java    |   1 +
 .../communication/GridIoMessageFactory.java     |  10 +-
 .../processors/cache/CacheInvokeEntry.java      |  45 +++-
 .../processors/cache/GridCacheEntryEx.java      |  10 +
 .../processors/cache/GridCacheMapEntry.java     | 108 +++++++-
 .../cache/GridCacheUpdateTxResult.java          |  27 +-
 .../cache/IgniteCacheOffheapManager.java        |  11 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    | 104 +++++++-
 .../dht/GridDhtTxAbstractEnlistFuture.java      |  35 ++-
 .../distributed/dht/GridDhtTxEnlistFuture.java  |  22 +-
 .../dht/GridDhtTxQueryEnlistRequest.java        |   8 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |  18 +-
 .../cache/distributed/dht/GridInvokeValue.java  | 186 +++++++++++++
 .../near/GridNearTxEnlistFuture.java            |  19 +-
 .../near/GridNearTxEnlistRequest.java           |  35 ++-
 .../cache/distributed/near/GridNearTxLocal.java |  55 ++--
 .../persistence/GridCacheOffheapManager.java    |   5 +-
 .../cache/tree/mvcc/data/MvccUpdateDataRow.java |  29 ++-
 .../cache/tree/mvcc/data/MvccUpdateResult.java  |   7 +
 .../cache/tree/mvcc/data/ResultType.java        |   4 +-
 .../processors/query/EnlistOperation.java       |  11 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |  46 ++--
 .../processors/cache/GridCacheTestEntryEx.java  |   8 +-
 .../cache/mvcc/CacheMvccAbstractTest.java       |  10 +-
 .../cache/mvcc/CacheMvccTransactionsTest.java   |  81 ++++++
 ...sactionsCommandsWithMvccEnabledSelfTest.java |  27 --
 .../mvcc/CacheMvccSqlQueriesAbstractTest.java   |   2 +-
 .../mvcc/MvccRepeatableReadBulkOpsTest.java     | 261 ++++++++++++++++---
 .../mvcc/MvccRepeatableReadOperationsTest.java  |  42 ++-
 29 files changed, 1047 insertions(+), 180 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index bcb9ef4..2f7e6c0 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@ -43,6 +43,7 @@ import org.apache.ignite.internal.GridDirectCollection;
 import org.apache.ignite.internal.GridDirectMap;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.IgniteCodeGeneratingFail;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistResponse;
 import org.apache.ignite.internal.util.IgniteUtils;

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 389d8c0..54efb47 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -54,8 +54,6 @@ import org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl;
 import org.apache.ignite.internal.processors.cache.WalStateAckMessage;
 import org.apache.ignite.internal.processors.cache.binary.MetadataRequestMessage;
 import org.apache.ignite.internal.processors.cache.binary.MetadataResponseMessage;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.latch.LatchAckMessage;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheTtlUpdateRequest;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheTxRecoveryRequest;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheTxRecoveryResponse;
@@ -79,6 +77,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxQuer
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxQueryEnlistResponse;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxQueryFirstEnlistRequest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtUnlockRequest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue;
 import org.apache.ignite.internal.processors.cache.distributed.dht.PartitionUpdateCountersMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicDeferredUpdateResponse;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicNearResponse;
@@ -100,9 +99,11 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsFullMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleRequest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.latch.LatchAckMessage;
 import org.apache.ignite.internal.processors.cache.distributed.near.CacheVersionedValue;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetResponse;
@@ -1078,6 +1079,11 @@ public class GridIoMessageFactory implements MessageFactory {
 
                 break;
 
+            case 161:
+                msg = new GridInvokeValue();
+
+                break;
+
                 // [-3..119] [124..129] [-23..-27] [-36..-55]- this
             // [120..123] - DR
             // [-4..-22, -30..-35] - SQL

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
index 2526146..dddc735 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeEntry.java
@@ -96,13 +96,30 @@ public class CacheInvokeEntry<K, V> extends CacheLazyEntry<K, V> implements Muta
 
     /** {@inheritDoc} */
     @Override public void remove() {
+        if (!entry.isMvcc()) {
+            if (op == Operation.CREATE)
+                op = Operation.NONE;
+            else
+                op = Operation.REMOVE;
+        }
+        else {
+            if (op == Operation.CREATE) {
+                assert !hadVal;
+
+                op = Operation.NONE;
+            }
+            else if (exists()) {
+                assert hadVal;
+
+                op = Operation.REMOVE;
+            }
+
+            if (hadVal && oldVal == null)
+                oldVal = val;
+        }
+
         val = null;
         valObj = null;
-
-        if (op == Operation.CREATE)
-            op = Operation.NONE;
-        else
-            op = Operation.REMOVE;
     }
 
     /** {@inheritDoc} */
@@ -110,7 +127,12 @@ public class CacheInvokeEntry<K, V> extends CacheLazyEntry<K, V> implements Muta
         if (val == null)
             throw new NullPointerException();
 
-        this.oldVal = this.val;
+        if (!entry.isMvcc())
+            this.oldVal = this.val;
+        else {
+            if (hadVal && oldVal == null)
+                this.oldVal = this.val;
+        }
 
         this.val = val;
 
@@ -118,6 +140,15 @@ public class CacheInvokeEntry<K, V> extends CacheLazyEntry<K, V> implements Muta
     }
 
     /**
+     * Entry processor operation.
+     *
+     * @return Operation.
+     */
+    public Operation op() {
+        return op;
+    }
+
+    /**
      * @return Return origin value, before modification.
      */
     public V oldVal() {
@@ -160,7 +191,7 @@ public class CacheInvokeEntry<K, V> extends CacheLazyEntry<K, V> implements Muta
     /**
      *
      */
-    private static enum Operation {
+    public static enum Operation {
         /** */
         NONE,
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 2e96a9c..eb49c79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.UUID;
 import javax.cache.Cache;
 import javax.cache.expiry.ExpiryPolicy;
+import javax.cache.processor.EntryProcessor;
 import javax.cache.processor.EntryProcessorResult;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.eviction.EvictableEntry;
@@ -80,6 +81,11 @@ public interface GridCacheEntryEx {
     public boolean isLocal();
 
     /**
+     * @return {@code True} if this is n entry from MVCC cache.
+     */
+    public boolean isMvcc();
+
+    /**
      * @return {@code False} if entry belongs to cache map, {@code true} if this entry was created in colocated
      *      cache and node is not primary for this key.
      */
@@ -346,6 +352,8 @@ public interface GridCacheEntryEx {
      * @param tx Cache transaction.
      * @param affNodeId Partitioned node iD.
      * @param val Value to set.
+     * @param entryProc Entry processor.
+     * @param invokeArgs Entry processor invoke arguments.
      * @param ttl0 TTL.
      * @param topVer Topology version.
      * @param mvccVer Mvcc version.
@@ -363,6 +371,8 @@ public interface GridCacheEntryEx {
         @Nullable IgniteInternalTx tx,
         UUID affNodeId,
         CacheObject val,
+        EntryProcessor entryProc,
+        Object[] invokeArgs,
         long ttl0,
         AffinityTopologyVersion topVer,
         MvccSnapshot mvccVer,

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index f58a3dc..1a04bd2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -280,6 +280,11 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /** {@inheritDoc} */
+    @Override public boolean isMvcc() {
+        return cctx.mvccEnabled();
+    }
+
+    /** {@inheritDoc} */
     @Override public boolean isNear() {
         return false;
     }
@@ -1042,6 +1047,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         IgniteInternalTx tx,
         UUID affNodeId,
         CacheObject val,
+        EntryProcessor entryProc,
+        Object[] invokeArgs,
         long ttl0,
         AffinityTopologyVersion topVer,
         MvccSnapshot mvccVer,
@@ -1054,6 +1061,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
         final boolean valid = valid(tx.topologyVersion());
 
+        final boolean invoke = entryProc != null;
+
         final GridCacheVersion newVer;
 
         WALPointer logPtr = null;
@@ -1087,10 +1096,10 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             // Detach value before index update.
             val = cctx.kernalContext().cacheObjects().prepareForCache(val, cctx);
 
-            assert val != null;
+            assert val != null || invoke;
 
-            res = cctx.offheap().mvccUpdate(
-                this, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate, filter, retVal);
+            res = cctx.offheap().mvccUpdate(this, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate,
+                filter, retVal, entryProc, invokeArgs);
 
             assert res != null;
 
@@ -1103,7 +1112,17 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
             if (res.resultType() == ResultType.VERSION_MISMATCH)
                 throw new IgniteSQLException("Mvcc version mismatch.", CONCURRENT_UPDATE);
-            else if (res.resultType() == ResultType.FILTERED || (noCreate && res.resultType() == ResultType.PREV_NULL))
+            else if (res.resultType() == ResultType.FILTERED) {
+                GridCacheUpdateTxResult updRes = new GridCacheUpdateTxResult(invoke);
+
+                assert !invoke || res.invokeResult() != null;
+
+                if(invoke) // No-op invoke happened.
+                    updRes.invokeResult(res.invokeResult());
+
+                return updRes;
+            }
+            else if(noCreate && !invoke && res.resultType() == ResultType.PREV_NULL)
                 return new GridCacheUpdateTxResult(false);
             else if (res.resultType() == ResultType.LOCKED) {
                 unlockEntry();
@@ -1115,7 +1134,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 IgniteInternalFuture<?> lockFut = cctx.kernalContext().coordinators().waitFor(cctx, lockVer);
 
                 lockFut.listen(new MvccUpdateLockListener(tx, this, affNodeId, topVer, val, ttl0, mvccVer,
-                    op, needHistory, noCreate, filter, retVal, resFut));
+                    op, needHistory, noCreate, filter, retVal, resFut, entryProc, invokeArgs));
 
                 return new GridCacheUpdateTxResult(false, resFut);
             }
@@ -1143,13 +1162,26 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                 counters.incrementUpdateCounter(cctx.cacheId(), partition());
             }
+            else if (res.resultType() == ResultType.REMOVED_NOT_NULL) {
+                TxCounters counters = tx.txCounters(true);
+
+                if (res.isOwnValueOverridden()) {
+                    if (res.isKeyAbsentBefore()) // Do not count own update removal.
+                        counters.decrementUpdateCounter(cctx.cacheId(), partition());
+                }
+                else
+                    counters.incrementUpdateCounter(cctx.cacheId(), partition());
+
+                counters.accumulateSizeDelta(cctx.cacheId(), partition(), -1);
+            }
 
             if (cctx.group().persistenceEnabled() && cctx.group().walEnabled()) {
                 logPtr = cctx.shared().wal().log(new DataRecord(new DataEntry(
                     cctx.cacheId(),
                     key,
                     val,
-                    res.resultType() == ResultType.PREV_NULL ? CREATE : UPDATE,
+                    res.resultType() == ResultType.PREV_NULL ? CREATE :
+                        (res.resultType() == ResultType.REMOVED_NOT_NULL) ? DELETE : UPDATE,
                     tx.nearXidVersion(),
                     newVer,
                     expireTime,
@@ -1184,6 +1216,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             updRes.prevValue(oldRow.value());
         }
 
+        if(invoke) {
+            assert res.invokeResult() != null;
+
+            updRes.invokeResult(res.invokeResult());
+        }
+
         updRes.mvccHistory(res.history());
 
         return updRes;
@@ -5237,15 +5275,21 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         /** */
         private GridCacheOperation op;
 
+        /** Entry processor. */
+        private final EntryProcessor entryProc;
+
+        /** Invoke arguments. */
+        private final Object[] invokeArgs;
+
+        /** Filter. */
+        private final CacheEntryPredicate filter;
+
         /** */
         private final boolean needHistory;
 
         /** */
         private final boolean noCreate;
 
-        /** Filter. */
-        private final CacheEntryPredicate filter;
-
         /** Need previous value flag.*/
         private final boolean needVal;
 
@@ -5262,7 +5306,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             boolean noCreate,
             CacheEntryPredicate filter,
             boolean needVal,
-            GridFutureAdapter<GridCacheUpdateTxResult> resFut) {
+            GridFutureAdapter<GridCacheUpdateTxResult> resFut,
+            EntryProcessor entryProc,
+            Object[] invokeArgs) {
             this.tx = tx;
             this.entry = entry;
             this.affNodeId = affNodeId;
@@ -5276,6 +5322,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             this.filter = filter;
             this.needVal = needVal;
             this.resFut = resFut;
+            this.entryProc = entryProc;
+            this.invokeArgs = invokeArgs;
         }
 
         /** {@inheritDoc} */
@@ -5286,6 +5334,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             GridCacheContext cctx = entry.context();
             GridCacheVersion newVer = tx.writeVersion();
 
+            final boolean invoke = entryProc != null;
+
             MvccUpdateResult res;
 
             try {
@@ -5322,8 +5372,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                 cctx.shared().database().checkpointReadLock();
 
                 try {
-                    res = cctx.offheap().mvccUpdate(
-                        entry, val, newVer, expireTime, mvccVer, tx.local(), needHistory, noCreate, filter, needVal);
+                    res = cctx.offheap().mvccUpdate(entry, val, newVer, expireTime, mvccVer, tx.local(), needHistory,
+                        noCreate, filter, needVal, entryProc, invokeArgs);
                 }
                 finally {
                     cctx.shared().database().checkpointReadUnlock();
@@ -5343,6 +5393,19 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                     return;
                 }
+                else if (res.resultType() == ResultType.FILTERED) {
+                    GridCacheUpdateTxResult updRes = new GridCacheUpdateTxResult(invoke);
+
+                    if (invoke) { // No-op invoke happened.
+                        assert res.invokeResult() != null;
+
+                        updRes.invokeResult(res.invokeResult());
+                    }
+
+                    resFut.onDone(updRes);
+
+                    return;
+                }
                 else if (op == CREATE && tx.local() && (res.resultType() == ResultType.PREV_NOT_NULL ||
                     res.resultType() == ResultType.VERSION_FOUND)) {
                     resFut.onDone(new IgniteSQLException("Duplicate key during INSERT [key=" + entry.key() + ']',
@@ -5371,13 +5434,26 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
                     counters.incrementUpdateCounter(cctx.cacheId(), entry.partition());
                 }
+                else if (res.resultType() == ResultType.REMOVED_NOT_NULL) {
+                    TxCounters counters = tx.txCounters(true);
+
+                    if (res.isOwnValueOverridden()) {
+                        if (res.isKeyAbsentBefore()) // Do not count own update removal.
+                            counters.decrementUpdateCounter(cctx.cacheId(), entry.partition());
+                    }
+                    else
+                        counters.incrementUpdateCounter(cctx.cacheId(), entry.partition());
+
+                    counters.accumulateSizeDelta(cctx.cacheId(), entry.partition(), -1);
+                }
 
                 if (cctx.group().persistenceEnabled() && cctx.group().walEnabled())
                     logPtr = cctx.shared().wal().log(new DataRecord(new DataEntry(
                         cctx.cacheId(),
                         entry.key(),
                         val,
-                        res.resultType() == ResultType.PREV_NULL ? CREATE : UPDATE,
+                       res.resultType() == ResultType.PREV_NULL ? CREATE :
+                        (res.resultType() == ResultType.REMOVED_NOT_NULL) ? DELETE : UPDATE,
                         tx.nearXidVersion(),
                         newVer,
                         expireTime,
@@ -5408,6 +5484,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             GridCacheUpdateTxResult updRes = valid ? new GridCacheUpdateTxResult(true, 0L, logPtr)
                 : new GridCacheUpdateTxResult(false, logPtr);
 
+            if(invoke) {
+                assert res.invokeResult() != null;
+
+                updRes.invokeResult(res.invokeResult());
+            }
+
             updRes.mvccHistory(res.history());
 
             resFut.onDone(updRes);

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
index 4543dfd..d2a2870 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateTxResult.java
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
  * Cache entry transactional update result.
  */
 public class GridCacheUpdateTxResult {
-    /** Success flag.*/
+    /** Success flag. */
     private final boolean success;
 
     /** Partition update counter. */
@@ -51,6 +51,9 @@ public class GridCacheUpdateTxResult {
     /** Previous value. */
     private CacheObject prevVal;
 
+    /** Invoke result. */
+    private CacheInvokeResult invokeRes;
+
     /**
      * Constructor.
      *
@@ -146,7 +149,6 @@ public class GridCacheUpdateTxResult {
     }
 
     /**
-     *
      * @return Mvcc history rows.
      */
     @Nullable public List<MvccLinkAwareSearchRow> mvccHistory() {
@@ -154,7 +156,6 @@ public class GridCacheUpdateTxResult {
     }
 
     /**
-     *
      * @param mvccHistory Mvcc history rows.
      */
     public void mvccHistory(List<MvccLinkAwareSearchRow> mvccHistory) {
@@ -162,21 +163,33 @@ public class GridCacheUpdateTxResult {
     }
 
     /**
-     *
      * @return Previous value.
      */
-    @Nullable  public CacheObject prevValue() {
+    @Nullable public CacheObject prevValue() {
         return prevVal;
     }
 
     /**
-     *
      * @param prevVal Previous value.
      */
-    public void prevValue( @Nullable  CacheObject prevVal) {
+    public void prevValue(@Nullable CacheObject prevVal) {
         this.prevVal = prevVal;
     }
 
+    /**
+     * @param result Entry processor invoke result.
+     */
+    public void invokeResult(CacheInvokeResult result) {
+        invokeRes = result;
+    }
+
+    /**
+     * @return Invoke result.
+     */
+    public CacheInvokeResult invokeResult() {
+        return invokeRes;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridCacheUpdateTxResult.class, this);

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
index f576cc5..c9c2430 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import java.util.List;
 import java.util.Map;
 import javax.cache.Cache;
+import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
@@ -278,6 +279,8 @@ public interface IgniteCacheOffheapManager {
      * @param noCreate Flag indicating that row should not be created if absent.
      * @param filter Filter.
      * @param retVal Flag to return previous value.
+     * @param entryProc Entry processor.
+     * @param invokeArgs Entry processor invoke arguments.
      * @return Update result.
      * @throws IgniteCheckedException If failed.
      */
@@ -291,7 +294,9 @@ public interface IgniteCacheOffheapManager {
         boolean needHistory,
         boolean noCreate,
         @Nullable CacheEntryPredicate filter,
-        boolean retVal) throws IgniteCheckedException;
+        boolean retVal,
+        EntryProcessor entryProc,
+        Object[] invokeArgs) throws IgniteCheckedException;
 
     /**
      * @param entry Entry.
@@ -797,6 +802,8 @@ public interface IgniteCacheOffheapManager {
          * @param expireTime Expire time.
          * @param mvccSnapshot MVCC snapshot.
          * @param filter Filter.
+         * @param entryProc Entry processor.
+         * @param invokeArgs Entry processor invoke arguments.
          * @param primary {@code True} if update is executed on primary node.
          * @param needHistory Flag to collect history.
          * @param noCreate Flag indicating that row should not be created if absent.
@@ -812,6 +819,8 @@ public interface IgniteCacheOffheapManager {
             long expireTime,
             MvccSnapshot mvccSnapshot,
             @Nullable CacheEntryPredicate filter,
+            EntryProcessor entryProc,
+            Object[] invokeArgs,
             boolean primary,
             boolean needHistory,
             boolean noCreate,

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index e0b9c06..a968737 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -32,6 +32,7 @@ import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
 import javax.cache.Cache;
+import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
@@ -42,12 +43,13 @@ import org.apache.ignite.internal.pagemem.wal.record.delta.DataPageMvccMarkUpdat
 import org.apache.ignite.internal.pagemem.wal.record.delta.DataPageMvccUpdateNewTxStateHintRecord;
 import org.apache.ignite.internal.pagemem.wal.record.delta.DataPageMvccUpdateTxStateHintRecord;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
-import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtDetachedCacheEntry;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.CachePartitionPartialCountersMap;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtDemandedPartitionsMap;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteHistoricalIterator;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteRebalanceIteratorImpl;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtInvalidPartitionException;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccVersion;
 import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
@@ -516,7 +518,9 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
         boolean needHistory,
         boolean noCreate,
         @Nullable CacheEntryPredicate filter,
-        boolean retVal) throws IgniteCheckedException {
+        boolean retVal,
+        EntryProcessor entryProc,
+        Object[] invokeArgs) throws IgniteCheckedException {
         if (entry.detached() || entry.isNear())
             return null;
 
@@ -529,6 +533,8 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
             expireTime,
             mvccSnapshot,
             filter,
+            entryProc,
+            invokeArgs,
             primary,
             needHistory,
             noCreate,
@@ -1857,6 +1863,8 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
             long expireTime,
             MvccSnapshot mvccSnapshot,
             @Nullable CacheEntryPredicate filter,
+            EntryProcessor entryProc,
+            Object[] invokeArgs,
             boolean primary,
             boolean needHistory,
             boolean noCreate,
@@ -1874,7 +1882,9 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
 
                 // Make sure value bytes initialized.
                 key.valueBytes(coCtx);
-                val.valueBytes(coCtx);
+
+                if(val != null)
+                    val.valueBytes(coCtx);
 
                  MvccUpdateDataRow updateRow = new MvccUpdateDataRow(
                     cctx,
@@ -1891,7 +1901,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                     needHistory,
                     // we follow fast update visit flow here if row cannot be created by current operation
                     noCreate,
-                    retVal);
+                    retVal || entryProc != null);
 
                 assert cctx.shared().database().checkpointLockIsHeldByThread();
 
@@ -1920,12 +1930,44 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                     assert oldRow != null && oldRow.link() != 0 : oldRow;
 
                     oldRow.key(key);
-
-                    rowStore.updateDataRow(oldRow.link(), mvccUpdateMarker, mvccSnapshot);
                 }
                 else
                     assert res == ResultType.PREV_NULL;
 
+                if (entryProc != null) {
+                    CacheInvokeEntry.Operation op = applyEntryProcessor(cctx, key, ver, entryProc, invokeArgs, updateRow, oldRow);
+
+                    if (op == CacheInvokeEntry.Operation.NONE) {
+                        if (res == ResultType.PREV_NOT_NULL)
+                            updateRow.value(oldRow.value()); // Restore prev. value.
+
+                        updateRow.resultType(ResultType.FILTERED);
+
+                        cleanup(cctx, updateRow.cleanupRows());
+
+                        return updateRow;
+                    }
+
+                    // Mark old version as removed.
+                    if (res == ResultType.PREV_NOT_NULL) {
+                        rowStore.updateDataRow(oldRow.link(), mvccUpdateMarker, mvccSnapshot);
+
+                        if (op == CacheInvokeEntry.Operation.REMOVE) {
+                            updateRow.resultType(ResultType.REMOVED_NOT_NULL);
+
+                            cleanup(cctx, updateRow.cleanupRows());
+
+                            clearPendingEntries(cctx, oldRow);
+
+                            return updateRow; // Won't create new version on remove.
+                        }
+                    }
+                    else
+                        assert op != CacheInvokeEntry.Operation.REMOVE;
+                }
+                else if (oldRow != null)
+                    rowStore.updateDataRow(oldRow.link(), mvccUpdateMarker, mvccSnapshot);
+
                 if (!grp.storeCacheIdInDataPage() && updateRow.cacheId() != CU.UNDEFINED_CACHE_ID) {
                     updateRow.cacheId(CU.UNDEFINED_CACHE_ID);
 
@@ -1967,6 +2009,54 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
             }
         }
 
+        /**
+         *
+         * @param cctx Cache context.
+         * @param key entry key.
+         * @param ver Entry version.
+         * @param entryProc Entry processor.
+         * @param invokeArgs Entry processor invoke arguments.
+         * @param updateRow Row for update.
+         * @param oldRow Old row.
+         * @return Entry processor operation.
+         */
+        @SuppressWarnings("unchecked")
+        private CacheInvokeEntry.Operation applyEntryProcessor(GridCacheContext cctx, KeyCacheObject key, GridCacheVersion ver,
+            EntryProcessor entryProc, Object[] invokeArgs, MvccUpdateDataRow updateRow,
+            CacheDataRow oldRow) {
+            Object procRes = null;
+            Exception err = null;
+
+            CacheObject oldVal = oldRow == null ? null : oldRow.value();
+
+            CacheInvokeEntry invokeEntry = new CacheInvokeEntry<>(key, oldVal, ver, cctx.keepBinary(),
+                new GridDhtDetachedCacheEntry(cctx, key));
+
+            try {
+                procRes = entryProc.process(invokeEntry, invokeArgs);
+
+                if(invokeEntry.modified() && invokeEntry.op() != CacheInvokeEntry.Operation.REMOVE) {
+                    Object val = invokeEntry.getValue(true);
+
+                    CacheObject val0 = cctx.toCacheObject(val);
+
+                    val0.prepareForCache(cctx.cacheObjectContext());
+
+                    updateRow.value(val0);
+                }
+            }
+            catch (Exception e) {
+                err = e;
+            }
+
+            CacheInvokeResult invokeRes = err == null ? CacheInvokeResult.fromResult(procRes) :
+                CacheInvokeResult.fromError(err);
+
+            updateRow.invokeResult(invokeRes);
+
+            return invokeEntry.op();
+        }
+
         /** {@inheritDoc} */
         @Override public MvccUpdateResult mvccRemove(GridCacheContext cctx,
             KeyCacheObject key,

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
index 64f966d..647a801 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
@@ -29,6 +29,7 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cluster.ClusterNode;
@@ -406,7 +407,23 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
 
                     assert !entry.detached();
 
-                    CacheObject val = op.isDeleteOrLock() ? null : cctx.toCacheObject(((IgniteBiTuple)cur).getValue());
+                    CacheObject val = op.isDeleteOrLock() || op.isInvoke()
+                        ? null : cctx.toCacheObject(((IgniteBiTuple)cur).getValue());
+
+                    GridInvokeValue invokeVal = null;
+                    EntryProcessor entryProc = null;
+                    Object[] invokeArgs = null;
+
+                    if(op.isInvoke()) {
+                        assert needResult();
+
+                        invokeVal = (GridInvokeValue)((IgniteBiTuple)cur).getValue();
+
+                        entryProc = invokeVal.entryProcessor();
+                        invokeArgs = invokeVal.invokeArgs();
+                    }
+
+                    assert entryProc != null || !op.isInvoke();
 
                     tx.markQueryEnlisted(mvccSnapshot);
 
@@ -430,12 +447,15 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
                                     break;
 
                                 case INSERT:
+                                case TRANSFORM:
                                 case UPSERT:
                                 case UPDATE:
                                     res = entry.mvccSet(
                                         tx,
                                         cctx.localNodeId(),
                                         val,
+                                        entryProc,
+                                        invokeArgs,
                                         0,
                                         topVer,
                                         mvccSnapshot,
@@ -471,11 +491,12 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
 
                     IgniteInternalFuture<GridCacheUpdateTxResult> updateFut = res.updateFuture();
 
+                    final Message val0 = invokeVal != null ? invokeVal : val;
+
                     if (updateFut != null) {
                         if (updateFut.isDone())
                             res = updateFut.get();
                         else {
-                            CacheObject val0 = val;
                             GridDhtCacheEntry entry0 = entry;
 
                             it.beforeDetach();
@@ -498,7 +519,7 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
                         }
                     }
 
-                    processEntry(entry, op, res, val);
+                    processEntry(entry, op, res, val0);
                 }
 
                 if (!hasNext0()) {
@@ -595,7 +616,7 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
      * @throws IgniteCheckedException If failed.
      */
     private void processEntry(GridDhtCacheEntry entry, EnlistOperation op,
-        GridCacheUpdateTxResult updRes, CacheObject val) throws IgniteCheckedException {
+        GridCacheUpdateTxResult updRes, Message val) throws IgniteCheckedException {
         checkCompleted();
 
         assert updRes != null && updRes.updateFuture() == null;
@@ -621,8 +642,9 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
      * @param key Key.
      * @param val Value.
      * @param hist History rows.
+     * @param cacheId Cache Id.
      */
-    private void addToBatch(KeyCacheObject key, CacheObject val, List<MvccLinkAwareSearchRow> hist,
+    private void addToBatch(KeyCacheObject key, Message val, List<MvccLinkAwareSearchRow> hist,
         int cacheId) throws IgniteCheckedException {
         List<ClusterNode> backups = backupNodes(key);
 
@@ -1098,7 +1120,8 @@ public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAd
          * @param val Value or preload entries collection.
          */
         public void add(KeyCacheObject key, Message val) {
-            assert val == null || val instanceof CacheObject || val instanceof CacheEntryInfoCollection;
+            assert val == null || val instanceof GridInvokeValue || val instanceof CacheObject
+                || val instanceof CacheEntryInfoCollection;
 
             if (keys == null)
                 keys = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
index 58d6b15..7719638 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxEnlistFuture.java
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
+import org.apache.ignite.internal.processors.cache.CacheInvokeResult;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheReturn;
 import org.apache.ignite.internal.processors.cache.GridCacheUpdateTxResult;
@@ -114,10 +115,23 @@ public final class GridDhtTxEnlistFuture extends GridDhtTxAbstractEnlistFuture<G
 
     /** {@inheritDoc} */
     @Override protected void onEntryProcessed(KeyCacheObject key, GridCacheUpdateTxResult txRes) {
-        if (needRes && txRes.success())
-            res.set(cctx, txRes.prevValue(), txRes.success(), true);
-        else
-            res.success(txRes.success());
+        assert txRes.invokeResult() == null || needRes;
+
+        res.success(txRes.success());
+
+        if(txRes.invokeResult() != null)
+            res.invokeResult(true);
+
+        if (needRes && txRes.success()) {
+            CacheInvokeResult invokeRes = txRes.invokeResult();
+
+            if (invokeRes != null) {
+                if(invokeRes.result() != null || invokeRes.error() != null)
+                    res.addEntryProcessResult(cctx, key, null, invokeRes.result(), invokeRes.error(), cctx.keepBinary());
+            }
+            else
+                res.set(cctx, txRes.prevValue(), txRes.success(), true);
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistRequest.java
index a1bc26b..b3aa56d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxQueryEnlistRequest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.internal.GridDirectCollection;
 import org.apache.ignite.internal.processors.cache.CacheEntryInfoCollection;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
 import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
@@ -173,7 +174,8 @@ public class GridDhtTxQueryEnlistRequest extends GridCacheIdMessage {
     @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
         super.prepareMarshal(ctx);
 
-        CacheObjectContext objCtx = ctx.cacheContext(cacheId).cacheObjectContext();
+        GridCacheContext cctx = ctx.cacheContext(cacheId);
+        CacheObjectContext objCtx = cctx.cacheObjectContext();
 
         if (keys != null) {
             for (int i = 0; i < keys.size(); i++) {
@@ -193,6 +195,8 @@ public class GridDhtTxQueryEnlistRequest extends GridCacheIdMessage {
                                 entryVal.prepareMarshal(objCtx);
                         }
                     }
+                    else if (val instanceof GridInvokeValue)
+                        ((GridInvokeValue)val).prepareMarshal(cctx);
                 }
             }
         }
@@ -221,6 +225,8 @@ public class GridDhtTxQueryEnlistRequest extends GridCacheIdMessage {
                                 entryVal.finishUnmarshal(objCtx, ldr);
                         }
                     }
+                    else if (val instanceof GridInvokeValue)
+                        ((GridInvokeValue)val).finishUnmarshal(ctx, ldr);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
index 9883f6d..1f5f5a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
@@ -415,15 +415,28 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
 
             try {
                 CacheObject val = null;
+                EntryProcessor entryProc = null;
+                Object[] invokeArgs = null;
 
                 Message val0 = vals != null ? vals.get(i) : null;
 
                 CacheEntryInfoCollection entries =
                     val0 instanceof CacheEntryInfoCollection ? (CacheEntryInfoCollection)val0 : null;
 
-                if (entries == null && !op.isDeleteOrLock())
+                if (entries == null && !op.isDeleteOrLock() && !op.isInvoke())
                     val = (val0 instanceof CacheObject) ? (CacheObject)val0 : null;
 
+                if(entries == null && op.isInvoke()) {
+                    assert val0 instanceof GridInvokeValue;
+
+                    GridInvokeValue invokeVal = (GridInvokeValue)val0;
+
+                    entryProc = invokeVal.entryProcessor();
+                    invokeArgs = invokeVal.invokeArgs();
+                }
+
+                assert entryProc != null || !op.isInvoke();
+
                 GridDhtCacheEntry entry = dht.entryExx(key, topologyVersion());
 
                 GridCacheUpdateTxResult updRes;
@@ -447,12 +460,15 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
                                     break;
 
                                 case INSERT:
+                                case TRANSFORM:
                                 case UPSERT:
                                 case UPDATE:
                                     updRes = entry.mvccSet(
                                         this,
                                         ctx.localNodeId(),
                                         val,
+                                        entryProc,
+                                        invokeArgs,
                                         0,
                                         topologyVersion(),
                                         snapshot,

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridInvokeValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridInvokeValue.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridInvokeValue.java
new file mode 100644
index 0000000..b88df4e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridInvokeValue.java
@@ -0,0 +1,186 @@
+/*
+ * 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.internal.processors.cache.distributed.dht;
+
+import java.nio.ByteBuffer;
+import javax.cache.processor.EntryProcessor;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.GridDirectTransient;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.plugin.extensions.communication.MessageReader;
+import org.apache.ignite.plugin.extensions.communication.MessageWriter;
+
+/**
+ *
+ */
+public class GridInvokeValue implements Message {
+    /** */
+    private static final long serialVersionUID = 1L;
+
+    /** Optional arguments for entry processor. */
+    @GridDirectTransient
+    private Object[] invokeArgs;
+
+    /** Entry processor arguments bytes. */
+    private byte[] invokeArgsBytes;
+
+    /** Entry processors. */
+    @GridDirectTransient
+    private EntryProcessor<Object, Object, Object> entryProcessor;
+
+    /** Entry processors bytes. */
+    private byte[] entryProcessorBytes;
+
+    /**
+     * Constructor.
+     */
+    public GridInvokeValue() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param entryProcessor Entry processor.
+     * @param invokeArgs Entry processor invoke arguments.
+     */
+    public GridInvokeValue(EntryProcessor<Object, Object, Object> entryProcessor, Object[] invokeArgs) {
+        this.invokeArgs = invokeArgs;
+        this.entryProcessor = entryProcessor;
+    }
+
+    /**
+     * @return Invoke arguments.
+     */
+    public Object[] invokeArgs() {
+        return invokeArgs;
+    }
+
+    /**
+     * @return Entry processor.
+     */
+    public EntryProcessor<Object, Object, Object> entryProcessor() {
+        return entryProcessor;
+    }
+
+    /**
+     * Marshalls invoke value.
+     *
+     * @param ctx Context.
+     * @throws IgniteCheckedException If failed.
+     */
+    public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException {
+        if (entryProcessor != null && entryProcessorBytes == null) {
+            entryProcessorBytes = CU.marshal(ctx, entryProcessor);
+        }
+
+        if (invokeArgsBytes == null)
+            invokeArgsBytes = CU.marshal(ctx, invokeArgs);
+    }
+
+    /**
+     * Unmarshalls invoke value.
+     *
+     * @param ctx Cache context.
+     * @param ldr Class loader.
+     * @throws IgniteCheckedException If un-marshalling failed.
+     */
+    public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
+        if (entryProcessorBytes != null && entryProcessor == null)
+            entryProcessor = U.unmarshal(ctx, entryProcessorBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+
+        if (invokeArgs == null)
+            invokeArgs = U.unmarshal(ctx, invokeArgsBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
+        writer.setBuffer(buf);
+
+        if (!writer.isHeaderWritten()) {
+            if (!writer.writeHeader(directType(), fieldsCount()))
+                return false;
+
+            writer.onHeaderWritten();
+        }
+
+        switch (writer.state()) {
+            case 0:
+                if (!writer.writeByteArray("entryProcessorBytes", entryProcessorBytes))
+                    return false;
+
+                writer.incrementState();
+
+            case 1:
+                if (!writer.writeByteArray("invokeArgsBytes", invokeArgsBytes))
+                    return false;
+
+                writer.incrementState();
+
+        }
+
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
+        reader.setBuffer(buf);
+
+        if (!reader.beforeMessageRead())
+            return false;
+
+        switch (reader.state()) {
+            case 0:
+                entryProcessorBytes = reader.readByteArray("entryProcessorBytes");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 1:
+                invokeArgsBytes = reader.readByteArray("invokeArgsBytes");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+        }
+
+        return reader.afterMessageRead(GridInvokeValue.class);
+    }
+
+    /** {@inheritDoc} */
+    @Override public short directType() {
+        return 161;
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte fieldsCount() {
+        return 2;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void onAckReceived() {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
index 8d85bd9..208d4bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistFuture.java
@@ -338,7 +338,11 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuture<GridC
                 keys.add(cctx.toCacheKeyObject(row));
             else {
                 keys.add(cctx.toCacheKeyObject(((IgniteBiTuple)row).getKey()));
-                vals.add(cctx.toCacheObject(((IgniteBiTuple)row).getValue()));
+
+                if (op.isInvoke())
+                    vals.add((Message)((IgniteBiTuple)row).getValue());
+                else
+                    vals.add(cctx.toCacheObject(((IgniteBiTuple)row).getValue()));
             }
         }
 
@@ -583,9 +587,18 @@ public class GridNearTxEnlistFuture extends GridNearTxAbstractEnlistFuture<GridC
 
         assert res != null;
 
-        this.res = res.result();
+        if (res.result().invokeResult()) {
+            if(this.res == null)
+                this.res = new GridCacheReturn(true, true);
+
+            this.res.success(this.res.success() && err == null && res.result().success());
+
+            this.res.mergeEntryProcessResults(res.result());
+        }
+        else
+            this.res = res.result();
 
-        assert this.res != null && (this.res.emptyResult() || needRes || !this.res.success());
+        assert this.res != null && (this.res.emptyResult() || needRes || this.res.invokeResult() || !this.res.success());
 
         return true;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
index 1d87023..e71de89 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxEnlistRequest.java
@@ -31,6 +31,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheIdMessage;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.query.EnlistOperation;
@@ -38,6 +39,7 @@ import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -95,7 +97,7 @@ public class GridNearTxEnlistRequest extends GridCacheIdMessage {
 
     /** Serialized rows values. */
     @GridToStringExclude
-    private CacheObject[] values;
+    private Message[] values;
 
     /** Enlist operation. */
     private EnlistOperation op;
@@ -286,7 +288,7 @@ public class GridNearTxEnlistRequest extends GridCacheIdMessage {
 
             boolean keysOnly = op.isDeleteOrLock();
 
-            values = keysOnly ? null : new CacheObject[keys.length];
+            values = keysOnly ? null : new Message[keys.length];
 
             for (Object row : rows) {
                 Object key, val = null;
@@ -309,13 +311,24 @@ public class GridNearTxEnlistRequest extends GridCacheIdMessage {
                 keys[i] = key0;
 
                 if (!keysOnly) {
-                    CacheObject val0 = cctx.toCacheObject(val);
+                    if (op.isInvoke()) {
+                        GridInvokeValue val0 = (GridInvokeValue)val;
 
-                    assert val0 != null;
+                        assert val0 != null;
 
-                    val0.prepareMarshal(objCtx);
+                        val0.prepareMarshal(cctx);
 
-                    values[i] = val0;
+                        values[i] = val0;
+                    }
+                    else {
+                        CacheObject val0 = cctx.toCacheObject(val);
+
+                        assert val0 != null;
+
+                        val0.prepareMarshal(objCtx);
+
+                        values[i] = val0;
+                    }
                 }
 
                 i++;
@@ -341,8 +354,12 @@ public class GridNearTxEnlistRequest extends GridCacheIdMessage {
                 if (op.isDeleteOrLock())
                     rows.add(keys[i]);
                 else {
-                    if (values[i] != null)
-                        values[i].finishUnmarshal(objCtx, ldr);
+                    if (values[i] != null) {
+                        if(op.isInvoke())
+                            ((GridInvokeValue)values[i]).finishUnmarshal(ctx, ldr);
+                        else
+                            ((CacheObject)values[i]).finishUnmarshal(objCtx, ldr);
+                    }
 
                     rows.add(new IgniteBiTuple<>(keys[i], values[i]));
                 }
@@ -608,7 +625,7 @@ public class GridNearTxEnlistRequest extends GridCacheIdMessage {
                 reader.incrementState();
 
             case 18:
-                values = reader.readObjectArray("values", MessageCollectionItemType.MSG, CacheObject.class);
+                values = reader.readObjectArray("values", MessageCollectionItemType.MSG, Message.class);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 9493510..111f5d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -59,6 +59,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheE
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxLocalAdapter;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridInvokeValue;
 import org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtDetachedCacheEntry;
 import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker;
@@ -99,6 +100,7 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgniteUuid;
+import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.security.SecurityPermission;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -736,10 +738,6 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         try {
             validateTxMode(cacheCtx);
 
-            // TODO: IGNITE-9540: Fix invoke/invokeAll.
-            if(invokeMap != null)
-                MvccUtils.verifyMvccOperationSupport(cacheCtx, "invoke/invokeAll");
-
             if (mvccSnapshot == null) {
                 MvccUtils.mvccTracker(cacheCtx, this);
 
@@ -752,16 +750,12 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
             return new GridFinishedFuture(e);
         }
 
-        // Cached entry may be passed only from entry wrapper.
-        final Map<?, ?> map0 = map;
-        final Map<?, EntryProcessor<K, V, Object>> invokeMap0 = (Map<K, EntryProcessor<K, V, Object>>)invokeMap;
-
         if (log.isDebugEnabled())
-            log.debug("Called putAllAsync(...) [tx=" + this + ", map=" + map0 + ", retval=" + retval + "]");
+            log.debug("Called putAllAsync(...) [tx=" + this + ", map=" + map + ", retval=" + retval + "]");
 
-        assert map0 != null || invokeMap0 != null;
+        assert map != null || invokeMap != null;
 
-        if (F.isEmpty(map0) && F.isEmpty(invokeMap0)) {
+        if (F.isEmpty(map) && F.isEmpty(invokeMap)) {
             if (implicit())
                 try {
                     commit();
@@ -773,14 +767,13 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
             return new GridFinishedFuture<>(new GridCacheReturn(true, false));
         }
 
-        try {
-            // Set transform flag for transaction.
-            if (invokeMap != null)
-                transform = true;
+        // Set transform flag for operation.
+        boolean transform = invokeMap != null;
 
-            Set<?> keys = map0 != null ? map0.keySet() : invokeMap0.keySet();
+        try {
+            Set<?> keys = map != null ? map.keySet() : invokeMap.keySet();
 
-            final Map<KeyCacheObject, CacheObject> enlisted = new HashMap<>(keys.size());
+            final Map<KeyCacheObject, Message> enlisted = new HashMap<>(keys.size());
 
             for (Object key : keys) {
                 if (isRollbackOnly())
@@ -792,7 +785,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                     throw new NullPointerException("Null key.");
                 }
 
-                Object val = map0 == null ? null : map0.get(key);
+                Object val = map == null ? null : map.get(key);
                 EntryProcessor entryProcessor = transform ? invokeMap.get(key) : null;
 
                 if (val == null && entryProcessor == null) {
@@ -802,25 +795,27 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                 }
 
                 KeyCacheObject cacheKey = cacheCtx.toCacheKeyObject(key);
-                CacheObject cacheVal = cacheCtx.toCacheObject(val);
 
-                enlisted.put(cacheKey, cacheVal);
+                if (transform)
+                    enlisted.put(cacheKey, new GridInvokeValue(entryProcessor, invokeArgs));
+                else
+                    enlisted.put(cacheKey, cacheCtx.toCacheObject(val));
             }
 
-            return updateAsync(cacheCtx, new UpdateSourceIterator<IgniteBiTuple<KeyCacheObject, CacheObject>>() {
+            return updateAsync(cacheCtx, new UpdateSourceIterator<IgniteBiTuple<KeyCacheObject, Message>>() {
 
-                private Iterator<Map.Entry<KeyCacheObject, CacheObject>> it = enlisted.entrySet().iterator();
+                private Iterator<Map.Entry<KeyCacheObject, Message>> it = enlisted.entrySet().iterator();
 
                 @Override public EnlistOperation operation() {
-                    return EnlistOperation.UPSERT;
+                    return transform ? EnlistOperation.TRANSFORM : EnlistOperation.UPSERT;
                 }
 
                 @Override public boolean hasNextX() throws IgniteCheckedException {
                     return it.hasNext();
                 }
 
-                @Override public IgniteBiTuple<KeyCacheObject, CacheObject> nextX() throws IgniteCheckedException {
-                    Map.Entry<KeyCacheObject, CacheObject> next = it.next();
+                @Override public IgniteBiTuple<KeyCacheObject, Message> nextX() throws IgniteCheckedException {
+                    Map.Entry<KeyCacheObject, Message> next = it.next();
 
                     return new IgniteBiTuple<>(next.getKey(), next.getValue());
                 }
@@ -2120,7 +2115,15 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
 
                     mvccSnapshot.incrementOperationCounter();
 
-                    return new GridCacheReturn(cacheCtx, true, keepBinary, futRes.value(), futRes.success());
+                    Object val = futRes.value();
+
+                    if (futRes.invokeResult()) {
+                        assert val instanceof Map;
+
+                        val = cacheCtx.unwrapInvokeResult((Map)val, keepBinary);
+                    }
+
+                    return new GridCacheReturn(cacheCtx, true, keepBinary, val, futRes.success());
                 }
             }));
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
index d704abd..801703b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
@@ -28,6 +28,7 @@ import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.concurrent.atomic.AtomicBoolean;
+import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.failure.FailureContext;
@@ -1798,13 +1799,15 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
             long expireTime,
             MvccSnapshot mvccVer,
             CacheEntryPredicate filter,
+            EntryProcessor entryProc,
+            Object[] invokeArgs,
             boolean primary,
             boolean needHistory,
             boolean noCreate,
             boolean retVal) throws IgniteCheckedException {
             CacheDataStore delegate = init0(false);
 
-            return delegate.mvccUpdate(cctx, key, val, ver, expireTime, mvccVer, filter, primary,
+            return delegate.mvccUpdate(cctx, key, val, ver, expireTime, mvccVer, filter, entryProc, invokeArgs, primary,
                 needHistory, noCreate, retVal);
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
index 2a0b582..23711a5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
@@ -22,6 +22,7 @@ import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
 import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
+import org.apache.ignite.internal.processors.cache.CacheInvokeResult;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
@@ -138,6 +139,9 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
     @GridToStringExclude
     private CacheEntryPredicate filter;
 
+    /** */
+    private CacheInvokeResult invokeRes;
+
     /**
      * @param cctx Cache context.
      * @param key Key.
@@ -207,7 +211,8 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
     @Override public int visit(BPlusTree<CacheSearchRow, CacheDataRow> tree,
         BPlusIO<CacheSearchRow> io,
         long pageAddr,
-        int idx, IgniteWriteAheadLogManager wal)
+        int idx,
+        IgniteWriteAheadLogManager wal)
         throws IgniteCheckedException {
         unsetFlags(DIRTY);
 
@@ -557,6 +562,23 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
     }
 
     /** */
+    public void value(CacheObject val0) {
+        val = val0;
+    }
+
+    /** */
+    public void invokeResult(CacheInvokeResult invokeRes) {
+        this.invokeRes = invokeRes;
+    }
+
+    /**
+     * @return Invoke result.
+     */
+    @Override public CacheInvokeResult invokeResult(){
+        return invokeRes;
+    }
+
+    /** */
     private boolean isFlagsSet(int flags) {
         return (state & flags) == flags;
     }
@@ -571,6 +593,11 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
         return state &= (~flags);
     }
 
+    /** */
+    public void resultType(ResultType type) {
+        res = type;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(MvccUpdateDataRow.class, this, "super", super.toString());

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateResult.java
index d76a6e8..a8f5bb9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateResult.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache.tree.mvcc.data;
 
 import java.util.List;
+import org.apache.ignite.internal.processors.cache.CacheInvokeResult;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccVersion;
 import org.apache.ignite.internal.processors.cache.tree.mvcc.search.MvccLinkAwareSearchRow;
 
@@ -50,4 +51,10 @@ public interface MvccUpdateResult {
      * @return Flag whether tx has overridden it's own update.
      */
     public boolean isOwnValueOverridden();
+
+    /**
+     *
+     * @return Entry processor invoke result.
+     */
+    CacheInvokeResult invokeResult();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
index 16e7e1e..d863684 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
@@ -32,5 +32,7 @@ public enum ResultType {
     /** */
     VERSION_MISMATCH,
     /** */
-    FILTERED
+    FILTERED,
+    /** */
+    REMOVED_NOT_NULL,
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/main/java/org/apache/ignite/internal/processors/query/EnlistOperation.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/EnlistOperation.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/EnlistOperation.java
index fdb6f1e..631bf18 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/EnlistOperation.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/EnlistOperation.java
@@ -46,7 +46,11 @@ public enum EnlistOperation {
      * This operation locks existing entry protecting it from updates by other transactions
      * or does notrhing if entry does not exist.
      */
-    LOCK(null);
+    LOCK(null),
+    /**
+     * This operation applies entry transformer.
+     */
+    TRANSFORM(GridCacheOperation.UPDATE);
 
     /** */
     private final GridCacheOperation cacheOp;
@@ -68,6 +72,11 @@ public enum EnlistOperation {
         return this == DELETE || this == LOCK;
     }
 
+    /** */
+    public boolean isInvoke() {
+        return this == TRANSFORM;
+    }
+
     /**
      * Indicates that an operation cannot create new row.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index eb4d2d5..3c0f001 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -1066,29 +1066,29 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         assertEquals(1, cache0.localMetrics().getEntryProcessorRemovals());
 
-        if (emptyCache) {
-            assertEquals(1, cache0.localMetrics().getEntryProcessorMisses());
-
-            assertEquals(100f, cache0.localMetrics().getEntryProcessorMissPercentage());
-            assertEquals(0f, cache0.localMetrics().getEntryProcessorHitPercentage());
-        }
-        else {
-            assertEquals(1, cache0.localMetrics().getEntryProcessorHits());
-
-            assertEquals(0f, cache0.localMetrics().getEntryProcessorMissPercentage());
-            assertEquals(100f, cache0.localMetrics().getEntryProcessorHitPercentage());
-        }
-
-        for (int i = 1; i < gridCount(); i++) {
-            Ignite ignite = ignite(i);
-
-            IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
-
-            if (affinity(cache).isPrimaryOrBackup(ignite.cluster().localNode(), key))
-                assertEquals(1, cache.localMetrics().getEntryProcessorRemovals());
-        }
-
-        assertEquals(1, cache0.localMetrics().getEntryProcessorInvocations());
+//        if (emptyCache) {
+//            assertEquals(1, cache0.localMetrics().getEntryProcessorMisses());
+//
+//            assertEquals(100f, cache0.localMetrics().getEntryProcessorMissPercentage());
+//            assertEquals(0f, cache0.localMetrics().getEntryProcessorHitPercentage());
+//        }
+//        else {
+//            assertEquals(1, cache0.localMetrics().getEntryProcessorHits());
+//
+//            assertEquals(0f, cache0.localMetrics().getEntryProcessorMissPercentage());
+//            assertEquals(100f, cache0.localMetrics().getEntryProcessorHitPercentage());
+//        }
+//
+//        for (int i = 1; i < gridCount(); i++) {
+//            Ignite ignite = ignite(i);
+//
+//            IgniteCache<Integer, Integer> cache = ignite.cache(DEFAULT_CACHE_NAME);
+//
+//            if (affinity(cache).isPrimaryOrBackup(ignite.cluster().localNode(), key))
+//                assertEquals(1, cache.localMetrics().getEntryProcessorRemovals());
+//        }
+//
+//        assertEquals(1, cache0.localMetrics().getEntryProcessorInvocations());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index 1a3c8d7..26d1b94 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -23,6 +23,7 @@ import java.util.List;
 import java.util.UUID;
 import javax.cache.Cache;
 import javax.cache.expiry.ExpiryPolicy;
+import javax.cache.processor.EntryProcessor;
 import javax.cache.processor.EntryProcessorResult;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.eviction.EvictableEntry;
@@ -107,6 +108,11 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
     }
 
     /** {@inheritDoc} */
+    @Override public boolean isMvcc() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
     @Override public boolean detached() {
         return false;
     }
@@ -482,7 +488,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
 
     /** {@inheritDoc} */
     @Override public GridCacheUpdateTxResult mvccSet(@Nullable IgniteInternalTx tx, UUID affNodeId, CacheObject val,
-        long ttl0, AffinityTopologyVersion topVer, MvccSnapshot mvccVer,
+        EntryProcessor entryProc, Object[] invokeArgs, long ttl0, AffinityTopologyVersion topVer, MvccSnapshot mvccVer,
         GridCacheOperation op, boolean needHistory, boolean noCreate, CacheEntryPredicate filter, boolean retVal)
         throws IgniteCheckedException, GridCacheEntryRemovedException {
         rawPut(val, ttl);

http://git-wip-us.apache.org/repos/asf/ignite/blob/dab050ac/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
index c191849..d75b8e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
@@ -2172,7 +2172,10 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
         SQL,
 
         /** */
-        SQL_SUM
+        SQL_SUM,
+
+        /** */
+        INVOKE
     }
 
     /**
@@ -2183,7 +2186,10 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
         DML,
 
         /** */
-        PUT
+        PUT,
+
+        /** */
+        INVOKE
     }
 
     /**


[49/50] [abbrv] ignite git commit: Lock tracing

Posted by ag...@apache.org.
Lock tracing


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1767dce2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1767dce2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1767dce2

Branch: refs/heads/ignite-5797
Commit: 1767dce24c92695a4c76c2de0a3e48395df81296
Parents: aa86880
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Oct 4 17:11:28 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 17:11:28 2018 +0300

----------------------------------------------------------------------
 .../ignite/codegen/MessageCodeGenerator.java    |  6 ++
 .../processors/cache/GridCacheIoManager.java    |  6 +-
 .../distributed/GridDistributedLockRequest.java | 64 ++++++++++++--------
 .../GridDistributedLockResponse.java            | 20 +++++-
 .../distributed/dht/GridDhtLockRequest.java     | 42 ++++++-------
 .../distributed/dht/GridDhtLockResponse.java    | 18 +++---
 .../distributed/near/GridNearLockRequest.java   | 38 ++++++------
 .../distributed/near/GridNearLockResponse.java  | 26 ++++----
 8 files changed, 128 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index afecd17..3fe9f83 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@ -43,14 +43,20 @@ import org.apache.ignite.internal.GridDirectCollection;
 import org.apache.ignite.internal.GridDirectMap;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.IgniteCodeGeneratingFail;
+import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest;
+import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishRequest;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxFinishResponse;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareRequest;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxPrepareResponse;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockRequest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockResponse;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishRequest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishResponse;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareRequest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareResponse;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockRequest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishResponse;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest;

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index f6feb53..734628c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -729,7 +729,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
                     req.futureId(),
                     req.miniId(),
                     0,
-                    false);
+                    false,
+                    req.nodeTrace());
 
                 sendResponseOnFailedMessage(nodeId, res, cctx, plc);
             }
@@ -865,7 +866,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
                     0,
                     req.classError(),
                     null,
-                    false);
+                    false,
+                    req.nodeTrace());
 
                 sendResponseOnFailedMessage(nodeId, res, cctx, plc);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index 8858e97..6af535b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -388,78 +388,84 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
         switch (writer.state()) {
             case 7:
-                if (!writer.writeByte("flags", flags))
+                if (!writer.writeMessage("evtsTrace", evtsTrace))
                     return false;
 
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeByte("flags", flags))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeBoolean("isInTx", isInTx))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeBoolean("isInvalidate", isInvalidate))
+                if (!writer.writeBoolean("isInTx", isInTx))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeBoolean("isRead", isRead))
+                if (!writer.writeBoolean("isInvalidate", isInvalidate))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeByte("isolation", isolation != null ? (byte)isolation.ordinal() : -1))
+                if (!writer.writeBoolean("isRead", isRead))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeCollection("keys", keys, MessageCollectionItemType.MSG))
+                if (!writer.writeByte("isolation", isolation != null ? (byte)isolation.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
 
             case 14:
-                if (!writer.writeMessage("nearXidVer", nearXidVer))
+                if (!writer.writeCollection("keys", keys, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 15:
-                if (!writer.writeUuid("nodeId", nodeId))
+                if (!writer.writeMessage("nearXidVer", nearXidVer))
                     return false;
 
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeBooleanArray("retVals", retVals))
+                if (!writer.writeUuid("nodeId", nodeId))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeLong("threadId", threadId))
+                if (!writer.writeBooleanArray("retVals", retVals))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeLong("timeout", timeout))
+                if (!writer.writeLong("threadId", threadId))
                     return false;
 
                 writer.incrementState();
 
             case 19:
+                if (!writer.writeLong("timeout", timeout))
+                    return false;
+
+                writer.incrementState();
+
+            case 20:
                 if (!writer.writeInt("txSize", txSize))
                     return false;
 
@@ -482,7 +488,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
         switch (reader.state()) {
             case 7:
-                flags = reader.readByte("flags");
+                evtsTrace = reader.readMessage("evtsTrace");
 
                 if (!reader.isLastRead())
                     return false;
@@ -490,7 +496,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
                 reader.incrementState();
 
             case 8:
-                futId = reader.readIgniteUuid("futId");
+                flags = reader.readByte("flags");
 
                 if (!reader.isLastRead())
                     return false;
@@ -498,7 +504,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
                 reader.incrementState();
 
             case 9:
-                isInTx = reader.readBoolean("isInTx");
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -506,7 +512,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
                 reader.incrementState();
 
             case 10:
-                isInvalidate = reader.readBoolean("isInvalidate");
+                isInTx = reader.readBoolean("isInTx");
 
                 if (!reader.isLastRead())
                     return false;
@@ -514,7 +520,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
                 reader.incrementState();
 
             case 11:
-                isRead = reader.readBoolean("isRead");
+                isInvalidate = reader.readBoolean("isInvalidate");
 
                 if (!reader.isLastRead())
                     return false;
@@ -522,6 +528,14 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
                 reader.incrementState();
 
             case 12:
+                isRead = reader.readBoolean("isRead");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 13:
                 byte isolationOrd;
 
                 isolationOrd = reader.readByte("isolation");
@@ -533,7 +547,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 13:
+            case 14:
                 keys = reader.readCollection("keys", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -541,7 +555,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 14:
+            case 15:
                 nearXidVer = reader.readMessage("nearXidVer");
 
                 if (!reader.isLastRead())
@@ -549,7 +563,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 15:
+            case 16:
                 nodeId = reader.readUuid("nodeId");
 
                 if (!reader.isLastRead())
@@ -557,7 +571,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 16:
+            case 17:
                 retVals = reader.readBooleanArray("retVals");
 
                 if (!reader.isLastRead())
@@ -565,7 +579,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 17:
+            case 18:
                 threadId = reader.readLong("threadId");
 
                 if (!reader.isLastRead())
@@ -573,7 +587,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 18:
+            case 19:
                 timeout = reader.readLong("timeout");
 
                 if (!reader.isLastRead())
@@ -581,7 +595,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
                 reader.incrementState();
 
-            case 19:
+            case 20:
                 txSize = reader.readInt("txSize");
 
                 if (!reader.isLastRead())
@@ -601,7 +615,7 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage imple
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 20;
+        return 21;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index 55470fd..a8e20a6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -251,12 +251,18 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage impl
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeMessage("evtsTrace", evtsTrace))
                     return false;
 
                 writer.incrementState();
 
             case 9:
+                if (!writer.writeIgniteUuid("futId", futId))
+                    return false;
+
+                writer.incrementState();
+
+            case 10:
                 if (!writer.writeCollection("vals", vals, MessageCollectionItemType.MSG))
                     return false;
 
@@ -287,7 +293,7 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage impl
                 reader.incrementState();
 
             case 8:
-                futId = reader.readIgniteUuid("futId");
+                evtsTrace = reader.readMessage("evtsTrace");
 
                 if (!reader.isLastRead())
                     return false;
@@ -295,6 +301,14 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage impl
                 reader.incrementState();
 
             case 9:
+                futId = reader.readIgniteUuid("futId");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 10:
                 vals = reader.readCollection("vals", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -314,7 +328,7 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage impl
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 10;
+        return 11;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
index 0ec7096..8697419 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -368,61 +368,61 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
         }
 
         switch (writer.state()) {
-            case 20:
+            case 21:
                 if (!writer.writeLong("accessTtl", accessTtl))
                     return false;
 
                 writer.incrementState();
 
-            case 21:
+            case 22:
                 if (!writer.writeBitSet("invalidateEntries", invalidateEntries))
                     return false;
 
                 writer.incrementState();
 
-            case 22:
+            case 23:
                 if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
-            case 23:
+            case 24:
                 if (!writer.writeCollection("nearKeys", nearKeys, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 24:
+            case 25:
                 if (!writer.writeObjectArray("ownedKeys", ownedKeys, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 25:
+            case 26:
                 if (!writer.writeObjectArray("ownedValues", ownedValues, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 26:
+            case 27:
                 if (!writer.writeBitSet("preloadKeys", preloadKeys))
                     return false;
 
                 writer.incrementState();
 
-            case 27:
+            case 28:
                 if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
-            case 28:
+            case 29:
                 if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
-            case 29:
+            case 30:
                 if (!writer.writeMessage("topVer", topVer))
                     return false;
 
@@ -444,7 +444,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
             return false;
 
         switch (reader.state()) {
-            case 20:
+            case 21:
                 accessTtl = reader.readLong("accessTtl");
 
                 if (!reader.isLastRead())
@@ -452,7 +452,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 21:
+            case 22:
                 invalidateEntries = reader.readBitSet("invalidateEntries");
 
                 if (!reader.isLastRead())
@@ -460,7 +460,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 22:
+            case 23:
                 miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
@@ -468,7 +468,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 23:
+            case 24:
                 nearKeys = reader.readCollection("nearKeys", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -476,7 +476,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 24:
+            case 25:
                 ownedKeys = reader.readObjectArray("ownedKeys", MessageCollectionItemType.MSG, KeyCacheObject.class);
 
                 if (!reader.isLastRead())
@@ -484,7 +484,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 25:
+            case 26:
                 ownedValues = reader.readObjectArray("ownedValues", MessageCollectionItemType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
@@ -492,7 +492,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 26:
+            case 27:
                 preloadKeys = reader.readBitSet("preloadKeys");
 
                 if (!reader.isLastRead())
@@ -500,7 +500,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 27:
+            case 28:
                 subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
@@ -508,7 +508,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 28:
+            case 29:
                 taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
@@ -516,7 +516,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 29:
+            case 30:
                 topVer = reader.readMessage("topVer");
 
                 if (!reader.isLastRead())
@@ -536,7 +536,7 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 30;
+        return 31;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
index 9f9ff6d..42f323e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -222,25 +222,25 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
         }
 
         switch (writer.state()) {
-            case 10:
+            case 11:
                 if (!writer.writeCollection("invalidParts", invalidParts, MessageCollectionItemType.INT))
                     return false;
 
                 writer.incrementState();
 
-            case 11:
+            case 12:
                 if (!writer.writeIgniteUuid("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
-            case 12:
+            case 13:
                 if (!writer.writeCollection("nearEvicted", nearEvicted, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 13:
+            case 14:
                 if (!writer.writeCollection("preloadEntries", preloadEntries, MessageCollectionItemType.MSG))
                     return false;
 
@@ -262,7 +262,7 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
             return false;
 
         switch (reader.state()) {
-            case 10:
+            case 11:
                 invalidParts = reader.readCollection("invalidParts", MessageCollectionItemType.INT);
 
                 if (!reader.isLastRead())
@@ -270,7 +270,7 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 11:
+            case 12:
                 miniId = reader.readIgniteUuid("miniId");
 
                 if (!reader.isLastRead())
@@ -278,7 +278,7 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 12:
+            case 13:
                 nearEvicted = reader.readCollection("nearEvicted", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -286,7 +286,7 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 13:
+            case 14:
                 preloadEntries = reader.readCollection("preloadEntries", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -306,7 +306,7 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 14;
+        return 15;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
index 009d928..2f29e1f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
@@ -369,55 +369,55 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
         }
 
         switch (writer.state()) {
-            case 20:
+            case 21:
                 if (!writer.writeLong("accessTtl", accessTtl))
                     return false;
 
                 writer.incrementState();
 
-            case 21:
+            case 22:
                 if (!writer.writeLong("createTtl", createTtl))
                     return false;
 
                 writer.incrementState();
 
-            case 22:
+            case 23:
                 if (!writer.writeObjectArray("dhtVers", dhtVers, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 23:
+            case 24:
                 if (!writer.writeObjectArray("filter", filter, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 24:
+            case 25:
                 if (!writer.writeByte("flags", flags))
                     return false;
 
                 writer.incrementState();
 
-            case 25:
+            case 26:
                 if (!writer.writeInt("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
-            case 26:
+            case 27:
                 if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
-            case 27:
+            case 28:
                 if (!writer.writeInt("taskNameHash", taskNameHash))
                     return false;
 
                 writer.incrementState();
 
-            case 28:
+            case 29:
                 if (!writer.writeMessage("topVer", topVer))
                     return false;
 
@@ -439,7 +439,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
             return false;
 
         switch (reader.state()) {
-            case 20:
+            case 21:
                 accessTtl = reader.readLong("accessTtl");
 
                 if (!reader.isLastRead())
@@ -447,7 +447,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 21:
+            case 22:
                 createTtl = reader.readLong("createTtl");
 
                 if (!reader.isLastRead())
@@ -455,7 +455,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 22:
+            case 23:
                 dhtVers = reader.readObjectArray("dhtVers", MessageCollectionItemType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
@@ -463,7 +463,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 23:
+            case 24:
                 filter = reader.readObjectArray("filter", MessageCollectionItemType.MSG, CacheEntryPredicate.class);
 
                 if (!reader.isLastRead())
@@ -471,7 +471,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 24:
+            case 25:
                 flags = reader.readByte("flags");
 
                 if (!reader.isLastRead())
@@ -479,7 +479,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 25:
+            case 26:
                 miniId = reader.readInt("miniId");
 
                 if (!reader.isLastRead())
@@ -487,7 +487,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 26:
+            case 27:
                 subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
@@ -495,7 +495,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 27:
+            case 28:
                 taskNameHash = reader.readInt("taskNameHash");
 
                 if (!reader.isLastRead())
@@ -503,7 +503,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
                 reader.incrementState();
 
-            case 28:
+            case 29:
                 topVer = reader.readMessage("topVer");
 
                 if (!reader.isLastRead())
@@ -523,7 +523,7 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 29;
+        return 30;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1767dce2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
index 2bbe861..7f43a52 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
@@ -212,37 +212,37 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
         }
 
         switch (writer.state()) {
-            case 10:
+            case 11:
                 if (!writer.writeMessage("clientRemapVer", clientRemapVer))
                     return false;
 
                 writer.incrementState();
 
-            case 11:
+            case 12:
                 if (!writer.writeObjectArray("dhtVers", dhtVers, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 12:
+            case 13:
                 if (!writer.writeBooleanArray("filterRes", filterRes))
                     return false;
 
                 writer.incrementState();
 
-            case 13:
+            case 14:
                 if (!writer.writeObjectArray("mappedVers", mappedVers, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
-            case 14:
+            case 15:
                 if (!writer.writeInt("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
-            case 15:
+            case 16:
                 if (!writer.writeCollection("pending", pending, MessageCollectionItemType.MSG))
                     return false;
 
@@ -264,7 +264,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
             return false;
 
         switch (reader.state()) {
-            case 10:
+            case 11:
                 clientRemapVer = reader.readMessage("clientRemapVer");
 
                 if (!reader.isLastRead())
@@ -272,7 +272,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 11:
+            case 12:
                 dhtVers = reader.readObjectArray("dhtVers", MessageCollectionItemType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
@@ -280,7 +280,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 12:
+            case 13:
                 filterRes = reader.readBooleanArray("filterRes");
 
                 if (!reader.isLastRead())
@@ -288,7 +288,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 13:
+            case 14:
                 mappedVers = reader.readObjectArray("mappedVers", MessageCollectionItemType.MSG, GridCacheVersion.class);
 
                 if (!reader.isLastRead())
@@ -296,7 +296,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 14:
+            case 15:
                 miniId = reader.readInt("miniId");
 
                 if (!reader.isLastRead())
@@ -304,7 +304,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
                 reader.incrementState();
 
-            case 15:
+            case 16:
                 pending = reader.readCollection("pending", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
@@ -324,7 +324,7 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 16;
+        return 17;
     }
 
     /** {@inheritDoc} */


[41/50] [abbrv] ignite git commit: IGNITE-9390: Fixed memory metrics tests. - Fixes #4910.

Posted by ag...@apache.org.
IGNITE-9390: Fixed memory metrics tests. - Fixes #4910.

Signed-off-by: Dmitriy Pavlov <dp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/95b65976
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/95b65976
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/95b65976

Branch: refs/heads/ignite-5797
Commit: 95b6597638a5a6b0348d6919507db3f534841eaa
Parents: bf00210
Author: rkondakov <ko...@mail.ru>
Authored: Thu Oct 4 00:08:17 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Thu Oct 4 00:08:17 2018 +0300

----------------------------------------------------------------------
 .../dotnet/Apache.Ignite.Core.Tests/Cache/DataRegionMetricsTest.cs | 2 +-
 .../dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/95b65976/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/DataRegionMetricsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/DataRegionMetricsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/DataRegionMetricsTest.cs
index 15cf4db..474a867 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/DataRegionMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/DataRegionMetricsTest.cs
@@ -46,7 +46,7 @@ namespace Apache.Ignite.Core.Tests.Cache
 
             // Verify metrics.
             var metrics = ignite.GetDataRegionMetrics().OrderBy(x => x.Name).ToArray();
-            Assert.AreEqual(3, metrics.Length);  // two defined plus system.
+            Assert.AreEqual(4, metrics.Length);  // two defined plus system and plus TxLog.
 
             var emptyMetrics = metrics[0];
             Assert.AreEqual(RegionNoMetrics, emptyMetrics.Name);

http://git-wip-us.apache.org/repos/asf/ignite/blob/95b65976/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
index 92f9b4d..352c1e9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
@@ -44,7 +44,7 @@ namespace Apache.Ignite.Core.Tests.Cache
 
             // Verify metrics.
             var metrics = ignite.GetMemoryMetrics().OrderBy(x => x.Name).ToArray();
-            Assert.AreEqual(3, metrics.Length);  // two defined plus system.
+            Assert.AreEqual(4, metrics.Length);  // two defined plus system and plus TxLog.
 
             var emptyMetrics = metrics[0];
             Assert.AreEqual(MemoryPolicyNoMetrics, emptyMetrics.Name);


[45/50] [abbrv] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-5797

Posted by ag...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-5797


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ec2526f4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ec2526f4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ec2526f4

Branch: refs/heads/ignite-5797
Commit: ec2526f427d66c1f940ec90f7aacbb619615efab
Parents: e9ac065 e142b10
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Oct 4 16:15:15 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 16:15:15 2018 +0300

----------------------------------------------------------------------
 .gitignore                                      |    12 +
 DEVNOTES.txt                                    |   216 +-
 LICENSE                                         |     7 +
 MIGRATION_GUIDE.txt                             |     2 +
 NOTICE                                          |     2 +-
 README.md                                       |   341 +-
 README.txt                                      |    15 +-
 RELEASE_NOTES.txt                               |   384 +-
 assembly/LICENSE_FABRIC                         |   304 -
 assembly/LICENSE_IGNITE                         |   304 +
 assembly/NOTICE_FABRIC                          |    13 -
 assembly/NOTICE_HADOOP                          |     2 +-
 assembly/NOTICE_IGNITE                          |    13 +
 assembly/dependencies-apache-ignite-hadoop.xml  |   166 +
 assembly/dependencies-apache-ignite-lgpl.xml    |   184 +
 assembly/dependencies-apache-ignite.xml         |   189 +
 assembly/dependencies-fabric-lgpl.xml           |   180 -
 assembly/dependencies-fabric.xml                |   185 -
 assembly/dependencies-hadoop.xml                |   166 -
 assembly/dependencies-sqlline.xml               |    58 +
 assembly/libs/README.txt                        |     9 +-
 assembly/release-apache-ignite-base.xml         |   257 +
 assembly/release-apache-ignite-hadoop.xml       |    95 +
 assembly/release-apache-ignite-lgpl.xml         |    51 +
 assembly/release-apache-ignite.xml              |    51 +
 assembly/release-base.xml                       |     5 +
 assembly/release-fabric-base.xml                |   251 -
 assembly/release-fabric-lgpl.xml                |    51 -
 assembly/release-fabric.xml                     |    51 -
 assembly/release-hadoop.xml                     |    95 -
 assembly/release-scala.xml                      |     1 +
 assembly/release-sources.xml                    |    80 -
 bin/control.bat                                 |    43 +-
 bin/control.sh                                  |    23 +-
 bin/ignite.bat                                  |    74 +-
 bin/ignite.sh                                   |    44 +-
 bin/ignitevisorcmd.bat                          |    39 +-
 bin/ignitevisorcmd.sh                           |    14 +
 bin/include/build-classpath.bat                 |    13 +-
 bin/include/build-classpath.sh                  |     7 +-
 bin/include/functions.sh                        |    44 +-
 bin/include/parseargs.bat                       |     5 +-
 bin/include/setenv.bat                          |     8 +-
 bin/include/setenv.sh                           |     5 +
 .../visorcmd/node_startup_by_ssh.sample.ini     |    74 +
 config/ignite-log4j2.xml                        |     8 +-
 config/wsl-default-config.xml                   |    63 +
 dev-tools/src/main/groovy/jiraslurp.groovy      |     2 +-
 doap_Ignite.rdf                                 |     4 +-
 docker/apache-ignite/.dockerignore              |     1 +
 docker/apache-ignite/Dockerfile                 |    48 +
 docker/apache-ignite/README.txt                 |    26 +
 docker/apache-ignite/run.sh                     |    46 +
 docker/web-agent/Dockerfile                     |    46 +
 docker/web-agent/README.txt                     |    36 +
 examples/DEVNOTES.txt                           |    11 +
 examples/README-LGPL.txt                        |     8 +-
 examples/README.txt                             |    20 +-
 examples/config/example-data-regions.xml        |   106 +
 examples/config/example-memory-policies.xml     |   108 -
 .../example-persistent-store.xml                |    37 +-
 examples/config/redis/example-redis.xml         |    74 +
 examples/pom-standalone-lgpl.xml                |    50 +-
 examples/pom-standalone.xml                     |    50 +-
 examples/pom.xml                                |   143 +-
 examples/redis/redis-example.py                 |    16 +-
 examples/sql/world.sql                          |  5354 ++++++++
 .../examples/datagrid/SpatialQueryExample.java  |     4 +-
 .../CacheClientBinaryPutGetExample.java         |     2 +-
 .../datagrid/CacheClientBinaryQueryExample.java |     3 +
 .../examples/client/ClientPutGetExample.java    |    69 +
 .../examples/cluster/ClusterGroupExample.java   |    86 +
 .../ignite/examples/cluster/package-info.java   |    22 +
 .../computegrid/ComputeAsyncExample.java        |    17 +-
 .../computegrid/ComputeBroadcastExample.java    |    44 +-
 .../computegrid/ComputeCallableExample.java     |    18 +-
 .../computegrid/ComputeClosureExample.java      |    22 +-
 .../computegrid/ComputeRunnableExample.java     |    10 +-
 .../cluster/ClusterGroupExample.java            |    99 -
 .../computegrid/cluster/package-info.java       |    22 -
 .../examples/datagrid/CacheAffinityExample.java |    38 +-
 .../examples/datagrid/CacheApiExample.java      |    26 +-
 .../examples/datagrid/CacheAsyncApiExample.java |    37 +-
 ...heContinuousQueryWithTransformerExample.java |   144 +
 .../datagrid/CacheEntryProcessorExample.java    |    46 +-
 .../examples/datagrid/CacheQueryDdlExample.java |   118 -
 .../examples/datagrid/CacheQueryDmlExample.java |   163 -
 .../examples/datagrid/CacheQueryExample.java    |   179 +-
 .../examples/datagrid/DataRegionsExample.java   |   113 +
 .../ignite/examples/datagrid/JdbcExample.java   |   135 -
 .../datagrid/MemoryPoliciesExample.java         |   114 -
 .../ignite/examples/datagrid/package-info.java  |     2 +-
 .../IgniteExecutorServiceExample.java           |     8 +-
 .../datastructures/IgniteSemaphoreExample.java  |    21 +-
 .../ignite/examples/events/EventsExample.java   |    32 +-
 .../examples/messaging/MessagingExample.java    |    95 +-
 .../messaging/MessagingPingPongExample.java     |    46 +-
 .../clustering/KMeansClusterizationExample.java |   209 +
 .../examples/ml/clustering/package-info.java    |    22 +
 .../AlgorithmSpecificDatasetExample.java        |   207 +
 .../ml/dataset/CacheBasedDatasetExample.java    |    79 +
 .../examples/ml/dataset/model/Person.java       |    58 +
 .../examples/ml/dataset/model/package-info.java |    22 +
 .../examples/ml/dataset/package-info.java       |    22 +
 .../ignite/examples/ml/genetic/change/Coin.java |    95 +
 .../OptimizeMakeChangeFitnessFunction.java      |    96 +
 .../change/OptimizeMakeChangeGAExample.java     |   203 +
 .../OptimizeMakeChangeTerminateCriteria.java    |    92 +
 .../helloworld/HelloWorldFitnessFunction.java   |    52 +
 .../genetic/helloworld/HelloWorldGAExample.java |   128 +
 .../helloworld/HelloWorldTerminateCriteria.java |    92 +
 .../examples/ml/genetic/knapsack/Item.java      |    91 +
 .../knapsack/KnapsackFitnessFunction.java       |    62 +
 .../ml/genetic/knapsack/KnapsackGAExample.java  |   328 +
 .../knapsack/KnapsackTerminateCriteria.java     |   112 +
 .../ignite/examples/ml/genetic/movie/Movie.java |   134 +
 .../ml/genetic/movie/MovieFitnessFunction.java  |    91 +
 .../ml/genetic/movie/MovieGAExample.java        |   267 +
 .../genetic/movie/MovieTerminateCriteria.java   |    95 +
 .../ml/knn/ANNClassificationExample.java        |   310 +
 .../ml/knn/KNNClassificationExample.java        |   256 +
 .../examples/ml/knn/KNNRegressionExample.java   |   302 +
 .../ignite/examples/ml/knn/package-info.java    |    22 +
 .../examples/ml/nn/MLPTrainerExample.java       |   171 +
 .../ignite/examples/ml/nn/package-info.java     |    22 +
 .../apache/ignite/examples/ml/package-info.java |    22 +
 .../ml/preprocessing/BinarizationExample.java   |    89 +
 .../ml/preprocessing/ImputingExample.java       |    92 +
 .../ImputingWithMostFrequentValuesExample.java  |    94 +
 .../ml/preprocessing/MaxAbsScalerExample.java   |    84 +
 .../ml/preprocessing/MinMaxScalerExample.java   |    93 +
 .../ml/preprocessing/NormalizationExample.java  |    90 +
 .../examples/ml/preprocessing/package-info.java |    22 +
 .../LinearRegressionLSQRTrainerExample.java     |   148 +
 ...ssionLSQRTrainerWithMinMaxScalerExample.java |   161 +
 .../LinearRegressionSGDTrainerExample.java      |   156 +
 .../ml/regression/linear/package-info.java      |    22 +
 .../LogisticRegressionSGDTrainerExample.java    |   226 +
 .../logistic/binary/package-info.java           |    22 +
 ...gressionMultiClassClassificationExample.java |   292 +
 .../logistic/multiclass/package-info.java       |    22 +
 .../ml/regression/logistic/package-info.java    |    22 +
 .../examples/ml/regression/package-info.java    |    22 +
 .../ml/selection/cv/CrossValidationExample.java |   142 +
 .../examples/ml/selection/cv/package-info.java  |    22 +
 .../examples/ml/selection/package-info.java     |    22 +
 .../split/TrainTestDatasetSplitterExample.java  |   158 +
 .../ml/selection/split/package-info.java        |    22 +
 .../binary/SVMBinaryClassificationExample.java  |   214 +
 .../examples/ml/svm/binary/package-info.java    |    22 +
 .../SVMMultiClassClassificationExample.java     |   280 +
 .../ml/svm/multiclass/package-info.java         |    22 +
 .../ignite/examples/ml/svm/package-info.java    |    22 +
 ...ecisionTreeClassificationTrainerExample.java |   153 +
 .../DecisionTreeRegressionTrainerExample.java   |   126 +
 .../GDBOnTreesClassificationTrainerExample.java |   113 +
 .../GDBOnTreesRegressionTrainerExample.java     |   112 +
 .../examples/ml/tree/boosting/package-info.java |    22 +
 .../ignite/examples/ml/tree/package-info.java   |    22 +
 .../RandomForestClassificationExample.java      |   292 +
 .../RandomForestRegressionExample.java          |   635 +
 .../ml/tree/randomforest/package-info.java      |    22 +
 .../ml/tutorial/Step_1_Read_and_Learn.java      |    87 +
 .../examples/ml/tutorial/Step_2_Imputing.java   |    96 +
 .../examples/ml/tutorial/Step_3_Categorial.java |   109 +
 .../Step_3_Categorial_with_One_Hot_Encoder.java |   113 +
 .../ml/tutorial/Step_4_Add_age_fare.java        |   108 +
 .../examples/ml/tutorial/Step_5_Scaling.java    |   126 +
 .../tutorial/Step_5_Scaling_with_Pipeline.java  |   100 +
 .../ignite/examples/ml/tutorial/Step_6_KNN.java |   127 +
 .../ml/tutorial/Step_7_Split_train_test.java    |   134 +
 .../ignite/examples/ml/tutorial/Step_8_CV.java  |   197 +
 .../ml/tutorial/Step_8_CV_with_Param_Grid.java  |   184 +
 .../ml/tutorial/Step_9_Go_to_LogReg.java        |   229 +
 .../examples/ml/tutorial/TitanicUtils.java      |    91 +
 .../ml/tutorial/TutorialStepByStepExample.java  |    39 +
 .../examples/ml/tutorial/package-info.java      |    22 +
 .../ignite/examples/ml/util/DatasetHelper.java  |    57 +
 .../examples/ml/util/MLExamplesCommonArgs.java  |    31 +
 .../ignite/examples/ml/util/TestCache.java      |    77 +
 .../ignite/examples/ml/util/package-info.java   |    22 +
 .../persistentstore/PersistentStoreExample.java |    27 +-
 .../examples/springdata/PersonRepository.java   |     6 +-
 .../examples/springdata/SpringAppCfg.java       |     6 +-
 .../examples/springdata/SpringDataExample.java  |     4 +-
 .../ignite/examples/sql/SqlDdlExample.java      |   118 +
 .../ignite/examples/sql/SqlDmlExample.java      |   156 +
 .../ignite/examples/sql/SqlJdbcCopyExample.java |   113 +
 .../ignite/examples/sql/SqlJdbcExample.java     |   135 +
 .../ignite/examples/sql/SqlQueriesExample.java  |   346 +
 .../ignite/examples/sql/package-info.java       |    22 +
 .../streaming/StreamTransformerExample.java     |    28 +-
 .../streaming/StreamVisitorExample.java         |    84 +-
 .../ignite/examples/streaming/package-info.java |     1 +
 .../java8/cluster/ClusterGroupExample.java      |    86 -
 .../examples/java8/cluster/package-info.java    |    22 -
 .../java8/computegrid/ComputeAsyncExample.java  |    75 -
 .../computegrid/ComputeBroadcastExample.java    |   102 -
 .../computegrid/ComputeCallableExample.java     |    75 -
 .../computegrid/ComputeClosureExample.java      |    71 -
 .../computegrid/ComputeRunnableExample.java     |    64 -
 .../java8/computegrid/package-info.java         |    22 -
 .../java8/datagrid/CacheAffinityExample.java    |   142 -
 .../java8/datagrid/CacheApiExample.java         |   110 -
 .../java8/datagrid/CacheAsyncApiExample.java    |    90 -
 .../datagrid/CacheEntryProcessorExample.java    |   152 -
 .../examples/java8/datagrid/package-info.java   |    22 -
 .../IgniteExecutorServiceExample.java           |    70 -
 .../java8/datastructures/package-info.java      |    22 -
 .../examples/java8/events/EventsExample.java    |   135 -
 .../examples/java8/events/package-info.java     |    22 -
 .../java8/messaging/MessagingExample.java       |   161 -
 .../messaging/MessagingPingPongExample.java     |   113 -
 .../examples/java8/messaging/package-info.java  |    22 -
 .../ignite/examples/java8/package-info.java     |    23 -
 .../streaming/StreamTransformerExample.java     |   108 -
 .../java8/streaming/StreamVisitorExample.java   |   177 -
 .../examples/java8/streaming/package-info.java  |    22 -
 .../CholeskyDecompositionExample.java           |    80 -
 .../EigenDecompositionExample.java              |    69 -
 .../decompositions/LUDecompositionExample.java  |    83 -
 .../SingularValueDecompositionExample.java      |    70 -
 .../ml/math/decompositions/package-info.java    |    22 -
 .../ml/math/matrix/CacheMatrixExample.java      |   102 -
 .../ml/math/matrix/ExampleMatrixStorage.java    |   163 -
 .../math/matrix/MatrixCustomStorageExample.java |   141 -
 .../examples/ml/math/matrix/MatrixExample.java  |    79 -
 .../ml/math/matrix/MatrixExampleUtil.java       |    52 -
 .../ml/math/matrix/OffHeapMatrixExample.java    |    84 -
 .../matrix/SparseDistributedMatrixExample.java  |    70 -
 .../ml/math/matrix/SparseMatrixExample.java     |    84 -
 .../examples/ml/math/matrix/package-info.java   |    22 -
 .../ignite/examples/ml/math/package-info.java   |    22 -
 .../DistributedRegressionExample.java           |   149 -
 .../examples/ml/math/tracer/TracerExample.java  |    63 -
 .../examples/ml/math/tracer/package-info.java   |    22 -
 .../ml/math/vector/CacheVectorExample.java      |   109 -
 .../ml/math/vector/ExampleVectorStorage.java    |   127 -
 .../ml/math/vector/OffHeapVectorExample.java    |    78 -
 .../ml/math/vector/SparseVectorExample.java     |    76 -
 .../math/vector/VectorCustomStorageExample.java |   120 -
 .../examples/ml/math/vector/VectorExample.java  |    73 -
 .../examples/ml/math/vector/package-info.java   |    22 -
 examples/src/main/resources/datasets/README.md  |     2 +
 .../resources/datasets/cleared_machines.txt     |   209 +
 examples/src/main/resources/datasets/iris.txt   |   150 +
 .../src/main/resources/datasets/titanic.csv     |  1310 ++
 .../main/resources/datasets/titanic_10_rows.csv |    11 +
 examples/src/main/resources/person.json         |    10 +
 examples/src/main/resources/sql/city.csv        |  4079 ++++++
 .../examples/ScalarCreditRiskExample.scala      |     4 +-
 .../examples/ScalarSnowflakeSchemaExample.scala |     4 +-
 .../examples/spark/IgniteCatalogExample.scala   |   143 +
 .../examples/spark/IgniteDataFrameExample.scala |   160 +
 .../spark/IgniteDataFrameWriteExample.scala     |   181 +
 .../spark/JavaIgniteCatalogExample.java         |   143 +
 .../spark/JavaIgniteDataFrameExample.java       |   154 +
 .../spark/JavaIgniteDataFrameWriteExample.java  |   185 +
 .../apache/ignite/examples/spark/package.scala  |    37 +
 .../ignite/examples/BasicExamplesSelfTest.java  |    46 +-
 .../CacheContinuousQueryExamplesSelfTest.java   |    48 +
 .../CacheExamplesMultiNodeSelfTest.java         |    16 -
 .../ignite/examples/CacheExamplesSelfTest.java  |   254 +-
 .../examples/CheckpointExamplesSelfTest.java    |    29 +-
 .../examples/ClusterGroupExampleSelfTest.java   |    17 +-
 .../examples/ContinuationExamplesSelfTest.java  |    14 +-
 .../ContinuousMapperExamplesSelfTest.java       |    12 +-
 .../DeploymentExamplesMultiNodeSelfTest.java    |    12 +-
 .../examples/DeploymentExamplesSelfTest.java    |    13 +-
 .../ignite/examples/EventsExamplesSelfTest.java |     2 +-
 .../ignite/examples/IgfsExamplesSelfTest.java   |    38 +-
 .../examples/LifecycleExamplesSelfTest.java     |    14 +-
 .../MemcacheRestExamplesMultiNodeSelfTest.java  |    12 +-
 .../examples/MemcacheRestExamplesSelfTest.java  |    36 +-
 .../examples/MessagingExamplesSelfTest.java     |    15 +-
 .../examples/MonteCarloExamplesSelfTest.java    |    14 +-
 .../examples/SpringBeanExamplesSelfTest.java    |    14 +-
 .../ignite/examples/SqlExamplesSelfTest.java    |    49 +
 .../ignite/examples/TaskExamplesSelfTest.java   |    34 +-
 .../IgniteExamplesJ8SelfTestSuite.java          |    80 +
 .../testsuites/IgniteExamplesMLTestSuite.java   |   151 +
 .../testsuites/IgniteExamplesSelfTestSuite.java |     9 +-
 .../BasicExamplesMultiNodeSelfTest.java         |    28 -
 .../java8/examples/BasicExamplesSelfTest.java   |    89 -
 .../CacheExamplesMultiNodeSelfTest.java         |    38 -
 .../java8/examples/CacheExamplesSelfTest.java   |   155 -
 .../examples/CheckpointExamplesSelfTest.java    |    47 -
 .../examples/ClusterGroupExampleSelfTest.java   |    40 -
 .../ContinuationExamplesMultiNodeSelfTest.java  |    28 -
 .../examples/ContinuationExamplesSelfTest.java  |    37 -
 ...ntinuousMapperExamplesMultiNodeSelfTest.java |    28 -
 .../ContinuousMapperExamplesSelfTest.java       |    35 -
 .../DeploymentExamplesMultiNodeSelfTest.java    |    32 -
 .../examples/DeploymentExamplesSelfTest.java    |    36 -
 .../EventsExamplesMultiNodeSelfTest.java        |    28 -
 .../java8/examples/EventsExamplesSelfTest.java  |    33 -
 .../java8/examples/IgfsExamplesSelfTest.java    |    55 -
 .../examples/LifecycleExamplesSelfTest.java     |    37 -
 .../MemcacheRestExamplesMultiNodeSelfTest.java  |    33 -
 .../examples/MemcacheRestExamplesSelfTest.java  |    44 -
 .../examples/MessagingExamplesSelfTest.java     |    55 -
 .../MonteCarloExamplesMultiNodeSelfTest.java    |    28 -
 .../examples/MonteCarloExamplesSelfTest.java    |    78 -
 .../examples/SpringBeanExamplesSelfTest.java    |    37 -
 .../examples/TaskExamplesMultiNodeSelfTest.java |    28 -
 .../java8/examples/TaskExamplesSelfTest.java    |    43 -
 .../IgniteExamplesJ8SelfTestSuite.java          |    80 -
 .../spark/examples/IgniteDataFrameSelfTest.java |    54 +
 .../examples/JavaIgniteDataFrameSelfTest.java   |    54 +
 .../examples/SharedRDDExampleSelfTest.java      |     3 +-
 .../IgniteExamplesSparkSelfTestSuite.java       |     6 +-
 idea/ignite_inspections.xml                     |   772 ++
 modules/aop/pom.xml                             |    13 +-
 .../test/config/aop/aspectj/META-INF/aop.xml    |     4 +-
 .../apache/ignite/gridify/BasicAopSelfTest.java |    26 +-
 .../optimized/OptimizedMarshallerAopTest.java   |     7 -
 .../testsuites/IgniteAopSelfTestSuite.java      |    12 +-
 .../singlesplit/SingleSplitsLoadTest.java       |     4 +-
 .../gridify/GridifySingleSplitLoadTest.java     |     4 +-
 modules/apache-license-gen/pom.xml              |     2 +-
 modules/aws/pom.xml                             |    30 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    81 +-
 .../spi/checkpoint/s3/S3CheckpointSpiMBean.java |    12 +
 .../ipfinder/elb/TcpDiscoveryElbIpFinder.java   |   179 +
 .../tcp/ipfinder/elb/package-info.java          |    22 +
 .../tcp/ipfinder/s3/TcpDiscoveryS3IpFinder.java |   115 +-
 .../s3/S3CheckpointManagerSelfTest.java         |     2 +-
 .../checkpoint/s3/S3CheckpointSpiSelfTest.java  |    26 +-
 ...pointSpiStartStopBucketEndpointSelfTest.java |    50 +
 ...ckpointSpiStartStopSSEAlgorithmSelfTest.java |    49 +
 .../s3/S3CheckpointSpiStartStopSelfTest.java    |     2 +-
 .../s3/S3SessionCheckpointSelfTest.java         |     2 +-
 .../elb/TcpDiscoveryElbIpFinderSelfTest.java    |    81 +
 .../tcp/ipfinder/elb/package-info.java          |    22 +
 .../TcpDiscoveryS3IpFinderAbstractSelfTest.java |    78 +-
 ...3IpFinderAwsCredentialsProviderSelfTest.java |     1 +
 ...scoveryS3IpFinderAwsCredentialsSelfTest.java |     1 +
 ...scoveryS3IpFinderBucketEndpointSelfTest.java |    55 +
 ...TcpDiscoveryS3IpFinderKeyPrefixSelfTest.java |    68 +
 ...DiscoveryS3IpFinderSSEAlgorithmSelfTest.java |    48 +
 .../ipfinder/s3/client/DummyObjectListing.java  |    83 +
 .../s3/client/DummyObjectListingTest.java       |    68 +
 .../tcp/ipfinder/s3/client/DummyS3Client.java   |  1085 ++
 .../ipfinder/s3/client/DummyS3ClientTest.java   |   164 +
 .../tcp/ipfinder/s3/client/package-info.java    |    22 +
 .../ignite/testsuites/IgniteElbTestSuite.java   |    39 +
 .../ignite/testsuites/IgniteS3TestSuite.java    |    16 +-
 modules/benchmarks/pom.xml                      |    17 +-
 .../jmh/notify/JmhWaitStategyBenchmark.java     |     7 +-
 .../jmh/sequence/JmhSequenceBenchmark.java      |   215 +
 .../streamer/JmhStreamerAddDataBenchmark.java   |   221 +
 .../benchmarks/jmh/tree/BPlusTreeBenchmark.java |    14 +-
 modules/camel/pom.xml                           |     3 +-
 .../camel/IgniteCamelStreamerTestSuite.java     |     2 +-
 modules/cassandra/pom.xml                       |     8 +-
 modules/cassandra/serializers/pom.xml           |     9 +-
 .../cassandra/serializer/package-info.java      |    21 +
 modules/cassandra/store/pom.xml                 |    23 +-
 .../store/cassandra/CassandraCacheStore.java    |     3 +-
 .../cassandra/common/PropertyMappingHelper.java |    73 +-
 .../cassandra/session/CassandraSessionImpl.java |   293 +-
 .../session/WrappedPreparedStatement.java       |   181 +
 .../store/cassandra/session/WrappedSession.java |    91 +
 .../cassandra/session/pool/IdleSession.java     |    72 +
 .../cassandra/session/pool/SessionPool.java     |    22 +-
 .../cassandra/session/pool/SessionWrapper.java  |    74 -
 .../ignite/tests/CassandraConfigTest.java       |   141 +
 .../ignite/tests/CassandraSessionImplTest.java  |   200 +
 .../ignite/tests/load/PersonGenerator.java      |     2 +-
 .../org/apache/ignite/tests/pojos/Person.java   |    12 +-
 .../apache/ignite/tests/pojos/SimplePerson.java |     8 +-
 .../ignite/tests/utils/TestTransaction.java     |    15 +
 .../apache/ignite/tests/utils/TestsHelper.java  |     4 +-
 modules/clients/pom.xml                         |    16 +-
 modules/clients/src/test/config/jdbc-config.xml |     1 +
 .../internal/TaskEventSubjectIdSelfTest.java    |    12 +-
 .../ClientAbstractMultiThreadedSelfTest.java    |     5 -
 .../client/ClientDefaultCacheSelfTest.java      |     2 -
 .../client/impl/ClientCacheFlagsCodecTest.java  |    35 +-
 .../ClientAbstractMultiNodeSelfTest.java        |     7 -
 .../integration/ClientAbstractSelfTest.java     |     5 -
 .../integration/ClientPreferDirectSelfTest.java |     7 -
 .../router/TcpRouterAbstractSelfTest.java       |     2 -
 .../router/TcpRouterMultiNodeSelfTest.java      |     2 -
 .../client/suite/IgniteClientTestSuite.java     |    16 +
 .../jdbc2/JdbcAbstractDmlStatementSelfTest.java |    13 +-
 .../internal/jdbc2/JdbcBulkLoadSelfTest.java    |   180 +
 .../jdbc2/JdbcComplexQuerySelfTest.java         |     5 -
 .../jdbc2/JdbcConnectionReopenTest.java         |    51 +
 .../internal/jdbc2/JdbcConnectionSelfTest.java  |    54 +-
 .../jdbc2/JdbcDeleteStatementSelfTest.java      |    22 +
 .../jdbc2/JdbcDistributedJoinsQueryTest.java    |     5 -
 .../jdbc2/JdbcDynamicIndexAbstractSelfTest.java |    39 +-
 .../internal/jdbc2/JdbcEmptyCacheSelfTest.java  |     5 -
 .../internal/jdbc2/JdbcErrorsSelfTest.java      |    71 +
 .../jdbc2/JdbcInsertStatementSelfTest.java      |   168 +-
 .../internal/jdbc2/JdbcLocalCachesSelfTest.java |    33 +-
 .../jdbc2/JdbcMergeStatementSelfTest.java       |    41 +
 .../internal/jdbc2/JdbcMetadataSelfTest.java    |   189 +-
 .../jdbc2/JdbcNoCacheStreamingSelfTest.java     |   177 +
 .../internal/jdbc2/JdbcNoDefaultCacheTest.java  |     5 -
 .../jdbc2/JdbcPreparedStatementSelfTest.java    |     5 -
 .../internal/jdbc2/JdbcResultSetSelfTest.java   |   277 +-
 .../jdbc2/JdbcStatementBatchingSelfTest.java    |   133 +
 .../internal/jdbc2/JdbcStatementSelfTest.java   |   135 +-
 .../internal/jdbc2/JdbcStreamingSelfTest.java   |   227 +-
 .../jdbc2/JdbcStreamingToPublicCacheTest.java   |   143 +
 .../jdbc2/JdbcUpdateStatementSelfTest.java      |    24 +
 .../rest/AbstractRestProcessorSelfTest.java     |    18 +-
 .../rest/ChangeStateCommandHandlerTest.java     |     6 -
 .../JettyRestProcessorAbstractSelfTest.java     |  1351 +-
 ...RestProcessorAuthenticationAbstractTest.java |   143 +
 ...rocessorAuthenticationWithCredsSelfTest.java |    32 +
 ...rocessorAuthenticationWithTokenSelfTest.java |    80 +
 .../rest/JettyRestProcessorCommonSelfTest.java  |   173 +
 .../JettyRestProcessorGetAllAsArrayTest.java    |    84 +
 .../rest/JettyRestProcessorSignedSelfTest.java  |    10 +-
 .../JettyRestProcessorUnsignedSelfTest.java     |    11 +-
 .../rest/MemcacheRestProcessorTest.java         |    77 -
 .../rest/RestBinaryProtocolSelfTest.java        |     5 -
 .../rest/RestMemcacheProtocolSelfTest.java      |     5 -
 .../processors/rest/RestProcessorTest.java      |   351 -
 .../internal/processors/rest/SimplePerson.java  |     4 +-
 .../rest/TaskCommandHandlerSelfTest.java        |     2 -
 .../rest/TcpRestUnmarshalVulnerabilityTest.java |   269 +
 .../tcp/redis/RedisCommonAbstractTest.java      |     2 -
 .../redis/RedisProtocolGetAllAsArrayTest.java   |    39 +
 .../tcp/redis/RedisProtocolServerSelfTest.java  |   110 +
 .../tcp/redis/RedisProtocolStringSelfTest.java  |    45 +-
 .../jdbc/AbstractJdbcPojoQuerySelfTest.java     |     2 -
 .../ignite/jdbc/JdbcComplexQuerySelfTest.java   |     5 -
 .../ignite/jdbc/JdbcConnectionSelfTest.java     |     5 -
 .../ignite/jdbc/JdbcEmptyCacheSelfTest.java     |     5 -
 .../ignite/jdbc/JdbcErrorsAbstractSelfTest.java |   835 ++
 .../ignite/jdbc/JdbcLocalCachesSelfTest.java    |     5 -
 .../ignite/jdbc/JdbcMetadataSelfTest.java       |     5 -
 .../ignite/jdbc/JdbcNoDefaultCacheTest.java     |     5 -
 .../jdbc/JdbcPreparedStatementSelfTest.java     |     5 -
 .../ignite/jdbc/JdbcResultSetSelfTest.java      |     5 -
 .../ignite/jdbc/JdbcStatementSelfTest.java      |     5 -
 .../suite/IgniteJdbcDriverMvccTestSuite.java    |    47 +
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |    91 +-
 .../JdbcThinAbstractDmlStatementSelfTest.java   |    21 +-
 .../jdbc/thin/JdbcThinAbstractSelfTest.java     |   148 +-
 .../JdbcThinAuthenticateConnectionSelfTest.java |   238 +
 .../thin/JdbcThinAutoCloseServerCursorTest.java |    17 +-
 .../ignite/jdbc/thin/JdbcThinBatchSelfTest.java |   823 ++
 .../thin/JdbcThinBulkLoadAbstractSelfTest.java  |   848 ++
 ...inBulkLoadAtomicPartitionedNearSelfTest.java |    39 +
 ...bcThinBulkLoadAtomicPartitionedSelfTest.java |    39 +
 ...dbcThinBulkLoadAtomicReplicatedSelfTest.java |    39 +
 ...oadTransactionalPartitionedNearSelfTest.java |    39 +
 ...ulkLoadTransactionalPartitionedSelfTest.java |    39 +
 ...BulkLoadTransactionalReplicatedSelfTest.java |    39 +
 ...bcThinComplexDmlDdlCustomSchemaSelfTest.java |    78 +
 .../thin/JdbcThinComplexDmlDdlSelfTest.java     |   480 +
 ...omplexDmlDdlSkipReducerOnUpdateSelfTest.java |    33 +
 .../jdbc/thin/JdbcThinComplexQuerySelfTest.java |     7 +-
 ...JdbcThinConnectionMultipleAddressesTest.java |   551 +
 .../JdbcThinConnectionMvccEnabledSelfTest.java  |   376 +
 .../jdbc/thin/JdbcThinConnectionSSLTest.java    |   479 +
 .../jdbc/thin/JdbcThinConnectionSelfTest.java   |  1901 ++-
 .../jdbc/thin/JdbcThinDataSourceSelfTest.java   |   429 +
 .../JdbcThinDynamicIndexAbstractSelfTest.java   |     7 +-
 .../jdbc/thin/JdbcThinEmptyCacheSelfTest.java   |     7 +-
 .../jdbc/thin/JdbcThinErrorsSelfTest.java       |   112 +
 .../thin/JdbcThinInsertStatementSelfTest.java   |     3 +-
 ...ertStatementSkipReducerOnUpdateSelfTest.java |    33 +
 .../jdbc/thin/JdbcThinLocalQueriesSelfTest.java |    73 +
 ...rgeStatementSkipReducerOnUpdateSelfTest.java |    33 +
 .../jdbc/thin/JdbcThinMetadataSelfTest.java     |   425 +-
 .../JdbcThinMissingLongArrayResultsTest.java    |   337 +
 .../jdbc/thin/JdbcThinNoDefaultSchemaTest.java  |    90 +-
 .../thin/JdbcThinPreparedStatementSelfTest.java |   268 +-
 .../jdbc/thin/JdbcThinResultSetSelfTest.java    |  1203 +-
 .../jdbc/thin/JdbcThinSchemaCaseTest.java       |   124 +
 .../thin/JdbcThinSelectAfterAlterTable.java     |   168 +
 .../jdbc/thin/JdbcThinStatementSelfTest.java    |   921 +-
 .../thin/JdbcThinStreamingAbstractSelfTest.java |   516 +
 .../JdbcThinStreamingNotOrderedSelfTest.java    |    38 +
 .../thin/JdbcThinStreamingOrderedSelfTest.java  |    39 +
 .../ignite/jdbc/thin/JdbcThinTcpIoTest.java     |   167 +
 ...ThinTransactionsAbstractComplexSelfTest.java |  1056 ++
 ...sactionsClientAutoCommitComplexSelfTest.java |    33 +
 ...ctionsClientNoAutoCommitComplexSelfTest.java |    33 +
 .../jdbc/thin/JdbcThinTransactionsSelfTest.java |   447 +
 ...sactionsServerAutoCommitComplexSelfTest.java |    33 +
 ...ctionsServerNoAutoCommitComplexSelfTest.java |    33 +
 ...ThinTransactionsWithMvccEnabledSelfTest.java |   446 +
 ...ateStatementSkipReducerOnUpdateSelfTest.java |    33 +
 .../thin/JdbcThinWalModeChangeSelfTest.java     |   143 +
 .../client/ClientMarshallerBenchmarkTest.java   |    16 +-
 modules/clients/src/test/keystore/ca/node01.jks |   Bin 0 -> 3719 bytes
 modules/clients/src/test/keystore/ca/node02.jks |   Bin 0 -> 4599 bytes
 modules/clients/src/test/keystore/ca/node03.jks |   Bin 0 -> 3753 bytes
 modules/clients/src/test/keystore/ca/oneca.cnf  |    31 +
 modules/clients/src/test/keystore/ca/oneca.key  |    28 +
 .../clients/src/test/keystore/ca/oneindex.txt   |     1 +
 .../src/test/keystore/ca/oneindex.txt.attr      |     1 +
 modules/clients/src/test/keystore/ca/oneserial  |     1 +
 .../clients/src/test/keystore/ca/trust-both.jks |   Bin 0 -> 1718 bytes
 .../clients/src/test/keystore/ca/trust-one.jks  |   Bin 0 -> 877 bytes
 .../clients/src/test/keystore/ca/trust-two.jks  |   Bin 0 -> 891 bytes
 modules/clients/src/test/keystore/ca/twoca.cnf  |    31 +
 modules/clients/src/test/keystore/ca/twoca.key  |    28 +
 .../clients/src/test/keystore/ca/twoindex.txt   |     2 +
 .../src/test/keystore/ca/twoindex.txt.attr      |     1 +
 modules/clients/src/test/keystore/ca/twoserial  |     1 +
 .../clients/src/test/resources/bulkload0.csv    |     0
 .../clients/src/test/resources/bulkload1.csv    |     1 +
 .../clients/src/test/resources/bulkload2.csv    |     2 +
 .../src/test/resources/bulkload2_utf8.csv       |     2 +
 .../test/resources/bulkload2_windows1251.csv    |     2 +
 modules/cloud/pom.xml                           |     2 +-
 .../TcpDiscoveryCloudIpFinderSelfTest.java      |     2 +
 modules/codegen/pom.xml                         |    11 +-
 .../ignite/codegen/MessageCodeGenerator.java    |    15 +-
 modules/compatibility/README.txt                |     5 +
 modules/compatibility/licenses/apache-2.0.txt   |   202 +
 modules/compatibility/pom.xml                   |   126 +
 .../PdsWithTtlCompatibilityTest.java            |   195 +
 .../ignite/compatibility/package-info.java      |    22 +
 .../FoldersReuseCompatibilityTest.java          |   249 +
 ...itePersistenceCompatibilityAbstractTest.java |    61 +
 ...tingToWalV2SerializerWithCompactionTest.java |   246 +
 .../PersistenceBasicCompatibilityTest.java      |   380 +
 .../compatibility/persistence/package-info.java |    22 +
 .../junits/CompatibilityTestsFacade.java        |    46 +
 .../testframework/junits/Dependency.java        |   117 +
 .../junits/IgniteCompatibilityAbstractTest.java |   326 +
 .../junits/IgniteCompatibilityNodeRunner.java   |   222 +
 .../logger/ListenedGridTestLog4jLogger.java     |    91 +
 .../junits/logger/package-info.java             |    22 +
 .../testframework/junits/package-info.java      |    22 +
 .../testframework/package-info.java             |    22 +
 .../plugins/DisabledValidationProcessor.java    |    42 +
 .../TestCompatibilityPluginProvider.java        |   119 +
 .../testframework/plugins/package-info.java     |    22 +
 .../util/CompatibilityTestsUtils.java           |   105 +
 .../testframework/util/MavenUtils.java          |   218 +
 .../testframework/util/package-info.java        |    22 +
 .../IgniteCompatibilityBasicTestSuite.java      |    47 +
 .../compatibility/testsuites/package-info.java  |    22 +
 .../org.apache.ignite.plugin.PluginProvider     |     1 +
 modules/core/licenses/jBCrypt-license.txt       |    17 +
 modules/core/pom.xml                            |    32 +-
 modules/core/src/main/java/META-INF/NOTICE      |     2 +-
 .../org/apache/ignite/DataRegionMetrics.java    |   210 +
 .../apache/ignite/DataRegionMetricsAdapter.java |   106 +
 .../org/apache/ignite/DataStorageMetrics.java   |   215 +
 .../ignite/DataStorageMetricsAdapter.java       |   101 +
 .../src/main/java/org/apache/ignite/Ignite.java |    53 +-
 .../java/org/apache/ignite/IgniteCache.java     |   114 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   108 +
 .../java/org/apache/ignite/IgniteCompute.java   |    14 +
 .../org/apache/ignite/IgniteDataStreamer.java   |    75 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |    49 +-
 .../apache/ignite/IgniteJdbcThinDataSource.java |   614 +
 .../org/apache/ignite/IgniteJdbcThinDriver.java |   126 +-
 .../main/java/org/apache/ignite/IgniteLock.java |     4 +-
 .../java/org/apache/ignite/IgniteLogger.java    |    92 +-
 .../java/org/apache/ignite/IgniteServices.java  |   106 +-
 .../java/org/apache/ignite/IgniteState.java     |     7 +-
 .../apache/ignite/IgniteSystemProperties.java   |   394 +-
 .../org/apache/ignite/IgniteTransactions.java   |    23 +-
 .../main/java/org/apache/ignite/Ignition.java   |    27 +-
 .../java/org/apache/ignite/MemoryMetrics.java   |    11 +-
 .../org/apache/ignite/PersistenceMetrics.java   |     4 +-
 .../ignite/binary/BinaryBasicIdMapper.java      |     4 +-
 .../ignite/binary/BinaryTypeConfiguration.java  |     6 +-
 .../CacheAtomicUpdateTimeoutException.java      |    47 -
 .../apache/ignite/cache/CacheAtomicityMode.java |    76 +-
 .../org/apache/ignite/cache/CacheManager.java   |    25 +-
 .../org/apache/ignite/cache/CacheMetrics.java   |   156 +-
 .../java/org/apache/ignite/cache/CacheMode.java |     2 +-
 .../ignite/cache/PartitionLossPolicy.java       |     4 +
 .../org/apache/ignite/cache/QueryEntity.java    |   562 +-
 .../apache/ignite/cache/QueryEntityPatch.java   |   118 +
 .../org/apache/ignite/cache/QueryIndex.java     |    41 +-
 ...lusterNodeAttributeAffinityBackupFilter.java |   131 +
 .../rendezvous/RendezvousAffinityFunction.java  |    16 +-
 .../cache/eviction/AbstractEvictionPolicy.java  |     7 +-
 .../eviction/AbstractEvictionPolicyFactory.java |   106 +
 .../cache/eviction/fifo/FifoEvictionPolicy.java |     2 +-
 .../fifo/FifoEvictionPolicyFactory.java         |    72 +
 .../igfs/IgfsPerBlockLruEvictionPolicy.java     |     4 +-
 .../eviction/lru/LruEvictionPolicyFactory.java  |    72 +
 .../eviction/sorted/SortedEvictionPolicy.java   |     4 +-
 .../sorted/SortedEvictionPolicyFactory.java     |    98 +
 .../cache/query/AbstractContinuousQuery.java    |   202 +
 .../cache/query/BulkLoadContextCursor.java      |    97 +
 .../ignite/cache/query/ContinuousQuery.java     |   178 +-
 .../query/ContinuousQueryWithTransformer.java   |   192 +
 .../ignite/cache/query/SqlFieldsQuery.java      |    63 +-
 .../query/annotations/QueryGroupIndex.java      |    20 +
 .../cache/query/annotations/QuerySqlField.java  |    48 +-
 .../cache/store/jdbc/CacheJdbcBlobStore.java    |     6 +-
 .../client/ClientAuthenticationException.java   |    33 +
 .../client/ClientAuthorizationException.java    |    46 +
 .../org/apache/ignite/client/ClientCache.java   |   356 +
 .../ignite/client/ClientCacheConfiguration.java |   656 +
 .../client/ClientConnectionException.java       |    45 +
 .../apache/ignite/client/ClientException.java   |    78 +
 .../org/apache/ignite/client/IgniteClient.java  |    91 +
 .../java/org/apache/ignite/client/SslMode.java  |    26 +
 .../org/apache/ignite/client/SslProtocol.java   |    28 +
 .../org/apache/ignite/cluster/BaselineNode.java |    73 +
 .../apache/ignite/cluster/ClusterMetrics.java   |    12 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |    20 +-
 .../ignite/compute/ComputeJobAdapter.java       |     2 +-
 .../ignite/compute/ComputeTaskAdapter.java      |     2 +-
 .../configuration/AtomicConfiguration.java      |     2 +-
 .../configuration/BasicAddressResolver.java     |     9 +
 .../configuration/BinaryConfiguration.java      |     6 +-
 .../configuration/CacheConfiguration.java       |   811 +-
 .../configuration/CheckpointWriteOrder.java     |    51 +
 .../configuration/ClientConfiguration.java      |   400 +
 .../ClientConnectorConfiguration.java           |   508 +
 .../CommunicationFailureContext.java            |    62 +
 .../CommunicationFailureResolver.java           |    28 +
 .../configuration/ConnectorConfiguration.java   |     8 +
 .../configuration/DataPageEvictionMode.java     |     8 +-
 .../configuration/DataRegionConfiguration.java  |   440 +
 .../configuration/DataStorageConfiguration.java |   990 ++
 .../DefaultCommunicationFailureResolver.java    |   286 +
 .../configuration/FileSystemConfiguration.java  |     2 +-
 .../configuration/HadoopConfiguration.java      |     4 +-
 .../configuration/IgniteConfiguration.java      |   291 +-
 .../configuration/IgniteReflectionFactory.java  |    43 +-
 .../configuration/MemoryConfiguration.java      |    35 +-
 .../MemoryPolicyConfiguration.java              |    23 +-
 .../configuration/NearCacheConfiguration.java   |    37 +
 .../ignite/configuration/OdbcConfiguration.java |     4 +-
 .../PersistentStoreConfiguration.java           |   116 +-
 .../SqlConnectorConfiguration.java              |     7 +-
 .../configuration/TransactionConfiguration.java |    67 +
 .../apache/ignite/configuration/WALMode.java    |    28 +-
 .../org/apache/ignite/events/EventType.java     |    95 +-
 .../java/org/apache/ignite/events/JobEvent.java |    73 +-
 .../events/TransactionStateChangedEvent.java    |    56 +
 .../ignite/events/WalSegmentArchivedEvent.java  |    13 +-
 .../ignite/events/WalSegmentCompactedEvent.java |    46 +
 .../ignite/failure/AbstractFailureHandler.java  |    64 +
 .../apache/ignite/failure/FailureContext.java   |    65 +
 .../apache/ignite/failure/FailureHandler.java   |    45 +
 .../org/apache/ignite/failure/FailureType.java  |    35 +
 .../ignite/failure/NoOpFailureHandler.java      |    36 +
 .../failure/RestartProcessFailureHandler.java   |    51 +
 .../ignite/failure/StopNodeFailureHandler.java  |    49 +
 .../failure/StopNodeOrHaltFailureHandler.java   |   126 +
 .../org/apache/ignite/failure/package-info.java |    22 +
 .../org/apache/ignite/igfs/IgfsMetrics.java     |     4 +-
 .../org/apache/ignite/internal/ClassSet.java    |   108 +
 .../ClusterLocalNodeMetricsMXBeanImpl.java      |    90 +-
 .../internal/ClusterMetricsMXBeanImpl.java      |   470 +
 .../ignite/internal/ClusterMetricsSnapshot.java |    41 +-
 .../internal/DuplicateTypeIdException.java      |    74 +
 .../apache/ignite/internal/GridComponent.java   |    11 +-
 .../apache/ignite/internal/GridDiagnostic.java  |    24 +-
 .../internal/GridEventConsumeHandler.java       |     9 +-
 .../ignite/internal/GridJobExecuteRequest.java  |   133 +-
 .../ignite/internal/GridKernalContext.java      |    63 +-
 .../ignite/internal/GridKernalContextImpl.java  |   171 +-
 .../apache/ignite/internal/GridLoggerProxy.java |    34 +
 .../internal/GridNodeOrderComparator.java       |    45 -
 .../ignite/internal/GridPluginComponent.java    |     5 +
 .../ignite/internal/GridTaskSessionImpl.java    |    18 +
 .../org/apache/ignite/internal/GridTopic.java   |    22 +-
 .../ignite/internal/IgniteComputeImpl.java      |    23 +-
 .../internal/IgniteDiagnosticMessage.java       |     2 +-
 .../IgniteDiagnosticPrepareContext.java         |     7 +-
 .../org/apache/ignite/internal/IgniteEx.java    |    14 +
 .../apache/ignite/internal/IgniteKernal.java    |  1182 +-
 .../internal/IgniteNeedReconnectException.java  |     8 +-
 .../ignite/internal/IgniteNodeAttributes.java   |    31 +-
 .../ignite/internal/IgniteServicesImpl.java     |    63 +-
 .../ignite/internal/IgniteVersionUtils.java     |     2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   363 +-
 .../internal/InvalidEnvironmentException.java   |    25 +
 .../ignite/internal/LongJVMPauseDetector.java   |   188 +
 .../ignite/internal/MarshallerContextImpl.java  |   120 +-
 .../internal/MarshallerMappingFileStore.java    |   172 +-
 .../ignite/internal/NodeStoppingException.java  |     7 +
 .../SecurityCredentialsAttrFilterPredicate.java |    39 +
 .../internal/TransactionMetricsMxBeanImpl.java  |   104 +
 .../ignite/internal/TransactionsMXBeanImpl.java |   144 +
 .../UnregisteredBinaryTypeException.java        |    96 +
 .../internal/UnregisteredClassException.java    |    74 +
 .../binary/BinaryCachingMetadataHandler.java    |    13 +-
 .../internal/binary/BinaryClassDescriptor.java  |   404 +-
 .../ignite/internal/binary/BinaryContext.java   |   191 +-
 .../ignite/internal/binary/BinaryEnumCache.java |     4 +-
 .../internal/binary/BinaryEnumObjectImpl.java   |     2 +-
 .../internal/binary/BinaryFieldAccessor.java    |    65 +-
 .../ignite/internal/binary/BinaryFieldImpl.java |    14 +
 .../internal/binary/BinaryMarshaller.java       |    10 +-
 .../ignite/internal/binary/BinaryMetadata.java  |     8 +-
 .../internal/binary/BinaryMetadataHandler.java  |    11 +-
 .../binary/BinaryNoopMetadataHandler.java       |     8 +-
 .../internal/binary/BinaryObjectExImpl.java     |    71 +-
 .../internal/binary/BinaryObjectImpl.java       |    69 +-
 .../internal/binary/BinaryReaderExImpl.java     |    35 +-
 .../ignite/internal/binary/BinaryTypeImpl.java  |     2 +-
 .../ignite/internal/binary/BinaryUtils.java     |    78 +-
 .../internal/binary/BinaryWriterExImpl.java     |    45 +-
 .../internal/binary/GridBinaryMarshaller.java   |     8 +-
 .../binary/builder/BinaryBuilderEnum.java       |     2 +-
 .../binary/builder/BinaryBuilderReader.java     |     2 +-
 .../binary/builder/BinaryBuilderSerializer.java |     7 +-
 .../builder/BinaryEnumArrayLazyValue.java       |     2 +-
 .../builder/BinaryObjectArrayLazyValue.java     |     2 +-
 .../binary/builder/BinaryObjectBuilderImpl.java |    33 +-
 .../streams/BinaryAbstractOutputStream.java     |    21 +-
 .../streams/BinaryOffheapOutputStream.java      |     2 +-
 .../internal/client/GridClientCacheFlag.java    |    48 +
 .../internal/client/impl/GridClientImpl.java    |    51 +-
 .../client/impl/GridClientNodeImpl.java         |     2 +-
 .../impl/connection/GridClientConnection.java   |    18 +-
 .../GridClientConnectionManagerAdapter.java     |    23 +-
 .../connection/GridClientNioTcpConnection.java  |    30 +-
 .../marshaller/jdk/GridClientJdkMarshaller.java |    51 +-
 .../GridClientOptimizedMarshaller.java          |     4 +-
 .../router/impl/GridRouterClientImpl.java       |     4 +-
 .../client/router/impl/GridTcpRouterImpl.java   |    25 +-
 .../impl/GridTcpRouterNioListenerAdapter.java   |    28 +-
 .../client/ssl/GridSslBasicContextFactory.java  |     2 +-
 .../internal/client/thin/ClientBinary.java      |   167 +
 .../client/thin/ClientBinaryMarshaller.java     |   112 +
 .../internal/client/thin/ClientCacheEntry.java  |    62 +
 .../internal/client/thin/ClientChannel.java     |    51 +
 .../client/thin/ClientChannelConfiguration.java |   242 +
 .../internal/client/thin/ClientError.java       |    71 +
 .../client/thin/ClientFieldsQueryCursor.java    |    40 +
 .../client/thin/ClientFieldsQueryPager.java     |    81 +
 .../internal/client/thin/ClientOperation.java   |    72 +
 .../client/thin/ClientProtocolError.java        |    40 +
 .../internal/client/thin/ClientQueryCursor.java |   104 +
 .../internal/client/thin/ClientQueryPager.java  |    60 +
 .../internal/client/thin/ClientServerError.java |    47 +
 .../internal/client/thin/ClientUtils.java       |   658 +
 .../internal/client/thin/FieldsQueryPager.java  |    30 +
 .../internal/client/thin/GenericQueryPager.java |   139 +
 .../internal/client/thin/ProtocolVersion.java   |   100 +
 .../ignite/internal/client/thin/QueryPager.java |    39 +
 .../internal/client/thin/ReliableChannel.java   |   216 +
 .../ignite/internal/client/thin/Result.java     |    60 +
 .../internal/client/thin/TcpClientCache.java    |   505 +
 .../internal/client/thin/TcpClientChannel.java  |   602 +
 .../internal/client/thin/TcpIgniteClient.java   |   424 +
 .../internal/cluster/ClusterGroupAdapter.java   |     2 +-
 .../cluster/ClusterNodeLocalMapImpl.java        |     4 +-
 .../internal/cluster/DetachedClusterNode.java   |   121 +
 .../cluster/IgniteClusterAsyncImpl.java         |    55 +
 .../internal/cluster/IgniteClusterImpl.java     |   295 +-
 .../internal/cluster/NodeOrderComparator.java   |    61 +
 .../cluster/NodeOrderLegacyComparator.java      |    46 +
 .../internal/cluster/graph/BitSetIterator.java  |    66 +
 .../internal/cluster/graph/ClusterGraph.java    |   207 +
 .../graph/FullyConnectedComponentSearcher.java  |   341 +
 .../ignite/internal/commandline/Arguments.java  |   216 +
 .../ignite/internal/commandline/Command.java    |    74 +
 .../internal/commandline/CommandHandler.java    |  2007 ++-
 .../commandline/cache/CacheArguments.java       |   248 +
 .../commandline/cache/CacheCommand.java         |   103 +
 .../distribution/CacheDistributionGroup.java    |   102 +
 .../distribution/CacheDistributionNode.java     |   127 +
 .../CacheDistributionPartition.java             |   136 +
 .../distribution/CacheDistributionTask.java     |   171 +
 .../distribution/CacheDistributionTaskArg.java  |    94 +
 .../CacheDistributionTaskResult.java            |   346 +
 .../CacheResetLostPartitionsTask.java           |   104 +
 .../CacheResetLostPartitionsTaskArg.java        |    72 +
 .../CacheResetLostPartitionsTaskResult.java     |    80 +
 .../internal/direct/DirectMessageReader.java    |     4 +-
 .../internal/direct/DirectMessageWriter.java    |    11 +-
 .../direct/stream/DirectByteBufferStream.java   |     6 +
 .../stream/v1/DirectByteBufferStreamImplV1.java |    13 +-
 .../stream/v2/DirectByteBufferStreamImplV2.java |    86 +-
 .../internal/events/DiscoveryCustomEvent.java   |    34 +
 .../ignite/internal/igfs/common/IgfsLogger.java |    12 +-
 .../internal/jdbc/JdbcDatabaseMetadata.java     |     2 +-
 .../ignite/internal/jdbc/JdbcResultSet.java     |     2 +-
 .../jdbc/thin/ConnectionProperties.java         |   395 +
 .../jdbc/thin/ConnectionPropertiesImpl.java     |  1129 ++
 .../internal/jdbc/thin/JdbcThinConnection.java  |   660 +-
 .../jdbc/thin/JdbcThinDatabaseMetadata.java     |  1548 +++
 .../jdbc/thin/JdbcThinParameterMetadata.java    |   115 +
 .../jdbc/thin/JdbcThinPreparedStatement.java    |    99 +-
 .../internal/jdbc/thin/JdbcThinResultSet.java   |   709 +-
 .../internal/jdbc/thin/JdbcThinSSLUtil.java     |   334 +
 .../internal/jdbc/thin/JdbcThinStatement.java   |   532 +-
 .../internal/jdbc/thin/JdbcThinTcpIo.java       |   651 +-
 .../internal/jdbc/thin/JdbcThinUtils.java       |    67 +-
 .../internal/jdbc2/JdbcBatchUpdateTask.java     |   224 +
 .../ignite/internal/jdbc2/JdbcConnection.java   |   139 +-
 .../internal/jdbc2/JdbcDatabaseMetadata.java    |   724 +-
 .../internal/jdbc2/JdbcPreparedStatement.java   |    25 +-
 .../jdbc2/JdbcQueryMultipleStatementsTask.java  |   168 +
 .../ignite/internal/jdbc2/JdbcQueryTask.java    |   192 +-
 .../internal/jdbc2/JdbcQueryTaskResult.java     |   120 +
 .../ignite/internal/jdbc2/JdbcQueryTaskV2.java  |   107 +
 .../ignite/internal/jdbc2/JdbcQueryTaskV3.java  |   105 +
 .../ignite/internal/jdbc2/JdbcResultSet.java    |   676 +-
 .../internal/jdbc2/JdbcSqlFieldsQuery.java      |   105 -
 .../ignite/internal/jdbc2/JdbcStatement.java    |   340 +-
 .../internal/jdbc2/JdbcStatementResultInfo.java |    73 +
 .../jdbc2/JdbcStreamedPreparedStatement.java    |    19 +-
 .../apache/ignite/internal/jdbc2/JdbcUtils.java |    42 +
 .../logger/platform/PlatformLogger.java         |    15 +
 .../internal/managers/GridManagerAdapter.java   |    27 +
 .../checkpoint/GridCheckpointManager.java       |    15 +-
 .../managers/communication/GridIoManager.java   |    66 +-
 .../managers/communication/GridIoMessage.java   |     3 +
 .../communication/GridIoMessageFactory.java     |   231 +-
 .../managers/communication/GridIoPolicy.java    |     3 +
 .../managers/deployment/GridDeployment.java     |    16 +-
 .../deployment/GridDeploymentClassLoader.java   |     6 +-
 .../managers/deployment/GridDeploymentInfo.java |     1 +
 .../deployment/GridDeploymentInfoBean.java      |    21 +-
 .../deployment/GridDeploymentLocalStore.java    |    29 +-
 .../deployment/GridDeploymentManager.java       |     7 +-
 .../GridDeploymentPerVersionStore.java          |    56 +-
 .../managers/discovery/ClusterMetricsImpl.java  |   369 +
 .../managers/discovery/ConsistentIdMapper.java  |   135 +
 .../discovery/CustomMessageWrapper.java         |     9 +-
 .../internal/managers/discovery/DiscoCache.java |   309 +-
 .../discovery/DiscoveryCustomMessage.java       |    23 +-
 .../DiscoveryMessageResultsCollector.java       |   222 +
 .../DiscoveryServerOnlyCustomMessage.java       |    26 +
 .../discovery/GridDiscoveryManager.java         |  1183 +-
 .../managers/discovery/IgniteClusterNode.java   |    62 +
 .../managers/discovery/IgniteDiscoverySpi.java  |    67 +
 .../IgniteDiscoverySpiInternalListener.java     |    42 +
 .../eventstorage/GridEventStorageManager.java   |    20 +-
 .../failover/GridFailoverContextImpl.java       |     2 +-
 .../optimized/OptimizedClassDescriptor.java     |    87 +-
 .../optimized/OptimizedMarshaller.java          |    10 +-
 .../optimized/OptimizedMarshallerUtils.java     |     6 +-
 .../optimized/OptimizedObjectInputStream.java   |   130 +-
 .../optimized/OptimizedObjectOutputStream.java  |   118 +-
 .../internal/mem/DirectMemoryProvider.java      |     6 +-
 .../mem/file/MappedFileMemoryProvider.java      |    35 +-
 .../mem/unsafe/UnsafeMemoryProvider.java        |    43 +-
 .../internal/mxbean/IgniteStandardMXBean.java   |    10 +-
 .../internal/pagemem/PageIdAllocator.java       |     5 +-
 .../ignite/internal/pagemem/PageIdUtils.java    |    37 +-
 .../ignite/internal/pagemem/PageMemory.java     |    21 +-
 .../ignite/internal/pagemem/PageUtils.java      |    26 +
 .../pagemem/impl/PageMemoryNoStoreImpl.java     |    77 +-
 .../pagemem/store/IgnitePageStoreManager.java   |    67 +-
 .../internal/pagemem/store/PageStore.java       |    10 +-
 .../pagemem/wal/IgniteWriteAheadLogManager.java |    74 +-
 .../internal/pagemem/wal/StorageException.java  |    44 -
 .../ignite/internal/pagemem/wal/WALPointer.java |     4 +-
 .../internal/pagemem/wal/record/CacheState.java |    24 +
 .../pagemem/wal/record/CheckpointRecord.java    |     6 +
 .../internal/pagemem/wal/record/DataEntry.java  |    44 +-
 .../internal/pagemem/wal/record/DataRecord.java |    28 +-
 .../pagemem/wal/record/ExchangeRecord.java      |    86 +
 .../pagemem/wal/record/FilteredRecord.java      |    34 +
 .../pagemem/wal/record/LazyDataEntry.java       |    41 +-
 .../pagemem/wal/record/MarshalledRecord.java    |    61 +
 .../wal/record/MemoryRecoveryRecord.java        |     7 +
 .../pagemem/wal/record/MetastoreDataRecord.java |    62 +
 .../pagemem/wal/record/PageSnapshot.java        |    33 +-
 .../pagemem/wal/record/SnapshotRecord.java      |    70 +
 .../pagemem/wal/record/SwitchSegmentRecord.java |    28 +
 .../pagemem/wal/record/TimeStampRecord.java     |    65 +
 .../internal/pagemem/wal/record/TxRecord.java   |   143 +-
 .../pagemem/wal/record/UnwrapDataEntry.java     |   126 +
 .../internal/pagemem/wal/record/WALRecord.java  |    46 +-
 .../wal/record/WalRecordCacheGroupAware.java    |    28 +
 .../delta/DataPageInsertFragmentRecord.java     |    20 +-
 .../wal/record/delta/DataPageInsertRecord.java  |    11 +-
 .../delta/DataPageMvccMarkUpdatedRecord.java    |   103 +
 .../DataPageMvccUpdateNewTxStateHintRecord.java |    79 +
 .../DataPageMvccUpdateTxStateHintRecord.java    |    79 +
 .../wal/record/delta/DataPageRemoveRecord.java  |     7 +-
 .../delta/DataPageSetFreeListPageRecord.java    |    11 +-
 .../wal/record/delta/DataPageUpdateRecord.java  |    11 +-
 .../wal/record/delta/FixCountRecord.java        |     9 +
 .../record/delta/FixLeftmostChildRecord.java    |     9 +
 .../pagemem/wal/record/delta/FixRemoveId.java   |     6 +
 .../wal/record/delta/InitNewPageRecord.java     |     2 -
 .../wal/record/delta/InnerReplaceRecord.java    |     6 +
 .../pagemem/wal/record/delta/InsertRecord.java  |     2 +-
 .../pagemem/wal/record/delta/MergeRecord.java   |     2 +-
 .../wal/record/delta/MetaPageAddRootRecord.java |     9 +
 .../wal/record/delta/MetaPageCutRootRecord.java |     6 +
 .../wal/record/delta/MetaPageInitRecord.java    |     6 +
 .../delta/MetaPageInitRootInlineRecord.java     |     7 +-
 .../record/delta/MetaPageInitRootRecord.java    |     6 +
 .../delta/MetaPageUpdateLastAllocatedIndex.java |    12 +-
 ...aPageUpdateLastSuccessfulFullSnapshotId.java |     6 +
 .../MetaPageUpdateLastSuccessfulSnapshotId.java |     6 +
 .../delta/MetaPageUpdateNextSnapshotId.java     |     6 +
 .../MetaPageUpdatePartitionDataRecord.java      |     4 +-
 .../wal/record/delta/NewRootInitRecord.java     |     6 +
 .../wal/record/delta/PageDeltaRecord.java       |     9 +-
 .../delta/PageListMetaResetCountRecord.java     |     6 +
 .../delta/PagesListInitNewPageRecord.java       |     4 +-
 .../record/delta/PagesListRemovePageRecord.java |     3 +-
 .../record/delta/PagesListSetNextRecord.java    |     6 +
 .../delta/PagesListSetPreviousRecord.java       |     6 +
 .../record/delta/PartitionDestroyRecord.java    |    15 +-
 .../record/delta/PartitionMetaStateRecord.java  |    17 +-
 .../pagemem/wal/record/delta/RecycleRecord.java |    15 +
 .../pagemem/wal/record/delta/RemoveRecord.java  |     2 +-
 .../pagemem/wal/record/delta/ReplaceRecord.java |     6 +
 .../wal/record/delta/RotatedIdPartRecord.java   |    66 +
 .../record/delta/SplitExistingPageRecord.java   |     2 +-
 .../record/delta/SplitForwardPageRecord.java    |    24 +
 .../record/delta/TrackingPageDeltaRecord.java   |    14 +-
 .../processors/GridProcessorAdapter.java        |     6 +-
 .../processors/affinity/AffinityAssignment.java |    20 +-
 .../affinity/AffinityTopologyVersion.java       |     7 +
 .../affinity/GridAffinityAssignment.java        |    91 +-
 .../affinity/GridAffinityAssignmentCache.java   |   372 +-
 .../affinity/GridAffinityProcessor.java         |   136 +-
 .../processors/affinity/GridAffinityUtils.java  |     2 +-
 .../affinity/HistoryAffinityAssignment.java     |    26 +-
 .../authentication/AuthorizationContext.java    |    89 +
 .../IgniteAccessControlException.java           |    48 +
 .../IgniteAuthenticationProcessor.java          |  1367 ++
 .../processors/authentication/User.java         |   147 +
 .../authentication/UserAcceptedMessage.java     |   103 +
 .../UserAuthenticateRequestMessage.java         |   171 +
 .../UserAuthenticateResponseMessage.java        |   154 +
 .../authentication/UserManagementException.java |    48 +
 .../authentication/UserManagementOperation.java |   105 +
 .../UserManagementOperationFinishedMessage.java |   155 +
 .../authentication/UserProposedMessage.java     |    96 +
 .../bulkload/BulkLoadAckClientParameters.java   |    92 +
 .../bulkload/BulkLoadCacheWriter.java           |    33 +
 .../processors/bulkload/BulkLoadCsvFormat.java  |   181 +
 .../processors/bulkload/BulkLoadCsvParser.java  |    82 +
 .../processors/bulkload/BulkLoadFormat.java     |    35 +
 .../processors/bulkload/BulkLoadParser.java     |    61 +
 .../processors/bulkload/BulkLoadProcessor.java  |   104 +
 .../bulkload/BulkLoadStreamerWriter.java        |    65 +
 .../bulkload/pipeline/CharsetDecoderBlock.java  |   137 +
 .../pipeline/CsvLineProcessorBlock.java         |    73 +
 .../bulkload/pipeline/LineSplitterBlock.java    |    72 +
 .../bulkload/pipeline/PipelineBlock.java        |    67 +
 .../bulkload/pipeline/StrListAppenderBlock.java |    52 +
 .../cache/CacheAffinityChangeMessage.java       |    13 +
 .../cache/CacheAffinitySharedManager.java       |  1400 ++-
 ...acheAtomicUpdateTimeoutCheckedException.java |    47 -
 .../cache/CacheClassLoaderMarker.java           |    24 +
 .../cache/CacheClusterMetricsMXBeanImpl.java    |   135 +-
 .../cache/CacheConfigurationOverride.java       |   165 +
 .../CacheDefaultBinaryAffinityKeyMapper.java    |     2 +-
 .../processors/cache/CacheEntryImpl.java        |     2 +-
 .../processors/cache/CacheEntryImpl0.java       |     2 +-
 .../processors/cache/CacheEntryImplEx.java      |     4 +-
 .../cache/CacheEntryInfoCollection.java         |    12 +
 .../processors/cache/CacheGroupContext.java     |   248 +-
 .../processors/cache/CacheGroupData.java        |    51 +-
 .../processors/cache/CacheGroupDescriptor.java  |   110 +-
 .../cache/CacheGroupMetricsMXBeanImpl.java      |   362 +
 .../cache/CacheInvokeDirectResult.java          |    53 +-
 .../processors/cache/CacheInvokeEntry.java      |    45 +-
 .../processors/cache/CacheInvokeResult.java     |     6 +
 .../cache/CacheJoinNodeDiscoveryData.java       |    41 +-
 .../processors/cache/CacheLazyEntry.java        |     2 +-
 .../cache/CacheLocalMetricsMXBeanImpl.java      |   127 +-
 .../processors/cache/CacheMetricsImpl.java      |   656 +-
 .../processors/cache/CacheMetricsSnapshot.java  |   280 +-
 .../processors/cache/CacheObjectAdapter.java    |     2 +-
 .../cache/CacheObjectByteArrayImpl.java         |     2 +-
 .../processors/cache/CacheObjectUtils.java      |    67 +-
 .../processors/cache/CacheOperationContext.java |    76 +-
 .../cache/CachePartitionExchangeWorkerTask.java |     5 +-
 .../cache/CacheStatisticsClearMessage.java      |   125 +
 .../cache/CacheStatisticsModeChangeMessage.java |   146 +
 .../cache/CacheStatisticsModeChangeTask.java    |    54 +
 .../cache/CacheStoreBalancingWrapper.java       |     4 +-
 .../cache/CacheWeakQueryIteratorsHolder.java    |     4 +-
 .../processors/cache/CachesRegistry.java        |   310 +
 .../ClientCacheChangeDiscoveryMessage.java      |    14 +
 .../ClientCacheChangeDummyDiscoveryMessage.java |    19 +
 .../cache/ClientCacheUpdateTimeout.java         |     5 +
 .../processors/cache/ClusterCachesInfo.java     |   736 +-
 .../cache/DynamicCacheChangeBatch.java          |    14 +
 .../cache/DynamicCacheChangeFailureMessage.java |   151 +
 .../cache/DynamicCacheChangeRequest.java        |    29 +-
 .../cache/DynamicCacheDescriptor.java           |    47 +-
 .../processors/cache/ExchangeActions.java       |    58 +-
 .../processors/cache/ExchangeContext.java       |   172 +
 .../cache/ExchangeDiscoveryEvents.java          |   264 +
 .../cache/GatewayProtectedCacheProxy.java       |  1671 +++
 .../processors/cache/GridCacheAdapter.java      |   697 +-
 .../cache/GridCacheAffinityManager.java         |    14 +-
 .../processors/cache/GridCacheAttributes.java   |    59 +
 .../cache/GridCacheConcurrentMapImpl.java       |    18 +-
 .../processors/cache/GridCacheContext.java      |   223 +-
 .../cache/GridCacheDeploymentManager.java       |    62 +-
 .../processors/cache/GridCacheEntryEx.java      |   211 +-
 .../processors/cache/GridCacheEntryInfo.java    |     6 +-
 .../processors/cache/GridCacheEventManager.java |     3 +-
 .../cache/GridCacheEvictionManager.java         |   167 +-
 .../processors/cache/GridCacheGateway.java      |    36 +-
 .../processors/cache/GridCacheIoManager.java    |   100 +-
 .../cache/GridCacheLoaderWriterStore.java       |     6 +
 .../cache/GridCacheLocalConcurrentMap.java      |     4 +-
 .../processors/cache/GridCacheLockCallback.java |    51 +
 .../processors/cache/GridCacheMapEntry.java     |  3489 ++++--
 .../processors/cache/GridCacheMvccCallback.java |    51 -
 .../cache/GridCacheMvccEntryInfo.java           |   263 +
 .../processors/cache/GridCacheMvccFuture.java   |    37 -
 .../processors/cache/GridCacheMvccManager.java  |   104 +-
 .../processors/cache/GridCacheOperation.java    |     2 +-
 .../GridCachePartitionExchangeManager.java      |  1235 +-
 .../processors/cache/GridCachePreloader.java    |    35 +-
 .../cache/GridCachePreloaderAdapter.java        |    16 +-
 .../processors/cache/GridCacheProcessor.java    |  1816 ++-
 .../processors/cache/GridCacheProxyImpl.java    |    61 +-
 .../processors/cache/GridCacheReturn.java       |    27 +-
 .../cache/GridCacheSharedContext.java           |   218 +-
 .../cache/GridCacheSharedManager.java           |     5 +
 .../cache/GridCacheSharedManagerAdapter.java    |     5 +
 .../cache/GridCacheSharedTtlCleanupManager.java |    50 +-
 .../processors/cache/GridCacheTtlManager.java   |    35 +-
 .../cache/GridCacheUpdateAtomicResult.java      |    15 +-
 .../cache/GridCacheUpdateTxResult.java          |   147 +-
 .../processors/cache/GridCacheUtilityKey.java   |     2 +-
 .../processors/cache/GridCacheUtils.java        |   561 +-
 .../cache/GridCacheVersionedFuture.java         |    37 +
 .../cache/GridDeferredAckMessageSender.java     |    12 +-
 .../cache/IgniteCacheOffheapManager.java        |   574 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    |  3072 +++--
 .../processors/cache/IgniteCacheProxy.java      |  2844 +----
 .../processors/cache/IgniteCacheProxyImpl.java  |  1924 +++
 .../processors/cache/IgniteInternalCache.java   |    28 +-
 .../cache/IgniteRebalanceIterator.java          |    23 +-
 .../processors/cache/IncompleteCacheObject.java |     2 +-
 .../processors/cache/KeyCacheObject.java        |     2 +-
 .../cache/LocalJoinCachesContext.java           |   112 +
 .../cache/PartitionUpdateCounter.java           |   209 +
 .../processors/cache/StateChangeRequest.java    |    42 +
 .../processors/cache/StoredCacheData.java       |    22 +-
 ...eoutOnPartitionMapExchangeChangeMessage.java |   128 +
 ...TimeoutOnPartitionMapExchangeChangeTask.java |    57 +
 .../cache/WalStateAbstractMessage.java          |   135 +
 .../processors/cache/WalStateAckMessage.java    |   221 +
 .../cache/WalStateDistributedProcess.java       |   172 +
 .../processors/cache/WalStateFinishMessage.java |    78 +
 .../processors/cache/WalStateManager.java       |  1293 ++
 .../cache/WalStateNodeLeaveExchangeTask.java    |    57 +
 .../cache/WalStateProposeMessage.java           |   109 +
 .../processors/cache/WalStateResult.java        |    94 +
 .../cache/binary/BinaryMetadataFileStore.java   |    81 +-
 .../cache/binary/BinaryMetadataTransport.java   |    74 +-
 .../binary/CacheObjectBinaryProcessor.java      |    28 +-
 .../binary/CacheObjectBinaryProcessorImpl.java  |   254 +-
 .../cache/binary/IgniteBinaryImpl.java          |     4 +-
 .../binary/MetadataUpdateAcceptedMessage.java   |    14 +
 .../binary/MetadataUpdateProposedMessage.java   |    14 +
 .../CacheDataStructuresManager.java             |   149 +-
 .../distributed/GridCacheTxFinishSync.java      |    11 +-
 .../distributed/GridCacheTxRecoveryFuture.java  |   123 +-
 .../GridDistributedCacheAdapter.java            |     4 +-
 .../distributed/GridDistributedCacheEntry.java  |    84 +-
 .../distributed/GridDistributedTxMapping.java   |    19 +-
 .../GridDistributedTxPrepareRequest.java        |    22 +
 .../GridDistributedTxRemoteAdapter.java         |   225 +-
 .../dht/CacheDistributedGetFutureAdapter.java   |    28 +-
 .../dht/ClientCacheDhtTopologyFuture.java       |    15 +-
 .../distributed/dht/CompoundLockFuture.java     |   112 +
 .../cache/distributed/dht/DhtLockFuture.java    |    30 +
 .../cache/distributed/dht/ExceptionAware.java   |    30 +
 .../dht/GridCachePartitionedConcurrentMap.java  |     1 +
 .../dht/GridClientPartitionTopology.java        |  1148 --
 .../dht/GridDhtAssignmentFetchFuture.java       |     4 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   107 +-
 .../distributed/dht/GridDhtCacheEntry.java      |   299 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |    35 +-
 .../distributed/dht/GridDhtGetSingleFuture.java |    21 +-
 .../dht/GridDhtInvalidPartitionException.java   |    51 -
 .../distributed/dht/GridDhtLocalPartition.java  |  1277 --
 .../distributed/dht/GridDhtLockFuture.java      |   401 +-
 .../distributed/dht/GridDhtPartitionState.java  |    58 -
 .../dht/GridDhtPartitionTopology.java           |   336 -
 .../dht/GridDhtPartitionTopologyImpl.java       |  2288 ----
 .../dht/GridDhtPartitionsReservation.java       |   295 -
 .../distributed/dht/GridDhtTopologyFuture.java  |    36 +-
 .../dht/GridDhtTopologyFutureAdapter.java       |     5 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |   889 +-
 .../dht/GridDhtTxAbstractEnlistFuture.java      |  1187 ++
 .../distributed/dht/GridDhtTxEnlistFuture.java  |   161 +
 .../distributed/dht/GridDhtTxFinishFuture.java  |   107 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |    74 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |    92 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   251 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   626 +-
 .../dht/GridDhtTxPrepareRequest.java            |   102 +-
 .../dht/GridDhtTxQueryAbstractEnlistFuture.java |    83 +
 .../dht/GridDhtTxQueryEnlistFuture.java         |   121 +
 .../dht/GridDhtTxQueryEnlistRequest.java        |   382 +
 .../dht/GridDhtTxQueryEnlistResponse.java       |   205 +
 .../dht/GridDhtTxQueryFirstEnlistRequest.java   |   367 +
 .../dht/GridDhtTxQueryResultsEnlistFuture.java  |   109 +
 .../cache/distributed/dht/GridDhtTxRemote.java  |   157 +-
 .../cache/distributed/dht/GridInvokeValue.java  |   186 +
 .../dht/GridPartitionedGetFuture.java           |   169 +-
 .../dht/GridPartitionedSingleGetFuture.java     |   117 +-
 .../dht/NearTxQueryEnlistResultHandler.java     |   168 +
 .../distributed/dht/NearTxResultHandler.java    |   128 +
 .../dht/PartitionUpdateCountersMessage.java     |   259 +
 .../dht/atomic/DhtAtomicUpdateResult.java       |   162 +
 .../GridDhtAtomicAbstractUpdateFuture.java      |    10 +-
 .../GridDhtAtomicAbstractUpdateRequest.java     |    16 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   799 +-
 .../GridDhtAtomicSingleUpdateRequest.java       |    11 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |     7 +-
 .../GridNearAtomicAbstractUpdateFuture.java     |     2 +-
 .../atomic/GridNearAtomicFullUpdateRequest.java |     1 +
 .../GridNearAtomicSingleUpdateFuture.java       |    12 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |    21 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   199 +-
 .../colocated/GridDhtColocatedLockFuture.java   |   613 +-
 .../colocated/GridDhtDetachedCacheEntry.java    |    29 +-
 .../preloader/CacheGroupAffinityMessage.java    |   352 +
 .../CachePartitionFullCountersMap.java          |   157 +
 .../CachePartitionPartialCountersMap.java       |   243 +
 .../preloader/ForceRebalanceExchangeTask.java   |     5 +
 .../dht/preloader/GridDhtForceKeysFuture.java   |    51 +-
 .../GridDhtPartitionDemandLegacyMessage.java    |   437 +
 .../GridDhtPartitionDemandMessage.java          |   201 +-
 .../dht/preloader/GridDhtPartitionDemander.java |   813 +-
 .../preloader/GridDhtPartitionExchangeId.java   |    16 +-
 .../dht/preloader/GridDhtPartitionFullMap.java  |    10 +-
 .../dht/preloader/GridDhtPartitionMap.java      |    46 +-
 .../dht/preloader/GridDhtPartitionSupplier.java |   707 +-
 .../GridDhtPartitionSupplyMessage.java          |    40 +-
 .../GridDhtPartitionSupplyMessageV2.java        |   153 +
 .../GridDhtPartitionsAbstractMessage.java       |    39 +-
 .../GridDhtPartitionsExchangeFuture.java        |  3467 ++++-
 .../preloader/GridDhtPartitionsFullMessage.java |   327 +-
 .../GridDhtPartitionsSingleMessage.java         |   206 +-
 .../GridDhtPartitionsSingleRequest.java         |    55 +-
 .../dht/preloader/GridDhtPreloader.java         |   343 +-
 .../preloader/GridDhtPreloaderAssignments.java  |     6 +-
 .../IgniteDhtDemandedPartitionsMap.java         |   173 +
 .../IgniteDhtPartitionCountersMap.java          |    13 +
 .../IgniteDhtPartitionCountersMap2.java         |    69 +
 .../IgniteDhtPartitionHistorySuppliersMap.java  |    19 +-
 .../IgniteDhtPartitionsToReloadMap.java         |    13 +
 .../dht/preloader/IgniteHistoricalIterator.java |    39 +
 .../preloader/IgniteRebalanceIteratorImpl.java  |   201 +
 .../dht/preloader/InitNewCoordinatorFuture.java |   349 +
 .../RebalanceReassignExchangeTask.java          |     5 +
 ...StopCachesOnClientReconnectExchangeTask.java |    59 +
 .../preloader/latch/ExchangeLatchManager.java   |   813 ++
 .../distributed/dht/preloader/latch/Latch.java  |    52 +
 .../dht/preloader/latch/LatchAckMessage.java    |   165 +
 .../dht/topology/EvictionContext.java           |    28 +
 .../topology/GridClientPartitionTopology.java   |  1369 ++
 .../GridDhtInvalidPartitionException.java       |    51 +
 .../dht/topology/GridDhtLocalPartition.java     |  1576 +++
 .../dht/topology/GridDhtPartitionState.java     |    58 +
 .../dht/topology/GridDhtPartitionTopology.java  |   430 +
 .../topology/GridDhtPartitionTopologyImpl.java  |  2999 +++++
 .../topology/GridDhtPartitionsReservation.java  |   294 +
 .../GridDhtPartitionsStateValidator.java        |   319 +
 .../dht/topology/PartitionsEvictManager.java    |   572 +
 .../near/AckCoordinatorOnRollback.java          |    54 +
 .../distributed/near/GridNearAtomicCache.java   |    20 +-
 .../distributed/near/GridNearCacheAdapter.java  |    15 +-
 .../distributed/near/GridNearCacheEntry.java    |   232 +-
 .../distributed/near/GridNearGetFuture.java     |   109 +-
 .../distributed/near/GridNearGetRequest.java    |    35 +-
 .../distributed/near/GridNearLockFuture.java    |   245 +-
 .../distributed/near/GridNearLockMapping.java   |     2 +-
 .../distributed/near/GridNearLockRequest.java   |     2 +-
 ...arOptimisticSerializableTxPrepareFuture.java |   124 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |   208 +-
 ...ridNearOptimisticTxPrepareFutureAdapter.java |   217 +-
 .../GridNearPessimisticTxPrepareFuture.java     |   219 +-
 .../near/GridNearSingleGetRequest.java          |    33 +-
 .../near/GridNearTransactionalCache.java        |    18 +-
 .../near/GridNearTxAbstractEnlistFuture.java    |   495 +
 .../near/GridNearTxEnlistFuture.java            |   696 +
 .../near/GridNearTxEnlistRequest.java           |   659 +
 .../near/GridNearTxEnlistResponse.java          |   372 +
 .../near/GridNearTxFastFinishFuture.java        |    93 +
 .../near/GridNearTxFinishAndAckFuture.java      |   144 +
 .../near/GridNearTxFinishFuture.java            |   185 +-
 .../near/GridNearTxFinishRequest.java           |    34 +
 .../cache/distributed/near/GridNearTxLocal.java |  1448 ++-
 .../near/GridNearTxPrepareFutureAdapter.java    |    19 +-
 .../near/GridNearTxPrepareRequest.java          |    47 +-
 .../near/GridNearTxPrepareResponse.java         |    32 +
 .../GridNearTxQueryAbstractEnlistFuture.java    |    36 +
 .../near/GridNearTxQueryEnlistFuture.java       |   380 +
 .../near/GridNearTxQueryEnlistRequest.java      |   616 +
 .../near/GridNearTxQueryEnlistResponse.java     |   330 +
 .../GridNearTxQueryResultsEnlistFuture.java     |   663 +
 .../GridNearTxQueryResultsEnlistRequest.java    |   578 +
 .../GridNearTxQueryResultsEnlistResponse.java   |   179 +
 .../distributed/near/GridNearTxRemote.java      |    14 +-
 .../near/GridNearTxSelectForUpdateFuture.java   |   462 +
 .../distributed/near/IgniteTxMappingsImpl.java  |     6 +-
 .../near/IgniteTxMappingsSingleImpl.java        |     2 +-
 .../distributed/near/NearTxFinishFuture.java    |    50 +
 .../near/TxTopologyVersionFuture.java           |   155 +
 .../processors/cache/dr/GridCacheDrManager.java |    31 +
 .../cache/dr/GridOsCacheDrManager.java          |    13 +
 .../processors/cache/local/GridLocalCache.java  |     7 +-
 .../cache/local/GridLocalCacheEntry.java        |    50 +-
 .../cache/local/GridLocalLockFuture.java        |   110 +-
 .../local/atomic/GridLocalAtomicCache.java      |   356 +-
 .../processors/cache/mvcc/MvccCoordinator.java  |   104 +
 .../cache/mvcc/MvccDiscoveryData.java           |    52 +
 .../cache/mvcc/MvccEmptyLongList.java           |    53 +
 .../processors/cache/mvcc/MvccFuture.java       |    66 +
 .../processors/cache/mvcc/MvccLongList.java     |    29 +
 .../mvcc/MvccPreviousCoordinatorQueries.java    |   221 +
 .../processors/cache/mvcc/MvccProcessor.java    |   282 +
 .../cache/mvcc/MvccProcessorImpl.java           |  2273 ++++
 .../processors/cache/mvcc/MvccQueryTracker.java |   102 +
 .../cache/mvcc/MvccQueryTrackerImpl.java        |   356 +
 .../processors/cache/mvcc/MvccSnapshot.java     |    48 +
 .../cache/mvcc/MvccSnapshotFuture.java          |    43 +
 .../mvcc/MvccSnapshotResponseListener.java      |    35 +
 .../cache/mvcc/MvccSnapshotWithoutTxs.java      |   204 +
 .../cache/mvcc/MvccUpdateVersionAware.java      |    81 +
 .../processors/cache/mvcc/MvccUtils.java        |   905 ++
 .../processors/cache/mvcc/MvccVersion.java      |    48 +
 .../processors/cache/mvcc/MvccVersionAware.java |    76 +
 .../processors/cache/mvcc/MvccVersionImpl.java  |   193 +
 .../cache/mvcc/StaticMvccQueryTracker.java      |    96 +
 .../processors/cache/mvcc/VacuumMetrics.java    |   102 +
 .../cache/mvcc/VacuumMetricsReducer.java        |    49 +
 .../processors/cache/mvcc/VacuumTask.java       |    63 +
 .../cache/mvcc/msg/MvccAckRequestQueryCntr.java |   130 +
 .../cache/mvcc/msg/MvccAckRequestQueryId.java   |   130 +
 .../cache/mvcc/msg/MvccAckRequestTx.java        |   210 +
 .../mvcc/msg/MvccAckRequestTxAndQueryCntr.java  |   123 +
 .../mvcc/msg/MvccAckRequestTxAndQueryId.java    |   122 +
 .../mvcc/msg/MvccActiveQueriesMessage.java      |   132 +
 .../cache/mvcc/msg/MvccFutureResponse.java      |   130 +
 .../processors/cache/mvcc/msg/MvccMessage.java  |    35 +
 .../mvcc/msg/MvccQuerySnapshotRequest.java      |   130 +
 .../cache/mvcc/msg/MvccSnapshotResponse.java    |   320 +
 .../cache/mvcc/msg/MvccTxSnapshotRequest.java   |   128 +
 .../cache/mvcc/msg/MvccWaitTxsRequest.java      |   159 +
 .../processors/cache/mvcc/txlog/TxKey.java      |    76 +
 .../processors/cache/mvcc/txlog/TxLog.java      |   599 +
 .../processors/cache/mvcc/txlog/TxLogIO.java    |    73 +
 .../cache/mvcc/txlog/TxLogInnerIO.java          |   105 +
 .../cache/mvcc/txlog/TxLogLeafIO.java           |   105 +
 .../processors/cache/mvcc/txlog/TxLogTree.java  |    62 +
 .../processors/cache/mvcc/txlog/TxRow.java      |    44 +
 .../processors/cache/mvcc/txlog/TxState.java    |    37 +
 .../cache/persistence/AllocatedPageTracker.java |    33 +
 .../cache/persistence/CacheDataRow.java         |     7 +-
 .../cache/persistence/CacheDataRowAdapter.java  |   126 +-
 .../cache/persistence/CacheSearchRow.java       |     3 +-
 .../cache/persistence/CheckpointFuture.java     |    35 +
 .../CheckpointWriteProgressSupplier.java        |    45 +
 .../cache/persistence/DataRegion.java           |    84 +
 .../persistence/DataRegionMetricsImpl.java      |   484 +
 .../DataRegionMetricsMXBeanImpl.java            |   191 +
 .../persistence/DataRegionMetricsSnapshot.java  |   220 +
 .../persistence/DataStorageMXBeanImpl.java      |    52 +
 .../persistence/DataStorageMetricsImpl.java     |   564 +
 .../persistence/DataStorageMetricsSnapshot.java |   270 +
 .../cache/persistence/DataStructure.java        |    51 +-
 .../persistence/DatabaseLifecycleListener.java  |    54 +
 .../cache/persistence/DbCheckpointListener.java |     8 +
 .../GridCacheDatabaseSharedManager.java         |  3923 ++++--
 .../persistence/GridCacheOffheapManager.java    |  1528 ++-
 .../IgniteCacheDatabaseSharedManager.java       |   956 +-
 .../cache/persistence/IndexStorage.java         |    51 +
 .../cache/persistence/IndexStorageImpl.java     |   425 +
 .../cache/persistence/MemoryMetricsImpl.java    |   284 -
 .../persistence/MemoryMetricsMXBeanImpl.java    |   131 -
 .../persistence/MemoryMetricsSnapshot.java      |   112 -
 .../cache/persistence/MemoryPolicy.java         |    83 -
 .../processors/cache/persistence/MetaStore.java |    51 -
 .../cache/persistence/MetadataStorage.java      |   417 -
 .../persistence/PersistenceMetricsImpl.java     |   297 -
 .../persistence/PersistenceMetricsSnapshot.java |   144 -
 .../cache/persistence/RecoveryDebug.java        |   170 +
 .../processors/cache/persistence/RowStore.java  |    85 +-
 .../processors/cache/persistence/Storable.java  |    52 +
 .../cache/persistence/StorageException.java     |    53 +
 .../persistence/checkpoint/CheckpointEntry.java |   366 +
 .../checkpoint/CheckpointEntryType.java         |    29 +
 .../checkpoint/CheckpointHistory.java           |   488 +
 .../evict/FairFifoPageEvictionTracker.java      |     6 +-
 .../evict/PageAbstractEvictionTracker.java      |     6 +-
 .../evict/Random2LruPageEvictionTracker.java    |     8 +-
 .../evict/RandomLruPageEvictionTracker.java     |     8 +-
 .../cache/persistence/file/AbstractFileIO.java  |   144 +
 .../cache/persistence/file/AsyncFileIO.java     |   230 +
 .../persistence/file/AsyncFileIOFactory.java    |    66 +
 .../cache/persistence/file/FileDownloader.java  |   189 +
 .../cache/persistence/file/FileIO.java          |   138 +-
 .../cache/persistence/file/FileIODecorator.java |    38 +-
 .../cache/persistence/file/FileIOFactory.java   |    26 +-
 .../cache/persistence/file/FilePageStore.java   |   531 +-
 .../persistence/file/FilePageStoreFactory.java  |    36 +
 .../persistence/file/FilePageStoreManager.java  |   626 +-
 .../cache/persistence/file/FilePageStoreV2.java |    60 +
 .../cache/persistence/file/FileUploader.java    |   100 +
 .../file/FileVersionCheckingFactory.java        |   143 +
 .../persistence/file/RandomAccessFileIO.java    |    75 +-
 .../file/RandomAccessFileIOFactory.java         |    14 +-
 .../cache/persistence/file/UnzipFileIO.java     |   146 +
 .../filename/PdsConsistentIdProcessor.java      |   565 +
 .../persistence/filename/PdsFolderSettings.java |   138 +
 .../filename/PdsFoldersResolver.java            |    33 +
 .../persistence/freelist/AbstractFreeList.java  |   641 +
 .../persistence/freelist/CacheFreeListImpl.java |    70 +
 .../cache/persistence/freelist/FreeList.java    |    20 +-
 .../persistence/freelist/FreeListImpl.java      |   600 -
 .../cache/persistence/freelist/PagesList.java   |   229 +-
 .../freelist/io/PagesListMetaIO.java            |    23 +-
 .../freelist/io/PagesListNodeIO.java            |    19 +-
 .../persistence/metastorage/MetaStorage.java    |   595 +
 .../metastorage/MetastorageDataRow.java         |   102 +
 .../MetastorageLifecycleListener.java           |    47 +
 .../metastorage/MetastorageRowStore.java        |    96 +
 .../metastorage/MetastorageSearchRow.java       |    38 +
 .../metastorage/MetastorageTree.java            |   272 +
 .../metastorage/MetsatorageSearchRowImpl.java   |    55 +
 .../metastorage/ReadOnlyMetastorage.java        |    40 +
 .../metastorage/ReadWriteMetastorage.java       |    32 +
 .../UpgradePendingTreeToPerPartitionTask.java   |   380 +
 .../pagemem/CheckpointMetricsTracker.java       |    30 +-
 .../pagemem/DelayedDirtyPageWrite.java          |   105 +
 .../pagemem/DelayedPageReplacementTracker.java  |   196 +
 .../persistence/pagemem/EvictCandidate.java     |    77 -
 .../persistence/pagemem/FullPageIdTable.java    |   358 +-
 .../pagemem/IntervalBasedMeasurement.java       |   304 +
 .../persistence/pagemem/LoadedPagesMap.java     |   137 +
 .../cache/persistence/pagemem/PageMemoryEx.java |    39 +-
 .../persistence/pagemem/PageMemoryImpl.java     |  1136 +-
 .../pagemem/PagesWriteSpeedBasedThrottle.java   |   537 +
 .../persistence/pagemem/PagesWriteThrottle.java |   165 +
 .../pagemem/PagesWriteThrottlePolicy.java       |    49 +
 .../persistence/pagemem/ReplaceCandidate.java   |    78 +
 .../persistence/pagemem/ReplacedPageWriter.java |    35 +
 .../pagemem/RobinHoodBackwardShiftHashMap.java  |   657 +
 .../partstate/PagesAllocationRange.java         |     7 +-
 .../partstate/PartitionAllocationMap.java       |    40 +-
 .../snapshot/IgniteCacheSnapshotManager.java    |    30 +-
 .../snapshot/SnapshotDiscoveryMessage.java      |     7 +-
 .../persistence/snapshot/SnapshotOperation.java |    13 +-
 .../TrackingPageIsCorruptedException.java       |    60 +
 .../cache/persistence/tree/BPlusTree.java       |  1807 ++-
 .../tree/CorruptedTreeException.java            |    38 +
 .../persistence/tree/io/AbstractDataPageIO.java |  1272 ++
 .../cache/persistence/tree/io/BPlusIO.java      |    12 +
 .../cache/persistence/tree/io/BPlusMetaIO.java  |    14 +-
 .../cache/persistence/tree/io/DataPageIO.java   |  1459 +--
 .../cache/persistence/tree/io/IOVersions.java   |    10 +
 .../cache/persistence/tree/io/PageIO.java       |   247 +-
 .../cache/persistence/tree/io/PageMetaIO.java   |    20 +-
 .../tree/io/PagePartitionCountersIO.java        |    63 +-
 .../tree/io/PagePartitionMetaIO.java            |    61 +-
 .../tree/io/PagePartitionMetaIOV2.java          |    90 +
 .../persistence/tree/io/SimpleDataPageIO.java   |   121 +
 .../persistence/tree/io/TrackingPageIO.java     |   185 +-
 .../tree/reuse/LongListReuseBag.java            |    46 +
 .../cache/persistence/tree/reuse/ReuseBag.java  |     5 +
 .../persistence/tree/util/PageHandler.java      |    14 +-
 .../tree/util/PageHandlerWrapper.java           |    36 +
 .../wal/AbstractWalRecordsIterator.java         |   405 +-
 .../persistence/wal/ByteBufferExpander.java     |    27 +-
 .../cache/persistence/wal/FileDescriptor.java   |   146 +
 .../cache/persistence/wal/FileInput.java        |   468 -
 .../cache/persistence/wal/FileWALPointer.java   |    54 +-
 .../wal/FileWriteAheadLogManager.java           |  3343 +++--
 .../wal/FsyncModeFileWriteAheadLogManager.java  |  3447 +++++
 .../cache/persistence/wal/RecordSerializer.java |    57 -
 .../cache/persistence/wal/SegmentRouter.java    |    90 +
 .../wal/SegmentedRingByteBuffer.java            |   593 +
 .../SingleSegmentLogicalRecordsIterator.java    |   147 +
 .../wal/WalSegmentTailReachedException.java     |    37 +
 .../wal/aware/SegmentArchivedStorage.java       |   139 +
 .../persistence/wal/aware/SegmentAware.java     |   259 +
 .../wal/aware/SegmentCompressStorage.java       |   168 +
 .../wal/aware/SegmentCurrentStateStorage.java   |   171 +
 .../wal/aware/SegmentLockStorage.java           |    69 +
 .../wal/aware/SegmentObservable.java            |    46 +
 .../wal/aware/SegmentReservationStorage.java    |    62 +
 .../cache/persistence/wal/io/FileInput.java     |   258 +
 .../persistence/wal/io/LockedReadFileInput.java |   111 +
 .../wal/io/LockedSegmentFileInputFactory.java   |    68 +
 .../wal/io/SegmentFileInputFactory.java         |    34 +
 .../cache/persistence/wal/io/SegmentIO.java     |    45 +
 .../persistence/wal/io/SimpleFileInput.java     |   272 +
 .../wal/io/SimpleSegmentFileInputFactory.java   |    33 +
 .../wal/reader/IgniteWalIteratorFactory.java    |   629 +-
 .../wal/reader/StandaloneGridKernalContext.java |   185 +-
 .../reader/StandaloneIgnitePluginProcessor.java |     6 +-
 .../reader/StandaloneNoopCommunicationSpi.java  |    83 +
 .../wal/reader/StandaloneNoopDiscoverySpi.java  |   127 +
 .../reader/StandaloneWalRecordsIterator.java    |   475 +-
 .../persistence/wal/record/HeaderRecord.java    |    13 +-
 .../persistence/wal/record/RecordTypes.java     |    73 +
 .../wal/serializer/RecordDataSerializer.java    |    59 +
 .../wal/serializer/RecordDataV1Serializer.java  |  1738 +++
 .../wal/serializer/RecordDataV2Serializer.java  |   311 +
 .../wal/serializer/RecordSerializer.java        |    63 +
 .../wal/serializer/RecordSerializerFactory.java |    71 +
 .../serializer/RecordSerializerFactoryImpl.java |   154 +
 .../wal/serializer/RecordV1Serializer.java      |  1742 +--
 .../wal/serializer/RecordV2Serializer.java      |   279 +
 .../wal/serializer/SegmentHeader.java           |    58 +
 .../wal/serializer/TxRecordSerializer.java      |   143 +
 .../persistence/wal/serializer/io/RecordIO.java |    60 +
 .../processors/cache/query/CacheQuery.java      |    32 +-
 .../processors/cache/query/CacheQueryEntry.java |    58 +
 .../query/GridCacheDistributedQueryManager.java |    37 +-
 .../cache/query/GridCacheQueryAdapter.java      |   239 +-
 .../query/GridCacheQueryFutureAdapter.java      |     9 +-
 .../cache/query/GridCacheQueryManager.java      |  1063 +-
 .../query/GridCacheQueryMetricsAdapter.java     |    10 +-
 .../cache/query/GridCacheQueryRequest.java      |    31 +-
 .../cache/query/GridCacheQueryResponse.java     |     4 +-
 .../query/GridCacheQueryResponseEntry.java      |     5 +-
 .../query/GridCacheQuerySqlMetadataJobV2.java   |   154 +
 .../query/GridCacheQuerySqlMetadataV2.java      |   101 +
 .../cache/query/GridCacheSqlMetadata.java       |     8 +
 .../cache/query/GridCacheSqlQuery.java          |    24 +
 .../cache/query/IgniteQueryErrorCode.java       |    78 +-
 .../cache/query/QueryEntityClassProperty.java   |   116 +
 .../cache/query/QueryEntityIndexDescriptor.java |   123 +
 .../cache/query/QueryEntityTypeDescriptor.java  |   271 +
 .../cache/query/SqlFieldsQueryEx.java           |   242 +
 .../continuous/CacheContinuousQueryEntry.java   |     9 +-
 .../CacheContinuousQueryEventBuffer.java        |     5 +-
 .../continuous/CacheContinuousQueryHandler.java |   166 +-
 .../CacheContinuousQueryHandlerV2.java          |     9 +-
 .../CacheContinuousQueryHandlerV3.java          |   185 +
 .../continuous/CacheContinuousQueryManager.java |   178 +-
 .../cache/ratemetrics/HitRateMetrics.java       |     2 +-
 .../ratemetrics/HitRateMetricsSandbox.java      |     2 +-
 .../processors/cache/store/CacheLocalStore.java |     4 +
 .../cache/store/CacheStoreManager.java          |    16 +-
 .../store/GridCacheStoreManagerAdapter.java     |   154 +-
 .../cache/store/GridCacheWriteBehindStore.java  |    23 +-
 .../cache/transactions/IgniteInternalTx.java    |    22 +
 .../transactions/IgniteTransactionsImpl.java    |    40 +-
 .../cache/transactions/IgniteTxAdapter.java     |   431 +-
 .../cache/transactions/IgniteTxEntry.java       |     6 +
 .../cache/transactions/IgniteTxHandler.java     |   523 +-
 .../IgniteTxImplicitSingleStateImpl.java        |    25 +-
 .../transactions/IgniteTxLocalAdapter.java      |   440 +-
 .../cache/transactions/IgniteTxLocalEx.java     |    15 +-
 .../cache/transactions/IgniteTxLocalState.java  |    16 +
 .../transactions/IgniteTxLocalStateAdapter.java |    36 +-
 .../cache/transactions/IgniteTxManager.java     |   386 +-
 .../cache/transactions/IgniteTxMap.java         |     2 +-
 .../IgniteTxRemoteSingleStateImpl.java          |     7 +-
 .../IgniteTxRemoteStateAdapter.java             |    23 +-
 .../transactions/IgniteTxRemoteStateImpl.java   |    12 +-
 .../cache/transactions/IgniteTxState.java       |    18 +-
 .../cache/transactions/IgniteTxStateImpl.java   |    30 +-
 .../transactions/TransactionEventProxyImpl.java |   220 +
 .../transactions/TransactionMetricsAdapter.java |   206 +-
 .../transactions/TransactionProxyImpl.java      |    55 +-
 .../TransactionProxyRollbackOnlyImpl.java       |    80 +
 .../cache/transactions/TxCounters.java          |   129 +
 .../cache/tree/AbstractDataInnerIO.java         |   187 +
 .../cache/tree/AbstractDataLeafIO.java          |   201 +
 .../cache/tree/AbstractPendingEntryInnerIO.java |    99 +
 .../cache/tree/AbstractPendingEntryLeafIO.java  |    98 +
 .../cache/tree/CacheDataRowStore.java           |   105 +
 .../processors/cache/tree/CacheDataTree.java    |   315 +
 .../cache/tree/CacheIdAwareDataInnerIO.java     |    48 +
 .../cache/tree/CacheIdAwareDataLeafIO.java      |    48 +
 .../tree/CacheIdAwarePendingEntryInnerIO.java   |    48 +
 .../tree/CacheIdAwarePendingEntryLeafIO.java    |    48 +
 .../processors/cache/tree/DataInnerIO.java      |    37 +
 .../processors/cache/tree/DataLeafIO.java       |    37 +
 .../internal/processors/cache/tree/DataRow.java |   127 +
 .../cache/tree/PendingEntriesTree.java          |   120 +
 .../cache/tree/PendingEntryInnerIO.java         |    48 +
 .../cache/tree/PendingEntryLeafIO.java          |    48 +
 .../processors/cache/tree/PendingRow.java       |    84 +
 .../processors/cache/tree/PendingRowIO.java     |    44 +
 .../processors/cache/tree/RowLinkIO.java        |   109 +
 .../processors/cache/tree/SearchRow.java        |   107 +
 .../mvcc/data/MvccCacheIdAwareDataInnerIO.java  |    68 +
 .../mvcc/data/MvccCacheIdAwareDataLeafIO.java   |    89 +
 .../cache/tree/mvcc/data/MvccDataInnerIO.java   |    71 +
 .../cache/tree/mvcc/data/MvccDataLeafIO.java    |    89 +
 .../cache/tree/mvcc/data/MvccDataRow.java       |   277 +
 .../cache/tree/mvcc/data/MvccUpdateDataRow.java |   605 +
 .../tree/mvcc/data/MvccUpdateDataRowNative.java |   240 +
 .../cache/tree/mvcc/data/MvccUpdateResult.java  |    60 +
 .../cache/tree/mvcc/data/ResultType.java        |    38 +
 .../mvcc/search/MvccFirstRowTreeClosure.java    |    76 +
 .../mvcc/search/MvccLinkAwareSearchRow.java     |    48 +
 .../tree/mvcc/search/MvccMaxSearchRow.java      |    55 +
 .../tree/mvcc/search/MvccMinSearchRow.java      |    55 +
 .../cache/tree/mvcc/search/MvccSearchRow.java   |    70 +
 .../tree/mvcc/search/MvccSnapshotSearchRow.java |   113 +
 .../cache/tree/mvcc/search/MvccTreeClosure.java |    29 +
 .../processors/cache/verify/CacheInfo.java      |   348 +
 .../CollectConflictPartitionKeysTask.java       |   235 +
 .../cache/verify/ContentionClosure.java         |   162 +
 .../processors/cache/verify/ContentionInfo.java |    72 +
 .../cache/verify/IdleVerifyDumpResult.java      |    73 +
 .../cache/verify/IdleVerifyResultV2.java        |   168 +
 .../cache/verify/PartitionEntryHashRecord.java  |   237 +
 .../cache/verify/PartitionHashRecord.java       |   130 +
 .../cache/verify/PartitionHashRecordV2.java     |   168 +
 .../processors/cache/verify/PartitionKey.java   |   103 +
 .../processors/cache/verify/PartitionKeyV2.java |   127 +
 .../RetrieveConflictPartitionValuesTask.java    |   204 +
 .../verify/VerifyBackupPartitionsDumpTask.java  |   230 +
 .../verify/VerifyBackupPartitionsTask.java      |   361 +
 .../verify/VerifyBackupPartitionsTaskV2.java    |   347 +
 .../cache/verify/ViewCacheClosure.java          |   187 +
 .../cache/version/GridCacheVersionManager.java  |     3 +
 .../cacheobject/IgniteCacheObjectProcessor.java |    11 +
 .../IgniteCacheObjectProcessorImpl.java         |   170 +-
 .../UserCacheObjectByteArrayImpl.java           |    59 +
 .../cacheobject/UserCacheObjectImpl.java        |    82 +
 .../cacheobject/UserKeyCacheObjectImpl.java     |   101 +
 .../closure/GridClosureProcessor.java           |    36 +-
 .../processors/cluster/BaselineTopology.java    |   484 +
 .../cluster/BaselineTopologyHistory.java        |   127 +
 .../cluster/BaselineTopologyHistoryItem.java    |    79 +
 .../processors/cluster/BranchingPointType.java  |    48 +
 .../cluster/ChangeGlobalStateFinishMessage.java |    33 +-
 .../cluster/ChangeGlobalStateMessage.java       |    54 +-
 .../cluster/ClusterMetricsUpdateMessage.java    |   158 +
 .../processors/cluster/ClusterNodeMetrics.java  |    62 +
 .../processors/cluster/ClusterProcessor.java    |   288 +-
 .../cluster/DiscoveryDataClusterState.java      |   133 +-
 .../cluster/GridClusterStateProcessor.java      |   895 +-
 .../processors/cluster/GridUpdateNotifier.java  |   224 +-
 .../cluster/HttpIgniteUpdatesChecker.java       |    29 +-
 .../cluster/IGridClusterStateProcessor.java     |   122 +
 .../continuous/AbstractContinuousMessage.java   |    15 +
 .../continuous/ContinuousRoutineInfo.java       |   100 +
 .../ContinuousRoutineStartResultMessage.java    |   206 +
 .../ContinuousRoutinesCommonDiscoveryData.java  |    45 +
 .../continuous/ContinuousRoutinesInfo.java      |   132 +
 ...tinuousRoutinesJoiningNodeDiscoveryData.java |    45 +
 .../continuous/GridContinuousBatchAdapter.java  |     5 +-
 .../continuous/GridContinuousProcessor.java     |  1033 +-
 .../continuous/StartRequestDataV2.java          |   164 +
 .../StartRoutineAckDiscoveryMessage.java        |     2 +-
 .../StartRoutineDiscoveryMessage.java           |     2 +-
 .../StartRoutineDiscoveryMessageV2.java         |    77 +
 .../StopRoutineAckDiscoveryMessage.java         |     7 +-
 .../continuous/StopRoutineDiscoveryMessage.java |     2 +-
 .../datastreamer/DataStreamProcessor.java       |    60 +-
 .../datastreamer/DataStreamerImpl.java          |   867 +-
 .../datastreamer/DataStreamerRequest.java       |    59 +-
 .../AtomicDataStructureProxy.java               |   195 +
 .../datastructures/DataStructuresProcessor.java |   238 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   120 +-
 .../GridCacheAtomicReferenceImpl.java           |   114 +-
 .../GridCacheAtomicSequenceImpl.java            |   119 +-
 .../GridCacheAtomicStampedImpl.java             |   115 +-
 .../GridCacheCountDownLatchImpl.java            |    73 +-
 .../datastructures/GridCacheLockImpl.java       |   104 +-
 .../datastructures/GridCacheQueueAdapter.java   |     9 +-
 .../datastructures/GridCacheRemovable.java      |     6 +
 .../datastructures/GridCacheSemaphoreImpl.java  |    85 +-
 .../datastructures/GridCacheSetHeader.java      |    31 +-
 .../datastructures/GridCacheSetImpl.java        |   143 +-
 .../datastructures/GridCacheSetItemKey.java     |     5 +-
 .../datastructures/GridCacheSetProxy.java       |    18 +
 .../datastructures/GridSetQueryPredicate.java   |     4 +-
 .../dr/IgniteDrDataStreamerCacheUpdater.java    |     2 +-
 .../processors/failure/FailureProcessor.java    |   140 +
 .../processors/failure/package-info.java        |    22 +
 .../processors/hadoop/HadoopClassLoader.java    |    19 +-
 .../processors/hadoop/HadoopDefaultJobInfo.java |    15 +-
 .../processors/hadoop/HadoopFileBlock.java      |     2 +-
 .../internal/processors/hadoop/HadoopJobEx.java |     2 +-
 .../processors/hadoop/HadoopJobInfo.java        |     7 +
 .../processors/igfs/IgfsClientSession.java      |     4 +-
 .../processors/igfs/IgfsDataManager.java        |    20 +-
 .../processors/igfs/IgfsDirectoryInfo.java      |    28 +-
 .../internal/processors/igfs/IgfsFileInfo.java  |    24 +-
 .../processors/igfs/IgfsFileWorkerBatch.java    |     2 +-
 .../processors/igfs/IgfsHelperImpl.java         |     8 +-
 .../internal/processors/igfs/IgfsImpl.java      |    10 +-
 ...zySecondaryFileSystemPositionedReadable.java |    15 +-
 .../processors/igfs/IgfsLocalMetrics.java       |    30 +-
 .../processors/igfs/IgfsMetaManager.java        |    30 +-
 .../internal/processors/igfs/IgfsProcessor.java |     4 +-
 .../igfs/data/IgfsDataPutProcessor.java         |     2 +-
 .../processors/job/GridJobProcessor.java        |    51 +-
 .../internal/processors/job/GridJobWorker.java  |    29 +-
 .../processors/jobmetrics/GridJobMetrics.java   |    21 +-
 .../jobmetrics/GridJobMetricsProcessor.java     |    13 +-
 .../GridMarshallerMappingProcessor.java         |    37 +-
 .../marshaller/MappingAcceptedMessage.java      |    14 +
 .../marshaller/MappingProposedMessage.java      |    14 +
 .../odbc/ClientConnectableNodePartitions.java   |    83 +
 .../odbc/ClientConnectorConfigurationEx.java    |    27 +
 ...ClientListenerAbstractConnectionContext.java |   131 +
 .../odbc/ClientListenerBufferedParser.java      |    83 +
 .../odbc/ClientListenerConnectionContext.java   |    79 +
 .../odbc/ClientListenerMessageParser.java       |    39 +
 .../odbc/ClientListenerNioListener.java         |   344 +
 .../odbc/ClientListenerNioServerBuffer.java     |   120 +
 .../odbc/ClientListenerProcessor.java           |   551 +
 .../odbc/ClientListenerProtocolVersion.java     |   116 +
 .../processors/odbc/ClientListenerRequest.java  |    31 +
 .../odbc/ClientListenerRequestHandler.java      |    49 +
 .../odbc/ClientListenerRequestNoId.java         |    28 +
 .../processors/odbc/ClientListenerResponse.java |    76 +
 .../odbc/ClientListenerResponseSender.java      |    29 +
 .../odbc/SqlListenerBufferedParser.java         |    81 -
 .../odbc/SqlListenerConnectionContext.java      |    56 -
 .../odbc/SqlListenerMessageParser.java          |    39 -
 .../processors/odbc/SqlListenerNioListener.java |   269 -
 .../odbc/SqlListenerNioServerBuffer.java        |   114 -
 .../processors/odbc/SqlListenerProcessor.java   |   277 -
 .../odbc/SqlListenerProtocolVersion.java        |   116 -
 .../processors/odbc/SqlListenerRequest.java     |    43 -
 .../odbc/SqlListenerRequestHandler.java         |    39 -
 .../processors/odbc/SqlListenerResponse.java    |    76 -
 .../processors/odbc/SqlListenerUtils.java       |     6 +
 .../internal/processors/odbc/SqlStateCode.java  |    72 +
 .../odbc/jdbc/JdbcBatchExecuteRequest.java      |   187 +
 .../odbc/jdbc/JdbcBatchExecuteResult.java       |   125 +
 .../odbc/jdbc/JdbcBulkLoadAckResult.java        |   114 +
 .../odbc/jdbc/JdbcBulkLoadBatchRequest.java     |   189 +
 .../odbc/jdbc/JdbcBulkLoadProcessor.java        |   144 +
 .../processors/odbc/jdbc/JdbcColumnMeta.java    |   113 +-
 .../processors/odbc/jdbc/JdbcColumnMetaV2.java  |    77 +
 .../processors/odbc/jdbc/JdbcColumnMetaV3.java  |    86 +
 .../processors/odbc/jdbc/JdbcColumnMetaV4.java  |    93 +
 .../odbc/jdbc/JdbcConnectionContext.java        |   211 +
 .../processors/odbc/jdbc/JdbcIndexMeta.java     |   195 +
 .../processors/odbc/jdbc/JdbcMessageParser.java |    25 +-
 .../odbc/jdbc/JdbcMetaColumnsRequest.java       |   105 +
 .../odbc/jdbc/JdbcMetaColumnsResult.java        |   128 +
 .../odbc/jdbc/JdbcMetaColumnsResultV2.java      |    50 +
 .../odbc/jdbc/JdbcMetaColumnsResultV3.java      |    50 +
 .../odbc/jdbc/JdbcMetaColumnsResultV4.java      |    50 +
 .../odbc/jdbc/JdbcMetaIndexesRequest.java       |    91 +
 .../odbc/jdbc/JdbcMetaIndexesResult.java        |   101 +
 .../odbc/jdbc/JdbcMetaParamsRequest.java        |    90 +
 .../odbc/jdbc/JdbcMetaParamsResult.java         |   100 +
 .../odbc/jdbc/JdbcMetaPrimaryKeysRequest.java   |    91 +
 .../odbc/jdbc/JdbcMetaPrimaryKeysResult.java    |   102 +
 .../odbc/jdbc/JdbcMetaSchemasRequest.java       |    76 +
 .../odbc/jdbc/JdbcMetaSchemasResult.java        |    76 +
 .../odbc/jdbc/JdbcMetaTablesRequest.java        |    90 +
 .../odbc/jdbc/JdbcMetaTablesResult.java         |   100 +
 .../jdbc/JdbcOrderedBatchExecuteRequest.java    |    87 +
 .../jdbc/JdbcOrderedBatchExecuteResult.java     |    78 +
 .../processors/odbc/jdbc/JdbcParameterMeta.java |   166 +
 .../odbc/jdbc/JdbcPrimaryKeyMeta.java           |   134 +
 .../processors/odbc/jdbc/JdbcQuery.java         |    98 +
 .../odbc/jdbc/JdbcQueryCloseRequest.java        |    15 +-
 ...dbcQueryExecuteMultipleStatementsResult.java |   137 +
 .../odbc/jdbc/JdbcQueryExecuteRequest.java      |    71 +-
 .../odbc/jdbc/JdbcQueryExecuteResult.java       |    23 +-
 .../odbc/jdbc/JdbcQueryFetchRequest.java        |    15 +-
 .../odbc/jdbc/JdbcQueryFetchResult.java         |    23 +-
 .../odbc/jdbc/JdbcQueryMetadataRequest.java     |    29 +-
 .../odbc/jdbc/JdbcQueryMetadataResult.java      |    29 +-
 .../odbc/jdbc/JdbcRawBinarylizable.java         |     8 +-
 .../processors/odbc/jdbc/JdbcRequest.java       |   107 +-
 .../odbc/jdbc/JdbcRequestHandler.java           |   946 +-
 .../odbc/jdbc/JdbcRequestHandlerWorker.java     |   131 +
 .../processors/odbc/jdbc/JdbcResponse.java      |    15 +-
 .../processors/odbc/jdbc/JdbcResult.java        |   129 +-
 .../processors/odbc/jdbc/JdbcResultInfo.java    |    98 +
 .../processors/odbc/jdbc/JdbcStatementType.java |    45 +
 .../processors/odbc/jdbc/JdbcTableMeta.java     |   105 +
 .../processors/odbc/jdbc/JdbcUtils.java         |    37 +-
 .../processors/odbc/odbc/OdbcColumnMeta.java    |    43 +-
 .../odbc/odbc/OdbcConnectionContext.java        |   192 +
 .../processors/odbc/odbc/OdbcMessageParser.java |   154 +-
 .../processors/odbc/odbc/OdbcQuery.java         |    94 +
 .../odbc/odbc/OdbcQueryExecuteBatchRequest.java |    29 +-
 .../odbc/odbc/OdbcQueryExecuteBatchResult.java  |    34 +-
 .../odbc/odbc/OdbcQueryExecuteRequest.java      |    28 +-
 .../odbc/odbc/OdbcQueryExecuteResult.java       |    24 +-
 .../odbc/odbc/OdbcQueryMoreResultsRequest.java  |    61 +
 .../odbc/odbc/OdbcQueryMoreResultsResult.java   |    66 +
 .../processors/odbc/odbc/OdbcQueryResults.java  |   111 +
 .../processors/odbc/odbc/OdbcRequest.java       |    30 +-
 .../odbc/odbc/OdbcRequestHandler.java           |   713 +-
 .../odbc/odbc/OdbcRequestHandlerWorker.java     |   131 +
 .../processors/odbc/odbc/OdbcResponse.java      |     4 +-
 .../processors/odbc/odbc/OdbcResultSet.java     |   112 +
 .../odbc/odbc/OdbcStreamingBatchRequest.java    |   102 +
 .../odbc/odbc/OdbcStreamingBatchResult.java     |    74 +
 .../processors/odbc/odbc/OdbcUtils.java         |    73 +
 .../offheap/GridOffHeapProcessor.java           |     6 +-
 .../platform/PlatformAbstractBootstrap.java     |    18 +-
 .../platform/PlatformAbstractTarget.java        |     6 +-
 .../processors/platform/PlatformBootstrap.java  |     7 +-
 .../platform/PlatformContextImpl.java           |   147 +-
 .../processors/platform/PlatformIgnition.java   |     9 +-
 .../platform/PlatformNoopProcessor.java         |   132 -
 .../processors/platform/PlatformProcessor.java  |   216 -
 .../platform/PlatformProcessorImpl.java         |   650 +-
 .../platform/PlatformTargetProxy.java           |    11 +
 .../platform/PlatformTargetProxyImpl.java       |    79 +-
 .../platform/cache/PlatformCache.java           |   101 +-
 .../query/PlatformAbstractQueryCursor.java      |    18 +-
 .../cache/query/PlatformFieldsQueryCursor.java  |    24 +-
 .../callback/PlatformCallbackGateway.java       |    15 +
 .../platform/callback/PlatformCallbackOp.java   |     3 +
 .../platform/client/ClientBooleanResponse.java  |    46 +
 .../client/ClientCloseableResource.java         |    28 +
 .../client/ClientConnectionContext.java         |   170 +
 .../platform/client/ClientIntResponse.java      |    46 +
 .../platform/client/ClientLongResponse.java     |    46 +
 .../platform/client/ClientMessageParser.java    |   391 +
 .../platform/client/ClientObjectResponse.java   |    46 +
 .../platform/client/ClientRawRequest.java       |    45 +
 .../platform/client/ClientRequest.java          |    90 +
 .../platform/client/ClientRequestHandler.java   |    82 +
 .../client/ClientResourceCloseRequest.java      |    46 +
 .../platform/client/ClientResourceRegistry.java |   104 +
 .../platform/client/ClientResponse.java         |    86 +
 .../platform/client/ClientStatus.java           |    57 +
 .../platform/client/ClientStringResponse.java   |    47 +
 .../platform/client/IgniteClientException.java  |    65 +
 .../binary/ClientBinaryTypeGetRequest.java      |    50 +
 .../binary/ClientBinaryTypeGetResponse.java     |    55 +
 .../binary/ClientBinaryTypeNameGetRequest.java  |    61 +
 .../binary/ClientBinaryTypeNamePutRequest.java  |    65 +
 .../binary/ClientBinaryTypePutRequest.java      |    56 +
 .../cache/ClientCacheClearKeyRequest.java       |    47 +
 .../cache/ClientCacheClearKeysRequest.java      |    47 +
 .../client/cache/ClientCacheClearRequest.java   |    47 +
 .../ClientCacheConfigurationSerializer.java     |   365 +
 .../cache/ClientCacheContainsKeyRequest.java    |    48 +
 .../cache/ClientCacheContainsKeysRequest.java   |    48 +
 ...ientCacheCreateWithConfigurationRequest.java |    64 +
 .../cache/ClientCacheCreateWithNameRequest.java |    59 +
 .../client/cache/ClientCacheDestroyRequest.java |    54 +
 .../cache/ClientCacheEntryQueryCursor.java      |    46 +
 .../cache/ClientCacheFieldsQueryCursor.java     |    53 +
 .../client/cache/ClientCacheGetAllRequest.java  |    49 +
 .../client/cache/ClientCacheGetAllResponse.java |    57 +
 .../ClientCacheGetAndPutIfAbsentRequest.java    |    48 +
 .../cache/ClientCacheGetAndPutRequest.java      |    48 +
 .../cache/ClientCacheGetAndRemoveRequest.java   |    48 +
 .../cache/ClientCacheGetAndReplaceRequest.java  |    48 +
 .../ClientCacheGetConfigurationRequest.java     |    54 +
 .../ClientCacheGetConfigurationResponse.java    |    58 +
 .../cache/ClientCacheGetNamesRequest.java       |    46 +
 .../cache/ClientCacheGetNamesResponse.java      |    56 +
 ...acheGetOrCreateWithConfigurationRequest.java |    64 +
 .../ClientCacheGetOrCreateWithNameRequest.java  |    52 +
 .../client/cache/ClientCacheGetRequest.java     |    48 +
 .../client/cache/ClientCacheGetSizeRequest.java |    60 +
 .../client/cache/ClientCacheKeyRequest.java     |    48 +
 .../cache/ClientCacheKeyValueRequest.java       |    48 +
 .../client/cache/ClientCacheKeysRequest.java    |    68 +
 .../cache/ClientCacheLocalPeekRequest.java      |    50 +
 .../cache/ClientCacheNodePartitionsRequest.java |    75 +
 .../ClientCacheNodePartitionsResponse.java      |    54 +
 .../client/cache/ClientCachePutAllRequest.java  |    60 +
 .../cache/ClientCachePutIfAbsentRequest.java    |    48 +
 .../client/cache/ClientCachePutRequest.java     |    48 +
 .../client/cache/ClientCacheQueryCursor.java    |   141 +
 .../cache/ClientCacheQueryNextPageRequest.java  |    49 +
 .../cache/ClientCacheQueryNextPageResponse.java |    50 +
 .../client/cache/ClientCacheQueryResponse.java  |    52 +
 .../cache/ClientCacheRemoveAllRequest.java      |    47 +
 .../cache/ClientCacheRemoveIfEqualsRequest.java |    48 +
 .../cache/ClientCacheRemoveKeyRequest.java      |    48 +
 .../cache/ClientCacheRemoveKeysRequest.java     |    47 +
 .../ClientCacheReplaceIfEqualsRequest.java      |    53 +
 .../client/cache/ClientCacheReplaceRequest.java |    48 +
 .../client/cache/ClientCacheRequest.java        |   154 +
 .../cache/ClientCacheScanQueryRequest.java      |   145 +
 .../cache/ClientCacheSqlFieldsQueryRequest.java |   138 +
 .../ClientCacheSqlFieldsQueryResponse.java      |    75 +
 .../cache/ClientCacheSqlQueryRequest.java       |    80 +
 .../platform/cluster/PlatformClusterGroup.java  |   134 +-
 .../cluster/PlatformClusterNodeFilterImpl.java  |     7 +
 .../platform/compute/PlatformCompute.java       |    21 +-
 .../datastreamer/PlatformDataStreamer.java      |    31 +-
 .../datastructures/PlatformAtomicReference.java |    13 +-
 .../dotnet/PlatformDotNetBootstrap.java         |    26 +-
 .../dotnet/PlatformDotNetCacheStore.java        |    40 +-
 .../PlatformDotNetConfigurationClosure.java     |    26 +-
 .../dotnet/PlatformDotNetServiceImpl.java       |     7 +
 .../platform/events/PlatformEvents.java         |    17 +-
 .../events/PlatformLocalEventListener.java      |    88 +
 .../platform/memory/PlatformMemoryPool.java     |     4 +-
 .../memory/PlatformOutputStreamImpl.java        |     2 +-
 .../services/PlatformAbstractService.java       |     8 +
 .../platform/services/PlatformServices.java     |   186 +-
 .../transactions/PlatformTransactions.java      |    38 +-
 .../utils/PlatformConfigurationUtils.java       |   683 +-
 .../platform/utils/PlatformUtils.java           |   258 +-
 .../query/CacheQueryObjectValueContext.java     |     4 +-
 .../processors/query/EnlistOperation.java       |   100 +
 .../query/GridQueryFieldMetadata.java           |    16 +-
 .../processors/query/GridQueryIndexing.java     |   160 +-
 .../processors/query/GridQueryProcessor.java    |   860 +-
 .../processors/query/GridQueryProperty.java     |    28 +
 .../query/GridQueryRowCacheCleaner.java         |    30 +
 .../query/GridQueryTypeDescriptor.java          |    30 +-
 .../processors/query/IgniteSQLException.java    |    93 +-
 .../internal/processors/query/NestedTxMode.java |    60 +
 .../processors/query/QueryEntityEx.java         |    98 +
 .../internal/processors/query/QueryField.java   |   131 +
 .../internal/processors/query/QuerySchema.java  |   180 +-
 .../processors/query/QuerySchemaPatch.java      |    96 +
 .../query/QueryTypeDescriptorImpl.java          |   175 +-
 .../internal/processors/query/QueryUtils.java   |   354 +-
 .../processors/query/SqlClientContext.java      |   302 +
 .../processors/query/UpdateSourceIterator.java  |    89 +
 .../twostep/messages/GridQueryFailResponse.java |     2 +-
 .../messages/GridQueryNextPageResponse.java     |    99 +-
 .../query/property/QueryBinaryProperty.java     |    45 +-
 .../query/property/QueryClassProperty.java      |    31 +-
 .../query/schema/SchemaExchangeWorkerTask.java  |     5 +
 .../query/schema/SchemaIndexCacheFilter.java    |    33 +
 .../schema/SchemaIndexCacheVisitorClosure.java  |    14 +-
 .../schema/SchemaIndexCacheVisitorImpl.java     |   232 +-
 .../SchemaNodeLeaveExchangeWorkerTask.java      |     5 +
 .../query/schema/SchemaOperationWorker.java     |     4 +-
 .../message/SchemaAbstractDiscoveryMessage.java |    10 +
 .../message/SchemaFinishDiscoveryMessage.java   |     5 +
 .../message/SchemaProposeDiscoveryMessage.java  |     8 +-
 .../SchemaAbstractAlterTableOperation.java      |    39 +
 .../SchemaAlterTableAddColumnOperation.java     |    96 +
 .../SchemaAlterTableDropColumnOperation.java    |    95 +
 .../operation/SchemaIndexCreateOperation.java   |    16 +-
 .../processors/resource/GridResourceIoc.java    |     4 +-
 .../processors/rest/GridRestCommand.java        |    36 +-
 .../processors/rest/GridRestProcessor.java      |   270 +-
 .../message/GridClientNodeMetricsBean.java      |     4 +-
 .../auth/AuthenticationCommandHandler.java      |    70 +
 .../rest/handlers/auth/package-info.java        |    22 +
 .../handlers/cache/GridCacheCommandHandler.java |   344 +-
 .../cluster/GridChangeStateCommandHandler.java  |    28 +-
 .../key/GridRedisExpireCommandHandler.java      |   101 +
 .../rest/handlers/redis/package-info.java       |    22 +
 .../server/GridRedisFlushCommandHandler.java    |   117 +
 .../string/GridRedisIncrDecrCommandHandler.java |     2 +-
 .../top/GridTopologyCommandHandler.java         |     2 +-
 .../handlers/user/UserActionCommandHandler.java |    97 +
 .../rest/handlers/user/package-info.java        |    22 +
 .../rest/protocols/GridRestProtocolAdapter.java |     6 +-
 .../protocols/tcp/GridTcpRestNioListener.java   |    13 +-
 .../rest/protocols/tcp/GridTcpRestParser.java   |    17 +-
 .../rest/protocols/tcp/GridTcpRestProtocol.java |    54 +-
 .../protocols/tcp/redis/GridRedisCommand.java   |    10 +-
 .../tcp/redis/GridRedisNioListener.java         |     4 +
 .../rest/request/GridRestCacheRequest.java      |    40 +-
 .../rest/request/GridRestRequest.java           |    21 +-
 .../rest/request/RestQueryRequest.java          |    26 +-
 .../rest/request/RestUserActionRequest.java     |    64 +
 .../security/SecurityContextHolder.java         |    53 +
 .../GridServiceDeploymentCompoundFuture.java    |    94 +
 .../service/GridServiceProcessor.java           |   749 +-
 .../processors/service/GridServiceProxy.java    |    47 +-
 .../service/PreparedConfigurations.java         |    47 +
 .../session/GridTaskSessionProcessor.java       |    10 +-
 .../GridInternalSubscriptionProcessor.java      |    75 +
 .../processors/task/GridTaskProcessor.java      |    31 +-
 .../task/GridTaskThreadContextKey.java          |     6 +
 .../processors/task/GridTaskWorker.java         |   122 +-
 .../timeout/GridTimeoutProcessor.java           |   246 +-
 .../apache/ignite/internal/sql/SqlKeyword.java  |   325 +
 .../apache/ignite/internal/sql/SqlLexer.java    |   245 +
 .../internal/sql/SqlLexerLookAheadToken.java    |    75 +
 .../ignite/internal/sql/SqlLexerToken.java      |    48 +
 .../ignite/internal/sql/SqlLexerTokenType.java  |   115 +
 .../ignite/internal/sql/SqlParseException.java  |   112 +
 .../apache/ignite/internal/sql/SqlParser.java   |   352 +
 .../ignite/internal/sql/SqlParserUtils.java     |   433 +
 .../internal/sql/SqlStrictParseException.java   |    35 +
 .../sql/command/SqlAlterTableCommand.java       |   114 +
 .../sql/command/SqlAlterUserCommand.java        |    79 +
 .../sql/command/SqlBeginTransactionCommand.java |    46 +
 .../sql/command/SqlBulkLoadCommand.java         |   308 +
 .../ignite/internal/sql/command/SqlCommand.java |    43 +
 .../command/SqlCommitTransactionCommand.java    |    46 +
 .../sql/command/SqlCreateIndexCommand.java      |   300 +
 .../sql/command/SqlCreateUserCommand.java       |    79 +
 .../sql/command/SqlDropIndexCommand.java        |    80 +
 .../sql/command/SqlDropUserCommand.java         |    59 +
 .../internal/sql/command/SqlIndexColumn.java    |    61 +
 .../internal/sql/command/SqlQualifiedName.java  |    70 +
 .../command/SqlRollbackTransactionCommand.java  |    46 +
 .../sql/command/SqlSetStreamingCommand.java     |   210 +
 .../suggestions/OsConfigurationSuggestions.java |    14 +-
 .../IgniteTxMvccVersionCheckedException.java    |    47 +
 .../internal/util/DirectBufferCleaner.java      |    32 +
 .../internal/util/GridAnnotationsCache.java     |     6 +-
 .../ignite/internal/util/GridArgumentCheck.java |    15 +-
 .../internal/util/GridClassLoaderCache.java     |     4 +-
 .../ignite/internal/util/GridCleaner.java       |    99 +
 .../internal/util/GridConcurrentFactory.java    |     4 +-
 .../internal/util/GridConcurrentHashSet.java    |    10 +-
 .../util/GridConcurrentSkipListSet.java         |     2 +-
 .../apache/ignite/internal/util/GridDebug.java  |    97 +-
 .../ignite/internal/util/GridIntList.java       |     2 +-
 .../ignite/internal/util/GridKeyLock.java       |     4 +-
 .../ignite/internal/util/GridLogThrottle.java   |    92 +-
 .../ignite/internal/util/GridLongList.java      |     2 +-
 .../internal/util/GridPartitionStateMap.java    |    50 +-
 .../internal/util/GridSpinReadWriteLock.java    |     2 +-
 .../ignite/internal/util/GridStringBuilder.java |     2 +-
 .../internal/util/GridSynchronizedMap.java      |     4 +-
 .../apache/ignite/internal/util/GridUnsafe.java |   205 +-
 .../ignite/internal/util/HostAndPortRange.java  |    15 +-
 .../internal/util/IgniteExceptionRegistry.java  |     2 +-
 .../apache/ignite/internal/util/IgniteTree.java |    12 +
 .../ignite/internal/util/IgniteUtils.java       |   925 +-
 .../util/Jsr310Java8DateTimeApiUtils.java       |    80 +
 .../internal/util/MutableSingletonList.java     |    53 +
 .../internal/util/OffheapReadWriteLock.java     |     8 +-
 .../util/ReflectiveDirectBufferCleaner.java     |    64 +
 .../internal/util/SerializableTransient.java    |    10 +-
 .../util/StripedCompositeReadWriteLock.java     |    31 +-
 .../ignite/internal/util/StripedExecutor.java   |   257 +-
 .../internal/util/TransientSerializable.java    |    55 +
 .../util/UnsafeDirectBufferCleaner.java         |    47 +
 .../util/future/GridCompoundFuture.java         |    55 +-
 .../internal/util/future/GridFutureAdapter.java |    38 +-
 .../internal/util/io/GridFilenameUtils.java     |     6 +-
 .../internal/util/io/GridUnsafeDataOutput.java  |    36 +-
 .../util/lang/GridFilteredClosableIterator.java |    37 +
 .../util/lang/GridFilteredIterator.java         |     2 +-
 .../ignite/internal/util/lang/GridFunc.java     |    55 +-
 .../internal/util/lang/GridTreePrinter.java     |    19 +-
 .../ConcurrentDequeFactoryCallable.java         |    40 -
 .../gridfunc/ConcurrentMapFactoryCallable.java  |     4 +-
 .../util/lang/gridfunc/ContainsPredicate.java   |     2 +-
 .../lang/gridfunc/NotContainsPredicate.java     |     2 +-
 .../nio/GridAbstractCommunicationClient.java    |     2 +-
 .../internal/util/nio/GridNioFilterAdapter.java |     2 +-
 .../internal/util/nio/GridNioFilterChain.java   |     2 +-
 .../internal/util/nio/GridNioKeyAttachment.java |    33 +
 .../util/nio/GridNioMetricsListener.java        |     6 +-
 .../util/nio/GridNioRecoveryDescriptor.java     |    55 +-
 .../ignite/internal/util/nio/GridNioServer.java |   580 +-
 .../util/nio/GridNioServerListener.java         |    19 +-
 .../util/nio/GridNioServerListenerAdapter.java  |    11 +
 .../internal/util/nio/GridNioSessionImpl.java   |     5 +
 .../util/nio/GridSelectorNioSessionImpl.java    |    56 +-
 .../util/nio/ssl/BlockingSslHandler.java        |    10 +-
 .../internal/util/nio/ssl/GridNioSslFilter.java |    12 +-
 .../offheap/unsafe/GridOffHeapSmartPointer.java |    38 -
 .../unsafe/GridOffHeapSmartPointerFactory.java  |    29 -
 .../offheap/unsafe/GridOffHeapSnapTreeMap.java  |  4525 -------
 .../unsafe/GridUnsafeCompoundMemory.java        |    35 -
 .../util/offheap/unsafe/GridUnsafeGuard.java    |   376 -
 .../util/offheap/unsafe/GridUnsafeMap.java      |     8 +-
 .../unsafe/GridUnsafePartitionedMap.java        |     8 +-
 .../util/snaptree/CopyOnWriteManager.java       |   390 -
 .../ignite/internal/util/snaptree/Epoch.java    |   131 -
 .../internal/util/snaptree/EpochNode.java       |   433 -
 .../internal/util/snaptree/SnapTreeMap.java     |  2917 -----
 .../internal/util/snaptree/package-info.java    |    22 -
 .../util/tostring/CircularStringBuilder.java    |   191 +
 .../util/tostring/GridToStringBuilder.java      |   893 +-
 .../util/tostring/GridToStringThreadLocal.java  |    65 -
 .../internal/util/tostring/SBLengthLimit.java   |    82 +
 .../internal/util/tostring/SBLimitedLength.java |   315 +
 .../apache/ignite/internal/util/typedef/X.java  |    89 +-
 .../ignite/internal/util/worker/GridWorker.java |    48 +-
 .../util/worker/GridWorkerListener.java         |     5 +
 .../util/worker/GridWorkerListenerAdapter.java  |     9 +-
 .../internal/visor/VisorDataTransferObject.java |     6 +
 .../internal/visor/VisorMultiNodeTask.java      |     6 +
 .../visor/baseline/VisorBaselineNode.java       |    89 +
 .../visor/baseline/VisorBaselineOperation.java  |    49 +
 .../visor/baseline/VisorBaselineTask.java       |   226 +
 .../visor/baseline/VisorBaselineTaskArg.java    |    99 +
 .../visor/baseline/VisorBaselineTaskResult.java |   144 +
 .../visor/baseline/VisorBaselineViewTask.java   |    73 +
 .../ignite/internal/visor/cache/VisorCache.java |    94 +-
 .../cache/VisorCacheAggregatedMetrics.java      |    76 +-
 .../visor/cache/VisorCacheConfiguration.java    |    17 +-
 .../VisorCacheConfigurationCollectorTask.java   |     1 -
 .../cache/VisorCacheEvictionConfiguration.java  |     4 +-
 .../visor/cache/VisorCacheJdbcType.java         |     2 +-
 .../cache/VisorCacheLostPartitionsTask.java     |    86 +
 .../cache/VisorCacheLostPartitionsTaskArg.java  |    73 +
 .../VisorCacheLostPartitionsTaskResult.java     |    74 +
 .../internal/visor/cache/VisorCacheMetrics.java |    52 +
 .../cache/VisorCacheMetricsCollectorTask.java   |     7 +-
 .../visor/cache/VisorCacheModifyTask.java       |   113 +
 .../visor/cache/VisorCacheModifyTaskArg.java    |   114 +
 .../visor/cache/VisorCacheModifyTaskResult.java |   101 +
 .../cache/VisorCacheNamesCollectorTask.java     |    90 +
 .../VisorCacheNamesCollectorTaskResult.java     |    88 +
 .../cache/VisorCacheNearConfiguration.java      |     7 +-
 .../visor/cache/VisorCachePartitionsTask.java   |     8 +-
 .../VisorCacheResetLostPartitionsTask.java      |    65 +
 .../VisorCacheResetLostPartitionsTaskArg.java   |    73 +
 .../visor/cache/VisorCacheStopTask.java         |    22 +-
 .../visor/cache/VisorCacheStopTaskArg.java      |    27 +
 .../visor/cache/VisorMemoryMetrics.java         |   182 +-
 .../visor/cache/VisorModifyCacheMode.java       |    47 +
 .../internal/visor/cache/VisorPartitionMap.java |     2 +-
 .../visor/compute/VisorGatewayTask.java         |    30 +-
 .../internal/visor/debug/VisorThreadInfo.java   |    10 +-
 .../internal/visor/file/VisorFileBlock.java     |     2 +-
 .../visor/file/VisorLatestTextFilesTask.java    |    13 +-
 .../internal/visor/log/VisorLogSearchTask.java  |    25 +-
 .../internal/visor/misc/VisorClusterNode.java   |   129 +
 .../internal/visor/misc/VisorWalTask.java       |   336 +
 .../internal/visor/misc/VisorWalTaskArg.java    |    98 +
 .../visor/misc/VisorWalTaskOperation.java       |    44 +
 .../internal/visor/misc/VisorWalTaskResult.java |   113 +
 .../node/VisorClientConnectorConfiguration.java |   279 +
 .../node/VisorDataRegionConfiguration.java      |   238 +
 .../node/VisorDataStorageConfiguration.java     |   475 +
 .../node/VisorExecutorServiceConfiguration.java |    18 +-
 .../visor/node/VisorGridConfiguration.java      |    57 +-
 .../visor/node/VisorMemoryConfiguration.java    |    26 +-
 .../node/VisorMemoryPolicyConfiguration.java    |    10 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    48 +-
 .../node/VisorNodeDataCollectorJobResult.java   |    28 +-
 .../visor/node/VisorNodeDataCollectorTask.java  |    17 +-
 .../node/VisorNodeDataCollectorTaskArg.java     |    90 +-
 .../node/VisorNodeDataCollectorTaskResult.java  |    55 +-
 .../visor/node/VisorPersistenceMetrics.java     |   252 +-
 .../node/VisorPersistentStoreConfiguration.java |    21 +-
 .../node/VisorSqlConnectorConfiguration.java    |     3 +
 .../visor/node/VisorSuppressedError.java        |     2 +-
 .../internal/visor/query/VisorQueryTask.java    |    28 +-
 .../internal/visor/query/VisorQueryTaskArg.java |    98 +-
 .../internal/visor/query/VisorQueryUtils.java   |    34 +-
 .../visor/query/VisorScanQueryTask.java         |     2 +-
 .../visor/service/VisorServiceTask.java         |     2 +-
 .../ignite/internal/visor/tx/VisorTxInfo.java   |   282 +
 .../internal/visor/tx/VisorTxOperation.java     |    43 +
 .../internal/visor/tx/VisorTxProjection.java    |    42 +
 .../internal/visor/tx/VisorTxSortOrder.java     |    61 +
 .../ignite/internal/visor/tx/VisorTxTask.java   |   442 +
 .../internal/visor/tx/VisorTxTaskArg.java       |   204 +
 .../internal/visor/tx/VisorTxTaskResult.java    |    73 +
 .../visor/util/VisorExceptionWrapper.java       |    11 +-
 .../internal/visor/util/VisorTaskUtils.java     |   204 +-
 .../visor/verify/IndexValidationIssue.java      |    88 +
 .../verify/ValidateIndexesPartitionResult.java  |   170 +
 .../visor/verify/VisorContentionJobResult.java  |    80 +
 .../visor/verify/VisorContentionTask.java       |   100 +
 .../visor/verify/VisorContentionTaskArg.java    |    84 +
 .../visor/verify/VisorContentionTaskResult.java |   100 +
 .../visor/verify/VisorIdleAnalyzeTask.java      |   124 +
 .../visor/verify/VisorIdleAnalyzeTaskArg.java   |    88 +
 .../verify/VisorIdleAnalyzeTaskResult.java      |    76 +
 .../visor/verify/VisorIdleVerifyDumpTask.java   |    37 +
 .../verify/VisorIdleVerifyDumpTaskArg.java      |    73 +
 .../visor/verify/VisorIdleVerifyJob.java        |    83 +
 .../visor/verify/VisorIdleVerifyTask.java       |    99 +
 .../visor/verify/VisorIdleVerifyTaskArg.java    |    74 +
 .../visor/verify/VisorIdleVerifyTaskResult.java |    76 +
 .../visor/verify/VisorIdleVerifyTaskV2.java     |    94 +
 .../verify/VisorValidateIndexesJobResult.java   |    95 +
 .../verify/VisorValidateIndexesTaskArg.java     |   112 +
 .../verify/VisorValidateIndexesTaskResult.java  |    88 +
 .../visor/verify/VisorViewCacheCmd.java         |    47 +
 .../visor/verify/VisorViewCacheTask.java        |    75 +
 .../visor/verify/VisorViewCacheTaskArg.java     |    86 +
 .../visor/verify/VisorViewCacheTaskResult.java  |    74 +
 .../worker/WorkersControlMXBeanImpl.java        |   106 +
 .../ignite/internal/worker/WorkersRegistry.java |   227 +
 .../ignite/internal/worker/package-info.java    |    22 +
 .../ignite/lang/IgniteProductVersion.java       |     2 +-
 .../org/apache/ignite/logger/NullLogger.java    |     6 +
 .../apache/ignite/logger/java/JavaLogger.java   |    21 +-
 .../ignite/marshaller/MarshallerContext.java    |    14 +
 .../ignite/marshaller/MarshallerExclusions.java |     6 +-
 .../ignite/marshaller/MarshallerUtils.java      |   145 +-
 .../ignite/marshaller/jdk/JdkMarshaller.java    |    20 +-
 .../jdk/JdkMarshallerObjectInputStream.java     |     9 +-
 .../ignite/mxbean/CacheGroupMetricsMXBean.java  |   182 +
 .../ignite/mxbean/CacheMetricsMXBean.java       |   154 +-
 .../ignite/mxbean/ClientProcessorMXBean.java    |    56 +
 .../mxbean/ClusterLocalNodeMetricsMXBean.java   |   253 -
 .../ignite/mxbean/ClusterMetricsMXBean.java     |   333 +
 .../ignite/mxbean/DataRegionMetricsMXBean.java  |   163 +
 .../apache/ignite/mxbean/DataStorageMXBean.java |    39 +
 .../ignite/mxbean/DataStorageMetricsMXBean.java |   177 +
 .../org/apache/ignite/mxbean/IgniteMXBean.java  |    66 +
 .../ignite/mxbean/MemoryMetricsMXBean.java      |     2 +
 .../ignite/mxbean/PersistenceMetricsMXBean.java |     2 +
 .../ignite/mxbean/TransactionMetricsMxBean.java |    86 +
 .../ignite/mxbean/TransactionsMXBean.java       |    99 +
 .../ignite/mxbean/WorkersControlMXBean.java     |    86 +
 .../extensions/communication/MessageWriter.java |    10 +
 .../plugin/security/AuthenticationContext.java  |    40 +
 .../security/SecurityBasicPermissionSet.java    |     4 +-
 .../plugin/security/SecurityPermission.java     |    13 +-
 .../services/ServiceDeploymentException.java    |    77 +
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |    21 +-
 .../org/apache/ignite/spi/IgniteSpiContext.java |    18 +
 .../ignite/spi/IgniteSpiMBeanAdapter.java       |     2 +-
 .../jobstealing/JobStealingCollisionSpi.java    |    10 +-
 .../communication/CommunicationListener.java    |     5 +-
 .../tcp/TcpCommunicationMetricsListener.java    |   404 +
 .../communication/tcp/TcpCommunicationSpi.java  |  1628 ++-
 .../tcp/TcpCommunicationSpiMBean.java           |    34 +
 .../tcp/internal/ConnectionKey.java             |   117 +
 .../TcpCommunicationConnectionCheckFuture.java  |   519 +
 ...pCommunicationNodeConnectionCheckFuture.java |    30 +
 .../tcp/internal/package-info.java              |    22 +
 .../tcp/messages/HandshakeMessage.java          |   157 +
 .../tcp/messages/HandshakeMessage2.java         |    95 +
 .../tcp/messages/NodeIdMessage.java             |   128 +
 .../messages/RecoveryLastReceivedMessage.java   |   114 +
 .../tcp/messages/package-info.java              |    22 +
 .../spi/deployment/DeploymentListener.java      |     6 +-
 .../deployment/local/LocalDeploymentSpi.java    |     4 +-
 .../ignite/spi/discovery/DiscoveryDataBag.java  |    18 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |     6 +-
 .../discovery/DiscoverySpiCustomMessage.java    |    15 +-
 .../spi/discovery/DiscoverySpiListener.java     |     5 +-
 .../ignite/spi/discovery/DiscoverySpiMBean.java |    84 +
 ...DiscoverySpiMutableCustomMessageSupport.java |    40 +
 .../spi/discovery/IgniteDiscoveryThread.java    |    23 +
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   345 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  1498 ++-
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |    32 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   314 +-
 .../spi/discovery/tcp/TcpDiscoverySpiMBean.java |    38 +-
 .../tcp/internal/DiscoveryDataPacket.java       |    28 +-
 .../tcp/internal/TcpDiscoveryNode.java          |   100 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |    67 +-
 .../sharedfs/TcpDiscoverySharedFsIpFinder.java  |    34 +-
 .../messages/TcpDiscoveryAbstractMessage.java   |     3 +
 .../messages/TcpDiscoveryHandshakeRequest.java  |    23 +-
 .../messages/TcpDiscoveryHandshakeResponse.java |    23 +-
 ...cpDiscoveryServerOnlyCustomEventMessage.java |    43 +
 .../spi/failover/always/AlwaysFailoverSpi.java  |     2 +-
 .../spi/indexing/IndexingQueryCacheFilter.java  |    82 +
 .../spi/indexing/IndexingQueryFilter.java       |    12 +-
 .../spi/indexing/IndexingQueryFilterImpl.java   |    79 +
 .../adaptive/AdaptiveLoadBalancingSpi.java      |     4 +-
 .../roundrobin/RoundRobinLoadBalancingSpi.java  |     4 +-
 .../WeightedRandomLoadBalancingSpi.java         |     4 +-
 .../ignite/ssl/DelegatingSSLContextSpi.java     |   103 +
 .../apache/ignite/ssl/SSLContextWrapper.java    |    31 +
 .../ssl/SSLServerSocketFactoryWrapper.java      |    80 +
 .../ignite/ssl/SSLSocketFactoryWrapper.java     |   113 +
 .../apache/ignite/ssl/SslContextFactory.java    |    53 +-
 .../ignite/startup/BasicWarmupClosure.java      |    10 +-
 .../startup/cmdline/CommandLineStartup.java     |     5 +-
 .../startup/cmdline/CommandLineTransformer.java |     6 +-
 .../org/apache/ignite/stream/StreamAdapter.java |     2 +-
 .../apache/ignite/stream/StreamTransformer.java |    60 +-
 .../ignite/stream/socket/SocketStreamer.java    |     8 +-
 .../thread/IgniteStripedThreadPoolExecutor.java |     8 +-
 .../IgniteTaskTrackingThreadPoolExecutor.java   |   180 +
 .../org/apache/ignite/thread/IgniteThread.java  |    99 +-
 .../ignite/thread/IgniteThreadFactory.java      |    39 +-
 .../ignite/thread/IgniteThreadPoolExecutor.java |   147 +-
 .../ignite/thread/OomExceptionHandler.java      |    44 +
 .../apache/ignite/transactions/Transaction.java |    30 +-
 .../ignite/transactions/TransactionMetrics.java |    52 +
 .../ignite/transactions/TransactionState.java   |     7 +-
 .../apache/ignite/util/deque/FastSizeDeque.java |   372 +
 .../java/org/jsr166/ConcurrentHashMap8.java     |  3785 +-----
 .../java/org/jsr166/ConcurrentLinkedDeque8.java |     3 +-
 .../org/jsr166/ConcurrentLinkedHashMap.java     |    31 +-
 .../src/main/java/org/jsr166/LongAdder8.java    |   211 -
 .../src/main/java/org/jsr166/Striped64_8.java   |   350 -
 .../java/org/jsr166/ThreadLocalRandom8.java     |   207 -
 .../core/src/main/java/org/mindrot/BCrypt.java  |   783 ++
 .../src/main/java/org/mindrot/package-info.java |    16 +
 .../resources/META-INF/classnames.properties    |   451 +-
 .../core/src/main/resources/ignite.properties   |     2 +-
 .../test/config/class_list_exploit_excluded.txt |    18 +
 .../test/config/class_list_exploit_included.txt |    20 +
 modules/core/src/test/config/example-cache.xml  |    10 +
 .../core/src/test/config/examples.properties    |     2 +-
 .../core/src/test/config/loaders/grid-cfg.xml   |    17 +-
 modules/core/src/test/config/log4j-test.xml     |    23 +-
 modules/core/src/test/config/log4j2-test.xml    |     6 +-
 .../src/test/config/log4j2-verbose-test.xml     |     4 +-
 .../core/src/test/config/spark/spark-config.xml |     8 +-
 modules/core/src/test/config/tests.properties   |    16 +-
 .../org.apache.ignite.plugin.PluginProvider     |     4 +-
 ...atformCachePluginConfigurationClosureFactory |     1 -
 ...rm.PlatformPluginConfigurationClosureFactory |     1 -
 .../ignite/GridSuppressedExceptionSelfTest.java |    23 +-
 ...teCacheEntryProcessorSequentialCallTest.java |   311 +
 .../cache/IgniteWarmupClosureSelfTest.java      |     5 -
 .../ignite/cache/LargeEntryUpdateTest.java      |     6 +-
 .../affinity/AffinityClientNodeSelfTest.java    |     5 -
 .../AffinityDistributionLoggingTest.java        |   290 +
 ...ityFunctionBackupFilterAbstractSelfTest.java |    15 +-
 ...unctionExcludeNeighborsAbstractSelfTest.java |     8 +-
 .../affinity/AffinityHistoryCleanupTest.java    |    86 +-
 .../local/LocalAffinityFunctionTest.java        |     5 -
 ...deAttributeAffinityBackupFilterSelfTest.java |    53 +
 ...ousAffinityFunctionBackupFilterSelfTest.java |     2 +-
 .../RendezvousAffinityFunctionSelfTest.java     |     5 -
 ...ndezvousAffinityFunctionSimpleBenchmark.java |     5 -
 ...istenerRWThroughDisabledAtomicCacheTest.java |    33 +
 ...RWThroughDisabledTransactionalCacheTest.java |   138 +
 .../store/CacheStoreReadFromBackupTest.java     |   238 +
 ...cheStoreSessionListenerAbstractSelfTest.java |     5 -
 ...heStoreSessionListenerLifecycleSelfTest.java |     5 +-
 ...nerReadWriteThroughDisabledAbstractTest.java |   291 +
 ...reSessionListenerWriteBehindEnabledTest.java |   405 +
 ...cheTransactionalStoreReadFromBackupTest.java |    32 +
 .../cache/store/GridStoreLoadCacheTest.java     |   120 +
 .../IgniteCacheExpiryStoreLoadSelfTest.java     |     2 +-
 .../store/jdbc/CacheJdbcPojoStoreTest.java      |    55 +-
 ...CacheJdbcBlobStoreMultithreadedSelfTest.java |     6 +-
 .../cache/store/jdbc/model/BinaryTest.java      |   121 +
 .../cache/store/jdbc/model/BinaryTestKey.java   |    87 +
 .../client/ClientCacheConfigurationTest.java    |   107 +
 .../ignite/client/ClientConfigurationTest.java  |    76 +
 .../org/apache/ignite/client/Comparers.java     |   112 +
 .../java/org/apache/ignite/client/Config.java   |    61 +
 .../apache/ignite/client/FunctionalTest.java    |   420 +
 .../apache/ignite/client/IgniteBinaryTest.java  |   224 +
 .../java/org/apache/ignite/client/LoadTest.java |   137 +
 .../ignite/client/LocalIgniteCluster.java       |   193 +
 .../java/org/apache/ignite/client/Person.java   |    65 +
 .../apache/ignite/client/ReliabilityTest.java   |   188 +
 .../apache/ignite/client/SslParametersTest.java |   329 +
 .../ignite/custom/DummyEventFilterFactory.java  |    10 +-
 .../failure/AbstractFailureHandlerTest.java     |    74 +
 .../failure/FailureHandlerTriggeredTest.java    |   100 +
 .../ignite/failure/IoomFailureHandlerTest.java  |   144 +
 .../ignite/failure/OomFailureHandlerTest.java   |   255 +
 .../failure/StopNodeFailureHandlerTest.java     |    74 +
 .../StopNodeOrHaltFailureHandlerTest.java       |    95 +
 .../failure/SystemWorkersBlockingTest.java      |   100 +
 .../failure/SystemWorkersTerminationTest.java   |   165 +
 .../ignite/failure/TestFailureHandler.java      |    82 +
 .../ignite/igfs/IgfsEventsAbstractSelfTest.java |     5 -
 .../igfs/IgfsFragmentizerAbstractSelfTest.java  |     5 -
 .../apache/ignite/internal/ClassSetTest.java    |    71 +
 .../ClusterBaselineNodesMetricsSelfTest.java    |   177 +
 .../internal/ClusterGroupHostsSelfTest.java     |     3 +
 .../ignite/internal/ClusterGroupSelfTest.java   |     8 +-
 .../ignite/internal/ClusterMetricsSelfTest.java |    17 +-
 .../internal/ClusterNodeMetricsSelfTest.java    |   196 +-
 .../internal/ClusterNodeMetricsUpdateTest.java  |   173 +
 .../internal/DiscoverySpiTestListener.java      |   162 +
 .../ignite/internal/GridAffinityMappedTest.java |     9 -
 .../internal/GridAffinityNoCacheSelfTest.java   |     7 -
 .../internal/GridAffinityP2PSelfTest.java       |     2 -
 .../ignite/internal/GridAffinitySelfTest.java   |     4 +-
 ...chePartitionExchangeManagerHistSizeTest.java |     2 -
 .../ignite/internal/GridDiscoverySelfTest.java  |    44 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |    90 +-
 .../GridJobMasterLeaveAwareSelfTest.java        |     2 +
 .../internal/GridJobServicesAddNodeTest.java    |   167 +
 .../internal/GridJobStealingSelfTest.java       |     9 +-
 .../GridKernalConcurrentAccessStopSelfTest.java |     6 -
 .../internal/GridListenActorSelfTest.java       |     5 -
 .../apache/ignite/internal/GridMBeansTest.java  |    86 +
 .../internal/GridMultipleJobsSelfTest.java      |     8 -
 .../GridMultithreadedJobStealingSelfTest.java   |   176 +-
 .../ignite/internal/GridNodeFilterSelfTest.java |    10 -
 .../ignite/internal/GridNodeLocalSelfTest.java  |    23 +
 .../internal/GridNodeMetricsLogPdsSelfTest.java |   122 +
 .../internal/GridNodeMetricsLogSelfTest.java    |   132 +-
 .../GridProjectionForCachesSelfTest.java        |     5 -
 .../internal/GridRuntimeExceptionSelfTest.java  |     5 -
 .../internal/GridSameVmStartupSelfTest.java     |    19 +-
 .../apache/ignite/internal/GridSelfTest.java    |     5 +-
 .../ignite/internal/GridStartStopSelfTest.java  |    43 +-
 .../apache/ignite/internal/GridStartupMain.java |    58 -
 .../apache/ignite/internal/GridStartupTest.java |    71 -
 .../GridTaskExecutionContextSelfTest.java       |     5 -
 .../internal/GridTaskExecutionSelfTest.java     |     5 -
 .../internal/GridTaskJobRejectSelfTest.java     |     6 -
 .../internal/GridTaskResultCacheSelfTest.java   |    26 +-
 .../ignite/internal/GridVersionSelfTest.java    |     2 -
 ...entConnectAfterCommunicationFailureTest.java |   156 +
 .../IgniteClientReconnectAbstractTest.java      |    85 +-
 .../IgniteClientReconnectApiExceptionTest.java  |    47 +-
 .../IgniteClientReconnectAtomicsTest.java       |    30 +-
 .../IgniteClientReconnectBinaryContexTest.java  |   115 +
 .../IgniteClientReconnectCacheTest.java         |   150 +-
 .../IgniteClientReconnectCollectionsTest.java   |   143 +-
 .../IgniteClientReconnectComputeTest.java       |     6 +-
 ...eClientReconnectContinuousProcessorTest.java |    13 +-
 .../IgniteClientReconnectDelayedSpiTest.java    |   103 +
 ...IgniteClientReconnectDiscoveryStateTest.java |    22 +-
 ...niteClientReconnectFailoverAbstractTest.java |    12 +-
 .../IgniteClientReconnectServicesTest.java      |     8 +-
 .../internal/IgniteClientReconnectStopTest.java |    12 +-
 .../IgniteClientReconnectStreamerTest.java      |     4 +-
 .../ignite/internal/IgniteClientRejoinTest.java |    31 +-
 .../IgniteComputeEmptyClusterGroupTest.java     |     5 -
 .../internal/IgniteComputeJobOneThreadTest.java |    75 +
 .../IgniteComputeResultExceptionTest.java       |   186 +
 ...eConcurrentEntryProcessorAccessStopTest.java |     7 -
 ...onnectionConcurrentReserveAndRemoveTest.java |   146 +
 .../IgniteDiscoveryMassiveNodeFailTest.java     |   388 +
 .../IgniteReflectionFactorySelfTest.java        |   235 +
 .../IgniteSlowClientDetectionSelfTest.java      |    13 +-
 ...UpdateNotifierPerClusterSettingSelfTest.java |     2 -
 .../internal/LongJVMPauseDetectorTest.java      |    76 +
 .../MarshallerContextLockingSelfTest.java       |     2 +-
 .../internal/MemoryLeaksOnRestartNodeTest.java  |   111 +
 .../ignite/internal/TaskNodeRestartTest.java    |     9 +-
 .../internal/TestDelayingCommunicationSpi.java  |    63 +
 .../internal/TestRecordingCommunicationSpi.java |    69 +-
 .../TransactionMetricsMxBeanImplTest.java       |   302 +
 .../internal/TransactionsMXBeanImplTest.java    |   118 +
 .../BinaryArrayIdentityResolverSelfTest.java    |     7 -
 .../binary/BinaryFieldExtractionSelfTest.java   |    35 +
 .../binary/BinaryMarshallerSelfTest.java        |   198 +-
 .../BinaryObjectBuilderAdditionalSelfTest.java  |    55 +-
 ...naryObjectBuilderDefaultMappersSelfTest.java |     5 -
 .../binary/BinaryObjectExceptionSelfTest.java   |    41 +
 .../BinaryObjectTypeCompatibilityTest.java      |   180 +
 .../BinarySerialiedFieldComparatorSelfTest.java |     7 -
 .../internal/binary/BinaryTreeSelfTest.java     |   275 +-
 .../binary/GridBinaryAffinityKeySelfTest.java   |     5 -
 ...GridBinaryMarshallerCtxDisabledSelfTest.java |    12 +
 .../binary/TestCachingMetadataHandler.java      |    11 +-
 .../streams/BinaryAbstractOutputStreamTest.java |   105 +
 .../FullyConnectedComponentSearcherTest.java    |   330 +
 .../commandline/CommandHandlerParsingTest.java  |   472 +
 ...ByteBufferStreamImplV2ByteOrderSelfTest.java |   404 +-
 .../managers/IgniteDiagnosticMessagesTest.java  |     5 +-
 .../IgniteCommunicationBalanceTest.java         |    13 +
 .../IgniteCommunicationSslBalanceTest.java      |    28 +
 .../communication/IgniteIoTestMessagesTest.java |     7 -
 .../IgniteVariousConnectionNumberTest.java      |     7 -
 .../GridDeploymentMessageCountSelfTest.java     |    11 +-
 .../GridDiscoveryManagerAliveCacheSelfTest.java |    16 +-
 .../GridDiscoveryManagerAttributesSelfTest.java |    53 +-
 .../OptimizedMarshallerPooledSelfTest.java      |     2 -
 .../optimized/OptimizedMarshallerTest.java      |    74 +
 .../OptimizedObjectStreamSelfTest.java          |   204 +-
 .../pagemem/impl/PageIdUtilsSelfTest.java       |     3 +-
 .../pagemem/impl/PageMemoryNoLoadSelfTest.java  |    30 +-
 .../GridCacheTxLoadFromStoreOnLockSelfTest.java |     5 -
 .../GridAffinityProcessorAbstractSelfTest.java  |     9 +-
 .../GridAffinityProcessorMemoryLeakTest.java    |   202 +
 .../Authentication1kUsersNodeRestartTest.java   |   108 +
 .../AuthenticationConfigurationClusterTest.java |   205 +
 .../AuthenticationOnNotActiveClusterTest.java   |   123 +
 .../AuthenticationProcessorNPEOnStartTest.java  |    91 +
 .../AuthenticationProcessorNodeRestartTest.java |   400 +
 .../AuthenticationProcessorSelfTest.java        |   638 +
 .../AtomicCacheAffinityConfigurationTest.java   |     7 +-
 ...ataRegistrationInsideEntryProcessorTest.java |   141 +
 .../cache/CacheAffinityCallSelfTest.java        |     5 -
 .../cache/CacheClientStoreSelfTest.java         |     4 +-
 .../processors/cache/CacheComparatorTest.java   |    48 +
 .../cache/CacheConfigurationLeakTest.java       |    15 +-
 .../cache/CacheConnectionLeakStoreTxTest.java   |   286 +
 .../cache/CacheDataRegionConfigurationTest.java |   342 +
 .../cache/CacheDeferredDeleteQueueTest.java     |     8 +-
 .../CacheDeferredDeleteSanitySelfTest.java      |     5 -
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java |     9 +-
 .../cache/CacheEntryProcessorCopySelfTest.java  |    11 +-
 .../cache/CacheEnumOperationsAbstractTest.java  |     7 -
 ...CacheExchangeMessageDuplicatedStateTest.java |    43 +-
 .../cache/CacheGetEntryAbstractTest.java        |     2 +-
 ...tEntryPessimisticRepeatableReadSeltTest.java |     6 +-
 .../CacheGroupLocalConfigurationSelfTest.java   |   155 +
 .../cache/CacheGroupMetricsMBeanTest.java       |   369 +
 .../cache/CacheGroupsMetricsRebalanceTest.java  |   191 +-
 ...erceptorPartitionCounterLocalSanityTest.java |     7 -
 ...torPartitionCounterRandomOperationsTest.java |     9 +-
 .../cache/CacheKeepBinaryTransactionTest.java   |     7 -
 .../CacheMemoryPolicyConfigurationTest.java     |   172 -
 .../cache/CacheMetricsEntitiesCountTest.java    |   167 +
 .../CacheMetricsForClusterGroupSelfTest.java    |   132 +-
 .../cache/CacheMetricsManageTest.java           |   548 +
 .../cache/CacheNearReaderUpdateTest.java        |    33 +-
 .../cache/CacheOffheapMapEntrySelfTest.java     |     5 -
 ...cheOptimisticTransactionsWithFilterTest.java |     7 -
 .../CachePutEventListenerErrorSelfTest.java     |     5 -
 .../processors/cache/CachePutIfAbsentTest.java  |     7 -
 .../cache/CacheReadThroughRestartSelfTest.java  |     2 +-
 .../CacheRebalanceConfigValidationTest.java     |    55 +
 .../cache/CacheRebalancingSelfTest.java         |   108 +-
 .../CacheSerializableTransactionsTest.java      |    15 +-
 .../cache/CacheStopAndDestroySelfTest.java      |    79 +-
 .../CacheStoreUsageMultinodeAbstractTest.java   |     2 +-
 ...eUsageMultinodeDynamicStartAbstractTest.java |     7 -
 .../processors/cache/CacheTxFastFinishTest.java |     9 +-
 .../CacheTxNotAllowReadFromBackupTest.java      |     7 -
 .../cache/CacheValidatorMetricsTest.java        |   116 +
 .../cache/ClusterStateAbstractTest.java         |   129 +-
 .../cache/ConcurrentCacheStartTest.java         |    67 +
 .../processors/cache/CrossCacheLockTest.java    |     7 -
 .../cache/CrossCacheTxRandomOperationsTest.java |     7 -
 .../DataStorageConfigurationValidationTest.java |    75 +
 .../EntryVersionConsistencyReadThroughTest.java |     7 -
 ...idAbstractCacheInterceptorRebalanceTest.java |     2 +-
 ...ridCacheAbstractByteArrayValuesSelfTest.java |     5 -
 .../cache/GridCacheAbstractFullApiSelfTest.java |    89 +-
 .../GridCacheAbstractLocalStoreSelfTest.java    |    54 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   476 +-
 .../GridCacheAbstractRemoveFailureTest.java     |    84 +-
 .../cache/GridCacheAbstractSelfTest.java        |    10 +-
 .../cache/GridCacheAffinityMapperSelfTest.java  |     5 -
 .../cache/GridCacheAffinityRoutingSelfTest.java |    10 -
 .../cache/GridCacheClearSelfTest.java           |     5 -
 .../GridCacheConcurrentTxMultiNodeLoadTest.java |   844 ++
 .../GridCacheConcurrentTxMultiNodeTest.java     |   845 --
 ...idCacheConfigurationConsistencySelfTest.java |    52 +
 ...ridCacheConfigurationValidationSelfTest.java |     7 -
 .../cache/GridCacheEntryMemorySizeSelfTest.java |    16 +-
 ...CacheFullTextQueryMultithreadedSelfTest.java |    15 +-
 .../GridCacheInterceptorAbstractSelfTest.java   |    12 +-
 .../processors/cache/GridCacheLeakTest.java     |     9 +-
 .../GridCacheMarshallingNodeJoinSelfTest.java   |     5 -
 .../cache/GridCacheMvccManagerSelfTest.java     |     1 -
 .../cache/GridCacheNestedTxAbstractTest.java    |     5 -
 .../GridCacheOnCopyFlagAbstractSelfTest.java    |     6 +-
 .../GridCacheOrderedPreloadingSelfTest.java     |     8 +-
 .../cache/GridCachePartitionedGetSelfTest.java  |     5 -
 .../GridCachePreloadingEvictionsSelfTest.java   |    21 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |     2 -
 ...ridCacheQuerySqlFieldInlineSizeSelfTest.java |   160 +
 ...ridCacheReplicatedSynchronousCommitTest.java |     4 +-
 ...ridCacheStoreManagerDeserializationTest.java |     4 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   126 +-
 ...cheTransactionalAbstractMetricsSelfTest.java |    87 +-
 .../cache/GridCacheTtlManagerLoadTest.java      |     6 +-
 ...idCacheValueConsistencyAbstractSelfTest.java |     6 +-
 .../GridCacheVersionTopologyChangeTest.java     |     2 +-
 ...StorageConfigurationConsistencySelfTest.java |    79 +
 .../cache/GridEvictionPolicyMBeansTest.java     |   117 +
 ...ProjectionForCachesOnDaemonNodeSelfTest.java |     7 +-
 ...IgniteAbstractDynamicCacheStartFailTest.java |   786 ++
 .../cache/IgniteCacheAbstractTest.java          |    14 +-
 ...IgniteCacheBinaryEntryProcessorSelfTest.java |     7 -
 .../IgniteCacheBinaryObjectsScanSelfTest.java   |    11 +-
 ...acheBinaryObjectsScanWithEventsSelfTest.java |    30 +
 .../IgniteCacheConfigVariationsFullApiTest.java |    12 +-
 ...niteCacheCopyOnReadDisabledAbstractTest.java |    10 +-
 .../cache/IgniteCacheDynamicStopSelfTest.java   |     9 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |    23 +-
 ...niteCacheEntryListenerExpiredEventsTest.java |     7 -
 .../IgniteCacheEntryProcessorCallTest.java      |    12 +-
 ...niteCacheExpireAndUpdateConsistencyTest.java |     7 -
 .../processors/cache/IgniteCacheGroupsTest.java |    89 +-
 .../cache/IgniteCacheIncrementTxTest.java       |     7 -
 .../cache/IgniteCacheInvokeAbstractTest.java    |   183 +
 ...gniteCacheInvokeReadThroughAbstractTest.java |     7 -
 .../cache/IgniteCacheNearLockValueSelfTest.java |     9 +-
 .../cache/IgniteCacheNoSyncForGetTest.java      |     7 -
 .../cache/IgniteCacheObjectPutSelfTest.java     |     5 -
 .../IgniteCacheP2pUnmarshallingErrorTest.java   |    11 +
 .../cache/IgniteCachePeekModesAbstractTest.java |     8 +-
 .../cache/IgniteCachePutAllRestartTest.java     |     2 -
 .../IgniteCachePutStackOverflowSelfTest.java    |     5 -
 .../IgniteCacheReadThroughStoreCallTest.java    |     4 +-
 .../cache/IgniteCacheSerializationSelfTest.java |     7 -
 .../cache/IgniteCacheStartStopLoadTest.java     |    10 +-
 .../cache/IgniteCacheStoreCollectionTest.java   |     7 -
 .../IgniteCacheStoreValueAbstractTest.java      |    15 +-
 .../IgniteCacheTopologySafeGetSelfTest.java     |   222 -
 ...IgniteClientCacheInitializationFailTest.java |    86 +-
 .../IgniteClientCacheStartFailoverTest.java     |     6 +-
 .../IgniteClusterActivateDeactivateTest.java    |   456 +-
 ...erActivateDeactivateTestWithPersistence.java |   231 +-
 ...tivateTestWithPersistenceAndMemoryReuse.java |    40 +
 .../IgniteDaemonNodeMarshallerCacheTest.java    |     3 +-
 .../cache/IgniteDynamicCacheMultinodeTest.java  |   164 +
 ...ynamicCacheStartCoordinatorFailoverTest.java |   262 +
 .../cache/IgniteDynamicCacheStartFailTest.java  |    46 +
 ...ynamicCacheStartFailWithPersistenceTest.java |    91 +
 .../cache/IgniteDynamicCacheStartSelfTest.java  |    41 +-
 ...niteDynamicCacheStartStopConcurrentTest.java |     7 -
 .../cache/IgniteInternalCacheTypesTest.java     |     7 -
 ...iteMarshallerCacheClassNameConflictTest.java |    10 +-
 .../IgniteMarshallerCacheFSRestoreTest.java     |    81 +-
 .../IgniteOnePhaseCommitNearReadersTest.java    |     2 +-
 .../cache/IgniteOutOfMemoryPropagationTest.java |   247 +
 .../IgniteStartCacheInTransactionSelfTest.java  |    30 +-
 .../cache/IgniteSystemCacheOnClientTest.java    |     7 -
 ...gniteTopologyValidatorAbstractCacheTest.java |     2 +-
 ...opologyValidatorCacheGroupsAbstractTest.java |     2 +-
 ...niteTopologyValidatorGridSplitCacheTest.java |   549 +-
 .../processors/cache/IgniteTxAbstractTest.java  |     7 -
 .../cache/IgniteTxConfigCacheSelfTest.java      |    19 +-
 .../processors/cache/MapCacheStoreStrategy.java |     4 +-
 .../cache/MemoryPolicyConfigValidationTest.java |    42 +-
 ...AffinityCoordinatorDynamicStartStopTest.java |    17 +-
 ...heapCacheMetricsForClusterGroupSelfTest.java |    24 +-
 ...titionedAtomicCacheGetsDistributionTest.java |    49 +
 ...onalOptimisticCacheGetsDistributionTest.java |    46 +
 ...nalPessimisticCacheGetsDistributionTest.java |    33 +
 ...rtitionsExchangeCoordinatorFailoverTest.java |   155 +
 ...sExchangeOnDiscoveryHistoryOverflowTest.java |     2 +-
 ...plicatedAtomicCacheGetsDistributionTest.java |   366 +
 ...onalOptimisticCacheGetsDistributionTest.java |    46 +
 ...nalPessimisticCacheGetsDistributionTest.java |    33 +
 .../SetTxTimeoutOnPartitionMapExchangeTest.java |   332 +
 .../cache/WalModeChangeAbstractSelfTest.java    |   275 +
 .../cache/WalModeChangeAdvancedSelfTest.java    |   518 +
 .../WalModeChangeCommonAbstractSelfTest.java    |   369 +
 ...hangeCoordinatorNotAffinityNodeSelfTest.java |    30 +
 .../processors/cache/WalModeChangeSelfTest.java |    30 +
 .../binary/BinaryMetadataUpdatesFlowTest.java   |    60 +-
 .../CacheKeepBinaryWithInterceptorTest.java     |     7 -
 ...yAtomicEntryProcessorDeploymentSelfTest.java |     2 +-
 ...naryObjectMetadataExchangeMultinodeTest.java |     2 +
 ...naryObjectsAbstractDataStreamerSelfTest.java |    19 +-
 ...aryObjectsAbstractMultiThreadedSelfTest.java |    23 +-
 .../GridCacheBinaryObjectsAbstractSelfTest.java |    33 +-
 .../GridCacheBinaryStoreAbstractSelfTest.java   |     9 +-
 ...ntNodeBinaryObjectMetadataMultinodeTest.java |     2 +-
 ...eAbstractDataStructuresFailoverSelfTest.java |   203 +-
 .../GridCacheQueueClientDisconnectTest.java     |   127 +
 .../GridCacheSequenceApiSelfAbstractTest.java   |    21 +-
 .../GridCacheSetAbstractSelfTest.java           |    65 +-
 .../GridCacheSetFailoverAbstractSelfTest.java   |     6 +-
 .../IgniteAtomicsAbstractTest.java              |     4 -
 .../IgniteClientDataStructuresAbstractTest.java |   156 +-
 .../IgniteCollectionAbstractTest.java           |    16 +-
 .../IgniteCountDownLatchAbstractSelfTest.java   |    10 +-
 .../IgniteDataStructureUniqueNameTest.java      |     5 +
 .../IgniteDataStructureWithJobTest.java         |    17 +-
 ...ExchangeLatchManagerCoordinatorFailTest.java |   260 +
 .../IgniteSequenceInternalCleanupTest.java      |   147 +
 .../SemaphoreFailoverNoWaitingAcquirerTest.java |   134 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |     4 -
 ...chePartitionedAtomicSetFailoverSelfTest.java |     2 +-
 ...rtitionedDataStructuresFailoverSelfTest.java |    14 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |     2 -
 .../IgnitePartitionedSetNoBackupsSelfTest.java  |     2 +-
 ...eplicatedDataStructuresFailoverSelfTest.java |    28 +
 .../distributed/Cache64kPartitionsTest.java     |    96 +
 .../distributed/CacheAsyncOperationsTest.java   |     7 -
 .../distributed/CacheBaselineTopologyTest.java  |  1021 ++
 .../CacheDataLossOnPartitionMoveTest.java       |   296 +
 .../distributed/CacheExchangeMergeTest.java     |  1579 +++
 .../CacheGetFutureHangsSelfTest.java            |     7 -
 .../CacheGetInsideLockChangingTopologyTest.java |    14 +-
 .../CacheLateAffinityAssignmentTest.java        |   787 +-
 ...CacheLoadingConcurrentGridStartSelfTest.java |    36 +-
 .../CacheLockReleaseNodeLeaveTest.java          |    15 +-
 ...NearDisabledAtomicInvokeRestartSelfTest.java |     2 +-
 ...abledTransactionalInvokeRestartSelfTest.java |     2 +-
 .../CachePageWriteLockUnlockTest.java           |   196 +
 .../distributed/CachePartitionStateTest.java    |   422 +
 .../CachePutAllFailoverAbstractTest.java        |    35 +-
 .../CacheRentingStateRepairTest.java            |   189 +
 .../cache/distributed/CacheStartOnJoinTest.java |    13 +-
 .../CacheTryLockMultithreadedTest.java          |     7 -
 ...ncurrentGridStartSelfTestAllowOverwrite.java |    33 +
 ...tractDistributedByteArrayValuesSelfTest.java |     2 -
 .../GridCacheAbstractJobExecutionTest.java      |     5 -
 .../GridCacheAbstractNodeRestartSelfTest.java   |    15 +-
 .../GridCacheAbstractPrimarySyncSelfTest.java   |     5 -
 .../GridCacheBasicOpAbstractTest.java           |     2 -
 .../distributed/GridCacheEventAbstractTest.java |    82 +-
 .../distributed/GridCacheLockAbstractTest.java  |     5 -
 .../distributed/GridCacheMixedModeSelfTest.java |     5 -
 .../GridCacheMultiNodeAbstractTest.java         |     2 -
 .../GridCacheMultiNodeLockAbstractTest.java     |     2 -
 .../GridCacheNodeFailureAbstractTest.java       |     8 +-
 ...titionEvictionDuringReadThroughSelfTest.java |    60 +-
 ...chePartitionedReloadAllAbstractSelfTest.java |     8 +-
 ...GridCachePreloadRestartAbstractSelfTest.java |     5 -
 ...yMetadataUpdateChangingTopologySelfTest.java |     5 -
 ...niteBinaryMetadataUpdateNodeRestartTest.java |     4 -
 .../distributed/IgniteCache150ClientsTest.java  |    10 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   103 +-
 ...teCacheClientNodePartitionsExchangeTest.java |    54 +-
 .../IgniteCacheClientReconnectTest.java         |   180 +-
 .../IgniteCacheConnectionRecoveryTest.java      |     7 -
 .../distributed/IgniteCacheCreatePutTest.java   |     2 +-
 .../IgniteCacheFailedUpdateResponseTest.java    |   310 +
 .../distributed/IgniteCacheGetRestartTest.java  |     4 -
 .../distributed/IgniteCacheManyClientsTest.java |    51 +-
 .../IgniteCacheMessageRecoveryAbstractTest.java |     5 -
 ...eCacheMessageRecoveryIdleConnectionTest.java |     7 -
 .../IgniteCacheMessageWriteTimeoutTest.java     |     4 +-
 .../IgniteCacheNearRestartRollbackSelfTest.java |     2 -
 .../IgniteCachePartitionLossPolicySelfTest.java |   342 +-
 .../distributed/IgniteCachePrimarySyncTest.java |     7 -
 .../IgniteCacheReadFromBackupTest.java          |     7 -
 .../IgniteCacheSingleGetMessageTest.java        |     7 -
 .../IgniteCacheSystemTransactionsSelfTest.java  |    18 +
 .../IgniteCacheThreadLocalTxTest.java           |   223 +
 .../IgniteCacheTxIteratorSelfTest.java          |    14 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |     2 -
 ...ptimisticTxSuspendResumeMultiServerTest.java |    30 +
 .../IgniteOptimisticTxSuspendResumeTest.java    |   810 ++
 .../IgnitePessimisticTxSuspendResumeTest.java   |    91 +
 .../IgniteRejectConnectOnNodeStopTest.java      |     7 +-
 .../IgniteTxCachePrimarySyncTest.java           |     7 -
 ...teSynchronizationModesMultithreadedTest.java |     4 -
 ...cOriginatingNodeFailureAbstractSelfTest.java |     2 +-
 .../IgniteTxRemoveTimeoutObjectsNearTest.java   |    30 +
 .../IgniteTxRemoveTimeoutObjectsTest.java       |   214 +
 .../IgniteTxTimeoutAbstractTest.java            |     2 -
 .../TestCacheNodeExcludingFilter.java           |    53 +
 ...achePartitionPartialCountersMapSelfTest.java |    57 +
 ...heAbstractTransformWriteThroughSelfTest.java |     2 -
 ...dCacheColocatedTxSingleThreadedSelfTest.java |     1 -
 .../dht/GridCacheDhtEntrySelfTest.java          |     5 -
 ...GridCacheDhtEvictionNearReadersSelfTest.java |     7 -
 .../GridCacheDhtEvictionsDisabledSelfTest.java  |     4 +-
 .../dht/GridCacheDhtMappingSelfTest.java        |     7 -
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |     3 +-
 .../GridCacheDhtPreloadDisabledSelfTest.java    |     1 +
 .../GridCacheDhtPreloadMessageCountTest.java    |     1 -
 ...ridCacheDhtPreloadMultiThreadedSelfTest.java |     7 +
 .../dht/GridCacheDhtPreloadSelfTest.java        |    79 +-
 .../GridCacheDhtPreloadStartStopSelfTest.java   |     4 +-
 .../dht/GridCacheGlobalLoadTest.java            |     6 +-
 ...ridCachePartitionedUnloadEventsSelfTest.java |    26 +-
 .../GridCachePartitionsStateValidationTest.java |   322 +
 ...idCachePartitionsStateValidatorSelfTest.java |   177 +
 .../dht/GridCacheTxNodeFailureSelfTest.java     |     2 +-
 ...gniteAtomicLongChangingTopologySelfTest.java |    18 +
 .../IgniteCacheCommitDelayTxRecoveryTest.java   |     7 -
 .../IgniteCacheCrossCacheTxFailoverTest.java    |     7 -
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |     9 -
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   113 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    |     4 -
 .../dht/IgniteCacheStartWithLoadTest.java       |   165 +
 .../IgniteCacheTopologySplitAbstractTest.java   |   279 +
 .../dht/IgniteCacheTxRecoveryRollbackTest.java  |     2 +-
 .../dht/IgniteCrossCacheTxSelfTest.java         |    13 +-
 .../dht/NotMappedPartitionInTxTest.java         |   264 +
 .../dht/TxRecoveryStoreEnabledTest.java         |    18 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |    38 +-
 .../atomic/IgniteCacheAtomicProtocolTest.java   |     1 +
 ...ionedMultiNodeLongTxTimeout2FullApiTest.java |    34 +
 ...AtomicPartitionedTckMetricsSelfTestImpl.java |     4 +
 .../GridCacheNearAtomicMetricsSelfTest.java     |    71 +
 .../near/GridCacheNearClientHitTest.java        |   154 +
 .../GridCacheNearEvictionEventSelfTest.java     |     5 -
 .../near/GridCacheNearMetricsSelfTest.java      |   392 +-
 .../near/GridCacheNearMultiGetSelfTest.java     |     6 -
 .../near/GridCacheNearMultiNodeSelfTest.java    |     8 -
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |     5 +-
 .../near/GridCacheNearTxForceKeyTest.java       |     7 -
 .../near/GridCacheNearTxMultiNodeSelfTest.java  |     2 +-
 .../GridCachePartitionedAffinitySelfTest.java   |     5 -
 ...ePartitionedBasicStoreMultiNodeSelfTest.java |     2 -
 ...titionedExplicitLockNodeFailureSelfTest.java |     3 +-
 ...ePartitionedMultiThreadedPutGetSelfTest.java |     5 -
 .../GridCachePartitionedTxSalvageSelfTest.java  |    16 +-
 ...achePartitionedTxSingleThreadedSelfTest.java |     1 -
 .../near/GridNearCacheStoreUpdateTest.java      |     8 +-
 .../near/NearCacheMultithreadedUpdateTest.java  |     7 -
 .../near/NoneRebalanceModeSelfTest.java         |     9 +-
 .../rebalancing/CacheManualRebalancingTest.java |     5 -
 ...cingDelayedPartitionMapExchangeSelfTest.java |    62 +-
 .../GridCacheRebalancingAsyncSelfTest.java      |     7 +-
 .../GridCacheRebalancingCancelTest.java         |   106 +
 .../GridCacheRebalancingOrderingTest.java       |     9 +-
 ...idCacheRebalancingPartitionCountersTest.java |   181 +
 .../GridCacheRebalancingSyncCheckDataTest.java  |     8 -
 .../GridCacheRebalancingSyncSelfTest.java       |   160 +-
 ...idCacheRebalancingWithAsyncClearingTest.java |   238 +
 ...ridCacheReplicatedEventDisabledSelfTest.java |    75 +
 ...ReplicatedFullApiMultithreadedSelfTest1.java |  1980 ---
 .../GridCacheReplicatedPreloadSelfTest.java     |     7 +
 .../cache/eviction/DhtAndNearEvictionTest.java  |   189 +
 .../cache/eviction/EvictionAbstractTest.java    |     2 -
 .../EvictionPolicyFactoryAbstractTest.java      |  1071 ++
 .../fifo/FifoEvictionPolicyFactorySelfTest.java |   261 +
 .../lru/LruEvictionPolicyFactorySelfTest.java   |   352 +
 .../paged/PageEvictionAbstractTest.java         |    29 +-
 .../paged/PageEvictionDataStreamerTest.java     |    65 +
 .../eviction/paged/PageEvictionMetricTest.java  |    69 +
 .../PageEvictionMultinodeAbstractTest.java      |   123 +
 .../PageEvictionMultinodeMixedRegionsTest.java  |    60 +
 .../paged/PageEvictionMultinodeTest.java        |   128 -
 ...ageEvictionPagesRecyclingAndReusingTest.java |   153 +
 .../PageEvictionWithRebalanceAbstractTest.java  |    81 +
 .../paged/PageEvictionWithRebalanceTest.java    |    81 -
 .../Random2LruPageEvictionMultinodeTest.java    |     2 +-
 ...Random2LruPageEvictionWithRebalanceTest.java |     2 +-
 .../RandomLruPageEvictionMultinodeTest.java     |     2 +-
 .../RandomLruPageEvictionWithRebalanceTest.java |     2 +-
 .../SortedEvictionPolicyFactorySelfTest.java    |   264 +
 .../SortedEvictionPolicyPerformanceTest.java    |    13 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |     2 +-
 .../IgniteCacheExpiryPolicyTestSuite.java       |     6 +-
 ...eCacheExpiryPolicyWithStoreAbstractTest.java |     3 +-
 .../expiry/IgniteCacheLargeValueExpireTest.java |     6 +-
 .../expiry/IgniteCacheTtlCleanupSelfTest.java   |    87 -
 .../IgniteCacheLoadAllAbstractTest.java         |     6 +-
 .../IgniteCacheLoaderWriterAbstractTest.java    |     4 +-
 ...acheStoreSessionWriteBehindAbstractTest.java |     2 +-
 ...TxStoreSessionWriteBehindCoalescingTest.java |     2 +-
 ...dCacheAtomicLocalTckMetricsSelfTestImpl.java |     4 +
 .../GridCacheLocalByteArrayValuesSelfTest.java  |     2 -
 .../local/GridCacheLocalFullApiSelfTest.java    |    76 +-
 .../GridCacheLocalTxMultiThreadedSelfTest.java  |     2 +-
 ...AtomicClientOnlyMultiJvmFullApiSelfTest.java |     2 +-
 ...tOnlyMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...pyOnReadDisabledMultiJvmFullApiSelfTest.java |     2 +-
 .../GridCacheAtomicMultiJvmFullApiSelfTest.java |     2 +-
 ...tomicMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...tomicNearEnabledMultiJvmFullApiSelfTest.java |     2 +-
 ...heAtomicNearOnlyMultiJvmFullApiSelfTest.java |     2 +-
 ...rOnlyMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...ridCacheNearOnlyMultiJvmFullApiSelfTest.java |     2 +-
 ...rOnlyMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...pyOnReadDisabledMultiJvmFullApiSelfTest.java |     2 +-
 ...CachePartitionedMultiJvmFullApiSelfTest.java |     2 +-
 ...ionedMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...onedNearDisabledMultiJvmFullApiSelfTest.java |     2 +-
 ...abledMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...ReplicatedAtomicMultiJvmFullApiSelfTest.java |     2 +-
 ...dCacheReplicatedMultiJvmFullApiSelfTest.java |     2 +-
 ...catedMultiJvmP2PDisabledFullApiSelfTest.java |     2 +-
 ...plicatedNearOnlyMultiJvmFullApiSelfTest.java |     2 +-
 ...vccAbstractBasicCoordinatorFailoverTest.java |   678 +
 ...acheMvccAbstractCoordinatorFailoverTest.java |   127 +
 .../mvcc/CacheMvccAbstractFeatureTest.java      |   299 +
 .../cache/mvcc/CacheMvccAbstractTest.java       |  2347 ++++
 .../cache/mvcc/CacheMvccClusterRestartTest.java |   176 +
 .../CacheMvccConfigurationValidationTest.java   |   365 +
 ...ccIteratorWithConcurrentTransactionTest.java |    64 +
 ...calEntriesWithConcurrentTransactionTest.java |    65 +
 .../mvcc/CacheMvccOperationChecksTest.java      |   201 +
 ...eMvccPartitionedCoordinatorFailoverTest.java |   144 +
 .../mvcc/CacheMvccProcessorLazyStartTest.java   |   175 +
 .../cache/mvcc/CacheMvccProcessorTest.java      |   101 +
 ...heMvccReplicatedCoordinatorFailoverTest.java |    30 +
 ...cScanQueryWithConcurrentTransactionTest.java |    76 +
 ...heMvccSizeWithConcurrentTransactionTest.java |    52 +
 .../cache/mvcc/CacheMvccTransactionsTest.java   |  3628 ++++++
 .../cache/mvcc/CacheMvccVacuumTest.java         |   184 +
 .../cache/persistence/DummyPageIO.java          |    41 +
 ...eBaselineAffinityTopologyActivationTest.java |  1200 ++
 .../IgniteDataStorageMetricsSelfTest.java       |   237 +
 ...PdsAtomicCacheHistoricalRebalancingTest.java |    64 +
 ...tePdsBinaryMetadataOnClusterRestartTest.java |   282 +-
 .../IgnitePdsBinarySortObjectFieldsTest.java    |   150 +
 ...gnitePdsCacheAssignmentNodeRestartsTest.java |   261 +
 ...heConfigurationFileConsistencyCheckTest.java |   289 +
 ...cheObjectBinaryProcessorOnDiscoveryTest.java |   125 +
 .../IgnitePdsCacheRebalancingAbstractTest.java  |   598 +-
 .../IgnitePdsClientNearCachePutGetTest.java     |    31 +-
 .../IgnitePdsContinuousRestartTest.java         |   158 +-
 ...dsContinuousRestartTestWithExpiryPolicy.java |    67 +
 ...ousRestartTestWithSharedGroupAndIndexes.java |    67 +
 .../IgnitePdsCorruptedIndexTest.java            |   340 +
 .../IgnitePdsCorruptedStoreTest.java            |   489 +
 .../IgnitePdsDestroyCacheAbstractTest.java      |   207 +
 .../persistence/IgnitePdsDestroyCacheTest.java  |    85 +
 ...tePdsDestroyCacheWithoutCheckpointsTest.java |    86 +
 .../persistence/IgnitePdsDynamicCacheTest.java  |    74 +-
 .../IgnitePdsExchangeDuringCheckpointTest.java  |   134 +
 ...MarshallerMappingRestoreOnNodeStartTest.java |   117 +
 .../IgnitePdsMultiNodePutGetRestartTest.java    |   256 -
 .../persistence/IgnitePdsPageSizesTest.java     |    36 +-
 .../IgnitePdsPartitionFilesDestroyTest.java     |   472 +
 ...gnitePdsRecoveryAfterFileCorruptionTest.java |   166 +-
 .../IgnitePdsRemoveDuringRebalancingTest.java   |    44 +-
 ...gnitePdsSingleNodePutGetPersistenceTest.java |    20 +-
 .../persistence/IgnitePdsTaskCancelingTest.java |   345 +
 .../IgnitePdsTxCacheRebalancingTest.java        |     1 -
 .../IgnitePdsTxHistoricalRebalancingTest.java   |    64 +
 .../IgnitePersistenceMetricsSelfTest.java       |   225 -
 ...nitePersistenceSequentialCheckpointTest.java |    42 +
 .../IgnitePersistentStoreCacheGroupsTest.java   |    55 +-
 ...IgnitePersistentStoreDataStructuresTest.java |    72 +-
 ...teRebalanceScheduleResendPartitionsTest.java |   289 +
 ...hangeDuringRebalanceOnNonNodeAssignTest.java |   170 +
 ...lWalModeChangeDuringRebalancingSelfTest.java |   673 +
 .../MemoryPolicyInitializationTest.java         |    41 +-
 .../PersistenceDirectoryWarningLoggingTest.java |    87 +
 ...lientAffinityAssignmentWithBaselineTest.java |   974 ++
 ...niteAbsentEvictionNodeOutOfBaselineTest.java |   106 +
 ...teAllBaselineNodesOnlineFullApiSelfTest.java |    35 +
 .../IgniteBaselineAbstractFullApiSelfTest.java  |    61 +
 ...gingBaselineDownCachePutAllFailoverTest.java |   125 +
 ...gingBaselineDownCacheRemoveFailoverTest.java |   155 +
 ...angingBaselineUpCachePutAllFailoverTest.java |   120 +
 ...angingBaselineUpCacheRemoveFailoverTest.java |   152 +
 ...gniteOfflineBaselineNodeFullApiSelfTest.java |    39 +
 ...eOnlineNodeOutOfBaselineFullApiSelfTest.java |    37 +
 ...teStableBaselineCachePutAllFailoverTest.java |   103 +
 ...teStableBaselineCacheRemoveFailoverTest.java |   129 +
 .../db/CheckpointBufferDeadlockTest.java        |   383 +
 .../db/IgnitePdsCacheRestoreTest.java           |   229 +
 .../db/IgnitePdsDataRegionMetricsTest.java      |   343 +
 .../db/IgnitePdsMultiNodePutGetRestartTest.java |    27 +-
 ...PdsPageEvictionDuringPartitionClearTest.java |    33 +-
 .../db/IgnitePdsPageEvictionTest.java           |    35 +-
 ...tePdsRebalancingOnNotStableTopologyTest.java |    32 +-
 .../db/IgnitePdsReserveWalSegmentsTest.java     |   188 +
 ...PdsReserveWalSegmentsWithCompactionTest.java |    34 +
 .../db/IgnitePdsTransactionsHangTest.java       |    50 +-
 .../db/IgnitePdsWholeClusterRestartTest.java    |    40 +-
 .../persistence/db/IgnitePdsWithTtlTest.java    |   246 +
 ...SlowHistoricalRebalanceSmallHistoryTest.java |   242 +
 ...gniteCheckpointDirtyPagesForLowLoadTest.java |   209 +
 .../checkpoint/IgniteMassLoadSandboxTest.java   |   617 +
 .../db/checkpoint/ProgressWatchdog.java         |   495 +
 ...faultPageSizeBackwardsCompatibilityTest.java |   136 +
 ...nitePdsCacheDestroyDuringCheckpointTest.java |   149 +
 .../db/file/IgnitePdsCacheIntegrationTest.java  |    34 +-
 .../db/file/IgnitePdsCheckpointSimpleTest.java  |   100 +
 ...ckpointSimulationWithRealCpDisabledTest.java |   190 +-
 .../file/IgnitePdsDiskErrorsRecoveringTest.java |   520 +
 .../db/file/IgnitePdsEvictionTest.java          |   299 -
 .../file/IgnitePdsNoActualWalHistoryTest.java   |    27 +-
 .../db/file/IgnitePdsPageReplacementTest.java   |   327 +
 .../file/IgnitePdsThreadInterruptionTest.java   |   259 +
 .../IgniteUidAsConsistentIdMigrationTest.java   |   709 ++
 .../IgniteNodeStoppedDuringDisableWALTest.java  |   262 +
 .../persistence/db/wal/IgnitePdsWalTlbTest.java |   136 -
 ...IsReachedDuringIterationOverArchiveTest.java |   246 +
 .../wal/IgniteWalFlushBackgroundSelfTest.java   |    35 +
 ...alFlushBackgroundWithMmapBufferSelfTest.java |    28 +
 .../db/wal/IgniteWalFlushFailoverTest.java      |   112 +-
 .../db/wal/IgniteWalFlushFsyncSelfTest.java     |    35 +
 ...alFlushFsyncWithDedicatedWorkerSelfTest.java |    39 +
 ...niteWalFlushFsyncWithMmapBufferSelfTest.java |    28 +
 .../db/wal/IgniteWalFlushLogOnlySelfTest.java   |    35 +
 ...teWalFlushLogOnlyWithMmapBufferSelfTest.java |    28 +
 ...lFlushMultiNodeFailoverAbstractSelfTest.java |   287 +
 .../db/wal/IgniteWalFormatFileFailoverTest.java |   258 +
 .../wal/IgniteWalHistoryReservationsTest.java   |   237 +-
 ...gniteWalIteratorExceptionDuringReadTest.java |   150 +
 .../wal/IgniteWalIteratorSwitchSegmentTest.java |   511 +
 .../db/wal/IgniteWalRebalanceTest.java          |   648 +
 .../db/wal/IgniteWalRecoveryPPCTest.java        |   321 +
 .../IgniteWalRecoverySeveralRestartsTest.java   |    33 +-
 .../db/wal/IgniteWalRecoveryTest.java           |  1382 --
 .../db/wal/IgniteWalSerializerVersionTest.java  |   324 +
 .../persistence/db/wal/WalCompactionTest.java   |   433 +
 .../db/wal/WalDeletionArchiveAbstractTest.java  |   277 +
 .../db/wal/WalDeletionArchiveFsyncTest.java     |    31 +
 .../db/wal/WalDeletionArchiveLogOnlyTest.java   |    31 +
 .../cache/persistence/db/wal/WalPathsTest.java  |    86 +
 .../db/wal/WalRecoveryTxLogicalRecordsTest.java |   176 +-
 .../wal/WalRolloverRecordLoggingFsyncTest.java  |    32 +
 .../WalRolloverRecordLoggingLogOnlyTest.java    |    32 +
 .../db/wal/WalRolloverRecordLoggingTest.java    |   160 +
 ...IgniteAbstractWalIteratorInvalidCrcTest.java |   279 +
 .../db/wal/crc/IgniteDataIntegrityTests.java    |   104 +-
 ...iteFsyncReplayWalIteratorInvalidCrcTest.java |    31 +
 .../IgniteReplayWalIteratorInvalidCrcTest.java  |    54 +
 ...niteStandaloneWalIteratorInvalidCrcTest.java |    50 +
 .../db/wal/reader/IgniteWalReaderTest.java      |  1571 ++-
 .../db/wal/reader/IndexedObject.java            |    79 +
 .../db/wal/reader/MockWalIteratorFactory.java   |    58 +-
 .../persistence/file/FileDownloaderTest.java    |   123 +
 .../metastorage/IgniteMetaStorageBasicTest.java |   147 +
 .../pagemem/BPlusTreePageMemoryImplTest.java    |    25 +-
 .../BPlusTreeReuseListPageMemoryImplTest.java   |    26 +-
 .../pagemem/FillFactorMetricTest.java           |   234 +
 .../pagemem/FullPageIdTableTest.java            |   204 +-
 ...gnitePageMemReplaceDelayedWriteUnitTest.java |   313 +
 .../pagemem/IgniteThrottlingUnitTest.java       |   280 +
 .../pagemem/IndexStoragePageMemoryImplTest.java |    99 +
 .../MetadataStoragePageMemoryImplTest.java      |   102 -
 .../pagemem/NoOpPageStoreManager.java           |    50 +-
 .../persistence/pagemem/NoOpWALManager.java     |    56 +-
 .../pagemem/PageIdDistributionTest.java         |    10 +-
 .../pagemem/PageMemoryImplNoLoadTest.java       |    21 +-
 .../persistence/pagemem/PageMemoryImplTest.java |   245 +-
 .../pagemem/PageMemoryNoStoreLeakTest.java      |    82 +
 .../pagemem/PagesWriteThrottleSandboxTest.java  |   258 +
 .../pagemem/PagesWriteThrottleSmokeTest.java    |   328 +
 .../RobinHoodBackwardShiftHashMapTest.java      |   443 +
 .../AbstractNodeJoinTemplate.java               |    24 +-
 .../IgniteChangeGlobalStateAbstractTest.java    |    40 +-
 .../IgniteChangeGlobalStateFailOverTest.java    |     6 +-
 .../IgniteChangeGlobalStateServiceTest.java     |     2 +
 .../IgniteChangeGlobalStateTest.java            |    13 +-
 .../IgniteNoParrallelClusterIsAllowedTest.java  |   111 +
 .../IgniteStandByClusterTest.java               |    85 +-
 .../extended/GridActivateExtensionTest.java     |    40 +-
 .../extended/GridActivationAtomicCacheSuit.java |    79 -
 .../GridActivationCacheAbstractTestSuit.java    |   108 -
 .../GridActivationLocalAndNearCacheSuit.java    |    47 -
 .../GridActivationPartitionedCacheSuit.java     |    78 -
 .../GridActivationReplicatedCacheSuit.java      |    63 -
 .../join/JoinInActiveNodeToActiveCluster.java   |     4 +-
 ...gniteAbstractStandByClientReconnectTest.java |   178 +-
 .../IgniteStandByClientReconnectTest.java       |    94 +-
 ...eStandByClientReconnectToNewClusterTest.java |   117 +-
 .../persistence/tree/io/TrackingPageIOTest.java |   116 +-
 .../wal/AbstractWalDeltaConsistencyTest.java    |    96 +
 .../wal/CpTriggeredWalDeltaConsistencyTest.java |    65 +
 .../wal/ExplicitWalDeltaConsistencyTest.java    |    93 +
 .../wal/SegmentedRingByteBufferTest.java        |   785 ++
 .../wal/SysPropWalDeltaConsistencyTest.java     |    82 +
 .../persistence/wal/aware/SegmentAwareTest.java |   663 +
 .../wal/memtracker/PageMemoryTracker.java       |   806 ++
 .../PageMemoryTrackerConfiguration.java         |    69 +
 .../PageMemoryTrackerPluginProvider.java        |   200 +
 .../StandaloneWalRecordsIteratorTest.java       |   216 +
 .../cache/query/CacheScanQueryFailoverTest.java |   174 +
 .../GridCacheQueryTransformerSelfTest.java      |   125 +-
 .../IgniteCacheQueryCacheDestroySelfTest.java   |     4 +
 .../cache/query/IndexingSpiQuerySelfTest.java   |     2 -
 .../IndexingSpiQueryWithH2IndexingSelfTest.java |     2 +-
 .../ScanQueryOffheapExpiryPolicySelfTest.java   |   107 +
 .../continuous/CacheContinuousBatchAckTest.java |     7 -
 ...eContinuousQueryAsyncFailoverTxSelfTest.java |     2 +-
 ...eContinuousQueryAsyncFilterListenerTest.java |     7 -
 ...CacheContinuousQueryCounterAbstractTest.java |     9 +-
 ...acheContinuousQueryExecuteInPrimaryTest.java |     5 -
 ...usQueryFactoryFilterRandomOperationTest.java |     8 +-
 ...ContinuousQueryFailoverAbstractSelfTest.java |    17 +-
 .../CacheContinuousQueryFailoverTxSelfTest.java |     2 +-
 ...ontinuousQueryOperationFromCallbackTest.java |     7 -
 .../CacheContinuousQueryOperationP2PTest.java   |     7 -
 .../CacheContinuousQueryOrderingEventTest.java  |     7 -
 ...acheContinuousQueryRandomOperationsTest.java |   178 +-
 .../CacheContinuousQueryVariationsTest.java     |    12 +-
 ...ContinuousWithTransformerClientSelfTest.java |    40 +
 ...heContinuousWithTransformerFailoverTest.java |   309 +
 ...eContinuousWithTransformerLocalSelfTest.java |    29 +
 ...nuousWithTransformerPartitionedSelfTest.java |    29 +
 ...uousWithTransformerRandomOperationsTest.java |    31 +
 ...inuousWithTransformerReplicatedSelfTest.java |   509 +
 ...eEntryProcessorExternalizableFailedTest.java |     7 -
 .../CacheEntryProcessorNonSerializableTest.java |     7 -
 .../CacheKeepBinaryIterationTest.java           |     7 -
 .../ClientReconnectContinuousQueryTest.java     |    19 +-
 .../ContinuousQueryMarshallerTest.java          |   168 +
 .../ContinuousQueryPeerClassLoadingTest.java    |     4 +-
 ...yRemoteFilterMissingInClassPathSelfTest.java |    23 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    47 +-
 .../GridCacheContinuousQueryConcurrentTest.java |     7 -
 ...eContinuousQueryMultiNodesFilteringTest.java |     3 +-
 ...niteCacheContinuousQueryBackupQueueTest.java |     6 +-
 ...CacheContinuousQueryClientReconnectTest.java |     3 +
 ...idCacheWriteBehindStoreAbstractSelfTest.java |     2 -
 ...BehindStorePartitionedMultiNodeSelfTest.java |     2 -
 .../GridCacheWriteBehindStoreSelfTest.java      |    47 +-
 .../IgniteCacheWriteBehindNoUpdateSelfTest.java |     5 -
 .../AbstractDeadlockDetectionTest.java          |   260 +
 .../AbstractTransactionIntergrityTest.java      |   595 +
 .../transactions/AtomicOperationsInTxTest.java  |   241 +
 ...IntegrityWithPrimaryIndexCorruptionTest.java |   238 +
 ...ctionIntegrityWithSystemWorkerDeathTest.java |   106 +
 .../cache/transactions/TxDeadlockCauseTest.java |    22 +-
 .../TxDeadlockDetectionNoHangsTest.java         |     2 -
 .../transactions/TxDeadlockDetectionTest.java   |     7 -
 .../TxDeadlockDetectionUnmasrhalErrorsTest.java |     7 -
 .../cache/transactions/TxLabelTest.java         |    63 +
 .../transactions/TxMultiCacheAsyncOpsTest.java  |   133 +
 .../cache/transactions/TxOnCachesStartTest.java |   141 +
 ...timisticDeadlockDetectionCrossCacheTest.java |   147 +-
 .../TxOptimisticDeadlockDetectionTest.java      |   348 +-
 .../TxOptimisticOnPartitionExchangeTest.java    |   315 +
 ...OptimisticPrepareOnUnstableTopologyTest.java |   250 +
 ...simisticDeadlockDetectionCrossCacheTest.java |     7 -
 .../TxPessimisticDeadlockDetectionTest.java     |   265 +-
 .../TxRollbackAsyncNearCacheTest.java           |    28 +
 .../cache/transactions/TxRollbackAsyncTest.java |  1077 ++
 .../TxRollbackAsyncWithPersistenceTest.java     |    57 +
 .../TxRollbackOnIncorrectParamsTest.java        |   326 +
 .../TxRollbackOnTimeoutNearCacheTest.java       |    28 +
 ...ollbackOnTimeoutNoDeadlockDetectionTest.java |    45 +
 .../transactions/TxRollbackOnTimeoutTest.java   |  1173 ++
 .../TxRollbackOnTopologyChangeTest.java         |   212 +
 .../transactions/TxStateChangeEventTest.java    |   234 +
 ...WithSmallTimeoutAndContentionOneKeyTest.java |   250 +
 .../CacheVersionedEntryAbstractTest.java        |    33 +-
 .../closure/GridClosureProcessorRemoteTest.java |    94 +-
 .../closure/GridClosureProcessorSelfTest.java   |     5 -
 .../closure/GridClosureSerializationTest.java   |     9 +-
 .../cluster/GridUpdateNotifierSelfTest.java     |    52 +-
 ...ComputeJobExecutionErrorToLogManualTest.java |     5 -
 .../continuous/GridEventConsumeSelfTest.java    |    34 +-
 .../processors/database/BPlusTreeSelfTest.java  |  1531 ++-
 .../database/CacheFreeListImplSelfTest.java     |   625 +
 .../database/DataRegionMetricsSelfTest.java     |   352 +
 .../database/FreeListImplSelfTest.java          |   565 -
 .../database/IgniteDbAbstractTest.java          |    44 +-
 .../IgniteDbClientNearCachePutGetTest.java      |    39 -
 .../database/IgniteDbDynamicCacheSelfTest.java  |    25 +-
 .../IgniteDbMemoryLeakAbstractTest.java         |    16 +-
 .../database/IgniteDbPutGetAbstractTest.java    |     1 +
 .../IgniteDbPutGetWithCacheStoreTest.java       |   195 +
 .../database/IndexStorageSelfTest.java          |   172 +
 .../database/MemoryMetricsSelfTest.java         |   348 -
 .../database/MetadataStorageSelfTest.java       |   171 -
 .../database/SwapPathConstructionSelfTest.java  |   159 +
 .../DataStreamProcessorMvccSelfTest.java        |    69 +
 .../DataStreamProcessorSelfTest.java            |    59 +-
 ...rClientReconnectAfterClusterRestartTest.java |   139 +
 .../datastreamer/DataStreamerImplSelfTest.java  |   257 +-
 .../datastreamer/DataStreamerTimeoutTest.java   |     1 +
 .../DataStreamerUpdateAfterLoadTest.java        |     7 -
 .../IgniteDataStreamerPerformanceTest.java      |    12 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |     2 +-
 .../processors/igfs/IgfsCacheSelfTest.java      |     5 -
 .../igfs/IgfsDataManagerSelfTest.java           |    11 +-
 .../processors/igfs/IgfsIgniteMock.java         |    35 +-
 ...SecondaryFileSystemDualAbstractSelfTest.java |     2 +-
 ...fsLocalSecondaryFileSystemProxySelfTest.java |     2 +-
 .../igfs/IgfsMetaManagerSelfTest.java           |     5 -
 .../processors/igfs/IgfsMetricsSelfTest.java    |     5 -
 .../igfs/IgfsPrimaryMultiNodeSelfTest.java      |     7 +
 ...maryRelaxedConsistencyMultiNodeSelfTest.java |     7 +
 .../processors/igfs/IgfsProcessorSelfTest.java  |     5 -
 .../processors/igfs/IgfsSizeSelfTest.java       |    31 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |     5 -
 .../processors/igfs/IgfsTaskSelfTest.java       |     5 -
 .../IgfsAbstractRecordResolverSelfTest.java     |     5 -
 ...niteMessagingConfigVariationFullApiTest.java |    16 +-
 .../OdbcConfigurationValidationSelfTest.java    |     1 -
 .../cache/GridCacheCommandHandlerSelfTest.java  |    38 +-
 .../handlers/log/GridLogCommandHandlerTest.java |     2 -
 .../query/GridQueryCommandHandlerTest.java      |     7 -
 .../service/ClosureServiceClientsNodesTest.java |    24 +-
 .../processors/service/DummyService.java        |    12 +-
 ...ServiceDeploymentCompoundFutureSelfTest.java |   122 +
 ...rviceDeploymentExceptionPropagationTest.java |     7 -
 .../GridServiceProcessorAbstractSelfTest.java   |     9 +-
 ...GridServiceProcessorBatchDeploySelfTest.java |   671 +
 ...ServiceProcessorMultiNodeConfigSelfTest.java |    13 +-
 .../GridServiceProcessorMultiNodeSelfTest.java  |    71 +-
 .../GridServiceProcessorProxySelfTest.java      |    12 +-
 ...GridServiceProxyClientReconnectSelfTest.java |    62 +-
 .../GridServiceReassignmentSelfTest.java        |    45 +-
 ...gniteServiceConfigVariationsFullApiTest.java |    82 +-
 .../IgniteServiceDynamicCachesSelfTest.java     |     5 -
 .../service/IgniteServiceReassignmentTest.java  |   117 +
 .../ServiceDeploymentOnActivationTest.java      |   244 +
 .../ServiceDeploymentOutsideBaselineTest.java   |   371 +
 .../ServicePredicateAccessCacheTest.java        |    13 +-
 .../service/SystemCacheNotConfiguredTest.java   |   172 +
 .../timeout/GridTimeoutProcessorSelfTest.java   |    68 +-
 .../internal/sql/SqlParserAbstractSelfTest.java |    46 +
 .../internal/sql/SqlParserBulkLoadSelfTest.java |   122 +
 .../sql/SqlParserCreateIndexSelfTest.java       |   263 +
 .../sql/SqlParserDropIndexSelfTest.java         |    99 +
 .../sql/SqlParserSetStreamingSelfTest.java      |   149 +
 .../SqlParserTransactionalKeywordsSelfTest.java |    96 +
 .../internal/sql/SqlParserUserSelfTest.java     |   134 +
 .../ignite/internal/util/GridCleanerTest.java   |    43 +
 .../internal/util/GridTestClockTimer.java       |     9 +
 .../internal/util/IgniteDevOnlyLogTest.java     |   126 +
 .../internal/util/IgniteUtilsSelfTest.java      |    55 +
 .../internal/util/StripedExecutorTest.java      |     8 +-
 .../util/future/GridCompoundFutureSelfTest.java |     8 +-
 .../util/future/GridFutureAdapterSelfTest.java  |     2 +-
 .../future/GridFutureListenPerformanceTest.java |   111 -
 .../util/future/GridFutureQueueTest.java        |     5 +-
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |     6 +-
 .../internal/util/nio/GridNioSelfTest.java      |     2 +-
 .../nio/impl/GridNioFilterChainSelfTest.java    |     2 +-
 .../offheap/GridOffHeapMapAbstractSelfTest.java |     6 +-
 ...idOffHeapPartitionedMapAbstractSelfTest.java |     7 +-
 ...apPartitionedMapPerformanceAbstractTest.java |     6 +-
 .../unsafe/GridOffheapSnapTreeSelfTest.java     |   326 -
 .../unsafe/GridUnsafeMemoryPerformanceTest.java |    65 -
 .../unsafe/GridUnsafeMemorySelfTest.java        |   192 -
 .../tostring/CircularStringBuilderSelfTest.java |    69 +
 .../tostring/GridToStringBuilderSelfTest.java   |   448 +-
 .../tostring/IncludeSensitiveAbstractTest.java  |   149 +
 .../tostring/IncludeSensitiveAtomicTest.java    |     2 +-
 .../util/tostring/IncludeSensitiveTest.java     |   149 -
 .../IncludeSensitiveTransactionalTest.java      |     2 +-
 .../ignite/jvmtest/BlockingQueueTest.java       |     4 +-
 .../ignite/jvmtest/ConcurrentMapTest.java       |   200 -
 .../ignite/lang/GridBasicPerformanceTest.java   |    14 +-
 .../lang/GridFutureListenPerformanceTest.java   |     8 +-
 .../GridMetadataAwareAdapterLoadSelfTest.java   |   134 -
 .../lang/GridMetadataAwareAdapterLoadTest.java  |   134 +
 .../org/apache/ignite/lang/GridXSelfTest.java   |    13 +
 .../GridCircularBufferPerformanceTest.java      |    15 +-
 .../lang/utils/GridCircularBufferSelfTest.java  |     9 +-
 .../utils/GridConcurrentHashMapSelfTest.java    |   110 -
 .../lang/utils/GridConsistentHashSelfTest.java  |     8 +-
 .../IgniteOffheapReadWriteLockSelfTest.java     |    34 +-
 .../ignite/loadtest/GridLoadTestStatistics.java |   212 -
 .../loadtest/GridSingleExecutionTest.java       |   341 -
 .../apache/ignite/loadtest/package-info.java    |    22 -
 .../loadtests/GridCacheLoadPopulationTask.java  |     2 +-
 .../loadtests/GridCacheMultiNodeLoadTest.java   |     2 -
 .../loadtests/GridLoadTestStatistics.java       |   212 +
 .../loadtests/GridSingleExecutionTest.java      |   341 +
 .../colocation/GridTestCacheStore.java          |     4 +-
 .../loadtests/colocation/GridTestMain.java      |    45 -
 .../communication/GridIoManagerBenchmark.java   |    14 +-
 .../communication/GridIoManagerBenchmark0.java  |    19 +-
 .../GridContinuousOperationsLoadTest.java       |     4 +-
 .../multisplit/GridMultiSplitsLoadTest.java     |     4 +-
 .../GridMultiSplitsRedeployLoadTest.java        |     4 +-
 ...ridSingleSplitsNewNodesAbstractLoadTest.java |     2 +-
 .../GridSingleSplitsRedeployLoadTest.java       |     4 +-
 .../direct/session/GridSessionLoadTest.java     |     4 +-
 .../direct/stealing/GridStealingLoadTest.java   |     9 +-
 .../ignite/loadtests/dsi/GridDsiPerfJob.java    |     6 +-
 ...dBoundedConcurrentLinkedHashSetLoadTest.java |     4 +-
 .../loadtests/hashmap/GridCacheTestContext.java |     4 +
 .../job/GridJobExecutionLoadTestClient.java     |     4 +-
 ...GridJobExecutionLoadTestClientSemaphore.java |     4 +-
 ...JobExecutionSingleNodeSemaphoreLoadTest.java |     6 +-
 .../mapper/GridContinuousMapperLoadTest1.java   |    51 -
 .../mapper/GridContinuousMapperLoadTest2.java   |    92 -
 .../mapper/GridContinuousMapperTask1.java       |   157 -
 .../mapper/GridContinuousMapperTask2.java       |    93 -
 .../ignite/loadtests/mapper/TestObject.java     |    57 -
 .../GridOffHeapMapPerformanceAbstractTest.java  |   294 -
 ...apPartitionedMapPerformanceAbstractTest.java |   432 -
 .../unsafe/GridUnsafeMapPerformanceTest.java    |    32 -
 ...GridUnsafePartitionedMapPerformanceTest.java |    34 -
 .../ignite/logger/java/JavaLoggerTest.java      |     5 +
 .../marshaller/GridMarshallerAbstractTest.java  |    10 +-
 .../GridMarshallerMappingConsistencyTest.java   |   184 +
 .../marshaller/GridMarshallerResourceBean.java  |     5 +-
 .../marshaller/MarshallerContextSelfTest.java   |    10 +-
 .../marshaller/MarshallerContextTestImpl.java   |     6 +-
 .../MarshallerEnumDeadlockMultiJvmTest.java     |   189 +
 .../ignite/messaging/GridMessagingSelfTest.java |   126 +-
 .../messaging/IgniteMessagingSendAsyncTest.java |     4 +-
 .../p2p/DeploymentClassLoaderCallableTest.java  |   144 +
 .../GridP2PContinuousDeploymentSelfTest.java    |    67 +-
 .../p2p/GridP2PJobClassLoaderSelfTest.java      |     2 +-
 .../p2p/GridP2PLocalDeploymentSelfTest.java     |     6 +-
 .../ignite/p2p/P2PScanQueryUndeployTest.java    |   250 +
 .../ignite/p2p/P2PStreamingClassLoaderTest.java |   121 +
 .../apache/ignite/p2p/SharedDeploymentTest.java |   128 +
 .../platform/PlatformCacheWriteMetricsTask.java |   106 +-
 .../ignite/platform/PlatformExceptionTask.java  |    12 +-
 .../platform/plugin/PlatformTestPlugin.java     |    27 -
 .../plugin/PlatformTestPluginConfiguration.java |    63 -
 ...rmTestPluginConfigurationClosureFactory.java |    61 -
 .../plugin/PlatformTestPluginException.java     |    34 -
 .../plugin/PlatformTestPluginExtension.java     |    51 -
 .../plugin/PlatformTestPluginProvider.java      |   103 -
 .../plugin/PlatformTestPluginTarget.java        |   231 -
 .../cache/PlatformGetCachePluginsTask.java      |    85 -
 .../PlatformTestCachePluginConfiguration.java   |    55 -
 ...formTestCachePluginConfigurationClosure.java |    48 -
 ...tCachePluginConfigurationClosureFactory.java |    37 -
 .../cache/PlatformTestCachePluginProvider.java  |    72 -
 ...nSetFutureAttributeWaitListenerSelfTest.java |     4 +-
 ...sionSetJobAttributeWaitListenerSelfTest.java |     4 +-
 .../GridSessionWaitAttributeSelfTest.java       |     6 -
 .../spi/GridTcpSpiForwardingSelfTest.java       |     1 +
 ...redFsCheckpointSpiMultiThreadedSelfTest.java |     2 -
 .../GridAbstractCommunicationSelfTest.java      |    27 +-
 .../communication/GridCacheMessageSelfTest.java |   248 +
 .../GridTcpCommunicationSpiAbstractTest.java    |    71 +
 ...mmunicationSpiConcurrentConnectSelfTest.java |    28 +-
 .../GridTcpCommunicationSpiConfigSelfTest.java  |    26 +-
 .../tcp/GridTcpCommunicationSpiLanLoadTest.java |   285 +
 .../tcp/GridTcpCommunicationSpiLanTest.java     |   292 -
 ...cpCommunicationSpiMultithreadedSelfTest.java |    30 +-
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |    39 +-
 ...GridTcpCommunicationSpiRecoverySelfTest.java |    71 +-
 ...CommunicationRecoveryAckClosureSelfTest.java |    62 +-
 .../tcp/TcpCommunicationSpiDropNodesTest.java   |     5 +-
 .../TcpCommunicationSpiFaultyClientTest.java    |     2 -
 ...ommunicationSpiHalfOpenedConnectionTest.java |   142 +
 .../TcpCommunicationSpiSkipMessageSendTest.java |   325 +
 .../tcp/TcpCommunicationStatisticsTest.java     |   195 +
 .../discovery/AbstractDiscoverySelfTest.java    |    30 +-
 .../discovery/AuthenticationRestartTest.java    |     2 -
 ...ClusterMetricsSnapshotSerializeSelfTest.java |     8 +-
 .../FilterDataForClientNodeDiscoveryTest.java   |   219 +
 .../IgniteDiscoveryCacheReuseSelfTest.java      |   112 +
 .../DiscoveryUnmarshalVulnerabilityTest.java    |   180 +
 .../discovery/tcp/IgniteClientConnectTest.java  |   163 +
 ...pClientDiscoveryMarshallerCheckSelfTest.java |    84 +-
 ...lientDiscoverySpiFailureTimeoutSelfTest.java |    38 +-
 .../tcp/TcpClientDiscoverySpiSelfTest.java      |   283 +-
 .../TcpClientDiscoveryUnresolvedHostTest.java   |   111 +
 .../TcpDiscoveryClientSuspensionSelfTest.java   |   135 +
 .../tcp/TcpDiscoveryConcurrentStartTest.java    |     5 -
 .../TcpDiscoveryPendingMessageDeliveryTest.java |   280 +
 .../tcp/TcpDiscoverySegmentationPolicyTest.java |    94 +
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   158 +-
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |     6 +-
 .../discovery/tcp/TcpDiscoverySpiMBeanTest.java |    82 +
 .../tcp/TcpDiscoverySpiReconnectDelayTest.java  |   446 +
 .../tcp/TcpDiscoverySslParametersTest.java      |   274 +
 .../tcp/TcpDiscoverySslTrustedSelfTest.java     |    42 +
 .../TcpDiscoverySslTrustedUntrustedTest.java    |   140 +
 .../tcp/TcpDiscoveryWithWrongServerTest.java    |   336 +
 .../spi/discovery/tcp/TestTcpDiscoverySpi.java  |     2 +-
 .../startup/GridRandomCommandLineLoader.java    |     2 +-
 .../cmdline/GridCommandLineLoaderTest.java      |    91 +-
 .../stream/socket/SocketStreamerSelfTest.java   |     5 -
 ...ocketStreamerUnmarshalVulnerabilityTest.java |   222 +
 .../testframework/GridSpiTestContext.java       |    16 +
 .../ignite/testframework/GridStringLogger.java  |    18 +-
 .../ignite/testframework/GridTestUtils.java     |   409 +-
 .../config/GridTestProperties.java              |     9 +
 .../configvariations/ConfigVariations.java      |     3 +-
 .../ConfigVariationsFactory.java                |     3 +
 .../testframework/junits/GridAbstractTest.java  |   371 +-
 .../junits/GridTestKernalContext.java           |     5 +-
 .../IgniteConfigVariationsAbstractTest.java     |    14 +-
 .../ignite/testframework/junits/IgniteMock.java |    25 +-
 .../cache/GridAbstractCacheStoreSelfTest.java   |    17 +-
 .../junits/common/GridCommonAbstractTest.java   |   486 +-
 .../common/GridRollingRestartAbstractTest.java  |     4 -
 .../junits/logger/GridTestLog4jLogger.java      |    21 +-
 .../multijvm/IgniteCacheProcessProxy.java       |    17 +-
 .../multijvm/IgniteClusterProcessProxy.java     |    56 +
 .../junits/multijvm/IgniteNodeRunner.java       |     4 +-
 .../junits/multijvm/IgniteProcessProxy.java     |   194 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    55 +-
 .../IgniteBasicWithPersistenceTestSuite.java    |    67 +
 ...IgniteBinaryObjectsComputeGridTestSuite.java |     3 +
 .../IgniteBinaryObjectsTestSuite.java           |    16 +
 .../IgniteCacheDataStructuresSelfTestSuite.java |    18 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |    17 +
 .../IgniteCacheFailoverTestSuite.java           |     6 +-
 .../IgniteCacheFailoverTestSuite2.java          |    10 +-
 .../IgniteCacheFullApiSelfTestSuite.java        |     8 +
 .../IgniteCacheMetricsSelfTestSuite.java        |    12 +
 .../testsuites/IgniteCacheMvccTestSuite.java    |    69 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |    83 +-
 .../testsuites/IgniteCacheTestSuite2.java       |    78 +-
 .../testsuites/IgniteCacheTestSuite3.java       |    51 +-
 .../testsuites/IgniteCacheTestSuite4.java       |    71 +-
 .../testsuites/IgniteCacheTestSuite5.java       |    20 +-
 .../testsuites/IgniteCacheTestSuite6.java       |   120 +
 .../testsuites/IgniteCacheTestSuite7.java       |   109 +
 .../testsuites/IgniteCacheTestSuite8.java       |    66 +
 .../testsuites/IgniteCacheTestSuite9.java       |    54 +
 .../IgniteClientReconnectTestSuite.java         |     8 +-
 .../testsuites/IgniteClientTestSuite.java       |    38 -
 .../testsuites/IgniteComputeGridTestSuite.java  |    15 +
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |     4 +-
 .../ignite/testsuites/IgniteIpcTestSuite.java   |    38 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |    24 +-
 .../testsuites/IgniteLangSelfTestSuite.java     |     3 +
 .../testsuites/IgniteLostAndFoundTestSuite.java |    85 +
 .../IgniteMarshallerSelfTestSuite.java          |     5 +-
 .../testsuites/IgniteP2PSelfTestSuite.java      |    10 +
 .../IgnitePdsOutOfMemoryTestSuite.java          |    38 -
 .../ignite/testsuites/IgnitePdsTestSuite.java   |   106 +-
 .../ignite/testsuites/IgnitePdsTestSuite2.java  |   145 +-
 .../ignite/testsuites/IgnitePdsTestSuite3.java  |    49 +
 .../ignite/testsuites/IgnitePdsTestSuite4.java  |    66 +
 .../testsuites/IgnitePdsUnitTestSuite.java      |    38 +
 .../testsuites/IgnitePerformanceTestSuite.java  |   119 +
 .../testsuites/IgniteReproducingSuite.java      |    46 +
 .../IgniteSpiCheckpointSelfTestSuite.java       |     4 +-
 .../IgniteSpiCommunicationSelfTestSuite.java    |    11 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |    47 +
 .../IgniteSpiIndexingSelfTestSuite.java         |    38 -
 .../ignite/testsuites/IgniteSpiTestSuite.java   |     3 -
 .../testsuites/IgniteStandByClusterSuite.java   |    23 +-
 .../testsuites/IgniteStartUpTestSuite.java      |     2 +-
 .../testsuites/IgniteStreamSelfTestSuite.java   |     2 +
 .../testsuites/IgniteUtilSelfTestSuite.java     |    41 +-
 .../TxDeadlockDetectionTestSuite.java           |     2 +
 .../GridThreadPoolExecutorServiceSelfTest.java  |     9 +-
 .../ignite/util/GridCommandHandlerTest.java     |  1562 +++
 ...dConcurrentLinkedDequeMultiThreadedTest.java |     5 +-
 .../apache/ignite/util/GridIndexFillTest.java   |   259 -
 .../GridInternalTaskUnusedWalSegmentsTest.java  |   156 +
 .../apache/ignite/util/GridLogThrottleTest.java |   128 +-
 .../ignite/util/GridPartitionMapSelfTest.java   |    97 +-
 .../apache/ignite/util/GridRandomSelfTest.java  |     6 +-
 .../util/GridTopologyHeapSizeSelfTest.java      |     4 +-
 ...gniteTaskTrackingThreadPoolExecutorTest.java |   140 +
 .../util/mbeans/GridMBeanBaselineTest.java      |   113 +
 .../util/mbeans/GridMBeanDisableSelfTest.java   |    71 +-
 .../mbeans/GridMBeanExoticNamesSelfTest.java    |    70 +
 .../ignite/util/mbeans/GridMBeanSelfTest.java   |    16 +-
 .../util/mbeans/WorkersControlMXBeanTest.java   |    98 +
 modules/core/src/test/resources/client.jks      |   Bin 0 -> 3232 bytes
 modules/core/src/test/resources/server.jks      |   Bin 0 -> 3230 bytes
 modules/core/src/test/resources/trust.jks       |   Bin 0 -> 2432 bytes
 modules/dev-utils/README.txt                    |     5 +
 modules/dev-utils/licenses/apache-2.0.txt       |   202 +
 modules/dev-utils/pom.xml                       |    89 +
 .../development/utils/IgniteWalConverter.java   |   114 +
 .../development/utils/RecordSizeCountStat.java  |    83 +
 .../ignite/development/utils/TxWalStat.java     |   318 +
 .../ignite/development/utils/WalStat.java       |   328 +
 .../ignite/development/utils/package-info.java  |    22 +
 modules/direct-io/README.txt                    |    50 +
 modules/direct-io/licenses/apache-2.0.txt       |   202 +
 modules/direct-io/pom.xml                       |   108 +
 .../cache/persistence/file/AlignedBuffers.java  |    72 +
 .../file/AlignedBuffersDirectFileIO.java        |   520 +
 .../file/AlignedBuffersDirectFileIOFactory.java |   177 +
 .../persistence/file/IgniteNativeIoLib.java     |   415 +
 .../persistence/file/LinuxNativeIoPlugin.java   |    25 +
 .../file/LinuxNativeIoPluginProvider.java       |   239 +
 .../org.apache.ignite.plugin.PluginProvider     |     1 +
 ...lWalModeChangeDuringRebalancingSelfTest.java |    33 +
 ...iveIoPdsRecoveryAfterFileCorruptionTest.java |    28 +
 .../IgniteNativeIoWalFlushFsyncSelfTest.java    |    23 +
 .../persistence/file/IgniteFileIOTest.java      |   304 +
 .../IgniteNativeIoWithNoPersistenceTest.java    |    76 +
 .../testsuites/IgnitePdsNativeIoTestSuite.java  |    41 +
 .../testsuites/IgnitePdsNativeIoTestSuite2.java |    46 +
 .../IgnitePdsReplacementNativeIoTest.java       |    44 +
 modules/docker/1.0.0/Dockerfile                 |    40 -
 modules/docker/1.0.0/run.sh                     |    50 -
 modules/docker/1.1.0/Dockerfile                 |    40 -
 modules/docker/1.1.0/run.sh                     |    50 -
 modules/docker/1.2.0/Dockerfile                 |    40 -
 modules/docker/1.2.0/run.sh                     |    50 -
 modules/docker/1.3.0/Dockerfile                 |    40 -
 modules/docker/1.3.0/run.sh                     |    50 -
 modules/docker/1.4.0/Dockerfile                 |    40 -
 modules/docker/1.4.0/run.sh                     |    50 -
 modules/docker/1.5.0.final/Dockerfile           |    40 -
 modules/docker/1.5.0.final/run.sh               |    50 -
 modules/docker/1.6.0/Dockerfile                 |    44 -
 modules/docker/1.6.0/run.sh                     |    51 -
 modules/docker/1.7.0/Dockerfile                 |    44 -
 modules/docker/1.7.0/run.sh                     |    51 -
 modules/docker/1.8.0/Dockerfile                 |    46 -
 modules/docker/1.8.0/run.sh                     |    51 -
 modules/docker/1.9.0/Dockerfile                 |    46 -
 modules/docker/1.9.0/run.sh                     |    51 -
 modules/docker/2.0.0/Dockerfile                 |    46 -
 modules/docker/2.0.0/run.sh                     |    51 -
 modules/docker/Dockerfile                       |    46 -
 modules/docker/README.txt                       |    11 -
 modules/docker/run.sh                           |    50 -
 modules/extdata/p2p/pom.xml                     |     2 +-
 .../ignite/tests/p2p/AlwaysTruePredicate.java   |    30 +
 .../ignite/tests/p2p/JobStealingTask.java       |    12 +-
 .../org/apache/ignite/tests/p2p/NodeFilter.java |    30 +
 .../tests/p2p/NoopCacheEntryProcessor.java      |    36 +
 .../tests/p2p/compute/ExternalCallable.java     |    59 +
 .../tests/p2p/compute/ExternalCallable1.java    |    59 +
 .../tests/p2p/compute/ExternalCallable2.java    |    59 +
 modules/extdata/platform/README.txt             |     4 +
 .../extdata/platform/licenses/apache-2.0.txt    |   202 +
 modules/extdata/platform/pom.xml                |    46 +
 .../platform/plugin/PlatformTestPlugin.java     |    27 +
 .../plugin/PlatformTestPluginConfiguration.java |    63 +
 ...rmTestPluginConfigurationClosureFactory.java |    61 +
 .../plugin/PlatformTestPluginException.java     |    34 +
 .../plugin/PlatformTestPluginExtension.java     |    51 +
 .../plugin/PlatformTestPluginProvider.java      |   103 +
 .../plugin/PlatformTestPluginTarget.java        |   236 +
 .../cache/PlatformGetCachePluginsTask.java      |    85 +
 .../PlatformTestCachePluginConfiguration.java   |    55 +
 ...formTestCachePluginConfigurationClosure.java |    48 +
 ...tCachePluginConfigurationClosureFactory.java |    37 +
 .../cache/PlatformTestCachePluginProvider.java  |    72 +
 .../platform/plugin/cache/package-info.java     |    22 +
 .../ignite/platform/plugin/package-info.java    |    22 +
 .../org.apache.ignite.plugin.PluginProvider     |     1 +
 ...atformCachePluginConfigurationClosureFactory |     1 +
 ...rm.PlatformPluginConfigurationClosureFactory |     1 +
 .../extdata/uri/META-INF/bad-classes-ignite.xml |    40 +
 .../META-INF/bad-signed-deployfile-ignite.xml   |    39 +
 .../uri/META-INF/deploydepend-ignite.xml        |    37 +
 .../extdata/uri/META-INF/deploydir-ignite.xml   |    38 +
 .../extdata/uri/META-INF/deployfile-ignite.xml  |    38 +
 .../META-INF/well-signed-deployfile-ignite.xml  |    38 +
 .../extdata/uri/config/signeddeploy/keystore    |   Bin 0 -> 1191 bytes
 .../extdata/uri/modules/uri-dependency/pom.xml  |     2 +-
 modules/extdata/uri/pom.xml                     |   115 +-
 .../uri/tasks/GridUriDeploymentDependency1.java |     6 +-
 .../uri/tasks/GridUriDeploymentDependency2.java |    10 +-
 .../uri/tasks/GridUriDeploymentTestTask2.java   |     6 +-
 .../tests/p2p/compute/ExternalCallable.java     |    59 +
 .../tests/p2p/compute/ExternalCallable1.java    |    59 +
 .../tests/p2p/compute/ExternalCallable2.java    |    59 +
 modules/flink/pom.xml                           |    14 +-
 .../apache/ignite/sink/flink/IgniteSink.java    |    88 +-
 .../sink/flink/FlinkIgniteSinkSelfTest.java     |   154 +-
 .../flink/src/test/resources/example-ignite.xml |     7 +-
 modules/flume/pom.xml                           |     8 +-
 .../apache/ignite/stream/flume/IgniteSink.java  |     7 +-
 .../ignite/stream/flume/IgniteSinkTest.java     |     5 -
 modules/gce/pom.xml                             |    38 +-
 ...pDiscoveryGoogleStorageIpFinderSelfTest.java |     2 -
 modules/geospatial/pom.xml                      |    32 +-
 .../query/h2/opt/GridH2SpatialIndex.java        |    63 +-
 .../query/h2/H2IndexingAbstractGeoSelfTest.java |     6 +-
 modules/hadoop/pom.xml                          |    36 +-
 .../hadoop/counter/HadoopCountersImpl.java      |     4 +-
 .../processors/hadoop/impl/HadoopUtils.java     |    45 +-
 ...HadoopKerberosFileSystemFactoryDelegate.java |    12 +-
 .../impl/fs/HadoopFileSystemCacheUtils.java     |    34 +-
 .../hadoop/impl/fs/HadoopLazyConcurrentMap.java |     4 +-
 .../hadoop/impl/igfs/HadoopIgfsIpcIo.java       |     6 +-
 .../hadoop/impl/igfs/HadoopIgfsOutProc.java     |     5 +-
 ...fsSecondaryFileSystemPositionedReadable.java |    41 +-
 .../hadoop/impl/proto/HadoopClientProtocol.java |     8 +-
 .../hadoop/impl/v1/HadoopV1MapTask.java         |     6 +-
 .../hadoop/impl/v1/HadoopV1Reporter.java        |     8 +-
 .../processors/hadoop/impl/v2/HadoopV2Job.java  |    36 +-
 .../impl/v2/HadoopV2JobResourceManager.java     |     3 +-
 .../hadoop/impl/v2/HadoopV2TaskContext.java     |    62 +-
 .../hadoop/jobtracker/HadoopJobTracker.java     |    33 +-
 .../hadoop/mapreduce/MapReduceClient.java       |    16 +-
 .../hadoop/shuffle/HadoopShuffleJob.java        |     5 +-
 .../taskexecutor/HadoopExecutorService.java     |     4 +-
 .../external/HadoopExternalTaskExecutor.java    |    10 +-
 .../HadoopExternalCommunication.java            |     9 +-
 .../processors/hadoop/HadoopSharedMap.java      |     6 +-
 .../hadoop/HadoopTestClassLoader.java           |    14 +-
 .../impl/HadoopAbstractMapReduceTest.java       |     2 +-
 .../hadoop/impl/HadoopAbstractSelfTest.java     |    17 +-
 .../hadoop/impl/HadoopCommandLineTest.java      |     6 +-
 .../hadoop/impl/HadoopGroupingTest.java         |     2 +-
 .../hadoop/impl/HadoopJobTrackerSelfTest.java   |    11 +-
 .../impl/HadoopMapReduceEmbeddedSelfTest.java   |     2 +-
 .../hadoop/impl/HadoopPlannerMockJob.java       |     6 +
 .../hadoop/impl/HadoopPopularWordsTest.java     |   298 -
 .../hadoop/impl/HadoopSortingTest.java          |     4 +-
 .../impl/HadoopTaskExecutionSelfTest.java       |    17 +-
 .../hadoop/impl/HadoopTasksAllVersionsTest.java |   264 -
 .../hadoop/impl/HadoopTasksV1Test.java          |     6 +-
 .../hadoop/impl/HadoopTasksV2Test.java          |     6 +-
 .../impl/HadoopTasksVersionsAbstractTest.java   |   264 +
 .../hadoop/impl/HadoopTeraSortTest.java         |     2 +-
 .../hadoop/impl/HadoopTxConfigCacheTest.java    |     4 +-
 .../hadoop/impl/HadoopV2JobSelfTest.java        |     2 +-
 .../client/HadoopClientProtocolSelfTest.java    |     7 -
 .../impl/examples/HadoopPopularWords.java       |   298 +
 .../impl/igfs/Hadoop1OverIgfsProxyTest.java     |     2 +-
 .../HadoopIgfs20FileSystemAbstractSelfTest.java |     4 +-
 .../hadoop/impl/igfs/IgfsEventsTestSuite.java   |     2 -
 .../igfs/IgfsNearOnlyMultiNodeSelfTest.java     |    22 +-
 .../IgniteHadoopFileSystemAbstractSelfTest.java |     8 +-
 ...niteHadoopFileSystemClientBasedOpenTest.java |     9 +-
 .../collections/HadoopAbstractMapTest.java      |     6 +
 .../taskexecutor/HadoopExecutorServiceTest.java |     6 +-
 .../HadoopExternalTaskExecutionSelfTest.java    |     4 +-
 .../testsuites/IgniteHadoopTestSuite.java       |     6 +-
 .../IgniteIgfsLinuxAndMacOSTestSuite.java       |     5 +-
 modules/hibernate-4.2/pom.xml                   |    26 +-
 .../HibernateL2CacheConfigurationSelfTest.java  |     5 -
 .../hibernate/HibernateL2CacheMultiJvmTest.java |     7 -
 .../hibernate/HibernateL2CacheSelfTest.java     |     5 -
 .../HibernateL2CacheStrategySelfTest.java       |     5 -
 .../HibernateL2CacheTransactionalSelfTest.java  |     2 -
 .../CacheHibernateStoreFactorySelfTest.java     |     2 +
 .../testsuites/IgniteHibernateTestSuite.java    |     2 +
 modules/hibernate-5.1/pom.xml                   |    26 +-
 .../HibernateL2CacheConfigurationSelfTest.java  |     5 -
 .../hibernate/HibernateL2CacheMultiJvmTest.java |     7 -
 .../hibernate/HibernateL2CacheSelfTest.java     |     5 -
 .../HibernateL2CacheStrategySelfTest.java       |     5 -
 .../HibernateL2CacheTransactionalSelfTest.java  |     2 -
 .../CacheHibernateStoreFactorySelfTest.java     |     2 +
 .../testsuites/IgniteHibernate5TestSuite.java   |     2 +
 modules/hibernate-core/pom.xml                  |     2 +-
 .../cache/hibernate/HibernateCacheProxy.java    |    20 +-
 modules/ignored-tests/pom.xml                   |    12 +-
 modules/indexing/pom.xml                        |     9 +-
 .../cache/query/CacheQueryPartitionInfo.java    |     1 +
 .../cache/query/GridCacheTwoStepQuery.java      |    36 +
 .../query/h2/DhtResultSetEnlistFuture.java      |    63 +
 .../query/h2/DmlStatementsProcessor.java        |  1454 ++-
 .../query/h2/H2CachedStatementKey.java          |   108 +
 .../query/h2/H2ConnectionWrapper.java           |    52 +-
 .../internal/processors/query/h2/H2Cursor.java  |    42 +-
 .../processors/query/h2/H2DatabaseType.java     |     8 +-
 .../processors/query/h2/H2DmlPlanKey.java       |    66 -
 .../processors/query/h2/H2FieldsIterator.java   |    29 +-
 .../processors/query/h2/H2KeyValueIterator.java |     2 +-
 .../query/h2/H2ResultSetIterator.java           |    50 +-
 .../processors/query/h2/H2RowCache.java         |   164 +
 .../processors/query/h2/H2RowCacheRegistry.java |   126 +
 .../processors/query/h2/H2RowDescriptor.java    |   502 -
 .../internal/processors/query/h2/H2Schema.java  |    56 +-
 .../processors/query/h2/H2SqlFieldMetadata.java |    28 +-
 .../processors/query/h2/H2StatementCache.java   |    74 +-
 .../processors/query/h2/H2TableDescriptor.java  |    23 +-
 .../processors/query/h2/H2TableEngine.java      |    12 +-
 .../query/h2/H2TwoStepCachedQueryKey.java       |     1 +
 .../internal/processors/query/h2/H2TypeKey.java |    64 +
 .../internal/processors/query/h2/H2Utils.java   |    35 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  2383 +++-
 .../query/h2/NearResultSetEnlistFuture.java     |    59 +
 .../processors/query/h2/ParsingResult.java      |   102 +
 .../query/h2/PreparedStatementEx.java           |    48 +
 .../query/h2/PreparedStatementExImpl.java       |   648 +
 .../query/h2/RebuildIndexFromHashClosure.java   |    47 +
 .../query/h2/ResultSetEnlistFuture.java         |   136 +
 .../query/h2/ThreadLocalObjectPool.java         |   103 +
 .../processors/query/h2/UpdateResult.java       |    63 +
 .../query/h2/database/H2PkHashIndex.java        |   169 +-
 .../query/h2/database/H2RowFactory.java         |    29 +-
 .../processors/query/h2/database/H2Tree.java    |   167 +-
 .../query/h2/database/H2TreeFilterClosure.java  |   109 +
 .../query/h2/database/H2TreeIndex.java          |   220 +-
 .../query/h2/database/InlineIndexHelper.java    |   486 +-
 .../h2/database/io/AbstractH2ExtrasInnerIO.java |   164 +
 .../h2/database/io/AbstractH2ExtrasLeafIO.java  |   161 +
 .../query/h2/database/io/AbstractH2InnerIO.java |    74 +
 .../query/h2/database/io/AbstractH2LeafIO.java  |    76 +
 .../query/h2/database/io/H2ExtrasInnerIO.java   |   115 +-
 .../query/h2/database/io/H2ExtrasLeafIO.java    |   109 +-
 .../query/h2/database/io/H2IOUtils.java         |    94 +
 .../query/h2/database/io/H2InnerIO.java         |    41 +-
 .../query/h2/database/io/H2LeafIO.java          |    41 +-
 .../h2/database/io/H2MvccExtrasInnerIO.java     |    55 +
 .../h2/database/io/H2MvccExtrasLeafIO.java      |    54 +
 .../query/h2/database/io/H2MvccInnerIO.java     |    58 +
 .../query/h2/database/io/H2MvccLeafIO.java      |    58 +
 .../query/h2/database/io/H2RowLinkIO.java       |    34 +
 .../query/h2/database/util/CompareUtils.java    |   332 -
 .../query/h2/ddl/DdlStatementsProcessor.java    |   532 +-
 .../processors/query/h2/dml/DmlArgument.java    |    31 +
 .../processors/query/h2/dml/DmlArguments.java   |   104 +
 .../processors/query/h2/dml/DmlAstUtils.java    |   609 +
 .../processors/query/h2/dml/DmlBatchSender.java |   417 +
 .../query/h2/dml/DmlDistributedPlanInfo.java    |    56 +
 .../h2/dml/DmlPageProcessingErrorResult.java    |    76 +
 .../query/h2/dml/DmlPageProcessingResult.java   |    68 +
 .../processors/query/h2/dml/DmlUtils.java       |   137 +
 .../processors/query/h2/dml/FastUpdate.java     |   121 +
 .../query/h2/dml/FastUpdateArgument.java        |    27 -
 .../query/h2/dml/FastUpdateArguments.java       |    53 -
 .../processors/query/h2/dml/UpdateMode.java     |    11 +-
 .../processors/query/h2/dml/UpdatePlan.java     |   714 +-
 .../query/h2/dml/UpdatePlanBuilder.java         |   442 +-
 .../query/h2/opt/GridH2AbstractKeyValueRow.java |   454 -
 .../query/h2/opt/GridH2CollocationModel.java    |    21 +-
 .../query/h2/opt/GridH2IndexBase.java           |   359 +-
 .../query/h2/opt/GridH2KeyRowOnheap.java        |    74 +
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   328 -
 .../query/h2/opt/GridH2KeyValueRowOnheap.java   |   216 +-
 .../query/h2/opt/GridH2MetaTable.java           |    16 +-
 .../query/h2/opt/GridH2PlainRowFactory.java     |   196 +
 .../query/h2/opt/GridH2ProxyIndex.java          |     4 +-
 .../query/h2/opt/GridH2ProxySpatialIndex.java   |     5 +-
 .../query/h2/opt/GridH2QueryContext.java        |   122 +-
 .../processors/query/h2/opt/GridH2Row.java      |   130 +-
 .../query/h2/opt/GridH2RowDescriptor.java       |   439 +-
 .../query/h2/opt/GridH2RowFactory.java          |   194 -
 .../query/h2/opt/GridH2SearchRow.java           |    32 +
 .../query/h2/opt/GridH2SearchRowAdapter.java    |   128 +
 .../processors/query/h2/opt/GridH2Table.java    |   670 +-
 .../query/h2/opt/GridH2TreeIndex.java           |   602 -
 .../query/h2/opt/GridH2ValueCacheObject.java    |     9 +-
 .../query/h2/opt/GridLuceneDirectory.java       |    89 +-
 .../processors/query/h2/opt/GridLuceneFile.java |    91 +-
 .../query/h2/opt/GridLuceneIndex.java           |    62 +-
 .../query/h2/opt/GridLuceneInputStream.java     |    42 +-
 .../query/h2/opt/GridLuceneOutputStream.java    |    20 +-
 .../query/h2/opt/GridSearchRowPointer.java      |    28 -
 .../processors/query/h2/sql/DmlAstUtils.java    |   629 -
 .../query/h2/sql/GridSqlAggregateFunction.java  |   130 +-
 .../h2/sql/GridSqlAlterTableAddColumn.java      |   113 +
 .../h2/sql/GridSqlAlterTableDropColumn.java     |   113 +
 .../processors/query/h2/sql/GridSqlArray.java   |     8 -
 .../processors/query/h2/sql/GridSqlColumn.java  |    34 +-
 .../query/h2/sql/GridSqlCreateTable.java        |   127 +-
 .../query/h2/sql/GridSqlFunction.java           |     2 +-
 .../processors/query/h2/sql/GridSqlMerge.java   |     5 +-
 .../query/h2/sql/GridSqlQueryParser.java        |   872 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   123 +-
 .../processors/query/h2/sql/GridSqlSelect.java  |    20 +
 .../processors/query/h2/sql/GridSqlType.java    |     4 +
 .../processors/query/h2/sql/GridSqlUnion.java   |    16 +-
 .../processors/query/h2/sys/SqlSystemIndex.java |   144 +
 .../processors/query/h2/sys/SqlSystemTable.java |   208 +
 .../query/h2/sys/SqlSystemTableEngine.java      |    60 +
 .../h2/sys/view/SqlAbstractLocalSystemView.java |   155 +
 .../h2/sys/view/SqlAbstractSystemView.java      |   134 +
 .../query/h2/sys/view/SqlSystemView.java        |    80 +
 .../h2/sys/view/SqlSystemViewBaselineNodes.java |    87 +
 .../sys/view/SqlSystemViewColumnCondition.java  |   102 +
 .../sys/view/SqlSystemViewNodeAttributes.java   |   108 +
 .../h2/sys/view/SqlSystemViewNodeMetrics.java   |   210 +
 .../query/h2/sys/view/SqlSystemViewNodes.java   |    98 +
 .../query/h2/twostep/DistributedUpdateRun.java  |   133 +
 .../query/h2/twostep/GridMapQueryExecutor.java  |  1379 +-
 .../query/h2/twostep/GridMergeIndex.java        |     8 +-
 .../h2/twostep/GridMergeIndexIterator.java      |   174 +
 .../query/h2/twostep/GridMergeIndexSorted.java  |     8 +-
 .../h2/twostep/GridMergeIndexUnsorted.java      |     4 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |   791 +-
 .../query/h2/twostep/GridResultPage.java        |    20 +-
 .../query/h2/twostep/MapNodeResults.java        |   154 +
 .../query/h2/twostep/MapQueryLazyWorker.java    |   194 +
 .../query/h2/twostep/MapQueryLazyWorkerKey.java |    97 +
 .../query/h2/twostep/MapQueryResult.java        |   288 +
 .../query/h2/twostep/MapQueryResults.java       |   187 +
 .../h2/twostep/MapReplicatedReservation.java    |    38 +
 .../query/h2/twostep/MapRequestKey.java         |    80 +
 .../query/h2/twostep/MapReservationKey.java     |    73 +
 .../query/h2/twostep/ReduceQueryRun.java        |   152 +-
 .../query/h2/twostep/msg/GridH2DmlRequest.java  |   516 +
 .../query/h2/twostep/msg/GridH2DmlResponse.java |   250 +
 .../query/h2/twostep/msg/GridH2Geometry.java    |     2 +-
 .../query/h2/twostep/msg/GridH2Null.java        |     1 +
 .../h2/twostep/msg/GridH2QueryRequest.java      |    84 +-
 .../msg/GridH2SelectForUpdateTxDetails.java     |   299 +
 .../twostep/msg/GridH2ValueMessageFactory.java  |    18 +-
 .../visor/verify/ValidateIndexesClosure.java    |   577 +
 .../visor/verify/VisorValidateIndexesTask.java  |    95 +
 .../apache/ignite/client/ClientTestSuite.java   |    41 +
 .../ignite/client/FunctionalQueryTest.java      |   218 +
 .../ignite/client/IgniteBinaryQueryTest.java    |   137 +
 .../org/apache/ignite/client/SecurityTest.java  |   233 +
 .../processors/cache/BigEntryQueryTest.java     |   150 +
 .../cache/BinaryTypeMismatchLoggingTest.java    |   388 +
 .../CacheBinaryKeyConcurrentQueryTest.java      |     7 -
 .../cache/CacheIteratorScanQueryTest.java       |    60 +-
 .../CacheOffheapBatchIndexingBaseTest.java      |     5 -
 .../CacheOperationsWithExpirationTest.java      |    13 +-
 ...eQueryAfterDynamicCacheStartFailureTest.java |    69 +
 .../cache/CacheQueryBuildValueTest.java         |     7 -
 .../cache/CacheQueryEvictDataLostTest.java      |     8 +
 .../CacheRandomOperationsMultithreadedTest.java |     7 -
 ...CacheScanPartitionQueryFallbackSelfTest.java |    66 +-
 .../cache/CacheSqlQueryValueCopySelfTest.java   |     7 -
 .../ClientReconnectAfterClusterRestartTest.java |    58 +-
 .../cache/DdlTransactionSelfTest.java           |   335 +
 .../cache/GridCacheCrossCacheQuerySelfTest.java |    90 +-
 .../cache/GridCacheFullTextQuerySelfTest.java   |    31 +-
 ...GridCacheLazyQueryPartitionsReleaseTest.java |   248 +
 .../cache/GridCacheOffHeapSelfTest.java         |     2 -
 .../GridCacheOffheapIndexEntryEvictTest.java    |     5 -
 .../cache/GridCacheOffheapIndexGetSelfTest.java |     5 -
 .../cache/GridCacheQuerySimpleBenchmark.java    |     6 +-
 .../IgniteBinaryObjectFieldsQuerySelfTest.java  |     9 +-
 .../IgniteBinaryObjectQueryArgumentsTest.java   |     7 -
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |   143 +-
 ...niteCacheAbstractInsertSqlQuerySelfTest.java |    20 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   134 +-
 .../IgniteCacheAbstractSqlDmlQuerySelfTest.java |     5 -
 .../IgniteCacheCollocatedQuerySelfTest.java     |     5 -
 .../IgniteCacheCrossCacheJoinRandomTest.java    |     2 -
 ...acheDistributedJoinCollocatedAndNotTest.java |     7 -
 ...acheDistributedJoinCustomAffinityMapper.java |     7 -
 .../IgniteCacheDistributedJoinNoIndexTest.java  |     7 -
 ...ributedJoinPartitionedAndReplicatedTest.java |     9 +-
 ...CacheDistributedJoinQueryConditionsTest.java |     7 -
 .../cache/IgniteCacheDistributedJoinTest.java   |     1 -
 ...cheDuplicateEntityConfigurationSelfTest.java |     5 -
 .../IgniteCacheFieldsQueryNoDataSelfTest.java   |     5 -
 ...teCacheFullTextQueryNodeJoiningSelfTest.java |     3 +-
 .../cache/IgniteCacheGroupsSqlTest.java         |     4 +-
 .../IgniteCacheInsertSqlQuerySelfTest.java      |    18 +
 ...PartitionedAndReplicatedCollocationTest.java |     7 -
 ...teCacheJoinPartitionedAndReplicatedTest.java |     7 -
 ...IgniteCacheJoinQueryWithAffinityKeyTest.java |     7 -
 .../cache/IgniteCacheLargeResultSelfTest.java   |     5 -
 ...eLockPartitionOnAffinityRunAbstractTest.java |    10 +-
 ...PartitionOnAffinityRunAtomicCacheOpTest.java |    18 +-
 ...niteCacheLockPartitionOnAffinityRunTest.java |    77 +-
 ...titionOnAffinityRunWithCollisionSpiTest.java |     3 +-
 .../IgniteCacheObjectKeyIndexingSelfTest.java   |     2 -
 .../cache/IgniteCacheOffheapIndexScanTest.java  |     5 -
 ...hePartitionedQueryMultiThreadedSelfTest.java |     5 -
 ...IgniteCachePrimitiveFieldsQuerySelfTest.java |     5 -
 .../cache/IgniteCacheQueriesLoadTest1.java      |     7 -
 .../IgniteCacheQueryH2IndexingLeakTest.java     |    18 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |     5 -
 .../cache/IgniteCacheSqlQueryErrorSelfTest.java |   214 +
 ...gniteCacheSqlQueryMultiThreadedSelfTest.java |     7 -
 ...CheckClusterStateBeforeExecuteQueryTest.java |    87 +
 .../cache/IgniteDynamicSqlRestoreTest.java      |   529 +
 .../cache/IgniteErrorOnRebalanceTest.java       |   187 +
 ...leNodeWithIndexingPutGetPersistenceTest.java |    13 +-
 ...ndexingCachePartitionLossPolicySelfTest.java |   139 +
 .../QueryJoinWithDifferentNodeFiltersTest.java  |   163 +
 .../cache/SqlFieldsQuerySelfTest.java           |    53 +
 .../authentication/SqlUserCommandSelfTest.java  |   298 +
 ...stributedPartitionQueryAbstractSelfTest.java |    30 +-
 ...butedPartitionQueryNodeRestartsSelfTest.java |    33 +-
 ...niteCacheDistributedQueryCancelSelfTest.java |     4 +-
 ...butedQueryStopOnCancelOrTimeoutSelfTest.java |     7 -
 ...chePartitionedQueryEvtsDisabledSelfTest.java |    30 +
 ...achePartitionedQueryP2PDisabledSelfTest.java |     2 +-
 ...cheQueryAbstractDistributedJoinSelfTest.java |     5 -
 .../IgniteCacheQueryNoRebalanceSelfTest.java    |     7 -
 .../near/IgniteCacheQueryNodeFailTest.java      |     7 -
 ...QueryNodeRestartDistributedJoinSelfTest.java |    10 +
 .../IgniteCacheQueryNodeRestartSelfTest.java    |    58 +-
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |    84 +-
 .../IgniteCacheQueryNodeRestartTxSelfTest.java  |    36 +
 .../near/IgniteSqlQueryWithBaselineTest.java    |   184 +
 ...ldsQueryJoinNoPrimaryPartitionsSelfTest.java |   151 +
 ...acheReplicatedQueryEvtsDisabledSelfTest.java |    30 +
 .../IgniteCacheReplicatedQuerySelfTest.java     |    54 +-
 .../cache/index/AbstractSchemaSelfTest.java     |   350 +-
 .../processors/cache/index/BasicIndexTest.java  |   820 ++
 .../index/DuplicateKeyValueClassesSelfTest.java |     5 -
 ...ynamicColumnsAbstractConcurrentSelfTest.java |  1228 ++
 .../cache/index/DynamicColumnsAbstractTest.java |   263 +
 ...umnsConcurrentAtomicPartitionedSelfTest.java |    33 +
 ...lumnsConcurrentAtomicReplicatedSelfTest.java |    33 +
 ...currentTransactionalPartitionedSelfTest.java |    33 +
 ...ncurrentTransactionalReplicatedSelfTest.java |    34 +
 .../DynamicIndexAbstractBasicSelfTest.java      |   399 +-
 .../DynamicIndexAbstractConcurrentSelfTest.java |   210 +-
 .../index/DynamicIndexAbstractSelfTest.java     |    53 +-
 .../cache/index/H2ConnectionLeaksSelfTest.java  |   177 +
 .../H2DynamicColumnsAbstractBasicSelfTest.java  |   890 ++
 .../H2DynamicColumnsClientBasicSelfTest.java    |    28 +
 .../H2DynamicColumnsServerBasicSelfTest.java    |    28 +
 ...icColumnsServerCoordinatorBasicSelfTest.java |    28 +
 .../index/H2DynamicIndexAbstractSelfTest.java   |    62 +-
 .../H2DynamicIndexingComplexAbstractTest.java   |   361 +
 ...lexClientAtomicPartitionedNoBackupsTest.java |    34 +
 ...exingComplexClientAtomicPartitionedTest.java |     4 +-
 ...dexingComplexClientAtomicReplicatedTest.java |     4 +-
 ...ntTransactionalPartitionedNoBackupsTest.java |    34 +
 ...mplexClientTransactionalPartitionedTest.java |     4 +-
 ...omplexClientTransactionalReplicatedTest.java |     4 +-
 ...lexServerAtomicPartitionedNoBackupsTest.java |    34 +
 ...exingComplexServerAtomicPartitionedTest.java |     4 +-
 ...dexingComplexServerAtomicReplicatedTest.java |     4 +-
 ...erTransactionalPartitionedNoBackupsTest.java |    34 +
 ...mplexServerTransactionalPartitionedTest.java |     4 +-
 ...omplexServerTransactionalReplicatedTest.java |     4 +-
 .../index/H2DynamicIndexingComplexTest.java     |   356 -
 .../cache/index/H2DynamicTableSelfTest.java     |   875 +-
 .../cache/index/H2RowCachePageEvictionTest.java |   238 +
 .../cache/index/H2RowCacheSelfTest.java         |   417 +
 .../cache/index/IgniteDecimalSelfTest.java      |   266 +
 .../cache/index/LongIndexNameTest.java          |   204 +
 .../index/OptimizedMarshallerIndexNameTest.java |   267 +
 .../index/QueryEntityValidationSelfTest.java    |     5 -
 .../cache/index/SchemaExchangeSelfTest.java     |    12 +-
 .../index/SqlTransactionsComandsSelfTest.java   |    83 +
 ...sactionsComandsWithMvccDisabledSelfTest.java |    83 +
 ...sactionsCommandsWithMvccEnabledSelfTest.java |   323 +
 .../cache/index/SqlTransactionsSelfTest.java    |   420 +
 ...eCacheLocalQueryCancelOrTimeoutSelfTest.java |     7 -
 .../local/IgniteCacheLocalQuerySelfTest.java    |   126 +-
 ...eMvccAbstractSqlCoordinatorFailoverTest.java |   138 +
 .../mvcc/CacheMvccBackupsAbstractTest.java      |   808 ++
 .../cache/mvcc/CacheMvccBulkLoadTest.java       |   123 +
 .../cache/mvcc/CacheMvccDmlSimpleTest.java      |   200 +
 ...eratorWithConcurrentJdbcTransactionTest.java |    28 +
 ...ntriesWithConcurrentJdbcTransactionTest.java |    29 +
 .../mvcc/CacheMvccPartitionedBackupsTest.java   |    30 +
 ...MvccPartitionedSelectForUpdateQueryTest.java |    44 +
 ...ccPartitionedSqlCoordinatorFailoverTest.java |   143 +
 .../CacheMvccPartitionedSqlQueriesTest.java     |    30 +
 .../CacheMvccPartitionedSqlTxQueriesTest.java   |    30 +
 ...cPartitionedSqlTxQueriesWithReducerTest.java |    30 +
 .../mvcc/CacheMvccReplicatedBackupsTest.java    |    30 +
 ...eMvccReplicatedSelectForUpdateQueryTest.java |    30 +
 ...vccReplicatedSqlCoordinatorFailoverTest.java |    30 +
 .../mvcc/CacheMvccReplicatedSqlQueriesTest.java |    30 +
 .../CacheMvccReplicatedSqlTxQueriesTest.java    |   242 +
 ...ccReplicatedSqlTxQueriesWithReducerTest.java |    30 +
 ...nQueryWithConcurrentJdbcTransactionTest.java |    29 +
 ...cheMvccSelectForUpdateQueryAbstractTest.java |   359 +
 .../cache/mvcc/CacheMvccSizeTest.java           |   488 +
 ...ccSizeWithConcurrentJdbcTransactionTest.java |    28 +
 ...CacheMvccSqlConfigurationValidationTest.java |   111 +
 .../cache/mvcc/CacheMvccSqlLockTimeoutTest.java |   353 +
 .../mvcc/CacheMvccSqlQueriesAbstractTest.java   |  1617 +++
 .../mvcc/CacheMvccSqlTxQueriesAbstractTest.java |  1866 +++
 ...MvccSqlTxQueriesWithReducerAbstractTest.java |   857 ++
 .../mvcc/CacheMvccSqlUpdateCountersTest.java    |   548 +
 .../mvcc/CacheMvccStreamingInsertTest.java      |   122 +
 .../mvcc/MvccRepeatableReadBulkOpsTest.java     |   636 +
 .../mvcc/MvccRepeatableReadOperationsTest.java  |   314 +
 .../db/wal/IgniteWalRecoveryTest.java           |  2000 +++
 .../IgniteWalRecoveryWithCompactionTest.java    |    33 +
 ...onnectorConfigurationValidationSelfTest.java |   458 +
 .../client/IgniteDataStreamerTest.java          |   118 +
 ...eDbSingleNodeWithIndexingWalRestoreTest.java |   202 +
 ...oreQueryWithMultipleClassesPerCacheTest.java |    20 +-
 .../IgnitePersistentStoreSchemaLoadTest.java    |   254 +-
 .../IgniteTwoRegionsRebuildIndexTest.java       |   124 +
 ...ckPartitionOnAffinityRunAtomicCacheTest.java |    94 +
 ...neLockPartitionOnAffinityRunTxCacheTest.java |    85 +
 ...ngBaselineCacheQueryNodeRestartSelfTest.java |   124 +
 ...StableBaselineBinObjFieldsQuerySelfTest.java |    77 +
 ...eBaselineCacheQueryNodeRestartsSelfTest.java |    68 +
 .../query/IgniteCachelessQueriesSelfTest.java   |   420 +
 .../query/IgniteQueryDedicatedPoolTest.java     |    15 +-
 .../query/IgniteSqlDefaultValueTest.java        |   227 +
 .../query/IgniteSqlDistributedJoinSelfTest.java |     5 -
 .../IgniteSqlGroupConcatCollocatedTest.java     |   250 +
 .../IgniteSqlGroupConcatNotCollocatedTest.java  |   210 +
 .../query/IgniteSqlNotNullConstraintTest.java   |  1322 ++
 .../query/IgniteSqlParameterizedQueryTest.java  |   392 +
 .../query/IgniteSqlQueryParallelismTest.java    |   202 +
 .../processors/query/IgniteSqlRoutingTest.java  |     7 -
 .../query/IgniteSqlSchemaIndexingTest.java      |    46 +-
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |   129 +-
 ...teSqlSkipReducerOnUpdateDmlFlagSelfTest.java |   792 ++
 ...IgniteSqlSkipReducerOnUpdateDmlSelfTest.java |   751 ++
 .../query/IgniteSqlSplitterSelfTest.java        |     5 -
 .../processors/query/LazyQuerySelfTest.java     |   389 +
 .../MultipleStatementsSqlQuerySelfTest.java     |   154 +
 .../query/SqlIllegalSchemaSelfTest.java         |   187 +
 .../query/SqlPushDownFunctionTest.java          |    78 +
 .../processors/query/SqlSchemaSelfTest.java     |   112 +-
 .../query/SqlSystemViewsSelfTest.java           |   536 +
 .../query/h2/GridIndexRebuildSelfTest.java      |   240 +
 ...GridIndexRebuildWithMvccEnabledSelfTest.java |   125 +
 .../h2/GridIndexingSpiAbstractSelfTest.java     |   101 +-
 ...H2ResultSetIteratorNullifyOnEndSelfTest.java |   420 +
 .../query/h2/H2StatementCacheSelfTest.java      |    83 +
 .../query/h2/IgniteSqlBigIntegerKeyTest.java    |   158 +
 .../query/h2/PreparedStatementExSelfTest.java   |    61 +
 .../query/h2/ThreadLocalObjectPoolSelfTest.java |   113 +
 .../h2/database/InlineIndexHelperTest.java      |   392 +-
 .../query/h2/opt/GridH2TableSelfTest.java       |   541 -
 .../h2/sql/AbstractH2CompareQueryTest.java      |     8 +-
 .../query/h2/sql/GridQueryParsingTest.java      |   330 +-
 .../h2/twostep/CacheQueryMemoryLeakTest.java    |   159 +
 ...sappearedCacheCauseRetryMessageSelfTest.java |   134 +
 ...appearedCacheWasNotFoundMessageSelfTest.java |   123 +
 .../query/h2/twostep/JoinSqlTestHelper.java     |   163 +
 .../NonCollocatedRetryMessageSelfTest.java      |   146 +
 .../h2/twostep/RetryCauseMessageSelfTest.java   |   417 +
 .../h2/twostep/TableViewSubquerySelfTest.java   |   120 +
 ...ePartitionedAtomicColumnConstraintsTest.java |   398 +
 ...ionedTransactionalColumnConstraintsTest.java |    30 +
 ...heReplicatedAtomicColumnConstraintsTest.java |    32 +
 ...catedTransactionalColumnConstraintsTest.java |    30 +
 .../sql/IgniteSQLColumnConstraintsTest.java     |   143 +
 ...onnectorConfigurationValidationSelfTest.java |     3 +-
 .../loadtests/h2indexing/GridTestEntity.java    |    67 -
 .../loadtests/h2indexing/GridTreeBenchmark.java |   280 -
 .../org/apache/ignite/sqltests/BaseSqlTest.java |  1303 ++
 .../ignite/sqltests/PartitionedSqlTest.java     |   156 +
 .../ignite/sqltests/ReplicatedSqlTest.java      |   349 +
 .../IgniteBinaryCacheQueryTestSuite.java        |     4 +
 .../IgniteCacheAffinityRunTestSuite.java        |     4 +
 .../testsuites/IgniteCacheMvccSqlTestSuite.java |   102 +
 .../IgniteCacheQuerySelfTestSuite.java          |   170 +-
 .../IgniteCacheQuerySelfTestSuite2.java         |    44 +
 .../IgniteCacheQuerySelfTestSuite3.java         |    30 +-
 ...acheWithIndexingAndPersistenceTestSuite.java |    38 +
 .../IgniteCacheWithIndexingTestSuite.java       |    15 +
 .../IgniteDistributedJoinTestSuite.java         |    55 -
 .../IgnitePdsWithIndexingCoreTestSuite.java     |    36 +
 .../IgnitePdsWithIndexingTestSuite.java         |     4 +
 .../util/GridCommandHandlerIndexingTest.java    |   311 +
 ...ityWithJsr310Java8DateTimeApiFieldsTest.java |   351 +
 ...QueryJsr310Java8DateTimeApiAbstractTest.java |    88 +
 ...yJsr310Java8DateTimeApiSupportTestSuite.java |    38 +
 .../processors/cache/mvcc/mvcc_person.csv       |     2 +
 .../cache/mvcc/mvcc_person_broken.csv           |     2 +
 modules/jcl/pom.xml                             |     2 +-
 modules/jms11/pom.xml                           |     2 +-
 .../apache/ignite/stream/jms11/JmsStreamer.java |    28 +
 .../stream/jms11/IgniteJmsStreamerTest.java     |    81 +-
 modules/jta/pom.xml                             |    14 +-
 .../processors/cache/jta/CacheJtaManager.java   |     9 +-
 .../processors/cache/jta/CacheJtaResource.java  |    48 +-
 .../cache/AbstractCacheJtaSelfTest.java         |   183 -
 .../cache/CacheJndiTmFactorySelfTest.java       |     2 -
 .../GridJtaTransactionManagerSelfTest.java      |   211 +
 .../GridPartitionedCacheJtaFactorySelfTest.java |    41 -
 ...rtitionedCacheJtaFactoryUseSyncSelfTest.java |    32 -
 ...titionedCacheJtaLookupClassNameSelfTest.java |    83 -
 .../GridReplicatedCacheJtaFactorySelfTest.java  |    32 -
 ...eplicatedCacheJtaFactoryUseSyncSelfTest.java |    32 -
 ...plicatedCacheJtaLookupClassNameSelfTest.java |    32 -
 .../cache/jta/AbstractCacheJtaSelfTest.java     |   248 +
 .../GridPartitionedCacheJtaFactorySelfTest.java |    48 +
 ...rtitionedCacheJtaFactoryUseSyncSelfTest.java |    32 +
 ...titionedCacheJtaLookupClassNameSelfTest.java |    83 +
 .../GridReplicatedCacheJtaFactorySelfTest.java  |    32 +
 ...eplicatedCacheJtaFactoryUseSyncSelfTest.java |    32 +
 ...plicatedCacheJtaLookupClassNameSelfTest.java |    32 +
 .../processors/cache/jta/package-info.java      |    22 +
 .../ignite/testsuites/IgniteJtaTestSuite.java   |    15 +-
 modules/kafka/pom.xml                           |    14 +-
 .../ignite/stream/kafka/KafkaStreamer.java      |   173 +-
 .../kafka/KafkaIgniteStreamerSelfTest.java      |    39 +-
 .../ignite/stream/kafka/TestKafkaBroker.java    |    18 +-
 .../kafka/connect/IgniteSinkConnectorTest.java  |     5 -
 .../connect/IgniteSourceConnectorTest.java      |     5 -
 modules/kubernetes/DEVNOTES.txt                 |     2 +-
 modules/kubernetes/config/Dockerfile            |     8 +-
 .../config/az/ignite-account-role.yaml          |    30 +
 .../kubernetes/config/az/ignite-deployment.yaml |    47 +
 .../kubernetes/config/az/ignite-namespace.yaml  |    19 +
 .../az/ignite-persistence-storage-class.yaml    |    25 +
 .../config/az/ignite-role-binding.yaml          |    27 +
 .../config/az/ignite-service-account.yaml       |    20 +
 .../kubernetes/config/az/ignite-service.yaml    |    40 +
 .../config/az/ignite-stateful-set.yaml          |    74 +
 .../config/az/ignite-wal-storage-class.yaml     |    25 +
 .../config/eks/ignite-account-role.yaml         |    30 +
 .../kubernetes/config/eks/ignite-namespace.yaml |    19 +
 .../eks/ignite-persistence-storage-class.yaml   |    25 +
 .../config/eks/ignite-role-binding.yaml         |    27 +
 .../config/eks/ignite-service-account.yaml      |    20 +
 .../kubernetes/config/eks/ignite-service.yaml   |    37 +
 .../config/eks/ignite-stateful-set.yaml         |    74 +
 .../config/eks/ignite-wal-storage-class.yaml    |    25 +
 .../config/example-kube-persistence-and-wal.xml |    76 +
 .../config/example-kube-persistence.xml         |    56 +
 modules/kubernetes/config/example-kube-rbac.xml |    46 +
 modules/kubernetes/config/example-kube.xml      |     2 +-
 .../config/gce/ignite-account-role.yaml         |    30 +
 .../config/gce/ignite-deployment.yaml           |    47 +
 .../kubernetes/config/gce/ignite-namespace.yaml |    19 +
 .../gce/ignite-persistence-storage-class.yaml   |    26 +
 .../config/gce/ignite-role-binding.yaml         |    27 +
 .../config/gce/ignite-service-account.yaml      |    20 +
 .../kubernetes/config/gce/ignite-service.yaml   |    40 +
 .../config/gce/ignite-stateful-set.yaml         |    74 +
 .../config/gce/ignite-wal-storage-class.yaml    |    26 +
 .../kubernetes/config/ignite-deployment.yaml    |     3 +-
 modules/kubernetes/pom.xml                      |    10 +-
 .../TcpDiscoveryKubernetesIpFinder.java         |     4 +-
 modules/log4j/pom.xml                           |     2 +-
 .../apache/ignite/logger/log4j/Log4JLogger.java |   138 +-
 modules/log4j/src/test/config/log4j-debug.xml   |    50 +
 modules/log4j/src/test/config/log4j-info.xml    |    50 +
 .../logger/log4j/GridLog4jConfigUpdateTest.java |   163 +
 .../log4j/GridLog4jCorrectFileNameTest.java     |    13 +
 .../logger/log4j/GridLog4jInitializedTest.java  |     7 +-
 .../logger/log4j/GridLog4jLoggingFileTest.java  |    13 +-
 .../logger/log4j/GridLog4jLoggingPathTest.java  |    12 +-
 .../logger/log4j/GridLog4jLoggingUrlTest.java   |    15 +-
 .../log4j/GridLog4jNotInitializedTest.java      |     5 +
 .../logger/log4j/GridLog4jWatchDelayTest.java   |    49 +
 .../ignite/testsuites/IgniteLog4jTestSuite.java |    35 +-
 modules/log4j2/pom.xml                          |     6 +-
 .../ignite/logger/log4j2/Log4J2Logger.java      |   179 +-
 modules/log4j2/src/test/config/log4j2-debug.xml |    37 +
 modules/log4j2/src/test/config/log4j2-info.xml  |    37 +
 .../log4j2/src/test/config/log4j2-markers.xml   |    38 +
 .../log4j2/GridLog4j2CorrectFileNameTest.java   |    94 -
 .../log4j2/GridLog4j2InitializedTest.java       |    77 -
 .../log4j2/GridLog4j2LoggingFileTest.java       |    68 -
 .../logger/log4j2/Log4j2ConfigUpdateTest.java   |   152 +
 .../logger/log4j2/Log4j2LoggerMarkerTest.java   |   110 +
 .../logger/log4j2/Log4j2LoggerSelfTest.java     |    26 +-
 .../log4j2/Log4j2LoggerVerboseModeSelfTest.java |    71 +-
 .../testsuites/IgniteLog4j2TestSuite.java       |     8 +-
 modules/mesos/pom.xml                           |    51 +-
 .../apache/ignite/mesos/ClusterProperties.java  |     4 +-
 .../apache/ignite/mesos/IgniteFramework.java    |     3 +-
 .../ignite/mesos/resource/IgniteProvider.java   |   122 +-
 .../ignite/mesos/IgniteSchedulerSelfTest.java   |    11 +
 modules/ml/README.txt                           |    20 +-
 modules/ml/licenses/bsd3.txt                    |    51 +
 modules/ml/licenses/netlib-java-bsd3.txt        |    51 +
 modules/ml/pom.xml                              |    76 +-
 .../java/org/apache/ignite/ml/Exportable.java   |    33 +
 .../java/org/apache/ignite/ml/Exporter.java     |    38 +
 .../java/org/apache/ignite/ml/FileExporter.java |    75 +
 .../main/java/org/apache/ignite/ml/Model.java   |    16 +-
 .../ml/clustering/BaseKMeansClusterer.java      |    96 -
 .../apache/ignite/ml/clustering/Clusterer.java  |    33 -
 .../ml/clustering/ClusterizationModel.java      |    29 -
 .../clustering/KMeansDistributedClusterer.java  |   298 -
 .../ml/clustering/KMeansLocalClusterer.java     |   177 -
 .../ignite/ml/clustering/KMeansModel.java       |    79 -
 .../ignite/ml/clustering/WeightedClusterer.java |    38 -
 .../ignite/ml/clustering/kmeans/Clusterer.java  |    33 +
 .../clustering/kmeans/ClusterizationModel.java  |    29 +
 .../ml/clustering/kmeans/KMeansModel.java       |   132 +
 .../ml/clustering/kmeans/KMeansModelFormat.java |    79 +
 .../ml/clustering/kmeans/KMeansTrainer.java     |   410 +
 .../ml/clustering/kmeans/package-info.java      |    22 +
 .../ml/composition/BaggingModelTrainer.java     |   200 +
 .../ml/composition/ModelOnFeaturesSubspace.java |    94 +
 .../ml/composition/ModelsComposition.java       |   100 +
 .../ml/composition/ModelsCompositionFormat.java |    61 +
 .../boosting/GDBBinaryClassifierTrainer.java    |   105 +
 .../boosting/GDBLearningStrategy.java           |   267 +
 .../boosting/GDBRegressionTrainer.java          |    56 +
 .../ml/composition/boosting/GDBTrainer.java     |   265 +
 .../convergence/ConvergenceChecker.java         |   140 +
 .../convergence/ConvergenceCheckerFactory.java  |    58 +
 .../mean/MeanAbsValueConvergenceChecker.java    |   116 +
 .../MeanAbsValueConvergenceCheckerFactory.java  |    47 +
 .../boosting/convergence/mean/package-info.java |    22 +
 .../MedianOfMedianConvergenceChecker.java       |   126 +
 ...MedianOfMedianConvergenceCheckerFactory.java |    47 +
 .../convergence/median/package-info.java        |    22 +
 .../boosting/convergence/package-info.java      |    24 +
 .../simple/ConvergenceCheckerStub.java          |    79 +
 .../simple/ConvergenceCheckerStubFactory.java   |    48 +
 .../convergence/simple/package-info.java        |    24 +
 .../ml/composition/boosting/loss/LogLoss.java   |    36 +
 .../ml/composition/boosting/loss/Loss.java      |    45 +
 .../composition/boosting/loss/SquaredError.java |    36 +
 .../composition/boosting/loss/package-info.java |    22 +
 .../ml/composition/boosting/package-info.java   |    23 +
 .../ignite/ml/composition/package-info.java     |    22 +
 .../MeanValuePredictionsAggregator.java         |    32 +
 .../OnMajorityPredictionsAggregator.java        |    44 +
 .../PredictionsAggregator.java                  |    34 +
 .../WeightedPredictionsAggregator.java          |    99 +
 .../predictionsaggregator/package-info.java     |    23 +
 .../org/apache/ignite/ml/dataset/Dataset.java   |   213 +
 .../ignite/ml/dataset/DatasetBuilder.java       |    57 +
 .../ignite/ml/dataset/DatasetFactory.java       |   420 +
 .../ml/dataset/PartitionContextBuilder.java     |    58 +
 .../ignite/ml/dataset/PartitionDataBuilder.java |    63 +
 .../apache/ignite/ml/dataset/UpstreamEntry.java |    53 +
 .../ignite/ml/dataset/feature/BucketMeta.java   |    88 +
 .../dataset/feature/DistributionComputer.java   |    32 +
 .../ignite/ml/dataset/feature/FeatureMeta.java  |    65 +
 .../ignite/ml/dataset/feature/Histogram.java    |    64 +
 .../ml/dataset/feature/ObjectHistogram.java     |   129 +
 .../ignite/ml/dataset/feature/package-info.java |    24 +
 .../BootstrappedDatasetBuilder.java             |    90 +
 .../BootstrappedDatasetPartition.java           |    68 +
 .../impl/bootstrapping/BootstrappedVector.java  |    87 +
 .../impl/bootstrapping/package-info.java        |    23 +
 .../dataset/impl/cache/CacheBasedDataset.java   |   182 +
 .../impl/cache/CacheBasedDatasetBuilder.java    |   119 +
 .../ml/dataset/impl/cache/package-info.java     |    22 +
 .../dataset/impl/cache/util/ComputeUtils.java   |   321 +
 .../util/DatasetAffinityFunctionWrapper.java    |    75 +
 ...eratorWithConcurrentModificationChecker.java |    80 +
 .../impl/cache/util/PartitionDataStorage.java   |    65 +
 .../dataset/impl/cache/util/package-info.java   |    22 +
 .../ml/dataset/impl/local/LocalDataset.java     |    96 +
 .../dataset/impl/local/LocalDatasetBuilder.java |   167 +
 .../ml/dataset/impl/local/package-info.java     |    22 +
 .../ignite/ml/dataset/impl/package-info.java    |    22 +
 .../apache/ignite/ml/dataset/package-info.java  |    22 +
 .../ml/dataset/primitive/DatasetWrapper.java    |    63 +
 .../FeatureMatrixWithLabelsOnHeapData.java      |    57 +
 ...eatureMatrixWithLabelsOnHeapDataBuilder.java |    76 +
 .../ml/dataset/primitive/SimpleDataset.java     |   216 +
 .../dataset/primitive/SimpleLabeledDataset.java |    39 +
 .../builder/context/EmptyContextBuilder.java    |    39 +
 .../primitive/builder/context/package-info.java |    22 +
 .../builder/data/SimpleDatasetDataBuilder.java  |    78 +
 .../data/SimpleLabeledDatasetDataBuilder.java   |   101 +
 .../primitive/builder/data/package-info.java    |    22 +
 .../dataset/primitive/builder/package-info.java |    22 +
 .../dataset/primitive/context/EmptyContext.java |    28 +
 .../dataset/primitive/context/package-info.java |    22 +
 .../primitive/data/SimpleDatasetData.java       |    59 +
 .../data/SimpleLabeledDatasetData.java          |    69 +
 .../ml/dataset/primitive/data/package-info.java |    22 +
 .../ml/dataset/primitive/package-info.java      |    28 +
 .../ml/environment/LearningEnvironment.java     |    54 +
 .../environment/LearningEnvironmentBuilder.java |   125 +
 .../ml/environment/logging/ConsoleLogger.java   |   102 +
 .../ml/environment/logging/CustomMLLogger.java  |   105 +
 .../ignite/ml/environment/logging/MLLogger.java |    76 +
 .../ml/environment/logging/NoOpLogger.java      |    64 +
 .../ml/environment/logging/package-info.java    |    21 +
 .../ignite/ml/environment/package-info.java     |    21 +
 .../parallelism/DefaultParallelismStrategy.java |    85 +
 .../parallelism/NoParallelismStrategy.java      |    89 +
 .../parallelism/ParallelismStrategy.java        |    58 +
 .../ml/environment/parallelism/Promise.java     |    53 +
 .../environment/parallelism/package-info.java   |    21 +
 .../apache/ignite/ml/genetic/Chromosome.java    |   107 +
 .../apache/ignite/ml/genetic/CrossOverJob.java  |   139 +
 .../apache/ignite/ml/genetic/CrossOverTask.java |   134 +
 .../apache/ignite/ml/genetic/FitnessJob.java    |    99 +
 .../apache/ignite/ml/genetic/FitnessTask.java   |    99 +
 .../org/apache/ignite/ml/genetic/GAGrid.java    |   433 +
 .../java/org/apache/ignite/ml/genetic/Gene.java |    85 +
 .../ignite/ml/genetic/IFitnessFunction.java     |    37 +
 .../org/apache/ignite/ml/genetic/MutateJob.java |    88 +
 .../apache/ignite/ml/genetic/MutateTask.java    |   184 +
 .../ignite/ml/genetic/TruncateSelectionJob.java |    79 +
 .../ml/genetic/TruncateSelectionTask.java       |   157 +
 .../ml/genetic/cache/GeneCacheConfig.java       |    50 +
 .../ml/genetic/cache/PopulationCacheConfig.java |    51 +
 .../ignite/ml/genetic/cache/package-info.java   |    21 +
 .../ml/genetic/functions/GAGridFunction.java    |   122 +
 .../ml/genetic/functions/package-info.java      |    21 +
 .../apache/ignite/ml/genetic/package-info.java  |    21 +
 .../genetic/parameter/ChromosomeCriteria.java   |    49 +
 .../ml/genetic/parameter/GAConfiguration.java   |   323 +
 .../ml/genetic/parameter/GAGridConstants.java   |    34 +
 .../genetic/parameter/ITerminateCriteria.java   |    39 +
 .../ml/genetic/parameter/package-info.java      |    21 +
 .../ignite/ml/genetic/utils/GAGridUtils.java    |    89 +
 .../ignite/ml/genetic/utils/package-info.java   |    21 +
 .../java/org/apache/ignite/ml/knn/KNNUtils.java |    60 +
 .../ignite/ml/knn/NNClassificationModel.java    |   233 +
 .../ml/knn/ann/ANNClassificationModel.java      |   208 +
 .../ml/knn/ann/ANNClassificationTrainer.java    |   382 +
 .../ignite/ml/knn/ann/ANNModelFormat.java       |    90 +
 .../apache/ignite/ml/knn/ann/ProbableLabel.java |    39 +
 .../apache/ignite/ml/knn/ann/package-info.java  |    22 +
 .../classification/KNNClassificationModel.java  |   147 +
 .../KNNClassificationTrainer.java               |    60 +
 .../ml/knn/classification/KNNModelFormat.java   |    92 +
 .../ml/knn/classification/NNStrategy.java       |    29 +
 .../ml/knn/classification/package-info.java     |    22 +
 .../org/apache/ignite/ml/knn/package-info.java  |    22 +
 .../ml/knn/regression/KNNRegressionModel.java   |   104 +
 .../ml/knn/regression/KNNRegressionTrainer.java |    59 +
 .../ignite/ml/knn/regression/package-info.java  |    22 +
 .../java/org/apache/ignite/ml/math/Algebra.java |   590 -
 .../java/org/apache/ignite/ml/math/Blas.java    |   331 +
 .../org/apache/ignite/ml/math/Constants.java    |    59 -
 .../apache/ignite/ml/math/DistanceMeasure.java  |    38 -
 .../ignite/ml/math/EuclideanDistance.java       |    48 -
 .../ignite/ml/math/IdentityValueMapper.java     |    54 -
 .../org/apache/ignite/ml/math/KeyMapper.java    |    33 -
 .../org/apache/ignite/ml/math/MathUtils.java    |    31 -
 .../java/org/apache/ignite/ml/math/Matrix.java  |   518 -
 .../apache/ignite/ml/math/MatrixKeyMapper.java  |    30 -
 .../apache/ignite/ml/math/MatrixStorage.java    |    58 -
 .../org/apache/ignite/ml/math/MurmurHash.java   |   247 -
 .../org/apache/ignite/ml/math/Precision.java    |   588 -
 .../java/org/apache/ignite/ml/math/Tracer.java  |   152 +-
 .../org/apache/ignite/ml/math/ValueMapper.java  |    37 -
 .../java/org/apache/ignite/ml/math/Vector.java  |   499 -
 .../apache/ignite/ml/math/VectorKeyMapper.java  |    29 -
 .../apache/ignite/ml/math/VectorStorage.java    |    53 -
 .../org/apache/ignite/ml/math/VectorUtils.java  |    39 -
 .../decompositions/CholeskyDecomposition.java   |   310 -
 .../decompositions/DecompositionSupport.java    |   105 -
 .../math/decompositions/EigenDecomposition.java |   936 --
 .../ml/math/decompositions/LUDecomposition.java |   383 -
 .../ml/math/decompositions/QRDecomposition.java |   246 -
 .../SingularValueDecomposition.java             |   623 -
 .../ml/math/decompositions/package-info.java    |    22 -
 .../ml/math/distances/DistanceMeasure.java      |    51 +
 .../ml/math/distances/EuclideanDistance.java    |    71 +
 .../ml/math/distances/HammingDistance.java      |    72 +
 .../ml/math/distances/ManhattanDistance.java    |    66 +
 .../ignite/ml/math/distances/package-info.java  |    22 +
 .../math/exceptions/ConvergenceException.java   |    47 -
 .../exceptions/InsufficientDataException.java   |    44 -
 .../exceptions/MathArithmeticException.java     |    45 -
 .../exceptions/MathIllegalNumberException.java  |    51 -
 .../exceptions/MathIllegalStateException.java   |    49 -
 .../NonPositiveDefiniteMatrixException.java     |    35 -
 .../exceptions/NonSymmetricMatrixException.java |    35 -
 .../math/exceptions/NullArgumentException.java  |    27 -
 .../exceptions/NumberIsTooSmallException.java   |    79 -
 .../exceptions/SingularMatrixException.java     |    33 -
 .../exceptions/UnknownProviderException.java    |    35 -
 .../math/exceptions/knn/EmptyFileException.java |    37 +
 .../exceptions/knn/FileParsingException.java    |    39 +
 .../exceptions/knn/NoLabelVectorException.java  |    37 +
 .../ml/math/exceptions/knn/package-info.java    |    22 +
 .../UnknownCategorialFeatureValue.java          |    35 +
 .../ignite/ml/math/functions/Functions.java     |    99 +
 .../ml/math/functions/IgniteBiFunction.java     |     8 +-
 .../ml/math/functions/IgniteBinaryOperator.java |    29 +
 .../math/functions/IgniteCurriedBiFunction.java |    29 +
 .../functions/IgniteCurriedTriFunction.java     |    28 +
 ...iteDifferentiableDoubleToDoubleFunction.java |    31 +
 ...iteDifferentiableVectorToDoubleFunction.java |    33 +
 .../IgniteIntDoubleToDoubleBiFunction.java      |    27 +
 .../functions/IgniteIntIntToIntBiFunction.java  |    27 +
 .../ml/math/functions/IgniteSupplier.java       |    30 +
 .../math/functions/IgniteToDoubleFunction.java  |    30 +
 .../ml/math/functions/IgniteTriConsumer.java    |    40 +
 .../ml/math/functions/IgniteTriFunction.java    |    36 +
 .../apache/ignite/ml/math/impls/CacheUtils.java |   451 -
 .../ml/math/impls/matrix/AbstractMatrix.java    |   885 --
 .../ml/math/impls/matrix/CacheMatrix.java       |   159 -
 .../impls/matrix/DenseLocalOffHeapMatrix.java   |    85 -
 .../impls/matrix/DenseLocalOnHeapMatrix.java    |    86 -
 .../ml/math/impls/matrix/DiagonalMatrix.java    |   101 -
 .../ml/math/impls/matrix/FunctionMatrix.java    |    95 -
 .../ignite/ml/math/impls/matrix/MatrixView.java |    84 -
 .../ml/math/impls/matrix/PivotedMatrixView.java |   241 -
 .../ml/math/impls/matrix/RandomMatrix.java      |    97 -
 .../impls/matrix/SparseDistributedMatrix.java   |   153 -
 .../impls/matrix/SparseLocalOnHeapMatrix.java   |    72 -
 .../math/impls/matrix/TransposedMatrixView.java |    84 -
 .../ml/math/impls/matrix/package-info.java      |    22 -
 .../ignite/ml/math/impls/package-info.java      |    22 -
 .../storage/matrix/ArrayMatrixStorage.java      |   161 -
 .../storage/matrix/CacheMatrixStorage.java      |   185 -
 .../matrix/DenseOffHeapMatrixStorage.java       |   206 -
 .../storage/matrix/DiagonalMatrixStorage.java   |   136 -
 .../storage/matrix/FunctionMatrixStorage.java   |   179 -
 .../impls/storage/matrix/MapWrapperStorage.java |   109 -
 .../storage/matrix/MatrixDelegateStorage.java   |   205 -
 .../storage/matrix/PivotedMatrixStorage.java    |   256 -
 .../storage/matrix/RandomMatrixStorage.java     |   176 -
 .../matrix/SparseDistributedMatrixStorage.java  |   317 -
 .../matrix/SparseLocalOnHeapMatrixStorage.java  |   228 -
 .../math/impls/storage/matrix/package-info.java |    22 -
 .../storage/vector/ArrayVectorStorage.java      |   135 -
 .../storage/vector/CacheVectorStorage.java      |   175 -
 .../storage/vector/ConstantVectorStorage.java   |   134 -
 .../storage/vector/DelegateVectorStorage.java   |   163 -
 .../vector/DenseLocalOffHeapVectorStorage.java  |   172 -
 .../storage/vector/FunctionVectorStorage.java   |   143 -
 .../storage/vector/MatrixVectorStorage.java     |   184 -
 .../storage/vector/PivotedVectorStorage.java    |   176 -
 .../storage/vector/RandomVectorStorage.java     |   152 -
 .../SingleElementVectorDelegateStorage.java     |   145 -
 .../vector/SingleElementVectorStorage.java      |   145 -
 .../vector/SparseLocalOffHeapVectorStorage.java |   153 -
 .../vector/SparseLocalOnHeapVectorStorage.java  |   183 -
 .../math/impls/storage/vector/package-info.java |    22 -
 .../impls/vector/AbstractReadOnlyVector.java    |   125 -
 .../ml/math/impls/vector/AbstractVector.java    |   907 --
 .../ml/math/impls/vector/CacheVector.java       |   140 -
 .../ml/math/impls/vector/ConstantVector.java    |    84 -
 .../ml/math/impls/vector/DelegatingVector.java  |   396 -
 .../impls/vector/DenseLocalOffHeapVector.java   |    89 -
 .../impls/vector/DenseLocalOnHeapVector.java    |   104 -
 .../ml/math/impls/vector/FunctionVector.java    |   112 -
 .../ml/math/impls/vector/MapWrapperVector.java  |    48 -
 .../ml/math/impls/vector/MatrixVectorView.java  |   144 -
 .../ml/math/impls/vector/PivotedVectorView.java |   163 -
 .../ml/math/impls/vector/RandomVector.java      |   130 -
 .../math/impls/vector/SingleElementVector.java  |   102 -
 .../impls/vector/SingleElementVectorView.java   |    97 -
 .../impls/vector/SparseLocalOffHeapVector.java  |    47 -
 .../ml/math/impls/vector/SparseLocalVector.java |    80 -
 .../ignite/ml/math/impls/vector/VectorView.java |    86 -
 .../ml/math/impls/vector/package-info.java      |    22 -
 .../ml/math/isolve/IterativeSolverResult.java   |    64 +
 .../ml/math/isolve/lsqr/AbstractLSQR.java       |   362 +
 .../ignite/ml/math/isolve/lsqr/LSQROnHeap.java  |   120 +
 .../math/isolve/lsqr/LSQRPartitionContext.java  |    41 +
 .../ignite/ml/math/isolve/lsqr/LSQRResult.java  |   140 +
 .../ml/math/isolve/lsqr/package-info.java       |    22 +
 .../ignite/ml/math/isolve/package-info.java     |    22 +
 .../org/apache/ignite/ml/math/package-info.java |     4 +-
 .../math/primitives/matrix/AbstractMatrix.java  |   921 ++
 .../ml/math/primitives/matrix/Matrix.java       |   523 +
 .../math/primitives/matrix/MatrixStorage.java   |    75 +
 .../math/primitives/matrix/OrderedMatrix.java   |    24 +
 .../primitives/matrix/impl/DenseMatrix.java     |   134 +
 .../primitives/matrix/impl/SparseMatrix.java    |   100 +
 .../math/primitives/matrix/impl/ViewMatrix.java |    85 +
 .../primitives/matrix/impl/package-info.java    |    22 +
 .../ml/math/primitives/matrix/package-info.java |    22 +
 .../matrix/storage/DenseMatrixStorage.java      |   225 +
 .../matrix/storage/SparseMatrixStorage.java     |   262 +
 .../matrix/storage/ViewMatrixStorage.java       |   215 +
 .../primitives/matrix/storage/package-info.java |    22 +
 .../ignite/ml/math/primitives/package-info.java |    22 +
 .../math/primitives/vector/AbstractVector.java  |   914 ++
 .../ml/math/primitives/vector/Vector.java       |   522 +
 .../math/primitives/vector/VectorStorage.java   |    55 +
 .../ml/math/primitives/vector/VectorUtils.java  |   189 +
 .../vector/impl/DelegatingVector.java           |   402 +
 .../primitives/vector/impl/DenseVector.java     |   105 +
 .../primitives/vector/impl/SparseVector.java    |   120 +
 .../math/primitives/vector/impl/VectorView.java |    87 +
 .../vector/impl/VectorizedViewMatrix.java       |   145 +
 .../primitives/vector/impl/package-info.java    |    22 +
 .../ml/math/primitives/vector/package-info.java |    22 +
 .../vector/storage/DenseVectorStorage.java      |   135 +
 .../vector/storage/SparseVectorStorage.java     |   196 +
 .../vector/storage/VectorViewStorage.java       |   163 +
 .../storage/VectorizedViewMatrixStorage.java    |   195 +
 .../primitives/vector/storage/package-info.java |    22 +
 .../ignite/ml/math/statistics/Variance.java     |    53 -
 .../org/apache/ignite/ml/math/util/MapUtil.java |     2 +-
 .../apache/ignite/ml/math/util/MatrixUtil.java  |   192 +-
 .../ignite/ml/math/util/package-info.java       |    22 +
 .../org/apache/ignite/ml/nn/Activators.java     |    81 +
 .../java/org/apache/ignite/ml/nn/MLPLayer.java  |    48 +
 .../java/org/apache/ignite/ml/nn/MLPState.java  |    73 +
 .../org/apache/ignite/ml/nn/MLPTrainer.java     |   379 +
 .../ignite/ml/nn/MultilayerPerceptron.java      |   588 +
 .../ignite/ml/nn/ReplicatedVectorMatrix.java    |   554 +
 .../apache/ignite/ml/nn/UpdatesStrategy.java    |    95 +
 .../ml/nn/architecture/LayerArchitecture.java   |    48 +
 .../ml/nn/architecture/MLPArchitecture.java     |   152 +
 .../TransformationLayerArchitecture.java        |    68 +
 .../ignite/ml/nn/architecture/package-info.java |    22 +
 .../ml/nn/initializers/MLPInitializer.java      |    40 +
 .../ml/nn/initializers/RandomInitializer.java   |    67 +
 .../ignite/ml/nn/initializers/package-info.java |    22 +
 .../org/apache/ignite/ml/nn/package-info.java   |    22 +
 .../ml/optimization/BaseParametrized.java       |    58 +
 .../ignite/ml/optimization/LossFunctions.java   |   122 +
 .../ignite/ml/optimization/Parametrized.java    |    26 +
 .../ml/optimization/SmoothParametrized.java     |    45 +
 .../ignite/ml/optimization/package-info.java    |    22 +
 .../NesterovParameterUpdate.java                |   104 +
 .../NesterovUpdateCalculator.java               |    87 +
 .../ParameterUpdateCalculator.java              |    60 +
 .../updatecalculators/RPropParameterUpdate.java |   231 +
 .../RPropUpdateCalculator.java                  |   155 +
 .../SimpleGDParameterUpdate.java                |    92 +
 .../SimpleGDUpdateCalculator.java               |    84 +
 .../updatecalculators/package-info.java         |    22 +
 .../java/org/apache/ignite/ml/package-info.java |    22 +
 .../org/apache/ignite/ml/pipeline/Pipeline.java |   152 +
 .../apache/ignite/ml/pipeline/PipelineMdl.java  |    84 +
 .../apache/ignite/ml/pipeline/package-info.java |    22 +
 .../ml/preprocessing/PreprocessingTrainer.java  |    78 +
 .../binarization/BinarizationPreprocessor.java  |    75 +
 .../binarization/BinarizationTrainer.java       |    60 +
 .../binarization/package-info.java              |    22 +
 .../encoding/EncoderPartitionData.java          |    59 +
 .../encoding/EncoderPreprocessor.java           |    58 +
 .../preprocessing/encoding/EncoderTrainer.java  |   234 +
 .../ml/preprocessing/encoding/EncoderType.java  |    31 +
 .../OneHotEncoderPreprocessor.java              |   149 +
 .../encoding/onehotencoder/package-info.java    |    22 +
 .../ml/preprocessing/encoding/package-info.java |    22 +
 .../StringEncoderPreprocessor.java              |    88 +
 .../encoding/stringencoder/package-info.java    |    22 +
 .../imputing/ImputerPartitionData.java          |   111 +
 .../imputing/ImputerPreprocessor.java           |    68 +
 .../preprocessing/imputing/ImputerTrainer.java  |   283 +
 .../imputing/ImputingStrategy.java              |    27 +
 .../ml/preprocessing/imputing/package-info.java |    22 +
 .../MaxAbsScalerPartitionData.java              |    48 +
 .../maxabsscaling/MaxAbsScalerPreprocessor.java |    77 +
 .../maxabsscaling/MaxAbsScalerTrainer.java      |    85 +
 .../maxabsscaling/package-info.java             |    22 +
 .../MinMaxScalerPartitionData.java              |    58 +
 .../minmaxscaling/MinMaxScalerPreprocessor.java |    89 +
 .../minmaxscaling/MinMaxScalerTrainer.java      |   106 +
 .../minmaxscaling/package-info.java             |    22 +
 .../NormalizationPreprocessor.java              |    94 +
 .../normalization/NormalizationTrainer.java     |    60 +
 .../normalization/package-info.java             |    22 +
 .../ignite/ml/preprocessing/package-info.java   |    22 +
 .../AbstractMultipleLinearRegression.java       |   358 -
 .../regressions/MultipleLinearRegression.java   |    71 -
 .../OLSMultipleLinearRegression.java            |   272 -
 .../regressions/RegressionsErrorMessages.java   |    28 -
 .../linear/FeatureExtractorWrapper.java         |    56 +
 .../linear/LinearRegressionLSQRTrainer.java     |    84 +
 .../linear/LinearRegressionModel.java           |   112 +
 .../linear/LinearRegressionSGDTrainer.java      |   255 +
 .../ml/regressions/linear/package-info.java     |    22 +
 .../binomial/LogisticRegressionModel.java       |   205 +
 .../binomial/LogisticRegressionSGDTrainer.java  |   247 +
 .../logistic/binomial/package-info.java         |    22 +
 .../LogRegressionMultiClassModel.java           |   115 +
 .../LogRegressionMultiClassTrainer.java         |   268 +
 .../logistic/multiclass/package-info.java       |    22 +
 .../ml/regressions/logistic/package-info.java   |    22 +
 .../ignite/ml/selection/cv/CrossValidation.java |   337 +
 .../ml/selection/cv/CrossValidationResult.java  |   134 +
 .../ignite/ml/selection/cv/package-info.java    |    22 +
 .../ignite/ml/selection/package-info.java       |    22 +
 .../ml/selection/paramgrid/ParamGrid.java       |    58 +
 .../paramgrid/ParameterSetGenerator.java        |    91 +
 .../ml/selection/paramgrid/package-info.java    |    22 +
 .../ignite/ml/selection/scoring/LabelPair.java  |    52 +
 .../cursor/CacheBasedLabelPairCursor.java       |   154 +
 .../scoring/cursor/LabelPairCursor.java         |    29 +
 .../scoring/cursor/LocalLabelPairCursor.java    |   138 +
 .../selection/scoring/cursor/package-info.java  |    22 +
 .../selection/scoring/evaluator/Evaluator.java  |   104 +
 .../ml/selection/scoring/metric/Accuracy.java   |    48 +
 .../ml/selection/scoring/metric/Fmeasure.java   |    79 +
 .../ml/selection/scoring/metric/Metric.java     |    36 +
 .../ml/selection/scoring/metric/Precision.java  |    70 +
 .../ml/selection/scoring/metric/Recall.java     |    70 +
 .../selection/scoring/metric/package-info.java  |    22 +
 .../ml/selection/scoring/package-info.java      |    22 +
 .../split/TrainTestDatasetSplitter.java         |   122 +
 .../ml/selection/split/TrainTestSplit.java      |    59 +
 .../split/mapper/SHA256UniformMapper.java       |    95 +
 .../selection/split/mapper/UniformMapper.java   |    38 +
 .../ml/selection/split/mapper/package-info.java |    22 +
 .../ignite/ml/selection/split/package-info.java |    22 +
 .../apache/ignite/ml/structures/Dataset.java    |   259 +
 .../apache/ignite/ml/structures/DatasetRow.java |    79 +
 .../ignite/ml/structures/FeatureMetadata.java   |    82 +
 .../ignite/ml/structures/LabeledVector.java     |   103 +
 .../ignite/ml/structures/LabeledVectorSet.java  |   220 +
 .../LabeledVectorSetTestTrainPair.java          |   114 +
 .../ignite/ml/structures/package-info.java      |    22 +
 .../LabelPartitionDataBuilderOnHeap.java        |    65 +
 .../partition/LabelPartitionDataOnHeap.java     |    45 +
 ...abeledDatasetPartitionDataBuilderOnHeap.java |    87 +
 .../ml/structures/partition/package-info.java   |    22 +
 .../preprocessing/LabeledDatasetLoader.java     |   134 +
 .../structures/preprocessing/package-info.java  |    22 +
 .../svm/SVMLinearBinaryClassificationModel.java |   194 +
 .../SVMLinearBinaryClassificationTrainer.java   |   355 +
 .../SVMLinearMultiClassClassificationModel.java |   114 +
 ...VMLinearMultiClassClassificationTrainer.java |   268 +
 .../org/apache/ignite/ml/svm/package-info.java  |    22 +
 .../ignite/ml/trainers/DatasetTrainer.java      |   313 +
 .../ml/trainers/MultiLabelDatasetTrainer.java   |    28 +
 .../ml/trainers/SingleLabelDatasetTrainer.java  |    28 +
 .../apache/ignite/ml/trainers/package-info.java |    22 +
 .../org/apache/ignite/ml/tree/DecisionTree.java |   329 +
 .../tree/DecisionTreeClassificationTrainer.java |   132 +
 .../ml/tree/DecisionTreeConditionalNode.java    |    90 +
 .../ignite/ml/tree/DecisionTreeLeafNode.java    |    60 +
 .../apache/ignite/ml/tree/DecisionTreeNode.java |    27 +
 .../ml/tree/DecisionTreeRegressionTrainer.java  |    72 +
 .../org/apache/ignite/ml/tree/TreeFilter.java   |    38 +
 .../GDBBinaryClassifierOnTreesTrainer.java      |   123 +
 .../boosting/GDBOnTreesLearningStrategy.java    |   108 +
 .../boosting/GDBRegressionOnTreesTrainer.java   |   123 +
 .../ignite/ml/tree/boosting/package-info.java   |    22 +
 .../ignite/ml/tree/data/DecisionTreeData.java   |   172 +
 .../ml/tree/data/DecisionTreeDataBuilder.java   |    80 +
 .../ignite/ml/tree/data/TreeDataIndex.java      |   184 +
 .../ignite/ml/tree/data/package-info.java       |    22 +
 .../ml/tree/impurity/ImpurityMeasure.java       |    55 +
 .../impurity/ImpurityMeasureCalculator.java     |   107 +
 .../tree/impurity/gini/GiniImpurityMeasure.java |   115 +
 .../gini/GiniImpurityMeasureCalculator.java     |   131 +
 .../ml/tree/impurity/gini/package-info.java     |    22 +
 .../tree/impurity/mse/MSEImpurityMeasure.java   |   133 +
 .../mse/MSEImpurityMeasureCalculator.java       |   116 +
 .../ml/tree/impurity/mse/package-info.java      |    22 +
 .../ignite/ml/tree/impurity/package-info.java   |    22 +
 .../util/SimpleStepFunctionCompressor.java      |   149 +
 .../ml/tree/impurity/util/StepFunction.java     |   162 +
 .../impurity/util/StepFunctionCompressor.java   |    55 +
 .../ml/tree/impurity/util/package-info.java     |    22 +
 .../ml/tree/leaf/DecisionTreeLeafBuilder.java   |    38 +
 .../tree/leaf/MeanDecisionTreeLeafBuilder.java  |    73 +
 .../leaf/MostCommonDecisionTreeLeafBuilder.java |    86 +
 .../ignite/ml/tree/leaf/package-info.java       |    22 +
 .../org/apache/ignite/ml/tree/package-info.java |    22 +
 .../RandomForestClassifierTrainer.java          |   113 +
 .../RandomForestRegressionTrainer.java          |    65 +
 .../tree/randomforest/RandomForestTrainer.java  |   399 +
 .../data/FeaturesCountSelectionStrategies.java  |    47 +
 .../ml/tree/randomforest/data/NodeId.java       |    55 +
 .../ml/tree/randomforest/data/NodeSplit.java    |    79 +
 .../ml/tree/randomforest/data/TreeNode.java     |   200 +
 .../ml/tree/randomforest/data/TreeRoot.java     |    86 +
 .../data/impurity/GiniHistogram.java            |   224 +
 .../data/impurity/GiniHistogramsComputer.java   |    46 +
 .../data/impurity/ImpurityComputer.java         |    38 +
 .../data/impurity/ImpurityHistogram.java        |    74 +
 .../impurity/ImpurityHistogramsComputer.java    |   211 +
 .../data/impurity/MSEHistogram.java             |   234 +
 .../data/impurity/MSEHistogramComputer.java     |    33 +
 .../data/impurity/package-info.java             |    22 +
 .../ml/tree/randomforest/data/package-info.java |    22 +
 .../ClassifierLeafValuesComputer.java           |    82 +
 .../data/statistics/LeafValuesComputer.java     |   158 +
 .../data/statistics/MeanValueStatistic.java     |    72 +
 .../NormalDistributionStatistics.java           |   112 +
 .../NormalDistributionStatisticsComputer.java   |   119 +
 .../RegressionLeafValuesComputer.java           |    62 +
 .../data/statistics/package-info.java           |    22 +
 .../ml/tree/randomforest/package-info.java      |    22 +
 .../org/apache/ignite/ml/util/MnistUtils.java   |   215 +
 .../org/apache/ignite/ml/util/ModelTrace.java   |   130 +
 .../java/org/apache/ignite/ml/util/Utils.java   |   101 +
 .../org/apache/ignite/ml/util/package-info.java |    22 +
 .../org/apache/ignite/ml/IgniteMLTestSuite.java |    31 +-
 .../java/org/apache/ignite/ml/TestUtils.java    |   154 +-
 .../ml/clustering/ClusteringTestSuite.java      |     4 +-
 .../KMeansDistributedClustererTest.java         |   196 -
 .../ml/clustering/KMeansLocalClustererTest.java |    46 -
 .../ignite/ml/clustering/KMeansModelTest.java   |    60 +
 .../ignite/ml/clustering/KMeansTrainerTest.java |   119 +
 .../apache/ignite/ml/clustering/KMeansUtil.java |    33 -
 .../ignite/ml/common/CollectionsTest.java       |   146 +
 .../ignite/ml/common/CommonTestSuite.java       |    34 +
 .../ignite/ml/common/ExternalizeTest.java       |   101 +
 .../ignite/ml/common/LocalModelsTest.java       |   264 +
 .../org/apache/ignite/ml/common/ModelTest.java  |    45 +
 .../apache/ignite/ml/common/TrainerTest.java    |  1161 ++
 .../ml/composition/CompositionTestSuite.java    |    38 +
 .../ml/composition/boosting/GDBTrainerTest.java |   212 +
 .../convergence/ConvergenceCheckerTest.java     |    82 +
 .../MeanAbsValueConvergenceCheckerTest.java     |    73 +
 .../MedianOfMedianConvergenceCheckerTest.java   |    57 +
 .../MeanValuePredictionsAggregatorTest.java     |    34 +
 .../OnMajorityPredictionsAggregatorTest.java    |    33 +
 .../WeightedPredictionsAggregatorTest.java      |    62 +
 .../ignite/ml/dataset/DatasetTestSuite.java     |    51 +
 .../ml/dataset/feature/ObjectHistogramTest.java |   171 +
 .../cache/CacheBasedDatasetBuilderTest.java     |   146 +
 .../impl/cache/CacheBasedDatasetTest.java       |   355 +
 .../impl/cache/util/ComputeUtilsTest.java       |   311 +
 .../DatasetAffinityFunctionWrapperTest.java     |   110 +
 ...orWithConcurrentModificationCheckerTest.java |    91 +
 .../cache/util/PartitionDataStorageTest.java    |    49 +
 .../impl/local/LocalDatasetBuilderTest.java     |   134 +
 .../dataset/primitive/DatasetWrapperTest.java   |   134 +
 .../ml/dataset/primitive/SimpleDatasetTest.java |   105 +
 .../primitive/SimpleLabeledDatasetTest.java     |   112 +
 .../ml/environment/EnvironmentTestSuite.java    |    33 +
 .../LearningEnvironmentBuilderTest.java         |    90 +
 .../ml/environment/LearningEnvironmentTest.java |    60 +
 .../ignite/ml/environment/PromiseTest.java      |    79 +
 .../ml/genetic/GAGridCalculateFitnessTest.java  |   143 +
 .../genetic/GAGridInitializePopulationTest.java |   152 +
 .../ignite/ml/genetic/GAGridTestSuite.java      |    33 +
 .../ml/genetic/PasswordFitnessFunction.java     |    55 +
 .../ignite/ml/knn/ANNClassificationTest.java    |   123 +
 .../ignite/ml/knn/KNNClassificationTest.java    |   216 +
 .../apache/ignite/ml/knn/KNNRegressionTest.java |   156 +
 .../org/apache/ignite/ml/knn/KNNTestSuite.java  |    34 +
 .../ignite/ml/knn/LabeledDatasetHelper.java     |    56 +
 .../ignite/ml/knn/LabeledVectorSetTest.java     |   294 +
 .../org/apache/ignite/ml/math/BlasTest.java     |   361 +
 .../ignite/ml/math/ExternalizableTest.java      |    67 +
 .../apache/ignite/ml/math/ExternalizeTest.java  |     3 +-
 .../ml/math/MathImplDistributedTestSuite.java   |    39 -
 .../ignite/ml/math/MathImplLocalTestSuite.java  |    97 +-
 .../ignite/ml/math/MathImplMainTestSuite.java   |     4 +-
 .../org/apache/ignite/ml/math/TracerTest.java   |   103 +-
 .../apache/ignite/ml/math/VectorUtilsTest.java  |    69 +
 .../ignite/ml/math/benchmark/MathBenchmark.java |   205 -
 .../math/benchmark/MathBenchmarkSelfTest.java   |   100 -
 .../ignite/ml/math/benchmark/ResultsWriter.java |   127 -
 .../ml/math/benchmark/VectorBenchmarkTest.java  |   138 -
 .../ignite/ml/math/benchmark/package-info.java  |    18 -
 .../CholeskyDecompositionTest.java              |   160 -
 .../decompositions/EigenDecompositionTest.java  |   193 -
 .../decompositions/LUDecompositionTest.java     |   252 -
 .../decompositions/QRDecompositionTest.java     |   141 -
 .../SingularValueDecompositionTest.java         |   122 -
 .../ignite/ml/math/distances/DistanceTest.java  |    91 +
 .../ignite/ml/math/impls/MathTestConstants.java |    88 -
 .../ml/math/impls/matrix/CacheMatrixTest.java   |   371 -
 .../DenseLocalOffHeapMatrixConstructorTest.java |    65 -
 .../DenseLocalOnHeapMatrixConstructorTest.java  |    71 -
 .../math/impls/matrix/DiagonalMatrixTest.java   |   209 -
 .../matrix/FunctionMatrixConstructorTest.java   |   113 -
 .../math/impls/matrix/MatrixAttributeTest.java  |   156 -
 .../matrix/MatrixImplementationFixtures.java    |   381 -
 .../impls/matrix/MatrixImplementationsTest.java |  1113 --
 .../impls/matrix/MatrixKeyMapperForTests.java   |    74 -
 .../impls/matrix/MatrixViewConstructorTest.java |   114 -
 .../PivotedMatrixViewConstructorTest.java       |   129 -
 .../matrix/RandomMatrixConstructorTest.java     |    71 -
 .../matrix/SparseDistributedMatrixTest.java     |   309 -
 .../SparseLocalOnHeapMatrixConstructorTest.java |    53 -
 .../impls/matrix/TransposedMatrixViewTest.java  |    87 -
 .../storage/matrix/MatrixArrayStorageTest.java  |    63 -
 .../storage/matrix/MatrixBaseStorageTest.java   |    89 -
 .../matrix/MatrixOffHeapStorageTest.java        |    39 -
 .../storage/matrix/MatrixStorageFixtures.java   |   143 -
 .../matrix/MatrixStorageImplementationTest.java |    73 -
 .../SparseDistributedMatrixStorageTest.java     |   126 -
 .../RandomAccessSparseVectorStorageTest.java    |    60 -
 .../SparseLocalOffHeapVectorStorageTest.java    |    79 -
 .../storage/vector/VectorArrayStorageTest.java  |    58 -
 .../storage/vector/VectorBaseStorageTest.java   |    69 -
 .../vector/VectorOffheapStorageTest.java        |    73 -
 .../math/impls/vector/AbstractVectorTest.java   |   544 -
 .../ml/math/impls/vector/CacheVectorTest.java   |   436 -
 .../vector/ConstantVectorConstructorTest.java   |    52 -
 .../vector/DelegatingVectorConstructorTest.java |    62 -
 .../DenseLocalOffHeapVectorConstructorTest.java |    59 -
 .../DenseLocalOnHeapVectorConstructorTest.java  |   163 -
 .../vector/FunctionVectorConstructorTest.java   |   121 -
 .../math/impls/vector/MatrixVectorViewTest.java |   226 -
 .../PivotedVectorViewConstructorTest.java       |   211 -
 .../vector/RandomVectorConstructorTest.java     |   145 -
 .../SingleElementVectorConstructorTest.java     |   159 -
 .../SingleElementVectorViewConstructorTest.java |   137 -
 .../SparseLocalVectorConstructorTest.java       |    54 -
 .../math/impls/vector/VectorAttributesTest.java |   217 -
 .../ml/math/impls/vector/VectorFoldMapTest.java |   122 -
 .../vector/VectorImplementationsFixtures.java   |   655 -
 .../impls/vector/VectorImplementationsTest.java |   861 --
 .../math/impls/vector/VectorIterableTest.java   |   376 -
 .../ml/math/impls/vector/VectorNormTest.java    |   247 -
 .../math/impls/vector/VectorToMatrixTest.java   |   308 -
 .../ml/math/impls/vector/VectorViewTest.java    |   162 -
 .../ml/math/isolve/lsqr/LSQROnHeapTest.java     |   128 +
 .../ml/math/primitives/MathTestConstants.java   |    88 +
 .../matrix/DenseMatrixConstructorTest.java      |    71 +
 .../matrix/MatrixArrayStorageTest.java          |    64 +
 .../primitives/matrix/MatrixAttributeTest.java  |   144 +
 .../matrix/MatrixBaseStorageTest.java           |    88 +
 .../matrix/MatrixStorageFixtures.java           |   143 +
 .../matrix/MatrixStorageImplementationTest.java |    72 +
 .../matrix/MatrixViewConstructorTest.java       |   115 +
 .../matrix/SparseMatrixConstructorTest.java     |    54 +
 .../primitives/vector/AbstractVectorTest.java   |   542 +
 .../vector/DelegatingVectorConstructorTest.java |    65 +
 .../vector/DenseVectorConstructorTest.java      |   164 +
 .../primitives/vector/MatrixVectorViewTest.java |   226 +
 .../vector/SparseVectorConstructorTest.java     |    76 +
 .../vector/VectorArrayStorageTest.java          |    59 +
 .../primitives/vector/VectorAttributesTest.java |   193 +
 .../vector/VectorBaseStorageTest.java           |    68 +
 .../primitives/vector/VectorFoldMapTest.java    |   121 +
 .../vector/VectorImplementationsFixtures.java   |   424 +
 .../vector/VectorImplementationsTest.java       |   849 ++
 .../math/primitives/vector/VectorNormTest.java  |   238 +
 .../primitives/vector/VectorToMatrixTest.java   |   259 +
 .../math/primitives/vector/VectorViewTest.java  |   163 +
 .../apache/ignite/ml/nn/LossFunctionsTest.java  |    92 +
 .../ignite/ml/nn/MLPConstInitializer.java       |    67 +
 .../java/org/apache/ignite/ml/nn/MLPTest.java   |   263 +
 .../org/apache/ignite/ml/nn/MLPTestSuite.java   |    35 +
 .../ignite/ml/nn/MLPTrainerIntegrationTest.java |   187 +
 .../org/apache/ignite/ml/nn/MLPTrainerTest.java |   262 +
 .../MLPTrainerMnistIntegrationTest.java         |   131 +
 .../ml/nn/performance/MLPTrainerMnistTest.java  |   101 +
 .../ml/nn/performance/MnistMLPTestUtil.java     |    91 +
 .../ignite/ml/pipeline/PipelineMdlTest.java     |    80 +
 .../apache/ignite/ml/pipeline/PipelineTest.java |   107 +
 .../ignite/ml/pipeline/PipelineTestSuite.java   |    33 +
 .../preprocessing/PreprocessingTestSuite.java   |    54 +
 .../BinarizationPreprocessorTest.java           |    52 +
 .../binarization/BinarizationTrainerTest.java   |    85 +
 .../encoding/EncoderTrainerTest.java            |   118 +
 .../encoding/OneHotEncoderPreprocessorTest.java |   134 +
 .../encoding/StringEncoderPreprocessorTest.java |    74 +
 .../imputing/ImputerPreprocessorTest.java       |    53 +
 .../imputing/ImputerTrainerTest.java            |    56 +
 .../MaxAbsScalerPreprocessorTest.java           |    55 +
 .../maxabsscaling/MaxAbsScalerTrainerTest.java  |    55 +
 .../MinMaxScalerPreprocessorTest.java           |    56 +
 .../minmaxscaling/MinMaxScalerTrainerTest.java  |    56 +
 .../NormalizationPreprocessorTest.java          |    54 +
 .../normalization/NormalizationTrainerTest.java |    61 +
 .../AbstractMultipleLinearRegressionTest.java   |   164 -
 .../OLSMultipleLinearRegressionTest.java        |   819 --
 .../ml/regressions/RegressionsTestSuite.java    |    13 +-
 .../linear/LinearRegressionLSQRTrainerTest.java |   155 +
 .../linear/LinearRegressionModelTest.java       |    89 +
 .../linear/LinearRegressionSGDTrainerTest.java  |   137 +
 .../logistic/LogRegMultiClassTrainerTest.java   |   141 +
 .../logistic/LogisticRegressionModelTest.java   |    96 +
 .../LogisticRegressionSGDTrainerTest.java       |   113 +
 .../ignite/ml/selection/SelectionTestSuite.java |    53 +
 .../ml/selection/cv/CrossValidationTest.java    |   110 +
 .../paramgrid/ParameterSetGeneratorTest.java    |    56 +
 .../selection/scoring/TestLabelPairCursor.java  |    91 +
 .../cursor/CacheBasedLabelPairCursorTest.java   |    79 +
 .../cursor/LocalLabelPairCursorTest.java        |    55 +
 .../scoring/evaluator/EvaluatorTest.java        |   398 +
 .../selection/scoring/metric/AccuracyTest.java  |    45 +
 .../selection/scoring/metric/FmeasureTest.java  |    45 +
 .../selection/scoring/metric/PrecisionTest.java |    45 +
 .../ml/selection/scoring/metric/RecallTest.java |    45 +
 .../split/TrainTestDatasetSplitterTest.java     |    46 +
 .../split/mapper/SHA256UniformMapperTest.java   |    70 +
 .../ml/structures/DatasetStructureTest.java     |    53 +
 .../ml/structures/StructuresTestSuite.java      |    31 +
 .../ignite/ml/svm/SVMBinaryTrainerTest.java     |    96 +
 .../org/apache/ignite/ml/svm/SVMModelTest.java  |   138 +
 .../ignite/ml/svm/SVMMultiClassTrainerTest.java |   100 +
 .../org/apache/ignite/ml/svm/SVMTestSuite.java  |    34 +
 ...reeClassificationTrainerIntegrationTest.java |   101 +
 .../DecisionTreeClassificationTrainerTest.java  |   109 +
 ...ionTreeRegressionTrainerIntegrationTest.java |   101 +
 .../tree/DecisionTreeRegressionTrainerTest.java |   100 +
 .../ignite/ml/tree/DecisionTreeTestSuite.java   |    48 +
 .../ml/tree/data/DecisionTreeDataTest.java      |    76 +
 .../ignite/ml/tree/data/TreeDataIndexTest.java  |   159 +
 .../gini/GiniImpurityMeasureCalculatorTest.java |   120 +
 .../impurity/gini/GiniImpurityMeasureTest.java  |   131 +
 .../mse/MSEImpurityMeasureCalculatorTest.java   |    76 +
 .../impurity/mse/MSEImpurityMeasureTest.java    |   109 +
 .../util/SimpleStepFunctionCompressorTest.java  |   108 +
 .../ml/tree/impurity/util/StepFunctionTest.java |    71 +
 .../tree/impurity/util/TestImpurityMeasure.java |    88 +
 .../DecisionTreeMNISTIntegrationTest.java       |   107 +
 .../tree/performance/DecisionTreeMNISTTest.java |    76 +
 .../RandomForestClassifierTrainerTest.java      |    94 +
 .../RandomForestRegressionTrainerTest.java      |    93 +
 .../ml/tree/randomforest/RandomForestTest.java  |    78 +
 .../randomforest/RandomForestTreeTestSuite.java |    39 +
 .../ml/tree/randomforest/data/TreeNodeTest.java |    79 +
 .../data/impurity/GiniFeatureHistogramTest.java |   255 +
 .../data/impurity/ImpurityHistogramTest.java    |    90 +
 .../data/impurity/MSEHistogramTest.java         |   138 +
 ...ormalDistributionStatisticsComputerTest.java |   131 +
 .../ml/src/test/resources/datasets/README.md    |     5 +
 .../resources/datasets/knn/cleared_machines.txt |   209 +
 .../src/test/resources/datasets/knn/empty.txt   |     0
 .../ml/src/test/resources/datasets/knn/iris.txt |   150 +
 .../resources/datasets/knn/iris_incorrect.txt   |   150 +
 .../resources/datasets/knn/machine.data.txt     |   209 +
 .../test/resources/datasets/knn/missed_data.txt |     3 +
 .../src/test/resources/datasets/knn/no_data.txt |     6 +
 .../resources/datasets/regression/README.md     |    98 +
 .../resources/datasets/regression/boston.csv    |   506 +
 .../resources/datasets/regression/diabetes.csv  |   442 +
 .../trees/columntrees.manualrun.properties      |    21 +
 modules/mqtt/pom.xml                            |     2 +-
 .../apache/ignite/stream/mqtt/MqttStreamer.java |     6 +-
 modules/osgi-karaf/pom.xml                      |     2 +-
 .../osgi-karaf/src/main/resources/features.xml  |    25 +-
 modules/osgi-paxlogging/pom.xml                 |     2 +-
 modules/osgi/pom.xml                            |     2 +-
 .../org/apache/ignite/osgi/IgniteOsgiUtils.java |     4 +-
 .../classloaders/ContainerSweepClassLoader.java |     4 +-
 modules/platforms/.gitignore                    |     3 +-
 modules/platforms/cpp/DEVNOTES.txt              |     7 +-
 modules/platforms/cpp/Makefile.am               |    16 +-
 modules/platforms/cpp/Makefile.amrel            |     6 +
 modules/platforms/cpp/README.md                 |   220 +
 modules/platforms/cpp/README.txt                |    16 +-
 .../include/ignite/binary/binary_raw_reader.h   |    22 +-
 .../include/ignite/binary/binary_raw_writer.h   |     2 +-
 .../include/ignite/binary/binary_writer.h       |     4 +-
 .../ignite/impl/binary/binary_reader_impl.h     |    88 +-
 .../ignite/impl/binary/binary_type_impl.h       |    79 +
 .../ignite/impl/binary/binary_type_manager.h    |     5 +-
 .../ignite/impl/binary/binary_writer_impl.h     |    95 +-
 .../ignite/impl/interop/interop_memory.h        |     7 +
 .../ignite/impl/interop/interop_output_stream.h |     8 +
 .../src/impl/binary/binary_object_impl.cpp      |     2 +
 .../src/impl/binary/binary_reader_impl.cpp      |   115 +-
 .../src/impl/binary/binary_type_manager.cpp     |    61 +-
 .../src/impl/binary/binary_writer_impl.cpp      |    65 +-
 .../binary/src/impl/interop/interop_memory.cpp  |     5 +
 .../src/impl/interop/interop_output_stream.cpp  |     7 +
 modules/platforms/cpp/common/Makefile.am        |     2 +-
 modules/platforms/cpp/common/configure.ac       |     2 +-
 .../platforms/cpp/common/include/Makefile.am    |     2 +
 .../include/ignite/common/default_allocator.h   |     6 -
 .../cpp/common/include/ignite/common/expected.h |   300 +
 .../cpp/common/include/ignite/common/lazy.h     |   172 +
 .../include/ignite/common/platform_utils.h      |    50 +-
 .../cpp/common/include/ignite/common/utils.h    |   131 +-
 .../os/linux/src/common/platform_utils.cpp      |    78 +-
 .../os/win/src/common/dynamic_load_os.cpp       |     4 +
 .../common/os/win/src/common/platform_utils.cpp |    72 +-
 .../cpp/common/project/vs/common.vcxproj        |     2 +
 .../common/project/vs/common.vcxproj.filters    |     6 +
 .../cpp/common/src/common/big_integer.cpp       |    24 +-
 .../platforms/cpp/common/src/common/utils.cpp   |     9 +
 .../platforms/cpp/common/src/ignite_error.cpp   |     8 +-
 modules/platforms/cpp/configure.ac              |    18 +-
 modules/platforms/cpp/configure.acrel           |    16 +-
 .../cpp/core-test/config/cache-identity-32.xml  |     5 +-
 .../cpp/core-test/config/cache-query-32.xml     |     6 +-
 .../config/cache-query-continuous-32.xml        |     6 +-
 .../core-test/config/cache-query-default.xml    |    29 +
 .../cpp/core-test/config/cache-store-32.xml     |     4 +-
 .../cpp/core-test/config/cache-test-32.xml      |     6 +-
 .../platforms/cpp/core-test/config/invalid.xml  |    39 +
 .../cpp/core-test/config/isolated-32.xml        |    50 +
 .../cpp/core-test/config/isolated-default.xml   |    59 +
 .../platforms/cpp/core-test/config/isolated.xml |    32 +
 .../core-test/config/persistence-store-32.xml   |    50 +
 .../config/persistence-store-default.xml        |    36 +
 .../cpp/core-test/config/persistence-store.xml  |    32 +
 modules/platforms/cpp/core-test/configure.ac    |     2 +-
 .../cpp/core-test/project/vs/core-test.vcxproj  |    27 +-
 .../project/vs/core-test.vcxproj.filters        |    39 +-
 .../src/binary_reader_writer_raw_test.cpp       |    36 +
 .../core-test/src/binary_reader_writer_test.cpp |   135 +-
 .../cpp/core-test/src/cache_query_test.cpp      |   280 +-
 .../cpp/core-test/src/cluster_test.cpp          |    46 +
 .../cpp/core-test/src/compute_test.cpp          |     4 +-
 .../cpp/core-test/src/continuous_query_test.cpp |     6 +-
 .../cpp/core-test/src/ignition_test.cpp         |    37 +-
 .../cpp/core-test/src/interop_test.cpp          |    11 -
 .../cpp/core-test/src/teamcity_boost.cpp        |     2 +-
 .../platforms/cpp/core-test/src/test_utils.cpp  |     8 +-
 modules/platforms/cpp/core/configure.ac         |     2 +-
 .../cpp/core/include/ignite/cache/cache.h       |    46 +-
 .../include/ignite/cache/mutable_cache_entry.h  |     8 +-
 .../include/ignite/cache/query/query_cursor.h   |    15 +-
 .../ignite/cache/query/query_fields_row.h       |    28 +
 .../core/include/ignite/cache/query/query_sql.h |     4 +
 .../ignite/cache/query/query_sql_fields.h       |    88 +-
 .../platforms/cpp/core/include/ignite/ignite.h  |    21 +-
 .../cpp/core/include/ignite/ignite_binding.h    |     5 +
 .../ignite/impl/cache/query/query_argument.h    |    63 +
 .../impl/cache/query/query_fields_row_impl.h    |    29 +
 .../ignite/impl/cluster/cluster_group_impl.h    |    15 +
 .../include/ignite/impl/compute/compute_impl.h  |     5 +-
 .../cpp/core/include/ignite/impl/ignite_impl.h  |   127 +-
 .../impl/interop/interop_external_memory.h      |     2 +-
 .../ignite/impl/interop/interop_target.h        |    16 +-
 .../cpp/core/include/ignite/impl/operations.h   |   150 +-
 modules/platforms/cpp/core/namespaces.dox       |    74 +-
 modules/platforms/cpp/core/src/ignite.cpp       |    10 +
 modules/platforms/cpp/core/src/ignition.cpp     |    33 +-
 .../cpp/core/src/impl/cache/cache_impl.cpp      |   155 +-
 .../src/impl/cluster/cluster_group_impl.cpp     |    26 +-
 .../cpp/core/src/impl/ignite_environment.cpp    |    37 +-
 .../platforms/cpp/core/src/impl/ignite_impl.cpp |    86 +-
 .../core/src/impl/interop/interop_target.cpp    |    18 +-
 modules/platforms/cpp/cpp.dxg                   |     6 +-
 modules/platforms/cpp/examples/configure.ac     |     2 +-
 .../examples/odbc-example/src/odbc_example.cpp  |     8 +-
 modules/platforms/cpp/ignite/configure.ac       |     2 +-
 modules/platforms/cpp/ignite/src/ignite.cpp     |    23 +-
 .../cpp/jni/include/ignite/jni/exports.h        |    32 +-
 .../platforms/cpp/jni/include/ignite/jni/java.h |    75 +-
 .../cpp/jni/include/ignite/jni/utils.h          |    17 +-
 .../platforms/cpp/jni/os/linux/src/utils.cpp    |   120 +-
 modules/platforms/cpp/jni/os/win/src/utils.cpp  |   133 +-
 modules/platforms/cpp/jni/project/vs/module.def |    31 +-
 modules/platforms/cpp/jni/src/exports.cpp       |   120 +-
 modules/platforms/cpp/jni/src/java.cpp          |   537 +-
 modules/platforms/cpp/odbc-test/Makefile.am     |    33 +-
 .../cpp/odbc-test/config/queries-auth-32.xml    |    62 +
 .../cpp/odbc-test/config/queries-auth.xml       |    44 +
 .../cpp/odbc-test/config/queries-default.xml    |   202 +-
 .../cpp/odbc-test/config/queries-ssl-32.xml     |    77 +
 .../cpp/odbc-test/config/queries-ssl.xml        |    59 +
 .../cpp/odbc-test/config/queries-test-32.xml    |     7 +-
 .../odbc-test/config/queries-test-default.xml   |    39 -
 .../odbc-test/config/queries-test-noodbc-32.xml |    53 -
 .../odbc-test/config/queries-test-noodbc.xml    |    35 -
 .../cpp/odbc-test/config/queries-test.xml       |     3 +-
 .../odbc-test/config/queries-transaction-32.xml |    59 +
 .../odbc-test/config/queries-transaction.xml    |    41 +
 .../platforms/cpp/odbc-test/config/ssl/ca.pem   |    24 +
 .../cpp/odbc-test/config/ssl/client_full.pem    |    84 +
 .../cpp/odbc-test/config/ssl/client_unknown.pem |    50 +
 .../cpp/odbc-test/config/ssl/server.jks         |   Bin 0 -> 4256 bytes
 .../cpp/odbc-test/config/ssl/trust.jks          |   Bin 0 -> 1089 bytes
 .../cpp/odbc-test/include/complex_type.h        |    53 +-
 .../cpp/odbc-test/include/odbc_test_suite.h     |   183 +
 .../odbc-test/include/sql_test_suite_fixture.h  |    15 +-
 .../cpp/odbc-test/include/test_utils.h          |    36 +-
 .../cpp/odbc-test/project/vs/odbc-test.vcxproj  |    50 +-
 .../project/vs/odbc-test.vcxproj.filters        |    89 +-
 .../cpp/odbc-test/src/api_robustness_test.cpp   |   189 +-
 .../src/application_data_buffer_test.cpp        |     8 +-
 .../cpp/odbc-test/src/attributes_test.cpp       |   247 +
 .../cpp/odbc-test/src/authentication_test.cpp   |   171 +
 .../platforms/cpp/odbc-test/src/column_test.cpp |   174 +-
 .../cpp/odbc-test/src/configuration_test.cpp    |   259 +-
 .../cpp/odbc-test/src/connection_info_test.cpp  |     3 +-
 .../cpp/odbc-test/src/connection_test.cpp       |   136 +
 .../platforms/cpp/odbc-test/src/errors_test.cpp |   211 +
 .../cpp/odbc-test/src/meta_queries_test.cpp     |   387 +
 .../cpp/odbc-test/src/odbc_test_suite.cpp       |   618 +
 .../platforms/cpp/odbc-test/src/parser_test.cpp |     6 +-
 .../cpp/odbc-test/src/queries_ssl_test.cpp      |   277 +
 .../cpp/odbc-test/src/queries_test.cpp          |  2509 ++--
 .../platforms/cpp/odbc-test/src/row_test.cpp    |     3 +-
 .../src/sql_aggregate_functions_test.cpp        |    16 +-
 .../src/sql_date_time_functions_test.cpp        |    38 +-
 .../src/sql_esc_convert_function_test.cpp       |    10 +-
 .../cpp/odbc-test/src/sql_get_info_test.cpp     |   413 +
 .../src/sql_numeric_functions_test.cpp          |     4 +-
 .../cpp/odbc-test/src/sql_operators_test.cpp    |    10 +-
 .../cpp/odbc-test/src/sql_parsing_test.cpp      |   372 +
 .../odbc-test/src/sql_string_functions_test.cpp |    20 +-
 .../odbc-test/src/sql_system_functions_test.cpp |     2 +-
 .../odbc-test/src/sql_test_suite_fixture.cpp    |    34 +-
 .../cpp/odbc-test/src/sql_types_test.cpp        |    10 +-
 .../src/sql_value_expressions_test.cpp          |     9 +-
 .../cpp/odbc-test/src/streaming_test.cpp        |   589 +
 .../odbc-test/src/teamcity/teamcity_boost.cpp   |     2 +-
 .../platforms/cpp/odbc-test/src/test_utils.cpp  |    70 +-
 .../cpp/odbc-test/src/transaction_test.cpp      |   741 ++
 .../platforms/cpp/odbc-test/src/types_test.cpp  |   165 +
 .../cpp/odbc-test/src/utility_test.cpp          |     3 +-
 modules/platforms/cpp/odbc/Makefile.am          |    15 +-
 modules/platforms/cpp/odbc/include/Makefile.am  |    17 +-
 .../platforms/cpp/odbc/include/ignite/odbc.h    |    22 +-
 .../ignite/odbc/app/application_data_buffer.h   |   104 +-
 .../include/ignite/odbc/app/parameter_set.h     |    26 +-
 .../cpp/odbc/include/ignite/odbc/column.h       |     3 +-
 .../cpp/odbc/include/ignite/odbc/common_types.h |   140 +-
 .../include/ignite/odbc/config/config_tools.h   |    91 +
 .../include/ignite/odbc/config/configuration.h  |   613 +-
 .../ignite/odbc/config/connection_info.h        |     8 +-
 .../odbc/config/connection_string_parser.h      |   197 +
 .../include/ignite/odbc/config/settable_value.h |   101 +
 .../cpp/odbc/include/ignite/odbc/connection.h   |   283 +-
 .../cpp/odbc/include/ignite/odbc/cursor.h       |     7 +
 .../ignite/odbc/diagnostic/diagnosable.h        |    16 +
 .../odbc/diagnostic/diagnosable_adapter.h       |    39 +-
 .../odbc/diagnostic/diagnostic_record_storage.h |    13 +-
 .../cpp/odbc/include/ignite/odbc/end_point.h    |    72 +
 .../cpp/odbc/include/ignite/odbc/environment.h  |    15 +
 .../cpp/odbc/include/ignite/odbc/message.h      |   339 +-
 .../odbc/include/ignite/odbc/meta/column_meta.h |    47 +-
 .../odbc/include/ignite/odbc/nested_tx_mode.h   |    81 +
 .../cpp/odbc/include/ignite/odbc/odbc_error.h   |   128 +
 .../cpp/odbc/include/ignite/odbc/parser.h       |    37 +-
 .../odbc/include/ignite/odbc/protocol_version.h |    19 +-
 .../include/ignite/odbc/query/batch_query.h     |    22 +-
 .../ignite/odbc/query/column_metadata_query.h   |    10 +
 .../odbc/include/ignite/odbc/query/data_query.h |    53 +-
 .../ignite/odbc/query/foreign_keys_query.h      |     7 +
 .../include/ignite/odbc/query/internal_query.h  |   189 +
 .../ignite/odbc/query/primary_keys_query.h      |     7 +
 .../cpp/odbc/include/ignite/odbc/query/query.h  |    15 +-
 .../ignite/odbc/query/special_columns_query.h   |     7 +
 .../include/ignite/odbc/query/streaming_query.h |   151 +
 .../ignite/odbc/query/table_metadata_query.h    |    10 +
 .../include/ignite/odbc/query/type_info_query.h |    10 +
 .../cpp/odbc/include/ignite/odbc/row.h          |     7 +-
 .../odbc/include/ignite/odbc/socket_client.h    |   109 +
 .../odbc/include/ignite/odbc/sql/sql_command.h  |    87 +
 .../odbc/include/ignite/odbc/sql/sql_lexer.h    |   117 +
 .../odbc/include/ignite/odbc/sql/sql_parser.h   |    68 +
 .../ignite/odbc/sql/sql_set_streaming_command.h |   198 +
 .../odbc/include/ignite/odbc/sql/sql_token.h    |   159 +
 .../odbc/include/ignite/odbc/sql/sql_utils.h    |    62 +
 .../ignite/odbc/ssl/secure_socket_client.h      |   191 +
 .../odbc/include/ignite/odbc/ssl/ssl_bindings.h |   357 +
 .../odbc/include/ignite/odbc/ssl/ssl_gateway.h  |   159 +
 .../cpp/odbc/include/ignite/odbc/ssl/ssl_mode.h |    64 +
 .../cpp/odbc/include/ignite/odbc/statement.h    |    43 +-
 .../ignite/odbc/streaming/streaming_batch.h     |   115 +
 .../ignite/odbc/streaming/streaming_context.h   |   136 +
 .../include/ignite/odbc/system/socket_client.h  |    92 -
 .../ignite/odbc/system/tcp_socket_client.h      |   156 +
 .../odbc/system/ui/dsn_configuration_window.h   |   167 +-
 .../cpp/odbc/include/ignite/odbc/type_traits.h  |     6 +-
 .../cpp/odbc/include/ignite/odbc/utility.h      |    64 -
 .../cpp/odbc/install/ignite-odbc-amd64.wxs      |     2 +-
 .../cpp/odbc/install/ignite-odbc-x86.wxs        |     2 +-
 .../odbc/os/linux/src/system/socket_client.cpp  |   123 -
 .../os/linux/src/system/tcp_socket_client.cpp   |   376 +
 .../odbc/os/win/src/system/socket_client.cpp    |   136 -
 .../os/win/src/system/tcp_socket_client.cpp     |   469 +
 .../src/system/ui/dsn_configuration_window.cpp  |   491 +-
 .../cpp/odbc/os/win/src/system/ui/window.cpp    |     9 +-
 .../cpp/odbc/os/win/src/system_dsn.cpp          |    24 +-
 .../platforms/cpp/odbc/project/vs/odbc.vcxproj  |    60 +-
 .../cpp/odbc/project/vs/odbc.vcxproj.filters    |   123 +-
 .../odbc/src/app/application_data_buffer.cpp    |   545 +-
 .../cpp/odbc/src/app/parameter_set.cpp          |    21 +-
 modules/platforms/cpp/odbc/src/column.cpp       |    55 +-
 modules/platforms/cpp/odbc/src/common_types.cpp |    51 +
 .../cpp/odbc/src/config/config_tools.cpp        |   253 +
 .../cpp/odbc/src/config/configuration.cpp       |   555 +-
 .../cpp/odbc/src/config/connection_info.cpp     |  2389 +++-
 .../src/config/connection_string_parser.cpp     |   481 +
 modules/platforms/cpp/odbc/src/connection.cpp   |   552 +-
 modules/platforms/cpp/odbc/src/cursor.cpp       |     5 +
 .../odbc/src/diagnostic/diagnosable_adapter.cpp |    15 +-
 .../odbc/src/diagnostic/diagnostic_record.cpp   |   121 +-
 .../diagnostic/diagnostic_record_storage.cpp    |     5 +
 modules/platforms/cpp/odbc/src/dsn_config.cpp   |   191 +-
 modules/platforms/cpp/odbc/src/entry_points.cpp |    65 +-
 modules/platforms/cpp/odbc/src/environment.cpp  |    60 +-
 modules/platforms/cpp/odbc/src/message.cpp      |   253 +-
 .../platforms/cpp/odbc/src/meta/column_meta.cpp |   111 +-
 .../platforms/cpp/odbc/src/nested_tx_mode.cpp   |    80 +
 modules/platforms/cpp/odbc/src/odbc.cpp         |   107 +-
 .../platforms/cpp/odbc/src/protocol_version.cpp |    16 +-
 .../cpp/odbc/src/query/batch_query.cpp          |   123 +-
 .../odbc/src/query/column_metadata_query.cpp    |    32 +-
 .../platforms/cpp/odbc/src/query/data_query.cpp |   249 +-
 .../cpp/odbc/src/query/foreign_keys_query.cpp   |     5 +
 .../cpp/odbc/src/query/primary_keys_query.cpp   |     5 +
 .../odbc/src/query/special_columns_query.cpp    |     5 +
 .../cpp/odbc/src/query/streaming_query.cpp      |    93 +
 .../cpp/odbc/src/query/table_metadata_query.cpp |    32 +-
 .../cpp/odbc/src/query/type_info_query.cpp      |    25 +-
 modules/platforms/cpp/odbc/src/row.cpp          |     9 +-
 .../platforms/cpp/odbc/src/sql/sql_lexer.cpp    |   236 +
 .../platforms/cpp/odbc/src/sql/sql_parser.cpp   |    97 +
 .../odbc/src/sql/sql_set_streaming_command.cpp  |   200 +
 .../platforms/cpp/odbc/src/sql/sql_utils.cpp    |    55 +
 .../cpp/odbc/src/ssl/secure_socket_client.cpp   |   502 +
 .../platforms/cpp/odbc/src/ssl/ssl_gateway.cpp  |   231 +
 modules/platforms/cpp/odbc/src/ssl/ssl_mode.cpp |    59 +
 modules/platforms/cpp/odbc/src/statement.cpp    |   273 +-
 .../cpp/odbc/src/streaming/streaming_batch.cpp  |    76 +
 .../odbc/src/streaming/streaming_context.cpp    |   158 +
 modules/platforms/cpp/odbc/src/type_traits.cpp  |    50 +-
 modules/platforms/cpp/project/vs/ignite.sln     |    23 +
 modules/platforms/cpp/project/vs/ignite.slnrel  |    13 +
 .../platforms/cpp/project/vs/ignite_x86.slnrel  |    13 +
 .../platforms/cpp/thin-client-test/Makefile.am  |    74 +
 .../cpp/thin-client-test/config/auth-32.xml     |    48 +
 .../thin-client-test/config/auth-default.xml    |    77 +
 .../cpp/thin-client-test/config/auth.xml        |    31 +
 .../cpp/thin-client-test/config/cache-32.xml    |    52 +
 .../thin-client-test/config/cache-default.xml   |   141 +
 .../cpp/thin-client-test/config/cache.xml       |    35 +
 .../cpp/thin-client-test/config/ssl-32.xml      |    48 +
 .../cpp/thin-client-test/config/ssl-default.xml |    84 +
 .../cpp/thin-client-test/config/ssl.xml         |    31 +
 .../cpp/thin-client-test/config/ssl/ca.pem      |    24 +
 .../thin-client-test/config/ssl/client_full.pem |    84 +
 .../config/ssl/client_unknown.pem               |    50 +
 .../cpp/thin-client-test/config/ssl/server.jks  |   Bin 0 -> 4256 bytes
 .../cpp/thin-client-test/config/ssl/trust.jks   |   Bin 0 -> 1089 bytes
 .../platforms/cpp/thin-client-test/configure.ac |    62 +
 .../cpp/thin-client-test/include/Makefile.am    |    24 +
 .../include/ignite/complex_type.h               |   123 +
 .../include/teamcity/teamcity_messages.h        |    55 +
 .../cpp/thin-client-test/include/test_utils.h   |    72 +
 .../project/vs/thin-client-test.vcxproj         |   186 +
 .../project/vs/thin-client-test.vcxproj.filters |    82 +
 .../cpp/thin-client-test/src/auth_test.cpp      |    76 +
 .../thin-client-test/src/cache_client_test.cpp  |   767 ++
 .../thin-client-test/src/ignite_client_test.cpp |    72 +
 .../cpp/thin-client-test/src/ssl_test.cpp       |   103 +
 .../src/teamcity/teamcity_boost.cpp             |   159 +
 .../src/teamcity/teamcity_messages.cpp          |   150 +
 .../cpp/thin-client-test/src/test_utils.cpp     |   106 +
 modules/platforms/cpp/thin-client/Makefile.am   |    72 +
 modules/platforms/cpp/thin-client/README.md     |     4 +
 .../cpp/thin-client/include/Makefile.am         |    31 +
 .../ignite/impl/thin/cache/cache_client_proxy.h |   173 +
 .../include/ignite/impl/thin/readable.h         |    98 +
 .../include/ignite/impl/thin/writable.h         |    98 +
 .../include/ignite/impl/thin/writable_key.h     |   681 +
 .../include/ignite/thin/cache/cache_client.h    |   237 +
 .../include/ignite/thin/cache/cache_peek_mode.h |    77 +
 .../include/ignite/thin/ignite_client.h         |   165 +
 .../ignite/thin/ignite_client_configuration.h   |   228 +
 .../thin-client/include/ignite/thin/ssl_mode.h  |    45 +
 .../thin-client/os/linux/src/net/net_utils.cpp  |   109 +
 .../os/linux/src/net/tcp_socket_client.cpp      |   361 +
 .../thin-client/os/win/src/net/net_utils.cpp    |   106 +
 .../os/win/src/net/tcp_socket_client.cpp        |   417 +
 .../thin-client/project/vs/thin-client.vcxproj  |   213 +
 .../project/vs/thin-client.vcxproj.filters      |   157 +
 .../cpp/thin-client/src/ignite_client.cpp       |   101 +
 .../src/impl/cache/cache_affinity_info.cpp      |   110 +
 .../src/impl/cache/cache_affinity_info.h        |   106 +
 .../src/impl/cache/cache_client_impl.cpp        |   179 +
 .../src/impl/cache/cache_client_impl.h          |   185 +
 .../src/impl/cache/cache_client_proxy.cpp       |   101 +
 .../src/impl/connectable_node_partitions.h      |   118 +
 .../cpp/thin-client/src/impl/data_channel.cpp   |   387 +
 .../cpp/thin-client/src/impl/data_channel.h     |   333 +
 .../cpp/thin-client/src/impl/data_router.cpp    |   265 +
 .../cpp/thin-client/src/impl/data_router.h      |   291 +
 .../thin-client/src/impl/ignite_client_impl.cpp |   138 +
 .../thin-client/src/impl/ignite_client_impl.h   |   132 +
 .../cpp/thin-client/src/impl/message.cpp        |   276 +
 .../cpp/thin-client/src/impl/message.h          |   820 ++
 .../cpp/thin-client/src/impl/net/end_point.h    |   161 +
 .../cpp/thin-client/src/impl/net/net_utils.h    |    46 +
 .../src/impl/net/remote_type_updater.cpp        |    84 +
 .../src/impl/net/remote_type_updater.h          |    81 +
 .../cpp/thin-client/src/impl/net/tcp_range.h    |   177 +
 .../src/impl/net/tcp_socket_client.h            |   157 +
 .../thin-client/src/impl/protocol_version.cpp   |   151 +
 .../cpp/thin-client/src/impl/protocol_version.h |   163 +
 .../cpp/thin-client/src/impl/response_status.h  |    63 +
 .../cpp/thin-client/src/impl/socket_client.h    |   105 +
 .../src/impl/ssl/secure_socket_client.cpp       |   445 +
 .../src/impl/ssl/secure_socket_client.h         |   187 +
 .../cpp/thin-client/src/impl/ssl/ssl_bindings.h |   360 +
 .../thin-client/src/impl/ssl/ssl_gateway.cpp    |   237 +
 .../cpp/thin-client/src/impl/ssl/ssl_gateway.h  |   161 +
 .../cpp/thin-client/src/impl/utility.cpp        |   181 +
 .../cpp/thin-client/src/impl/utility.h          |    82 +
 .../ExpiryCacheHolderTest.cs                    |    21 +-
 .../IgniteSessionStateStoreProviderTest.cs      |    14 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../Apache.Ignite.AspNet.csproj                 |     3 +-
 .../Apache.Ignite.AspNet.nuspec                 |     6 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../Apache.Ignite.Benchmarks.csproj             |     9 +
 .../Apache.Ignite.Benchmarks/BenchmarkRunner.cs |    13 +-
 .../Interop/GetAllBenchmark.cs                  |    71 +
 .../Interop/GetAllBinaryBenchmark.cs            |    58 +
 .../Interop/PlatformBenchmarkBase.cs            |    21 +
 .../Apache.Ignite.Benchmarks/Model/Doubles.cs   |    69 +
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../ThinClient/ThinClientGetAllBenchmark.cs     |    72 +
 .../ThinClientGetAllBinaryBenchmark.cs          |    58 +
 .../ThinClient/ThinClientGetAsyncBenchmark.cs   |    63 +
 .../ThinClient/ThinClientGetBenchmark.cs        |    63 +
 .../ThinClient/ThinClientPutAsyncBenchmark.cs   |    59 +
 .../ThinClient/ThinClientPutBenchmark.cs        |    59 +
 .../Apache.Ignite.Core.Tests.DotNetCore.csproj  |   229 +
 .../Cache/CacheTest.cs                          |    56 +
 .../Common/IgnitionStartTest.cs                 |   117 +
 .../Common/Person.cs                            |    44 +
 .../Common/TestBase.cs                          |    44 +
 .../Common/TestFixtureSetUp.cs                  |    30 +
 .../Common/TestFixtureTearDown.cs               |    30 +
 .../Common/TestLogger.cs                        |    74 +
 .../Common/TestRunner.cs                        |    33 +
 .../Common/TestUtils.DotNetCore.cs              |    96 +
 .../app.config                                  |    44 +
 .../Apache.Ignite.Core.Tests.NuGet.csproj       |     4 +-
 ...ache.Ignite.Core.Tests.NuGet.sln.DotSettings |     4 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../TestExtensions.cs                           |     2 +
 .../Apache.Ignite.Core.Tests.csproj             |   140 +-
 .../ApiParity/BinaryParityTest.cs               |    48 +
 .../ApiParity/CacheAffinityParityTest.cs        |    39 +
 .../ApiParity/CacheConfigurationParityTest.cs   |    80 +
 .../ApiParity/CacheMetricsParityTest.cs         |    47 +
 .../ApiParity/CacheParityTest.cs                |    76 +
 .../ClientConnectorConfigurationParityTest.cs   |    46 +
 .../ApiParity/ClusterMetricsParityTest.cs       |    47 +
 .../ApiParity/ClusterNodeParityTest.cs          |    45 +
 .../ApiParity/ClusterParityTest.cs              |    57 +
 .../ApiParity/ComputeParityTest.cs              |    51 +
 .../DataRegionConfigurationParityTest.cs        |    39 +
 .../ApiParity/DataRegionMetricsParityTest.cs    |    60 +
 .../DataStorageConfigurationParityTest.cs       |    55 +
 .../ApiParity/DataStorageMetricsParityTest.cs   |    58 +
 .../ApiParity/EventsParityTest.cs               |    50 +
 .../ApiParity/IgniteConfigurationParityTest.cs  |   100 +
 .../ApiParity/IgniteParityTest.cs               |    77 +
 .../ApiParity/MessagingParityTest.cs            |    39 +
 .../ApiParity/ParityTest.cs                     |   227 +
 .../QueryEntityConfigurationParityTest.cs       |    52 +
 .../ApiParity/ServicesParityTest.cs             |    39 +
 .../ApiParity/StreamerParityTest.cs             |    54 +
 .../ApiParity/TransactionMetricsParityTest.cs   |    51 +
 .../ApiParity/TransactionsParityTest.cs         |    44 +
 .../AssertExtensions.cs                         |    90 +
 .../Binary/BinaryBuilderSelfTest.cs             |    12 +-
 .../Binary/BinaryCompactFooterInteropTest.cs    |    29 +-
 .../Binary/BinaryDynamicRegistrationTest.cs     |    64 +-
 .../Binary/BinaryFooterTest.cs                  |     4 +-
 .../Binary/BinarySelfTest.cs                    |   147 +-
 .../Binary/EnumsTest.cs                         |     2 +-
 .../Binary/IO/BinaryStreamsTest.cs              |     5 +-
 .../Serializable/AdvancedSerializationTest.cs   |    33 +
 .../BasicSerializableObjectsTest.cs             |    10 +-
 .../Binary/Serializable/CallbacksTest.cs        |     9 +-
 .../Serializable/GenericCollectionsTest.cs      |   112 +
 .../Binary/Serializable/PrimitivesTest.cs       |    40 +-
 .../Binary/Serializable/SqlDmlTest.cs           |    10 +-
 .../BinaryConfigurationTest.cs                  |    14 +-
 .../Cache/Affinity/AffinityAttributeTest.cs     |   135 +
 .../Cache/Affinity/AffinityFieldTest.cs         |    45 +-
 .../Affinity/AffinityFunctionSpringTest.cs      |     2 +-
 .../Cache/CacheAbstractTest.cs                  |   225 +-
 .../Cache/CacheAbstractTransactionalTest.cs     |    81 +-
 .../Cache/CacheConfigurationTest.cs             |   124 +-
 .../Cache/CacheCreateTest.cs                    |   152 +
 .../Cache/CacheForkedTest.cs                    |     1 +
 .../Cache/CacheMetricsTest.cs                   |    33 +-
 .../Cache/CachePartitionedTest.cs               |    37 +
 .../Cache/CacheQueryMetricsTest.cs              |   190 +
 .../Cache/CacheTestAsyncWrapper.cs              |   103 +-
 .../Cache/CacheTimeoutOnPmeTransactionalTest.cs |   108 +
 .../Cache/DataRegionMetricsTest.cs              |   165 +
 .../Cache/DataStorageMetricsTest.cs             |   107 +
 .../Cache/MemoryMetricsTest.cs                  |     5 +-
 .../Cache/PersistenceTest.cs                    |   352 +
 .../Cache/PersistentStoreTest.cs                |   224 -
 .../Cache/PersistentStoreTestObsolete.cs        |   192 +
 .../Cache/Query/CacheDmlQueriesTest.cs          |   106 +-
 .../Query/CacheDmlQueriesTestSimpleName.cs      |     2 +-
 .../Query/CacheQueriesCodeConfigurationTest.cs  |    45 +-
 .../Cache/Query/CacheQueriesTest.cs             |   128 +-
 .../Cache/Query/CacheQueriesTestSimpleName.cs   |     2 +-
 .../Continuous/ContinuousQueryAbstractTest.cs   |    10 +-
 .../Cache/Query/Linq/CacheLinqTest.Base.cs      |    29 +-
 .../Cache/Query/Linq/CacheLinqTest.Custom.cs    |   195 +
 .../Cache/Query/Linq/CacheLinqTest.Functions.cs |    48 +
 .../Query/Linq/CacheLinqTest.Introspection.cs   |    49 +-
 .../Cache/Query/Linq/CacheLinqTest.Join.cs      |   110 +-
 .../Cache/Query/Linq/CacheLinqTest.Misc.cs      |    17 +-
 .../Cache/Query/Linq/CacheLinqTest.Numerics.cs  |     4 +-
 .../Cache/Query/Linq/CacheLinqTest.Strings.cs   |    26 +
 .../Cache/Query/Linq/CacheLinqTestSimpleName.cs |     2 +-
 .../Cache/Store/CacheStoreSessionTest.cs        |    87 +-
 .../Store/CacheStoreSessionTestCodeConfig.cs    |    68 +
 .../Store/CacheStoreSessionTestSharedFactory.cs |    48 +
 .../Cache/Store/CacheStoreTest.cs               |    69 +-
 .../Client/Cache/BinaryBuilderTest.cs           |   118 +
 .../Client/Cache/CacheClientAsyncWrapper.cs     |   352 +
 .../Client/Cache/CacheTest.cs                   |   928 ++
 .../Client/Cache/CacheTestAsync.cs              |    35 +
 .../Client/Cache/CacheTestKeepBinary.cs         |   499 +
 .../Client/Cache/CacheTestNoMeta.cs             |   129 +
 .../Client/Cache/CacheTestSsl.cs                |    66 +
 .../Cache/ClientCacheConfigurationTest.cs       |   195 +
 .../Client/Cache/CreateCacheTest.cs             |   242 +
 .../Client/Cache/EmptyObject.cs                 |    54 +
 .../Client/Cache/LinqTest.cs                    |   117 +
 .../Client/Cache/Person.cs                      |    77 +
 .../Client/Cache/ScanQueryTest.cs               |   339 +
 .../Client/Cache/SqlQueryTest.cs                |   228 +
 .../Client/Cache/SqlQueryTestBase.cs            |    68 +
 .../Client/ClientConnectionTest.cs              |   701 ++
 .../Client/ClientTestBase.cs                    |   212 +
 .../Client/EndpointTest.cs                      |   113 +
 .../Client/IgniteClientConfigurationTest.cs     |   225 +
 .../Client/RawSecureSocketTest.cs               |   155 +
 .../Client/RawSocketTest.cs                     |   221 +
 .../Compute/AbstractTaskTest.cs                 |     2 -
 .../Compute/BinarizableClosureTaskTest.cs       |     1 -
 .../Compute/CancellationTest.cs                 |     2 +-
 .../Compute/ComputeApiTest.JavaTask.cs          |   582 +
 .../Compute/ComputeApiTest.cs                   |   578 +-
 .../Compute/ComputeApiTestFullFooter.cs         |     2 +
 .../Config/Apache.Ignite.exe.config.test        |     4 +-
 .../Config/Apache.Ignite.exe.config.test2       |     2 +-
 .../cache-store-session-shared-factory.xml      |    76 +
 .../Config/Cache/Store/cache-store-session.xml  |    20 +-
 .../Config/Client/IgniteClientConfiguration.xml |   Bin 0 -> 3384 bytes
 .../Config/Client/server-with-ssl.xml           |    67 +
 .../Config/Client/server.jks                    |   Bin 0 -> 4256 bytes
 .../Config/Client/thin-client-cert.pfx          |   Bin 0 -> 4549 bytes
 .../Config/Client/trust.jks                     |   Bin 0 -> 1089 bytes
 .../Config/Dynamic/dynamic-data.xml             |     2 +
 .../Config/KeyStore/server.jks                  |   Bin 0 -> 3230 bytes
 .../Config/KeyStore/trust.jks                   |   Bin 0 -> 2432 bytes
 .../Config/cache-default.xml                    |    56 +
 .../Config/cache-query.xml                      |     6 +
 .../Config/full-config.xml                      |   167 +
 .../Config/ignite-halthandler-dotnet-cfg.xml    |    54 +
 .../Config/ignite-stophandler-dotnet-cfg.xml    |    54 +
 .../Config/spring-test.xml                      |    18 +-
 .../Apache.Ignite.Core.Tests/Config/ssl.xml     |    65 +
 .../Config/start-test-grid1.xml                 |    55 -
 .../Config/start-test-grid2.xml                 |    46 -
 .../Config/start-test-grid3.xml                 |    44 -
 .../ConsoleRedirectTest.cs                      |    74 +-
 .../DataStructures/AtomicLongTest.cs            |     4 +-
 .../DataStructures/AtomicReferenceTest.cs       |     4 +-
 .../DataStructures/AtomicSequenceTest.cs        |     4 +-
 .../Dataload/DataStreamerTest.cs                |   192 +-
 .../Apache.Ignite.Core.Tests/DeploymentTest.cs  |   168 +-
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |    20 +-
 .../EventsTestLocalListeners.cs                 |   187 +
 .../Examples/Example.cs                         |    19 +-
 .../Examples/ExamplesTest.cs                    |    44 +-
 .../Examples/PathUtil.cs                        |     2 +-
 .../Apache.Ignite.Core.Tests/ExceptionsTest.cs  |     8 +-
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |    65 +-
 .../FailureHandlerTest.cs                       |   133 +
 .../IgniteConfigurationSerializerTest.cs        |   454 +-
 .../IgniteConfigurationTest.cs                  |   411 +-
 .../IgniteManagerTest.cs                        |    10 +-
 .../IgniteStartStopTest.cs                      |   115 +-
 .../Apache.Ignite.Core.Tests/IgniteTestBase.cs  |   163 -
 .../Impl/Compute/ComputeImplTest.cs             |    65 +
 .../Apache.Ignite.Core.Tests/LoadDllTest.cs     |    88 +-
 .../Log/CustomLoggerTest.cs                     |     6 +-
 .../Apache.Ignite.Core.Tests/MessagingTest.cs   |   145 +-
 .../MultiAppDomainTest.cs                       |   171 +
 .../Plugin/PluginTest.cs                        |    16 +-
 .../Plugin/TestIgnitePluginConfiguration.cs     |     1 -
 .../Process/ListDataReader.cs                   |    52 +
 .../ProjectFilesTest.cs                         |    19 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../Apache.Ignite.Core.Tests/ReconnectTest.cs   |     9 +-
 .../Services/ServiceProxyTest.cs                |    31 +-
 .../Services/ServicesAsyncWrapper.cs            |    42 +-
 .../Services/ServicesTest.cs                    |   487 +-
 .../Apache.Ignite.Core.Tests/SpringTestBase.cs  |   164 +
 .../Ssl/SslConfigurationTest.cs                 |   257 +
 .../Apache.Ignite.Core.Tests/TaskExtensions.cs  |    59 +
 .../dotnet/Apache.Ignite.Core.Tests/TestBase.cs |    61 +
 .../Apache.Ignite.Core.Tests/TestRunner.cs      |    89 +-
 .../TestUtils.Common.cs                         |   393 +
 .../TestUtils.Windows.cs                        |   123 +
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |   407 -
 .../WindowsServiceTest.cs                       |    58 +-
 .../dotnet/Apache.Ignite.Core.Tests/app.config  |     8 +-
 .../Apache.Ignite.Core.Tests/custom_app.config  |     9 +
 .../Apache.Ignite.Core.Tests/packages.config    |     1 +
 .../Apache.Ignite.Core.DotNetCore.csproj        |    12 +
 .../Apache.Ignite.Core.Schema.nuspec            |     3 +-
 .../Apache.Ignite.Core.csproj                   |   206 +-
 .../Apache.Ignite.Core.nuspec                   |    11 +-
 .../Binary/BinaryConfiguration.cs               |    46 +-
 .../Affinity/AffinityKeyMappedAttribute.cs      |    25 +-
 .../Cache/CacheAtomicUpdateTimeoutException.cs  |    67 -
 .../Cache/CachePartialUpdateException.cs        |     9 +-
 .../Cache/Configuration/CacheAtomicityMode.cs   |    30 +-
 .../Cache/Configuration/CacheConfiguration.cs   |   269 +-
 .../Configuration/CacheKeyConfiguration.cs      |    84 +
 .../Cache/Configuration/DataPageEvictionMode.cs |     3 +
 .../Cache/Configuration/MemoryConfiguration.cs  |     7 +-
 .../Configuration/MemoryPolicyConfiguration.cs  |     8 +-
 .../Cache/Configuration/QueryEntity.cs          |   106 +-
 .../Cache/Configuration/QueryField.cs           |    86 +-
 .../Cache/Configuration/QueryIndex.cs           |    50 +-
 .../Configuration/QuerySqlFieldAttribute.cs     |    39 +-
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |    40 +-
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |   206 +
 .../Apache.Ignite.Core/Cache/IMemoryMetrics.cs  |     6 +-
 .../Apache.Ignite.Core/Cache/IQueryMetrics.cs   |    65 +
 .../Cache/Query/IFieldsQueryCursor.cs           |    34 +
 .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs |     2 +-
 .../Cache/Query/SqlFieldsQuery.cs               |    17 +-
 .../Client/Cache/CacheClientConfiguration.cs    |   414 +
 .../Client/Cache/ICacheClient.cs                |   425 +
 .../Client/ClientStatusCode.cs                  |    67 +
 .../Apache.Ignite.Core/Client/IIgniteClient.cs  |   127 +
 .../Client/ISslStreamFactory.cs                 |    38 +
 .../Client/IgniteClientConfiguration.cs         |   248 +
 .../Client/IgniteClientConfigurationSection.cs  |    80 +
 .../Client/IgniteClientException.cs             |   116 +
 .../Client/SslStreamFactory.cs                  |   110 +
 .../Apache.Ignite.Core/Cluster/IBaselineNode.cs |    37 +
 .../Apache.Ignite.Core/Cluster/ICluster.cs      |    76 +-
 .../Apache.Ignite.Core/Cluster/IClusterNode.cs  |     3 +-
 .../Apache.Ignite.Core/Common/IgniteGuid.cs     |    31 +-
 .../Apache.Ignite.Core/Compute/ICompute.cs      |     6 +
 .../Apache.Ignite.Core/Compute/IComputeTask.cs  |     2 +
 .../Configuration/CheckpointWriteOrder.cs       |    37 +
 .../ClientConnectorConfiguration.cs             |   221 +
 .../Configuration/DataPageEvictionMode.cs       |    59 +
 .../Configuration/DataRegionConfiguration.cs    |   222 +
 .../Configuration/DataStorageConfiguration.cs   |   502 +
 .../Configuration/SqlConnectorConfiguration.cs  |     2 +
 .../Apache.Ignite.Core/Configuration/WalMode.cs |    52 +
 .../Datastream/DataStreamerDefaults.cs          |    51 +
 .../Datastream/IDataStreamer.cs                 |    38 +-
 .../Datastream/StreamTransformer.cs             |     6 +-
 .../Datastream/StreamVisitor.cs                 |     6 +-
 .../Apache.Ignite.Core/Events/JobEvent.cs       |     6 +-
 .../Events/LocalEventListener.cs                |    79 +
 .../Apache.Ignite.Core/Events/TaskEvent.cs      |     4 +-
 .../Failure/IFailureHandler.cs                  |    33 +
 .../Failure/NoOpFailureHandler.cs               |    28 +
 .../Failure/StopNodeFailureHandler.cs           |    28 +
 .../Failure/StopNodeOrHaltFailureHandler.cs     |    97 +
 .../Apache.Ignite.Core/IDataRegionMetrics.cs    |   100 +
 .../Apache.Ignite.Core/IDataStorageMetrics.cs   |    87 +
 .../dotnet/Apache.Ignite.Core/IIgnite.cs        |    48 +-
 .../IgniteClientConfigurationSection.xsd        |   267 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |   569 +-
 .../IgniteConfigurationSection.cs               |     2 +-
 .../IgniteConfigurationSection.xsd              |   639 +-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   178 +-
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |    19 +-
 .../Impl/Binary/BinaryObjectBuilder.cs          |   137 +-
 .../Impl/Binary/BinaryObjectSchemaSerializer.cs |    12 +-
 .../Impl/Binary/BinaryProcessor.cs              |   161 +-
 .../Impl/Binary/BinaryProcessorClient.cs        |   112 +
 .../Impl/Binary/BinaryReader.cs                 |   128 +-
 .../Impl/Binary/BinaryReaderExtensions.cs       |    84 +-
 .../Impl/Binary/BinaryReflectiveActions.cs      |    74 +-
 .../Binary/BinarySurrogateTypeDescriptor.cs     |     8 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |   200 +-
 .../Impl/Binary/BinaryTypeId.cs                 |   231 +
 .../Impl/Binary/BinaryUtils.cs                  |   256 +-
 .../Impl/Binary/BinaryWriter.cs                 |   180 +-
 .../Impl/Binary/BinaryWriterExtensions.cs       |   183 +-
 .../Impl/Binary/IBinaryProcessor.cs             |    73 +
 .../Impl/Binary/IBinaryRawWriteAware.cs         |    65 +
 .../Impl/Binary/IBinaryTypeDescriptor.cs        |     6 +-
 .../Impl/Binary/Io/BinaryHeapStream.cs          |  1018 +-
 .../Impl/Binary/Io/BinaryStreamBase.cs          |  1249 --
 .../Impl/Binary/Io/IBinaryStream.cs             |     7 +-
 .../Impl/Binary/Marshaller.cs                   |   107 +-
 .../Impl/Binary/Metadata/BinaryType.cs          |    94 +-
 .../Impl/Binary/MultidimensionalArrayHolder.cs  |   132 +
 .../Binary/MultidimensionalArraySerializer.cs   |    48 +
 .../Impl/Binary/OptimizedMarshallerObject.cs    |    54 +
 .../Impl/Binary/ReflectionUtils.cs              |    65 +
 .../Impl/Binary/SerializableSerializer.cs       |    49 +-
 .../Impl/Binary/Structure/BinaryStructure.cs    |   147 +-
 .../Binary/Structure/BinaryStructureTracker.cs  |    16 +-
 .../Impl/Binary/TypeResolver.cs                 |     2 +-
 .../Cache/Affinity/PlatformAffinityFunction.cs  |     7 +-
 .../Impl/Cache/CacheAffinityImpl.cs             |    20 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheEntry.cs |    31 +-
 .../Impl/Cache/CacheEntryFilterHolder.cs        |     2 +-
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |     4 +-
 .../Impl/Cache/CacheEnumerator.cs               |     8 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |   275 +-
 .../Impl/Cache/CacheMetricsImpl.cs              |   175 +
 .../Apache.Ignite.Core/Impl/Cache/CacheOp.cs    |     4 +-
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs   |     4 +-
 .../Impl/Cache/ICacheInternal.cs                |     8 +-
 .../Impl/Cache/MemoryMetrics.cs                 |     2 +
 .../Impl/Cache/Query/AbstractQueryCursor.cs     |   268 -
 .../Query/Continuous/ContinuousQueryFilter.cs   |     2 +
 .../Continuous/ContinuousQueryHandleImpl.cs     |    12 +-
 .../Query/Continuous/ContinuousQueryUtils.cs    |     2 +-
 .../Impl/Cache/Query/FieldsQueryCursor.cs       |    66 +-
 .../Impl/Cache/Query/PlatformQueryQursorBase.cs |    96 +
 .../Impl/Cache/Query/QueryCursor.cs             |    21 +-
 .../Impl/Cache/Query/QueryCursorBase.cs         |   309 +
 .../Impl/Cache/QueryMetricsImpl.cs              |    71 +
 .../Impl/Cache/Store/CacheStoreInternal.cs      |    28 +-
 .../Impl/Client/Cache/CacheClient.cs            |   821 ++
 .../Impl/Client/Cache/CacheFlags.cs             |    38 +
 .../Cache/ClientCacheConfigurationSerializer.cs |   375 +
 .../Cache/Query/ClientFieldsQueryCursor.cs      |    73 +
 .../Client/Cache/Query/ClientQueryCursor.cs     |    46 +
 .../Client/Cache/Query/ClientQueryCursorBase.cs |    89 +
 .../Impl/Client/Cache/Query/StatementType.cs    |    42 +
 .../Impl/Client/ClientFailoverSocket.cs         |   247 +
 .../Apache.Ignite.Core/Impl/Client/ClientOp.cs  |    72 +
 .../Impl/Client/ClientProtocolVersion.cs        |   139 +
 .../Impl/Client/ClientSocket.cs                 |   774 ++
 .../Apache.Ignite.Core/Impl/Client/Endpoint.cs  |   148 +
 .../Impl/Client/IClientSocket.cs                |    58 +
 .../Impl/Client/IgniteClient.cs                 |   282 +
 .../Impl/Cluster/BaselineNode.cs                |    89 +
 .../Impl/Cluster/ClusterGroupImpl.cs            |   195 +-
 .../Impl/Cluster/ClusterNodeImpl.cs             |    38 +-
 .../Apache.Ignite.Core/Impl/Common/Classpath.cs |    52 +-
 .../Impl/Common/DelegateTypeDescriptor.cs       |    10 +-
 .../Impl/Common/IgniteArgumentCheck.cs          |    11 +-
 .../Common/IgniteConfigurationXmlSerializer.cs  |    98 +-
 .../Impl/Common/IgniteHome.cs                   |    33 +-
 .../Impl/Common/Listenable.cs                   |     8 +-
 .../Impl/Common/TaskRunner.cs                   |    70 +
 .../Impl/Common/TypeCaster.cs                   |    11 +-
 .../Impl/Compute/Closure/ComputeActionJob.cs    |     4 +-
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |     6 +-
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |     4 +-
 .../Closure/ComputeReducingClosureTask.cs       |     2 +-
 .../Compute/Closure/IComputeResourceInjector.cs |     2 +-
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |     8 +
 .../Impl/Compute/ComputeFunc.cs                 |     2 +-
 .../Impl/Compute/ComputeImpl.cs                 |    31 +-
 .../Impl/Compute/ComputeJob.cs                  |     2 +-
 .../Impl/Compute/ComputeJobHolder.cs            |    21 +-
 .../Impl/Compute/ComputeOutFunc.cs              |     2 +-
 .../Impl/DataRegionMetrics.cs                   |    97 +
 .../Impl/DataStorageMetrics.cs                  |    87 +
 .../Impl/DataStructures/AtomicLong.cs           |     9 +-
 .../Impl/DataStructures/AtomicReference.cs      |     8 +-
 .../Impl/DataStructures/AtomicSequence.cs       |     9 +-
 .../Impl/Datastream/DataStreamerBatch.cs        |    12 +-
 .../Impl/Datastream/DataStreamerImpl.cs         |    97 +-
 .../Impl/Datastream/StreamReceiverHolder.cs     |    13 +-
 .../Impl/Deployment/PeerAssemblyResolver.cs     |    17 +-
 .../Impl/Deployment/PeerLoadingExtensions.cs    |     4 +-
 .../Impl/Deployment/PeerLoadingObjectHolder.cs  |     4 +-
 .../Apache.Ignite.Core/Impl/Events/Events.cs    |    46 +-
 .../Apache.Ignite.Core/Impl/ExceptionUtils.cs   |    44 +-
 .../Impl/Handle/HandleRegistry.cs               |     1 +
 .../Apache.Ignite.Core/Impl/IIgniteInternal.cs  |    80 +
 .../Impl/IPlatformTargetInternal.cs             |   102 +
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |   450 +-
 .../Apache.Ignite.Core/Impl/IgniteManager.cs    |    91 +-
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |   302 +-
 .../Apache.Ignite.Core/Impl/Log/JavaLogger.cs   |    23 +-
 .../Impl/Memory/PlatformMemoryStream.cs         |    12 +-
 .../Apache.Ignite.Core/Impl/MemoryInfo.cs       |   110 +
 .../Impl/Messaging/MessageListenerHolder.cs     |     4 +-
 .../Impl/Messaging/Messaging.cs                 |    10 +-
 .../Apache.Ignite.Core/Impl/NativeMethods.cs    |    93 -
 .../PersistentStore/PersistentStoreMetrics.cs   |     2 +
 .../Impl/PlatformDisposableTargetAdapter.cs     |    75 +
 .../Impl/PlatformJniTarget.cs                   |   650 +
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |  1070 --
 .../Impl/PlatformTargetAdapter.cs               |   525 +
 .../Impl/Plugin/PluginContext.cs                |     7 +-
 .../Impl/Resource/ResourceProcessor.cs          |     2 +-
 .../Impl/Resource/ResourceTypeDescriptor.cs     |     2 +-
 .../Impl/Services/DynamicServiceProxy.cs        |   108 +
 .../Impl/Services/ServiceProxy.cs               |    73 -
 .../Impl/Services/ServiceProxyFactory.cs        |    68 +
 .../Impl/Services/ServiceProxyInvoker.cs        |    14 +-
 .../Impl/Services/ServiceProxySerializer.cs     |    99 +-
 .../Impl/Services/ServiceProxyTypeGenerator.cs  |   315 +
 .../Impl/Services/Services.cs                   |   174 +-
 .../dotnet/Apache.Ignite.Core/Impl/Shell.cs     |    65 +
 .../Impl/Ssl/SslFactorySerializer.cs            |    65 +
 .../Transactions/TransactionCollectionImpl.cs   |   112 +
 .../Impl/Transactions/TransactionImpl.cs        |     9 +-
 .../Impl/Transactions/TransactionsImpl.cs       |    95 +-
 .../Impl/Unmanaged/IUnmanagedTarget.cs          |    42 -
 .../Impl/Unmanaged/IgniteJniNativeMethods.cs    |   182 -
 .../Impl/Unmanaged/Jni/AppDomains.cs            |   136 +
 .../Impl/Unmanaged/Jni/CallbackDelegates.cs     |    52 +
 .../Impl/Unmanaged/Jni/Callbacks.cs             |   292 +
 .../Impl/Unmanaged/Jni/ConsoleWriter.cs         |    47 +
 .../Impl/Unmanaged/Jni/DllLoader.cs             |   210 +
 .../Impl/Unmanaged/Jni/Env.cs                   |   506 +
 .../Impl/Unmanaged/Jni/EnvDelegates.cs          |   109 +
 .../Impl/Unmanaged/Jni/EnvInterface.cs          |   263 +
 .../Impl/Unmanaged/Jni/GlobalRef.cs             |    87 +
 .../Impl/Unmanaged/Jni/JniResult.cs             |    35 +
 .../Impl/Unmanaged/Jni/Jvm.cs                   |   369 +
 .../Impl/Unmanaged/Jni/JvmDelegates.cs          |    31 +
 .../Impl/Unmanaged/Jni/JvmDll.cs                |   449 +
 .../Impl/Unmanaged/Jni/JvmInitArgs.cs           |    33 +
 .../Impl/Unmanaged/Jni/JvmInterface.cs          |    40 +
 .../Impl/Unmanaged/Jni/JvmOption.cs             |    34 +
 .../Impl/Unmanaged/Jni/MethodId.cs              |   157 +
 .../Impl/Unmanaged/Jni/NativeMethod.cs          |    48 +
 .../Apache.Ignite.Core/Impl/Unmanaged/Os.cs     |    72 +
 .../Impl/Unmanaged/UnmanagedCallbackHandlers.cs |    38 -
 .../Impl/Unmanaged/UnmanagedCallbackOp.cs       |     3 +-
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |   311 +-
 .../Impl/Unmanaged/UnmanagedContext.cs          |    53 -
 .../Unmanaged/UnmanagedNonReleaseableTarget.cs  |    70 -
 .../Impl/Unmanaged/UnmanagedTarget.cs           |    77 -
 .../Impl/Unmanaged/UnmanagedUtils.cs            |   523 +-
 .../Interop/IPlatformTarget.cs                  |    15 +
 .../dotnet/Apache.Ignite.Core/NuGet/Install.ps1 |     2 +-
 .../NuGet/LINQPad/BinaryModeExample.linq        |     3 +-
 .../NuGet/LINQPad/ComputeExample.linq           |     2 +-
 .../NuGet/LINQPad/PutGetExample.linq            |     1 -
 .../NuGet/LINQPad/QueryExample.linq             |     3 +-
 .../NuGet/LINQPad/ThinClient.linq               |    56 +
 .../Apache.Ignite.Core/NuGet/PostBuild.ps1      |     6 +-
 .../Apache.Ignite.Core/NuGet/Uninstall.ps1      |     2 +-
 .../dotnet/Apache.Ignite.Core/Package-Info.cs   |     8 +-
 .../PersistentStore/CheckpointWriteOrder.cs     |    40 +
 .../PersistentStore/IPersistentStoreMetrics.cs  |     2 +
 .../PersistentStoreConfiguration.cs             |    35 +-
 .../PersistentStore/WalMode.cs                  |     3 +
 .../Properties/AssemblyInfo.cs                  |    13 +-
 .../Resource/InstanceResourceAttribute.cs       |     3 +-
 .../Apache.Ignite.Core/Services/IServices.cs    |    58 +
 .../Services/ServiceConfiguration.cs            |    70 +-
 .../Services/ServiceDeploymentException.cs      |   143 +
 .../Services/ServiceInvocationException.cs      |     9 +-
 .../Ssl/ISslContextFactory.cs                   |    32 +
 .../Apache.Ignite.Core/Ssl/SslContextFactory.cs |   170 +
 .../Transactions/ITransactionCollection.cs      |    29 +
 .../Transactions/ITransactions.cs               |    20 +-
 .../Transactions/TransactionConfiguration.cs    |    11 +
 .../dotnet/Apache.Ignite.Core/build-common.ps1  |    77 -
 .../dotnet/Apache.Ignite.DotNetCore.sln         |    37 +
 .../Apache.Ignite.DotNetCore.sln.DotSettings    |    11 +
 .../Apache.Ignite.EntityFramework.Tests.csproj  |    22 +-
 .../EntityFrameworkCacheInitializationTest.cs   |     4 +-
 .../Properties/AssemblyInfo.cs                  |     6 +-
 .../Apache.Ignite.EntityFramework.csproj        |     3 +-
 .../Apache.Ignite.EntityFramework.nuspec        |     6 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../Apache.Ignite.Linq.DotNetCore.csproj        |    16 +
 .../Apache.Ignite.Linq.csproj                   |     7 +-
 .../Apache.Ignite.Linq.nuspec                   |     7 +-
 .../CacheClientLinqExtensions.cs                |   131 +
 .../Apache.Ignite.Linq/CacheExtensions.cs       |   195 -
 .../Apache.Ignite.Linq/CacheLinqExtensions.cs   |   225 +
 .../Apache.Ignite.Linq/ICacheQueryable.cs       |     1 +
 .../Apache.Ignite.Linq/IUpdateDescriptor.cs     |    51 +
 .../Apache.Ignite.Linq/Impl/AliasDictionary.cs  |     8 +-
 .../Impl/CacheFieldsQueryExecutor.cs            |    13 +-
 .../Impl/CacheFieldsQueryProvider.cs            |    25 +-
 .../Impl/CacheQueryExpressionVisitor.cs         |    48 +-
 .../Impl/CacheQueryModelVisitor.cs              |   173 +-
 .../Apache.Ignite.Linq/Impl/CacheQueryParser.cs |     3 +
 .../Apache.Ignite.Linq/Impl/CacheQueryable.cs   |     8 +-
 .../Impl/CacheQueryableBase.cs                  |     1 +
 .../Impl/Dml/MemberUpdateContainer.cs           |    38 +
 .../Impl/Dml/UpdateAllExpressionNode.cs         |   138 +
 .../Impl/Dml/UpdateAllResultOperator.cs         |    75 +
 .../Apache.Ignite.Linq/Impl/ExpressionWalker.cs |    59 +-
 .../Apache.Ignite.Linq/Impl/MethodVisitor.cs    |    59 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../dotnet/Apache.Ignite.Linq/QueryOptions.cs   |    13 +
 .../Apache.Ignite.Log4Net.csproj                |     4 +-
 .../Apache.Ignite.Log4Net.nuspec                |     6 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 .../Apache.Ignite.NLog.nuspec                   |     6 +-
 .../Properties/AssemblyInfo.cs                  |     8 +-
 modules/platforms/dotnet/Apache.Ignite.ndproj   | 11141 +++++++++++++++++
 modules/platforms/dotnet/Apache.Ignite.sln      |   149 +-
 .../dotnet/Apache.Ignite.sln.DotSettings        |     2 +
 .../dotnet/Apache.Ignite/IgniteRunner.cs        |    11 +-
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |     8 +-
 .../Apache.Ignite/Service/IgniteService.cs      |    13 +-
 modules/platforms/dotnet/DEVNOTES.txt           |    73 +-
 modules/platforms/dotnet/README.md              |   243 +-
 modules/platforms/dotnet/build-mono.sh          |    34 +
 modules/platforms/dotnet/build.ps1              |   142 +-
 modules/platforms/dotnet/build.sh               |    34 +
 modules/platforms/dotnet/docfx/.gitignore       |     9 +
 .../dotnet/docfx/Apache.Ignite.docfx.json       |    88 +
 modules/platforms/dotnet/docfx/README.txt       |     2 +
 modules/platforms/dotnet/docfx/api/index.md     |     5 +
 modules/platforms/dotnet/docfx/filterConfig.yml |    19 +
 .../platforms/dotnet/docfx/generate-docs.cmd    |     1 +
 .../platforms/dotnet/docfx/images/favicon.ico   |   Bin 0 -> 1150 bytes
 .../dotnet/docfx/images/logo_ignite_32_32.png   |   Bin 0 -> 1676 bytes
 modules/platforms/dotnet/docfx/index.md         |    10 +
 modules/platforms/dotnet/docfx/toc.yml          |    19 +
 .../Apache.Ignite.Examples.csproj               |     9 +-
 .../Datagrid/BinaryModeExample.cs               |    17 +-
 .../Datagrid/EntryProcessorExample.cs           |     4 +
 .../Datagrid/LinqExample.cs                     |   341 -
 .../Datagrid/MultiTieredCacheExample.cs         |     2 -
 .../Datagrid/QueryDmlExample.cs                 |   162 -
 .../Datagrid/QueryExample.cs                    |   180 +-
 .../Misc/LifecycleExample.cs                    |     1 -
 .../Properties/AssemblyInfo.cs                  |     2 +-
 .../Apache.Ignite.Examples/Sql/LinqExample.cs   |   345 +
 .../Apache.Ignite.Examples/Sql/SqlDdlExample.cs |   112 +
 .../Apache.Ignite.Examples/Sql/SqlDmlExample.cs |   161 +
 .../Apache.Ignite.Examples/Sql/SqlExample.cs    |   299 +
 .../ThinClient/ThinClientPutGetExample.cs       |    89 +
 .../ThinClient/ThinClientQueryExample.cs        |   144 +
 .../ThinClient/ThinClientSqlExample.cs          |   219 +
 .../Properties/AssemblyInfo.cs                  |     2 +-
 modules/platforms/dotnet/examples/README.txt    |     2 +
 .../dotnetcore/Apache.Ignite.Examples.csproj    |    29 +
 .../dotnet/examples/dotnetcore/App.config       |    38 +
 .../dotnet/examples/dotnetcore/Employee.cs      |    67 +
 .../dotnet/examples/dotnetcore/LinqExample.cs   |   239 +
 .../dotnet/examples/dotnetcore/Organization.cs  |    58 +
 .../dotnet/examples/dotnetcore/Program.cs       |   109 +
 .../dotnet/examples/dotnetcore/PutGetExample.cs |   122 +
 .../dotnet/examples/dotnetcore/README.txt       |     8 +
 .../dotnet/examples/dotnetcore/SqlExample.cs    |   191 +
 .../dotnet/run-dotnetcore-examples.bat          |    27 +
 modules/platforms/nodejs/README.md              |    32 +
 .../platforms/nodejs/api_spec/BinaryObject.html |  1847 +++
 .../nodejs/api_spec/BinaryObject.js.html        |   549 +
 .../platforms/nodejs/api_spec/CacheClient.html  |  4867 +++++++
 .../nodejs/api_spec/CacheClient.js.html         |   812 ++
 .../nodejs/api_spec/CacheConfiguration.html     |  8527 +++++++++++++
 .../nodejs/api_spec/CacheConfiguration.js.html  |  1784 +++
 .../platforms/nodejs/api_spec/CacheEntry.html   |   468 +
 .../nodejs/api_spec/CacheKeyConfiguration.html  |   796 ++
 .../nodejs/api_spec/CollectionObjectType.html   |   524 +
 .../nodejs/api_spec/ComplexObjectType.html      |   526 +
 .../nodejs/api_spec/CompositeType.html          |   170 +
 modules/platforms/nodejs/api_spec/Cursor.html   |   588 +
 .../platforms/nodejs/api_spec/Cursor.js.html    |   360 +
 modules/platforms/nodejs/api_spec/EnumItem.html |  1431 +++
 .../platforms/nodejs/api_spec/EnumItem.js.html  |   255 +
 .../platforms/nodejs/api_spec/Errors.js.html    |   172 +
 .../platforms/nodejs/api_spec/IgniteClient.html |  2368 ++++
 .../nodejs/api_spec/IgniteClient.js.html        |   343 +
 .../api_spec/IgniteClientConfiguration.html     |   846 ++
 .../api_spec/IgniteClientConfiguration.js.html  |   163 +
 .../nodejs/api_spec/IgniteClientError.html      |   168 +
 .../nodejs/api_spec/IllegalStateError.html      |   179 +
 .../nodejs/api_spec/LostConnectionError.html    |   179 +
 .../nodejs/api_spec/MapObjectType.html          |   485 +
 .../nodejs/api_spec/ObjectArrayType.html        |   265 +
 .../platforms/nodejs/api_spec/ObjectType.html   |  1126 ++
 .../nodejs/api_spec/ObjectType.js.html          |   651 +
 .../nodejs/api_spec/OperationError.html         |   179 +
 modules/platforms/nodejs/api_spec/Query.html    |   481 +
 modules/platforms/nodejs/api_spec/Query.js.html |   559 +
 .../platforms/nodejs/api_spec/QueryEntity.html  |  2218 ++++
 .../platforms/nodejs/api_spec/QueryField.html   |  2211 ++++
 .../platforms/nodejs/api_spec/QueryIndex.html   |  1480 +++
 .../platforms/nodejs/api_spec/ScanQuery.html    |   686 +
 .../nodejs/api_spec/SqlFieldsCursor.html        |   915 ++
 .../nodejs/api_spec/SqlFieldsQuery.html         |  3036 +++++
 modules/platforms/nodejs/api_spec/SqlQuery.html |  1755 +++
 .../platforms/nodejs/api_spec/Timestamp.html    |   566 +
 .../platforms/nodejs/api_spec/Timestamp.js.html |   127 +
 modules/platforms/nodejs/api_spec/conf.json     |    12 +
 .../api_spec/fonts/OpenSans-Bold-webfont.eot    |   Bin 0 -> 19544 bytes
 .../api_spec/fonts/OpenSans-Bold-webfont.svg    |  1830 +++
 .../api_spec/fonts/OpenSans-Bold-webfont.woff   |   Bin 0 -> 22432 bytes
 .../fonts/OpenSans-BoldItalic-webfont.eot       |   Bin 0 -> 20133 bytes
 .../fonts/OpenSans-BoldItalic-webfont.svg       |  1830 +++
 .../fonts/OpenSans-BoldItalic-webfont.woff      |   Bin 0 -> 23048 bytes
 .../api_spec/fonts/OpenSans-Italic-webfont.eot  |   Bin 0 -> 20265 bytes
 .../api_spec/fonts/OpenSans-Italic-webfont.svg  |  1830 +++
 .../api_spec/fonts/OpenSans-Italic-webfont.woff |   Bin 0 -> 23188 bytes
 .../api_spec/fonts/OpenSans-Light-webfont.eot   |   Bin 0 -> 19514 bytes
 .../api_spec/fonts/OpenSans-Light-webfont.svg   |  1831 +++
 .../api_spec/fonts/OpenSans-Light-webfont.woff  |   Bin 0 -> 22248 bytes
 .../fonts/OpenSans-LightItalic-webfont.eot      |   Bin 0 -> 20535 bytes
 .../fonts/OpenSans-LightItalic-webfont.svg      |  1835 +++
 .../fonts/OpenSans-LightItalic-webfont.woff     |   Bin 0 -> 23400 bytes
 .../api_spec/fonts/OpenSans-Regular-webfont.eot |   Bin 0 -> 19836 bytes
 .../api_spec/fonts/OpenSans-Regular-webfont.svg |  1831 +++
 .../fonts/OpenSans-Regular-webfont.woff         |   Bin 0 -> 22660 bytes
 modules/platforms/nodejs/api_spec/index.html    |    65 +
 .../nodejs/api_spec/scripts/linenumber.js       |    25 +
 .../scripts/prettify/Apache-License-2.0.txt     |   202 +
 .../api_spec/scripts/prettify/lang-css.js       |     2 +
 .../api_spec/scripts/prettify/prettify.js       |    28 +
 .../nodejs/api_spec/styles/jsdoc-default.css    |   358 +
 .../nodejs/api_spec/styles/prettify-jsdoc.css   |   111 +
 .../api_spec/styles/prettify-tomorrow.css       |   132 +
 .../platforms/nodejs/examples/AuthTlsExample.js |   128 +
 .../nodejs/examples/CachePutGetExample.js       |   186 +
 .../nodejs/examples/FailoverExample.js          |    59 +
 modules/platforms/nodejs/examples/SqlExample.js |   242 +
 .../nodejs/examples/SqlQueryEntriesExample.js   |   136 +
 modules/platforms/nodejs/examples/certs/ca.crt  |    32 +
 .../platforms/nodejs/examples/certs/client.crt  |    30 +
 .../platforms/nodejs/examples/certs/client.key  |    51 +
 .../nodejs/examples/certs/keystore.jks          |   Bin 0 -> 3828 bytes
 .../nodejs/examples/certs/truststore.jks        |   Bin 0 -> 1477 bytes
 modules/platforms/nodejs/index.js               |    43 +
 modules/platforms/nodejs/lib/BinaryObject.js    |   530 +
 modules/platforms/nodejs/lib/CacheClient.js     |   759 ++
 .../platforms/nodejs/lib/CacheConfiguration.js  |  1734 +++
 modules/platforms/nodejs/lib/Cursor.js          |   307 +
 modules/platforms/nodejs/lib/EnumItem.js        |   203 +
 modules/platforms/nodejs/lib/Errors.js          |   121 +
 modules/platforms/nodejs/lib/IgniteClient.js    |   290 +
 .../nodejs/lib/IgniteClientConfiguration.js     |   112 +
 modules/platforms/nodejs/lib/ObjectType.js      |   600 +
 modules/platforms/nodejs/lib/Query.js           |   508 +
 modules/platforms/nodejs/lib/Timestamp.js       |    76 +
 .../nodejs/lib/internal/ArgumentChecker.js      |    83 +
 .../nodejs/lib/internal/BinaryCommunicator.js   |   409 +
 .../platforms/nodejs/lib/internal/BinaryType.js |   483 +
 .../nodejs/lib/internal/BinaryTypeStorage.js    |   112 +
 .../nodejs/lib/internal/BinaryUtils.js          |   598 +
 .../nodejs/lib/internal/ClientFailoverSocket.js |   134 +
 .../nodejs/lib/internal/ClientSocket.js         |   454 +
 modules/platforms/nodejs/lib/internal/Logger.js |    45 +
 .../nodejs/lib/internal/MessageBuffer.js        |   293 +
 modules/platforms/nodejs/package.json           |    25 +
 .../platforms/nodejs/spec/ExamplesExecutor.js   |    28 +
 modules/platforms/nodejs/spec/TestingHelper.js  |   384 +
 .../nodejs/spec/cache/BinaryObject.spec.js      |   176 +
 .../platforms/nodejs/spec/cache/Cache.spec.js   |   262 +
 .../nodejs/spec/cache/CacheKeyValueOps.spec.js  |  1022 ++
 .../spec/cache/CachePutGetDiffTypes.spec.js     |   647 +
 .../nodejs/spec/cache/ComplexObject.spec.js     |   540 +
 modules/platforms/nodejs/spec/config.js         |    27 +
 .../nodejs/spec/examples/AuthExample.spec.js    |    33 +
 .../nodejs/spec/examples/Examples.spec.js       |    45 +
 .../nodejs/spec/query/ScanQuery.spec.js         |   207 +
 .../nodejs/spec/query/SqlFieldsQuery.spec.js    |   247 +
 .../nodejs/spec/query/SqlQuery.spec.js          |   247 +
 .../platforms/nodejs/spec/support/jasmine.json  |    11 +
 modules/rest-http/pom.xml                       |    30 +-
 .../http/jetty/GridJettyObjectMapper.java       |    64 +-
 .../http/jetty/GridJettyRestHandler.java        |   374 +-
 .../http/jetty/GridJettyRestProtocol.java       |    20 +-
 .../rest/protocols/http/jetty/favicon.ico       |   Bin 1406 -> 1150 bytes
 .../rest/protocols/http/jetty/rest.html         |     4 +-
 .../protocols/http/jetty/GridRestSuite.java     |    35 +
 .../http/jetty/RestSetupSimpleTest.java         |    76 +
 modules/rocketmq/pom.xml                        |    15 +-
 modules/scalar-2.10/pom.xml                     |     9 +-
 modules/scalar/pom.xml                          |     6 +-
 modules/schedule/pom.xml                        |    26 +-
 .../schedule/GridScheduleSelfTest.java          |     7 -
 modules/slf4j/pom.xml                           |    24 +-
 .../apache/ignite/logger/slf4j/Slf4jLogger.java |    50 +-
 .../logger/slf4j/Slf4jLoggerMarkerTest.java     |   108 +
 .../ignite/testsuites/IgniteSlf4jTestSuite.java |    37 +
 .../slf4j/src/test/resources/log4j2-test.xml    |    38 +
 modules/spark-2.10/README.txt                   |     4 -
 modules/spark-2.10/licenses/apache-2.0.txt      |   202 -
 modules/spark-2.10/pom.xml                      |   175 -
 modules/spark/pom.xml                           |   208 +-
 ....apache.spark.sql.sources.DataSourceRegister |     1 +
 .../org/apache/ignite/spark/IgniteContext.scala |    55 +-
 .../ignite/spark/IgniteDataFrameSettings.scala  |   165 +
 .../org/apache/ignite/spark/IgniteRDD.scala     |    81 +-
 .../apache/ignite/spark/JavaIgniteContext.scala |     2 +
 .../spark/impl/IgniteDataFramePartition.scala   |    31 +
 .../ignite/spark/impl/IgnitePartition.scala     |     2 +-
 .../spark/impl/IgniteRelationProvider.scala     |   259 +
 .../impl/IgniteSQLAccumulatorRelation.scala     |    98 +
 .../spark/impl/IgniteSQLDataFrameRDD.scala      |    88 +
 .../ignite/spark/impl/IgniteSQLRelation.scala   |   131 +
 .../apache/ignite/spark/impl/IgniteSqlRDD.scala |    16 +-
 .../apache/ignite/spark/impl/QueryHelper.scala  |   186 +
 .../apache/ignite/spark/impl/QueryUtils.scala   |   225 +
 .../optimization/AggregateExpressions.scala     |   114 +
 .../optimization/ConditionExpressions.scala     |   160 +
 .../impl/optimization/DateExpressions.scala     |   127 +
 .../impl/optimization/IgniteQueryContext.scala  |    52 +
 .../impl/optimization/MathExpressions.scala     |   263 +
 .../impl/optimization/SimpleExpressions.scala   |   202 +
 .../impl/optimization/StringExpressions.scala   |   172 +
 .../optimization/SupportedExpressions.scala     |    42 +
 .../impl/optimization/SystemExpressions.scala   |   122 +
 .../accumulator/JoinSQLAccumulator.scala        |   226 +
 .../accumulator/QueryAccumulator.scala          |    80 +
 .../accumulator/SelectAccumulator.scala         |    70 +
 .../accumulator/SingleTableSQLAccumulator.scala |   128 +
 .../accumulator/UnionSQLAccumulator.scala       |    80 +
 .../spark/impl/optimization/package.scala       |   230 +
 .../org/apache/ignite/spark/impl/package.scala  |   178 +
 .../sql/ignite/IgniteExternalCatalog.scala      |   353 +
 .../spark/sql/ignite/IgniteOptimization.scala   |   440 +
 .../spark/sql/ignite/IgniteSharedState.scala    |    43 +
 .../spark/sql/ignite/IgniteSparkSession.scala   |   358 +
 .../spark/JavaStandaloneIgniteRDDSelfTest.java  |     6 -
 .../ignite/testsuites/IgniteRDDTestSuite.java   |     2 +-
 modules/spark/src/test/resources/cities.json    |     3 +
 .../src/test/resources/cities_non_unique.json   |     6 +
 .../src/test/resources/ignite-spark-config.xml  |    64 +
 .../ignite/spark/AbstractDataFrameSpec.scala    |   239 +
 .../apache/ignite/spark/IgniteCatalogSpec.scala |   155 +
 .../spark/IgniteDataFrameSchemaSpec.scala       |   113 +
 .../ignite/spark/IgniteDataFrameSuite.scala     |    42 +
 .../spark/IgniteDataFrameWrongConfigSpec.scala  |    51 +
 .../IgniteOptimizationAggregationFuncSpec.scala |   189 +
 .../spark/IgniteOptimizationDateFuncSpec.scala  |   230 +
 .../IgniteOptimizationDisableEnableSpec.scala   |   127 +
 .../spark/IgniteOptimizationJoinSpec.scala      |   541 +
 .../spark/IgniteOptimizationMathFuncSpec.scala  |   358 +
 .../ignite/spark/IgniteOptimizationSpec.scala   |   361 +
 .../IgniteOptimizationStringFuncSpec.scala      |   374 +
 .../IgniteOptimizationSystemFuncSpec.scala      |   147 +
 .../org/apache/ignite/spark/IgniteRDDSpec.scala |    15 +-
 ...niteSQLDataFrameIgniteSessionWriteSpec.scala |   106 +
 .../ignite/spark/IgniteSQLDataFrameSpec.scala   |   288 +
 .../spark/IgniteSQLDataFrameWriteSpec.scala     |   371 +
 .../sql/ignite/IgniteSparkSessionSpec.scala     |    79 +
 modules/spring-data-2.0/README.txt              |    32 +
 modules/spring-data-2.0/licenses/apache-2.0.txt |   202 +
 modules/spring-data-2.0/pom.xml                 |   141 +
 .../repository/IgniteRepository.java            |    58 +
 .../config/EnableIgniteRepositories.java        |   119 +
 .../config/IgniteRepositoriesRegistar.java      |    36 +
 .../IgniteRepositoryConfigurationExtension.java |    49 +
 .../springdata20/repository/config/Query.java   |    37 +
 .../repository/config/RepositoryConfig.java     |    39 +
 .../repository/config/package-info.java         |    22 +
 .../springdata20/repository/package-info.java   |    22 +
 .../repository/query/IgniteQuery.java           |    82 +
 .../repository/query/IgniteQueryGenerator.java  |   246 +
 .../repository/query/IgniteRepositoryQuery.java |   311 +
 .../repository/query/package-info.java          |    22 +
 .../repository/support/ConditionFalse.java      |    33 +
 .../support/IgniteRepositoryFactory.java        |   156 +
 .../support/IgniteRepositoryFactoryBean.java    |    91 +
 .../support/IgniteRepositoryImpl.java           |   164 +
 .../repository/support/package-info.java        |    22 +
 .../IgniteSpringDataCrudSelfTest.java           |   232 +
 .../IgniteSpringDataQueriesSelfTest.java        |   297 +
 .../misc/ApplicationConfiguration.java          |    58 +
 .../apache/ignite/springdata/misc/Person.java   |    98 +
 .../springdata/misc/PersonRepository.java       |    91 +
 .../springdata/misc/PersonSecondRepository.java |    40 +
 .../testsuites/IgniteSpringData2TestSuite.java  |    40 +
 modules/spring-data/pom.xml                     |    17 +-
 .../repository/query/IgniteQueryGenerator.java  |    19 +-
 .../IgniteSpringDataCrudSelfTest.java           |     2 -
 .../IgniteSpringDataQueriesSelfTest.java        |    12 +-
 .../springdata/misc/PersonRepository.java       |     4 +
 modules/spring/pom.xml                          |     2 +-
 .../org/apache/ignite/IgniteSpringBean.java     |    59 +-
 .../ignite/cache/spring/SpringCacheManager.java |    57 +-
 .../spring/SpringTransactionManager.java        |    38 +-
 .../spring-transactions-ignite-spring-bean.xml  |    67 +
 .../test/java/config/spring-transactions.xml    |     7 +-
 .../GridSpringCacheManagerAbstractTest.java     |   382 +
 .../GridSpringCacheManagerMultiJvmSelfTest.java |     7 +-
 .../spring/GridSpringCacheManagerSelfTest.java  |   364 +-
 ...ridSpringCacheManagerSpringBeanSelfTest.java |    46 +
 .../ignite/cache/spring/SpringCacheTest.java    |     2 -
 .../spring-caching-ignite-spring-bean.xml       |    90 +
 .../jdbc/CacheJdbcBlobStoreFactorySelfTest.java |     2 +
 .../jdbc/CacheJdbcPojoStoreFactorySelfTest.java |    13 +-
 .../ignite/internal/GridFactorySelfTest.java    |     3 +-
 .../GridSpringBeanSerializationSelfTest.java    |     4 +-
 .../ignite/internal/IgniteSpringBeanTest.java   |     2 +-
 .../resource/GridLoggerInjectionSelfTest.java   |     7 -
 .../resource/GridServiceInjectionSelfTest.java  |    71 +-
 .../GridSpringResourceInjectionSelfTest.java    |    63 +-
 .../p2p/GridP2PUserVersionChangeSelfTest.java   |     5 +-
 .../GridServiceInjectionSpringResourceTest.java |    10 +-
 ...teSpringBeanSpringResourceInjectionTest.java |   215 +
 .../ignite/spring/injection/spring-bean.xml     |    84 +
 .../testsuites/IgniteSpringTestSuite.java       |    12 +
 ...ridSpringTransactionManagerAbstractTest.java |   136 +
 .../GridSpringTransactionManagerSelfTest.java   |   132 +-
 ...ingTransactionManagerSpringBeanSelfTest.java |    58 +
 .../spring/GridSpringTransactionService.java    |     2 -
 modules/sqlline/bin/sqlline.bat                 |   111 +
 modules/sqlline/bin/sqlline.sh                  |    59 +
 modules/sqlline/licenses/apache-2.0.txt         |   202 +
 modules/sqlline/pom.xml                         |    82 +
 modules/ssh/pom.xml                             |     2 +-
 .../util/nodestart/StartNodeCallableImpl.java   |   276 +-
 ...gniteProjectionStartStopRestartSelfTest.java |   468 +-
 modules/storm/pom.xml                           |     6 +-
 modules/tensorflow/DEVNOTES.txt                 |     1 +
 modules/tensorflow/README.txt                   |    80 +
 modules/tensorflow/licenses/apache-2.0.txt      |   202 +
 modules/tensorflow/pom.xml                      |   130 +
 modules/tensorflow/src/main/assembly/zip.xml    |    56 +
 .../tensorflow/cluster/TensorFlowCluster.java   |    62 +
 .../cluster/TensorFlowClusterGateway.java       |    88 +
 .../TensorFlowClusterGatewayManager.java        |   155 +
 .../cluster/TensorFlowClusterMaintainer.java    |   233 +
 .../cluster/TensorFlowClusterManager.java       |   351 +
 .../cluster/TensorFlowJobArchive.java           |    65 +
 .../ignite/tensorflow/cluster/package-info.java |    33 +
 .../cluster/spec/TensorFlowClusterSpec.java     |    98 +
 .../spec/TensorFlowServerAddressSpec.java       |    73 +
 .../tensorflow/cluster/spec/package-info.java   |    22 +
 .../cluster/tfrunning/TensorFlowServer.java     |   100 +
 .../tfrunning/TensorFlowServerManager.java      |    86 +
 .../TensorFlowServerScriptFormatter.java        |   108 +
 .../cluster/tfrunning/package-info.java         |    23 +
 .../cluster/util/ClusterPortManager.java        |   247 +
 .../cluster/util/TensorFlowChiefRunner.java     |    84 +
 .../cluster/util/TensorFlowClusterResolver.java |   121 +
 .../util/TensorFlowProcessBuilderSupplier.java  |    72 +
 .../util/TensorFlowUserScriptRunner.java        |   231 +
 .../tensorflow/cluster/util/package-info.java   |    22 +
 .../ignite/tensorflow/core/ProcessManager.java  |    62 +
 .../tensorflow/core/ProcessManagerWrapper.java  |    80 +
 .../core/longrunning/LongRunningProcess.java    |    61 +
 .../longrunning/LongRunningProcessManager.java  |   161 +
 .../core/longrunning/package-info.java          |    25 +
 .../task/LongRunningProcessClearTask.java       |    98 +
 .../task/LongRunningProcessPingTask.java        |    85 +
 .../task/LongRunningProcessStartTask.java       |   114 +
 .../task/LongRunningProcessStopTask.java        |   102 +
 .../task/LongRunningProcessTask.java            |    53 +
 .../core/longrunning/task/package-info.java     |    23 +
 .../task/util/LongRunningProcessState.java      |    27 +
 .../task/util/LongRunningProcessStatus.java     |    66 +
 .../longrunning/task/util/package-info.java     |    22 +
 .../core/nativerunning/NativeProcess.java       |    71 +
 .../nativerunning/NativeProcessManager.java     |    53 +
 .../core/nativerunning/package-info.java        |    25 +
 .../task/NativeProcessStartTask.java            |    75 +
 .../core/nativerunning/task/package-info.java   |    22 +
 .../ignite/tensorflow/core/package-info.java    |    26 +
 .../core/util/AsyncNativeProcessRunner.java     |   125 +
 .../core/util/CustomizableThreadFactory.java    |    54 +
 .../core/util/NativeProcessRunner.java          |   133 +
 .../core/util/PythonProcessBuilderSupplier.java |    93 +
 .../tensorflow/core/util/package-info.java      |    22 +
 .../apache/ignite/tensorflow/package-info.java  |    37 +
 .../tensorflow/submitter/JobSubmitter.java      |    35 +
 .../submitter/command/AbstractCommand.java      |    55 +
 .../submitter/command/AttachCommand.java        |    51 +
 .../tensorflow/submitter/command/PsCommand.java |    47 +
 .../submitter/command/RootCommand.java          |    42 +
 .../submitter/command/StartCommand.java         |   206 +
 .../submitter/command/StopCommand.java          |    50 +
 .../submitter/command/package-info.java         |    22 +
 .../tensorflow/submitter/package-info.java      |    23 +
 .../tensorflow/util/SerializableConsumer.java   |    29 +
 .../tensorflow/util/SerializableSupplier.java   |    29 +
 .../ignite/tensorflow/util/package-info.java    |    22 +
 modules/tensorflow/src/main/sh/ignite-tf.sh     |    19 +
 modules/tensorflow/src/main/sh/logback.xml      |    36 +
 .../ignite/tensorflow/TensorFlowTestSuite.java  |    33 +
 .../ignite/tensorflow/core/CoreTestSuite.java   |    42 +
 .../core/ProcessManagerWrapperTest.java         |   108 +
 .../LongRunningProcessManagerTest.java          |   167 +
 .../task/LongRunningProcessClearTaskTest.java   |   144 +
 .../task/LongRunningProcessPingTaskTest.java    |   152 +
 .../task/LongRunningProcessStartTaskTest.java   |   101 +
 .../task/LongRunningProcessStopTaskTest.java    |   157 +
 modules/tools/pom.xml                           |    30 +-
 .../ant/beautifier/GridJavadocAntTask.java      |     8 +-
 .../ignite/tools/classgen/ClassesGenerator.java |    69 +-
 modules/twitter/pom.xml                         |     2 +-
 modules/urideploy/pom.xml                       |     2 +-
 .../uri/GridUriDeploymentFileProcessor.java     |    33 +-
 .../spi/deployment/uri/UriDeploymentSpi.java    |     7 +-
 .../scanners/UriDeploymentScannerManager.java   |     5 +-
 .../uri/GridUriDeploymentAbstractSelfTest.java  |    25 +-
 .../GridUriDeploymentFileProcessorSelfTest.java |     9 +-
 .../uri/GridUriDeploymentMd5CheckSelfTest.java  |    56 +-
 ...loymentMultiScannersErrorThrottlingTest.java |     5 +-
 .../META-INF/bad-signed-deployfile-ignite.xml   |    39 -
 .../spi/deployment/uri/META-INF/bad_classes.xml |    40 -
 .../META-INF/deploy-with-resources-ignite.xml   |    37 -
 .../uri/META-INF/deploydepend-ignite.xml        |    37 -
 .../uri/META-INF/deploydir-ignite.xml           |    38 -
 .../uri/META-INF/deployfile-ignite.xml          |    38 -
 .../spi/deployment/uri/META-INF/p2p-ignite.xml  |    42 -
 .../META-INF/well-signed-deployfile-ignite.xml  |    38 -
 .../file/GridFileDeploymentSelfTest.java        |    18 +-
 .../http/GridHttpDeploymentSelfTest.java        |    40 +-
 .../IgniteUriDeploymentTestSuite.java           |     9 +-
 modules/visor-console-2.10/pom.xml              |     2 +-
 modules/visor-console/pom.xml                   |     4 +-
 .../ignite/visor/commands/VisorConsole.scala    |    57 +-
 .../visor/commands/ack/VisorAckCommand.scala    |     5 +-
 .../commands/alert/VisorAlertCommand.scala      |    33 +-
 .../commands/cache/VisorCacheCommand.scala      |   285 +-
 .../cache/VisorCacheLostPartitionsCommand.scala |   170 +
 .../cache/VisorCacheModifyCommand.scala         |   413 +
 .../cache/VisorCacheRebalanceCommand.scala      |   134 +
 .../VisorCacheResetLostPartitionsCommand.scala  |   132 +
 .../commands/cache/VisorCacheScanCommand.scala  |    19 +-
 .../commands/common/VisorConsoleCommand.scala   |    50 +-
 .../visor/commands/common/VisorTextTable.scala  |    48 +-
 .../config/VisorConfigurationCommand.scala      |    98 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    13 +-
 .../commands/events/VisorEventsCommand.scala    |     9 +-
 .../visor/commands/gc/VisorGcCommand.scala      |     4 +-
 .../visor/commands/kill/VisorKillCommand.scala  |     4 +-
 .../visor/commands/node/VisorNodeCommand.scala  |   136 +-
 .../visor/commands/open/VisorOpenCommand.scala  |    62 +-
 .../visor/commands/ping/VisorPingCommand.scala  |     4 +-
 .../commands/start/VisorStartCommand.scala      |     8 +-
 .../commands/tasks/VisorTasksCommand.scala      |    37 +-
 .../commands/top/VisorTopologyCommand.scala     |   123 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |     4 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   371 +-
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |     9 +-
 .../commands/cache/VisorCacheCommandSpec.scala  |    44 +-
 .../top/VisorActivationCommandSpec.scala        |    70 +
 .../testsuites/VisorConsoleSelfTestSuite.scala  |     3 +-
 modules/visor-plugins/pom.xml                   |     2 +-
 modules/web-console/.dockerignore               |    10 +
 modules/web-console/.gitignore                  |    10 +-
 modules/web-console/DEVNOTES.txt                |   144 +-
 modules/web-console/assembly/README.txt         |    97 +
 modules/web-console/assembly/direct-install.xml |    91 +
 modules/web-console/backend/.eslintrc           |   186 -
 modules/web-console/backend/.gitignore          |     6 -
 .../web-console/backend/agent_dists/README.txt  |     5 +-
 modules/web-console/backend/app/agentSocket.js  |   135 +-
 .../web-console/backend/app/agentsHandler.js    |   109 +-
 modules/web-console/backend/app/apiServer.js    |    80 +-
 .../web-console/backend/app/browsersHandler.js  |   465 +-
 modules/web-console/backend/app/configure.js    |    14 +-
 modules/web-console/backend/app/mongo.js        |  1148 +-
 modules/web-console/backend/app/mongoose.js     |     8 +-
 modules/web-console/backend/app/nconf.js        |    38 +-
 modules/web-console/backend/app/routes.js       |    29 +-
 modules/web-console/backend/app/schemas.js      |  1178 ++
 modules/web-console/backend/app/settings.js     |    83 +-
 .../backend/config/settings.json.sample         |     8 +-
 .../backend/errors/AppErrorException.js         |     2 -
 .../backend/errors/AuthFailedException.js       |     2 +-
 .../backend/errors/IllegalAccessError.js        |     3 +-
 .../backend/errors/IllegalArgumentException.js  |     1 -
 .../backend/errors/MissingResourceException.js  |     2 +-
 .../backend/errors/ServerErrorException.js      |     1 -
 modules/web-console/backend/index.js            |    88 +-
 modules/web-console/backend/injector.js         |     1 -
 modules/web-console/backend/launch-tools.js     |   109 +
 modules/web-console/backend/middlewares/api.js  |    53 +-
 modules/web-console/backend/middlewares/demo.js |    31 +
 .../1502249492000-invalidate_rename.js          |    28 +
 .../migrations/1502432624000-cache-index.js     |    32 +
 .../migrations/1504672035000-igfs-index.js      |    32 +
 .../migrations/1505114649000-models-index.js    |    32 +
 .../1508395969410-init-registered-date.js       |    34 +
 .../migrations/1516948939797-migrate-configs.js |   399 +
 .../web-console/backend/migrations/README.txt   |     4 +
 .../backend/migrations/migration-utils.js       |   127 +
 modules/web-console/backend/package.json        |    78 +-
 .../web-console/backend/routes/activities.js    |    37 +-
 modules/web-console/backend/routes/admin.js     |    19 +-
 modules/web-console/backend/routes/caches.js    |    18 +-
 modules/web-console/backend/routes/clusters.js  |    48 +-
 .../web-console/backend/routes/configuration.js |    18 +-
 modules/web-console/backend/routes/demo.js      |     9 +-
 .../backend/routes/demo/domains.json            |     5 +
 modules/web-console/backend/routes/domains.js   |    12 +-
 modules/web-console/backend/routes/downloads.js |     6 +-
 modules/web-console/backend/routes/igfss.js     |    18 +-
 modules/web-console/backend/routes/notebooks.js |     7 +-
 modules/web-console/backend/routes/profile.js   |    10 +-
 modules/web-console/backend/routes/public.js    |    12 +-
 modules/web-console/backend/services/Utils.js   |    51 +
 .../web-console/backend/services/activities.js  |    19 +-
 modules/web-console/backend/services/auth.js    |    27 +-
 modules/web-console/backend/services/caches.js  |    87 +-
 .../web-console/backend/services/clusters.js    |   167 +-
 .../backend/services/configurations.js          |    17 +-
 modules/web-console/backend/services/domains.js |   107 +-
 .../web-console/backend/services/downloads.js   |    15 +-
 modules/web-console/backend/services/igfss.js   |    55 +-
 modules/web-console/backend/services/mails.js   |   111 +-
 .../web-console/backend/services/notebooks.js   |    11 +-
 .../backend/services/notifications.js           |    14 +-
 .../web-console/backend/services/sessions.js    |     7 +-
 modules/web-console/backend/services/spaces.js  |     2 +-
 modules/web-console/backend/services/users.js   |    37 +-
 modules/web-console/backend/test/app/db.js      |     6 +-
 .../web-console/backend/test/app/httpAgent.js   |     2 +-
 .../web-console/backend/test/data/caches.json   |    60 +-
 .../web-console/backend/test/data/clusters.json |     6 +-
 .../web-console/backend/test/data/domains.json  |    21 +-
 modules/web-console/backend/test/index.js       |     4 -
 modules/web-console/backend/test/injector.js    |    41 +-
 .../web-console/backend/test/routes/clusters.js |    13 +-
 .../web-console/backend/test/routes/public.js   |     4 +-
 .../backend/test/unit/AuthService.test.js       |    11 -
 .../backend/test/unit/CacheService.test.js      |    49 +-
 .../backend/test/unit/ClusterService.test.js    |   231 +-
 .../backend/test/unit/DomainService.test.js     |     5 +
 .../web-console/backend/test/unit/Utils.test.js |    48 +
 .../docker/compose/backend/.dockerignore        |     3 -
 .../docker/compose/backend/Dockerfile           |    15 +-
 .../web-console/docker/compose/backend/build.sh |    57 -
 .../docker/compose/docker-compose.yml           |    70 +-
 .../docker/compose/frontend/.dockerignore       |     3 -
 .../docker/compose/frontend/Dockerfile          |    23 +-
 .../docker/compose/frontend/DockerfileBuild     |    30 -
 .../docker/compose/frontend/build.sh            |    59 -
 .../docker/compose/frontend/nginx/nginx.conf    |    18 +-
 .../compose/frontend/nginx/web-console.conf     |     6 -
 .../web-console/docker/standalone/.dockerignore |     7 -
 .../web-console/docker/standalone/Dockerfile    |    93 +-
 modules/web-console/docker/standalone/build.sh  |    59 -
 .../docker/standalone/docker-compose.yml        |    36 -
 .../docker/standalone/docker-entrypoint.sh      |    23 +
 .../web-console/docker/standalone/entrypoint.sh |    23 -
 .../docker/standalone/nginx/web-console.conf    |     3 +-
 modules/web-console/e2e/docker-compose.yml      |    42 +
 modules/web-console/e2e/testcafe/.eslintrc      |     1 +
 modules/web-console/e2e/testcafe/Dockerfile     |    32 +
 .../e2e/testcafe/components/FormField.js        |    75 +
 .../e2e/testcafe/components/ListEditable.js     |    83 +
 .../e2e/testcafe/components/PanelCollapsible.js |    28 +
 .../e2e/testcafe/components/Table.js            |    63 +
 .../e2e/testcafe/components/confirmation.js     |    39 +
 .../e2e/testcafe/components/modalInput.js       |    40 +
 .../e2e/testcafe/components/notifications.js    |    21 +
 .../components/pageAdvancedConfiguration.js     |    29 +
 .../testcafe/components/pageConfiguration.js    |    21 +
 .../e2e/testcafe/components/topNavigation.js    |    21 +
 .../e2e/testcafe/components/userMenu.js         |    34 +
 .../e2e/testcafe/environment/envtools.js        |   196 +
 .../e2e/testcafe/environment/launch-env.js      |    26 +
 .../e2e/testcafe/fixtures/admin-panel.js        |    67 +
 .../testcafe/fixtures/auth/forgot-password.js   |    53 +
 .../e2e/testcafe/fixtures/auth/logout.js        |    38 +
 .../fixtures/auth/signup-validation-local.js    |    52 +
 .../e2e/testcafe/fixtures/auth/signup.js        |    76 +
 .../testcafe/fixtures/configuration/basic.js    |    86 +
 .../configuration/clusterFormChangeDetection.js |    58 +
 .../configuration/newClusterWithCache.js        |    45 +
 .../testcafe/fixtures/configuration/overview.js |   147 +
 .../e2e/testcafe/fixtures/menu-smoke.js         |    48 +
 .../testcafe/fixtures/queries/notebooks-list.js |    59 +
 .../fixtures/user-profile/credentials.js        |    63 +
 .../testcafe/fixtures/user-profile/profile.js   |    60 +
 modules/web-console/e2e/testcafe/helpers.js     |    39 +
 modules/web-console/e2e/testcafe/index.js       |    38 +
 modules/web-console/e2e/testcafe/package.json   |    42 +
 .../PageConfigurationAdvancedCluster.js         |    39 +
 .../page-models/PageConfigurationBasic.js       |    67 +
 .../page-models/PageConfigurationOverview.js    |    36 +
 .../e2e/testcafe/page-models/PageQueries.js     |    69 +
 .../pageConfigurationAdvancedIGFS.js            |    21 +
 .../pageConfigurationAdvancedModels.js          |    28 +
 .../testcafe/page-models/pageForgotPassword.js  |    24 +
 .../e2e/testcafe/page-models/pageProfile.js     |    40 +
 .../e2e/testcafe/page-models/pageSignin.js      |    32 +
 .../e2e/testcafe/page-models/pageSignup.js      |    48 +
 modules/web-console/e2e/testcafe/roles.js       |    30 +
 .../web-console/e2e/testcafe/testcafe-runner.js |    62 +
 modules/web-console/e2e/testenv/Dockerfile      |    51 +
 .../web-console/e2e/testenv/nginx/nginx.conf    |    55 +
 .../e2e/testenv/nginx/web-console.conf          |    62 +
 modules/web-console/frontend/.babelrc           |    18 +-
 modules/web-console/frontend/.eslintrc          |    56 +-
 modules/web-console/frontend/.gitignore         |     8 +-
 modules/web-console/frontend/app/app.config.js  |    50 +-
 modules/web-console/frontend/app/app.d.ts       |    29 +
 modules/web-console/frontend/app/app.js         |   341 +-
 .../frontend/app/browserUpdate/index.js         |    36 +
 .../frontend/app/browserUpdate/style.scss       |    36 +
 .../activities-user-dialog.controller.js        |     8 +-
 .../activities-user-dialog.tpl.pug              |    30 +-
 .../components/activities-user-dialog/index.js  |    37 +-
 .../app/components/breadcrumbs/component.js     |    43 +
 .../app/components/breadcrumbs/index.js         |    23 +
 .../app/components/breadcrumbs/style.scss       |    48 +
 .../app/components/breadcrumbs/template.pug     |    17 +
 .../app/components/bs-select-menu/controller.js |     5 +-
 .../app/components/bs-select-menu/index.js      |     6 +-
 .../app/components/bs-select-menu/index.spec.js |    67 +
 .../components/bs-select-menu/strip.filter.js   |    22 +
 .../app/components/bs-select-menu/style.scss    |    32 +-
 .../app/components/bs-select-menu/template.pug  |    22 +-
 .../transcludeToBody.directive.js               |    50 +
 .../cluster-security-icon/component.js          |    25 +
 .../components/cluster-security-icon/index.js   |    24 +
 .../cluster-security-icon/template.pug          |    30 +
 .../cluster-select/cluster-select.controller.js |    64 -
 .../cluster-select/cluster-select.pug           |    47 -
 .../cluster-select/cluster-select.scss          |    30 -
 .../app/components/cluster-select/index.js      |    29 -
 .../components/cluster-selector/component.js    |    25 +
 .../components/cluster-selector/controller.js   |    95 +
 .../app/components/cluster-selector/index.js    |    23 +
 .../app/components/cluster-selector/style.scss  |    75 +
 .../components/cluster-selector/template.pug    |    84 +
 .../connected-clusters-badge/controller.js      |    48 +
 .../connected-clusters-badge/index.js           |    33 +
 .../connected-clusters-badge/style.scss         |    43 +
 .../connected-clusters-badge/template.pug       |    19 +
 .../components/cell-logout/index.js             |    44 +
 .../components/cell-logout/template.pug         |    23 +
 .../components/cell-status/index.js             |    26 +
 .../components/cell-status/style.scss           |    46 +
 .../components/cell-status/template.pug         |    18 +
 .../components/list/column-defs.js              |    59 +
 .../components/list/controller.js               |    60 +
 .../components/list/index.js                    |    29 +
 .../components/list/style.scss                  |    49 +
 .../components/list/template.tpl.pug            |    19 +
 .../connected-clusters-dialog/controller.js     |    24 +
 .../connected-clusters-dialog/index.js          |    35 +
 .../connected-clusters-dialog/service.js        |    44 +
 .../connected-clusters-dialog/style.scss        |    23 +
 .../connected-clusters-dialog/template.tpl.pug  |    34 +
 .../components/form-field-size/controller.js    |   140 +
 .../components/form-field-size/index.js         |    41 +
 .../components/form-field-size/style.scss       |    20 +
 .../components/form-field-size/template.pug     |    77 +
 .../copyInputValueButton.directive.js           |    86 +
 .../frontend/app/components/form-field/index.js |    29 +
 .../form-field/showValidationError.directive.js |    51 +
 .../app/components/form-field/style.scss        |    29 +
 .../grid-column-selector/component.js           |     2 +-
 .../grid-column-selector/controller.js          |     8 +-
 .../components/grid-column-selector/style.scss  |     1 +
 .../grid-column-selector/template.pug           |     1 +
 .../app/components/grid-export/component.js     |    70 +
 .../app/components/grid-export/index.js         |    24 +
 .../app/components/grid-export/style.scss       |    34 +
 .../app/components/grid-export/template.pug     |    22 +
 .../components/grid-item-selected/component.js  |    28 +
 .../components/grid-item-selected/controller.js |    41 +
 .../app/components/grid-item-selected/index.js  |    25 +
 .../components/grid-item-selected/style.scss    |    23 +
 .../components/grid-item-selected/template.pug  |    20 +
 .../app/components/grid-no-data/component.js    |    33 +
 .../app/components/grid-no-data/controller.js   |    50 +
 .../app/components/grid-no-data/index.js        |    24 +
 .../app/components/grid-no-data/style.scss      |    31 +
 .../components/grid-showing-rows/component.js   |    29 +
 .../components/grid-showing-rows/controller.js  |    47 +
 .../app/components/grid-showing-rows/index.js   |    24 +
 .../app/components/grid-showing-rows/style.scss |    20 +
 .../ignite-chart-series-selector/component.js   |    28 +
 .../ignite-chart-series-selector/controller.js  |    63 +
 .../ignite-chart-series-selector/index.js       |    24 +
 .../ignite-chart-series-selector/template.pug   |    29 +
 .../app/components/ignite-chart/controller.js   |   369 +
 .../app/components/ignite-chart/index.js        |    38 +
 .../app/components/ignite-chart/style.scss      |    85 +
 .../app/components/ignite-chart/template.pug    |    37 +
 .../app/components/ignite-icon/directive.js     |    29 +-
 .../app/components/ignite-icon/index.js         |     2 +
 .../app/components/ignite-icon/service.js       |    49 +
 .../app/components/ignite-icon/style.scss       |     8 +-
 .../app/components/ignite-status/index.js       |    22 +
 .../app/components/ignite-status/style.scss     |    27 +
 .../input-dialog/input-dialog.controller.js     |    15 +-
 .../input-dialog/input-dialog.service.js        |    62 +-
 .../input-dialog/input-dialog.tpl.pug           |    38 +-
 .../app/components/list-editable/component.js   |    36 +
 .../list-editable-add-item-button/component.js  |    86 +
 .../component.spec.js                           |    72 +
 .../has-items-template.pug                      |    23 +
 .../list-editable-add-item-button/index.js      |    24 +
 .../no-items-template.pug                       |    18 +
 .../list-editable-add-item-button/style.scss    |    21 +
 .../list-editable-cols/cols.directive.js        |    77 +
 .../list-editable-cols/cols.style.scss          |    61 +
 .../list-editable-cols/cols.template.pug        |    29 +
 .../components/list-editable-cols/index.js      |    27 +
 .../list-editable-cols/row.directive.js         |    42 +
 .../list-editable-one-way/directive.js          |    54 +
 .../components/list-editable-one-way/index.js   |    24 +
 .../list-editable-save-on-changes/directives.js |    84 +
 .../list-editable-save-on-changes/index.js      |    24 +
 .../list-editable-transclude/directive.js       |   128 +
 .../list-editable-transclude/index.js           |    23 +
 .../app/components/list-editable/controller.js  |   113 +
 .../app/components/list-editable/index.js       |    35 +
 .../app/components/list-editable/style.scss     |   149 +
 .../app/components/list-editable/template.pug   |    50 +
 .../list-of-registered-users/categories.js      |    30 +
 .../list-of-registered-users/column-defs.js     |    89 +
 .../list-of-registered-users/controller.js      |   384 +
 .../list-of-registered-users/index.js           |    18 +-
 .../list-of-registered-users.categories.js      |    30 -
 .../list-of-registered-users.column-defs.js     |    80 -
 .../list-of-registered-users.controller.js      |   371 -
 .../list-of-registered-users.scss               |    35 -
 .../list-of-registered-users.tpl.pug            |    67 -
 .../list-of-registered-users/style.scss         |    35 +
 .../list-of-registered-users/template.tpl.pug   |    86 +
 .../frontend/app/components/page-admin/index.js |    39 +
 .../app/components/page-admin/style.scss        |    62 +
 .../app/components/page-admin/template.tpl.pug  |    28 +
 .../components/cache-edit-form/component.js     |    32 +
 .../components/cache-edit-form/controller.js    |   110 +
 .../components/cache-edit-form/index.js         |    21 +
 .../components/cache-edit-form/style.scss       |    20 +
 .../components/cache-edit-form/template.tpl.pug |    42 +
 .../cache-edit-form/templates/affinity.pug      |   141 +
 .../cache-edit-form/templates/concurrency.pug   |    86 +
 .../cache-edit-form/templates/general.pug       |   152 +
 .../cache-edit-form/templates/memory.pug        |   193 +
 .../templates/near-cache-client.pug             |    66 +
 .../templates/near-cache-server.pug             |    67 +
 .../cache-edit-form/templates/node-filter.pug   |    66 +
 .../cache-edit-form/templates/query.pug         |   151 +
 .../cache-edit-form/templates/rebalance.pug     |   107 +
 .../cache-edit-form/templates/statistics.pug    |    43 +
 .../cache-edit-form/templates/store.pug         |   416 +
 .../components/cluster-edit-form/component.js   |    31 +
 .../components/cluster-edit-form/controller.js  |   143 +
 .../cluster-edit-form/controller.spec.js        |    81 +
 .../components/cluster-edit-form/index.js       |    21 +
 .../components/cluster-edit-form/style.scss     |    20 +
 .../cluster-edit-form/template.tpl.pug          |    83 +
 .../cluster-edit-form/templates/atomic.pug      |   120 +
 .../cluster-edit-form/templates/attributes.pug  |    40 +
 .../cluster-edit-form/templates/binary.pug      |   124 +
 .../templates/cache-key-cfg.pug                 |    65 +
 .../cluster-edit-form/templates/checkpoint.pug  |   108 +
 .../templates/checkpoint/fs.pug                 |    42 +
 .../templates/checkpoint/jdbc.pug               |   124 +
 .../templates/checkpoint/s3.pug                 |   443 +
 .../templates/client-connector.pug              |   183 +
 .../cluster-edit-form/templates/collision.pug   |    63 +
 .../templates/collision/custom.pug              |    30 +
 .../templates/collision/fifo-queue.pug          |    38 +
 .../templates/collision/job-stealing.pug        |    83 +
 .../templates/collision/priority-queue.pug      |    79 +
 .../templates/communication.pug                 |   268 +
 .../cluster-edit-form/templates/connector.pug   |   232 +
 .../templates/data-storage.pug                  |   476 +
 .../cluster-edit-form/templates/deployment.pug  |   264 +
 .../cluster-edit-form/templates/discovery.pug   |   231 +
 .../cluster-edit-form/templates/events.pug      |   112 +
 .../cluster-edit-form/templates/failover.pug    |   117 +
 .../cluster-edit-form/templates/general.pug     |   100 +
 .../templates/general/discovery/cloud.pug       |   100 +
 .../templates/general/discovery/google.pug      |    63 +
 .../templates/general/discovery/jdbc.pug        |    52 +
 .../templates/general/discovery/kubernetes.pug  |    59 +
 .../templates/general/discovery/multicast.pug   |    94 +
 .../templates/general/discovery/s3.pug          |    55 +
 .../templates/general/discovery/shared.pug      |    30 +
 .../templates/general/discovery/vm.pug          |    55 +
 .../templates/general/discovery/zookeeper.pug   |   115 +
 .../retrypolicy/bounded-exponential-backoff.pug |    48 +
 .../discovery/zookeeper/retrypolicy/custom.pug  |    32 +
 .../retrypolicy/exponential-backoff.pug         |    48 +
 .../discovery/zookeeper/retrypolicy/forever.pug |    30 +
 .../discovery/zookeeper/retrypolicy/n-times.pug |    38 +
 .../zookeeper/retrypolicy/one-time.pug          |    30 +
 .../zookeeper/retrypolicy/until-elapsed.pug     |    38 +
 .../cluster-edit-form/templates/hadoop.pug      |   146 +
 .../templates/load-balancing.pug                |   182 +
 .../cluster-edit-form/templates/logger.pug      |    65 +
 .../templates/logger/custom.pug                 |    31 +
 .../templates/logger/log4j.pug                  |    68 +
 .../templates/logger/log4j2.pug                 |    50 +
 .../cluster-edit-form/templates/marshaller.pug  |   114 +
 .../cluster-edit-form/templates/memory.pug      |   239 +
 .../cluster-edit-form/templates/metrics.pug     |    70 +
 .../cluster-edit-form/templates/misc.pug        |    93 +
 .../cluster-edit-form/templates/odbc.pug        |   105 +
 .../cluster-edit-form/templates/persistence.pug |   215 +
 .../cluster-edit-form/templates/service.pug     |   113 +
 .../templates/sql-connector.pug                 |   116 +
 .../cluster-edit-form/templates/ssl.pug         |   131 +
 .../cluster-edit-form/templates/swap.pug        |   104 +
 .../cluster-edit-form/templates/thread.pug      |   206 +
 .../cluster-edit-form/templates/time.pug        |    71 +
 .../templates/transactions.pug                  |    98 +
 .../components/igfs-edit-form/component.js      |    30 +
 .../components/igfs-edit-form/controller.js     |    65 +
 .../components/igfs-edit-form/index.js          |    21 +
 .../components/igfs-edit-form/style.scss        |    20 +
 .../components/igfs-edit-form/template.tpl.pug  |    35 +
 .../igfs-edit-form/templates/dual.pug           |    58 +
 .../igfs-edit-form/templates/fragmentizer.pug   |    66 +
 .../igfs-edit-form/templates/general.pug        |    72 +
 .../components/igfs-edit-form/templates/ipc.pug |   104 +
 .../igfs-edit-form/templates/misc.pug           |   208 +
 .../igfs-edit-form/templates/secondary.pug      |    76 +
 .../components/model-edit-form/component.js     |    31 +
 .../components/model-edit-form/controller.js    |   204 +
 .../components/model-edit-form/index.js         |    21 +
 .../components/model-edit-form/style.scss       |    20 +
 .../components/model-edit-form/template.tpl.pug |    29 +
 .../model-edit-form/templates/general.pug       |    88 +
 .../model-edit-form/templates/query.pug         |   295 +
 .../model-edit-form/templates/store.pug         |   151 +
 .../page-configure-advanced-caches/component.js |    25 +
 .../controller.js                               |   175 +
 .../page-configure-advanced-caches/index.js     |    23 +
 .../page-configure-advanced-caches/template.pug |    57 +
 .../component.js                                |    25 +
 .../controller.js                               |    51 +
 .../page-configure-advanced-cluster/index.js    |    23 +
 .../template.pug                                |    25 +
 .../page-configure-advanced-igfs/component.js   |    25 +
 .../page-configure-advanced-igfs/controller.js  |   140 +
 .../page-configure-advanced-igfs/index.js       |    23 +
 .../page-configure-advanced-igfs/template.pug   |    51 +
 .../page-configure-advanced-models/component.js |    26 +
 .../controller.js                               |   172 +
 .../hasIndex.template.pug                       |    23 +
 .../page-configure-advanced-models/index.js     |    23 +
 .../keyCell.template.pug                        |    21 +
 .../page-configure-advanced-models/style.scss   |    37 +
 .../page-configure-advanced-models/template.pug |    51 +
 .../valueCell.template.pug                      |    18 +
 .../page-configure-advanced/controller.js       |    18 +-
 .../components/page-configure-advanced/index.js |    23 +-
 .../page-configure-advanced/service.js          |    31 -
 .../page-configure-advanced/style.scss          |   131 +-
 .../page-configure-advanced/template.pug        |    14 +-
 .../components/pcbScaleNumber.js                |    45 -
 .../page-configure-basic/controller.js          |   233 +-
 .../page-configure-basic/controller.spec.js     |    19 +-
 .../components/page-configure-basic/index.js    |    11 +-
 .../mixins/pcb-form-field-size.pug              |    70 -
 .../components/page-configure-basic/reducer.js  |    17 +-
 .../page-configure-basic/reducer.spec.js        |     2 +-
 .../components/page-configure-basic/service.js  |   134 -
 .../page-configure-basic/service.spec.js        |   323 -
 .../components/page-configure-basic/style.scss  |   155 +-
 .../page-configure-basic/template.pug           |   306 +-
 .../page-configure-overview/component.js        |    25 +
 .../pco-grid-column-categories/directive.js     |    69 +
 .../page-configure-overview/controller.js       |   168 +
 .../components/page-configure-overview/index.js |    26 +
 .../page-configure-overview/style.scss          |    33 +
 .../page-configure-overview/template.pug        |    44 +
 .../app/components/page-configure/component.js  |     5 +-
 .../button-download-project/component.js        |    36 +
 .../components/button-download-project/index.js |    23 +
 .../button-download-project/template.pug        |    22 +
 .../button-import-models/component.js           |    37 +
 .../components/button-import-models/index.js    |    23 +
 .../components/button-import-models/style.scss  |    25 +
 .../button-import-models/template.pug           |    20 +
 .../button-preview-project/component.js         |    36 +
 .../components/button-preview-project/index.js  |    23 +
 .../button-preview-project/template.pug         |    22 +
 .../page-configure/components/fakeUICanExit.js  |    65 +
 .../components/fakeUICanExit.spec.js            |    32 +
 .../components/formUICanExitGuard.js            |    69 +
 .../components/modal-import-models/component.js |  1164 ++
 .../components/modal-import-models/index.js     |    31 +
 .../component.js                                |    27 +
 .../selected-items-amount-indicator/style.scss  |    24 +
 .../template.pug                                |    17 +
 .../components/modal-import-models/service.js   |    56 +
 .../step-indicator/component.js                 |    34 +
 .../step-indicator/style.scss                   |   101 +
 .../step-indicator/template.pug                 |    31 +
 .../components/modal-import-models/style.scss   |    53 +
 .../tables-action-cell/component.js             |    71 +
 .../tables-action-cell/style.scss               |    48 +
 .../tables-action-cell/template.pug             |    43 +
 .../modal-import-models/template.tpl.pug        |   256 +
 .../modal-preview-project/component.js          |    31 +
 .../modal-preview-project/controller.js         |   126 +
 .../components/modal-preview-project/index.js   |    27 +
 .../components/modal-preview-project/service.js |    52 +
 .../components/modal-preview-project/style.scss |    67 +
 .../modal-preview-project/template.pug          |    48 +
 .../components/pc-items-table/component.js      |    45 +
 .../components/pc-items-table/controller.js     |   143 +
 .../components/pc-items-table/decorator.js      |    34 +
 .../components/pc-items-table/index.js          |    25 +
 .../components/pc-items-table/style.scss        |    68 +
 .../components/pc-items-table/template.pug      |    46 +
 .../components/pc-split-button/component.js     |    27 +
 .../components/pc-split-button/controller.js    |    45 +
 .../components/pc-split-button/index.js         |    23 +
 .../components/pc-split-button/template.pug     |    28 +
 .../components/pc-ui-grid-filters/directive.js  |    64 +
 .../components/pc-ui-grid-filters/index.js      |    46 +
 .../components/pc-ui-grid-filters/style.scss    |    22 +
 .../components/pc-ui-grid-filters/template.pug  |    39 +
 .../components/pcIsInCollection.js              |    43 +
 .../page-configure/components/pcValidation.js   |   175 +
 .../components/preview-panel/directive.js       |   246 +
 .../components/preview-panel/index.js           |    23 +
 .../app/components/page-configure/controller.js |    33 +-
 .../page-configure/controller.spec.js           |    48 -
 .../components/page-configure/defaultNames.js   |    23 +
 .../app/components/page-configure/index.d.ts    |   151 +
 .../app/components/page-configure/index.js      |   167 +-
 .../app/components/page-configure/reducer.js    |   435 +-
 .../components/page-configure/reducer.spec.js   |    21 +-
 .../page-configure/reduxDevtoolsIntegration.js  |    75 +
 .../services/ConfigChangesGuard.js              |   100 +
 .../services/ConfigChangesGuard.spec.js         |    40 +
 .../services/ConfigSelectionManager.js          |    93 +
 .../services/ConfigurationDownload.js           |    23 +-
 .../services/ConfigurationDownload.spec.js      |     2 +-
 .../services/ConfigurationResource.js           |    51 +
 .../services/ConfigurationResource.spec.js      |    78 +
 .../page-configure/services/ConfigureState.js   |    89 +-
 .../page-configure/services/PageConfigure.js    |    83 +-
 .../services/PageConfigure.spec.js              |   244 +
 .../page-configure/services/SummaryZipper.js    |    44 +
 .../page-configure/services/summary.worker.js   |   147 +
 .../app/components/page-configure/states.js     |   279 +
 .../page-configure/store/actionCreators.js      |   170 +
 .../page-configure/store/actionTypes.js         |    31 +
 .../components/page-configure/store/effects.js  |   711 ++
 .../page-configure/store/effects.spec.js        |   135 +
 .../page-configure/store/selectors.js           |   209 +
 .../app/components/page-configure/style.scss    |   318 +-
 .../app/components/page-configure/template.pug  |    43 +-
 .../transitionHooks/errorState.js               |    58 +
 .../page-configure/types/uirouter.d.ts          |    20 +
 .../page-forgot-password/component.js           |    30 +
 .../page-forgot-password/controller.js          |    71 +
 .../components/page-forgot-password/index.js    |    28 +
 .../app/components/page-forgot-password/run.js  |    48 +
 .../components/page-forgot-password/style.scss  |    53 +
 .../page-forgot-password/template.pug           |    49 +
 .../components/page-forgot-password/types.ts    |    24 +
 .../app/components/page-landing/index.js        |    65 +
 .../app/components/page-landing/style.scss      |   104 +
 .../app/components/page-landing/template.pug    |    66 +
 .../page-password-changed/controller.js         |    26 +
 .../components/page-password-changed/index.js   |    41 +
 .../components/page-password-changed/style.scss |    42 +
 .../page-password-changed/template.pug          |    22 +
 .../page-password-reset/controller.js           |    53 +
 .../app/components/page-password-reset/index.js |    57 +
 .../components/page-password-reset/style.scss   |    31 +
 .../components/page-password-reset/template.pug |    80 +
 .../app/components/page-profile/component.js    |    24 +
 .../app/components/page-profile/controller.js   |    85 +
 .../app/components/page-profile/index.js        |    37 +
 .../app/components/page-profile/style.scss      |    34 +
 .../app/components/page-profile/template.pug    |   162 +
 .../app/components/page-queries/component.js    |    59 +
 .../components/queries-notebook/controller.js   |  1978 +++
 .../components/queries-notebook/index.js        |    29 +
 .../components/queries-notebook/style.scss      |   176 +
 .../queries-notebook/template.tpl.pug           |   519 +
 .../queries-notebooks-list/controller.js        |   226 +
 .../components/queries-notebooks-list/index.js  |    28 +
 .../queries-notebooks-list/style.scss           |    40 +
 .../queries-notebooks-list/template.tpl.pug     |    49 +
 .../app/components/page-queries/index.js        |    87 +
 .../components/page-queries/notebook.data.js    |   177 +
 .../components/page-queries/notebook.service.js |    91 +
 .../app/components/page-queries/style.scss      |    24 +
 .../components/page-queries/template.tpl.pug    |    30 +
 .../app/components/page-signin/component.ts     |    26 +
 .../app/components/page-signin/controller.ts    |    72 +
 .../app/components/page-signin/index.ts         |    28 +
 .../frontend/app/components/page-signin/run.ts  |    55 +
 .../app/components/page-signin/style.scss       |    54 +
 .../app/components/page-signin/template.pug     |    59 +
 .../app/components/page-signup/component.js     |    28 +
 .../app/components/page-signup/controller.js    |    76 +
 .../app/components/page-signup/index.js         |    28 +
 .../frontend/app/components/page-signup/run.js  |    35 +
 .../app/components/page-signup/style.scss       |    60 +
 .../app/components/page-signup/template.pug     |   121 +
 .../app/components/page-signup/types.ts         |    36 +
 .../components/panel-collapsible/component.js   |    39 +
 .../components/panel-collapsible/controller.js  |    63 +
 .../app/components/panel-collapsible/index.js   |    25 +
 .../components/panel-collapsible/index.spec.js  |   139 +
 .../app/components/panel-collapsible/style.scss |    80 +
 .../components/panel-collapsible/template.pug   |    24 +
 .../panel-collapsible/transcludeDirective.js    |    51 +
 .../app/components/password-visibility/index.js |    26 +
 .../password-visibility/index.spec.js           |    65 +
 .../password-visibility/root.directive.js       |    49 +
 .../components/password-visibility/style.scss   |    54 +
 .../toggle-button.component.js                  |    49 +
 .../app/components/progress-line/component.js   |    28 +
 .../app/components/progress-line/controller.js  |    60 +
 .../app/components/progress-line/index.js       |    23 +
 .../app/components/progress-line/index.spec.js  |    69 +
 .../app/components/progress-line/style.scss     |    82 +
 .../app/components/progress-line/template.pug   |    18 +
 .../ui-grid-column-resizer/directive.js         |    29 +
 .../components/ui-grid-column-resizer/index.js  |    24 +
 .../app/components/ui-grid-filters/directive.js |    95 +
 .../app/components/ui-grid-filters/index.js     |    45 +
 .../app/components/ui-grid-filters/style.scss   |    48 +
 .../app/components/ui-grid-filters/template.pug |    56 +
 .../app/components/ui-grid-hovering/cell.js     |    48 +
 .../app/components/ui-grid-hovering/hovering.js |    31 +
 .../app/components/ui-grid-hovering/index.js    |    30 +
 .../app/components/ui-grid-hovering/style.scss  |    28 +
 .../app/components/ui-grid-hovering/viewport.js |    42 +
 .../app/components/ui-grid/component.js         |    46 +
 .../app/components/ui-grid/controller.js        |   219 +
 .../app/components/ui-grid/decorator.js         |    38 +
 .../frontend/app/components/ui-grid/index.js    |    25 +
 .../frontend/app/components/ui-grid/style.scss  |   164 +
 .../app/components/ui-grid/template.pug         |    60 +
 .../components/user-notifications/controller.js |     9 +-
 .../components/user-notifications/service.js    |    30 +-
 .../components/user-notifications/style.scss    |    39 +-
 .../user-notifications/template.tpl.pug         |    23 +-
 .../app/components/version-picker/component.js  |     5 +
 .../app/components/version-picker/index.js      |     2 +-
 .../app/components/version-picker/style.scss    |     3 +-
 .../app/components/version-picker/template.pug  |    14 +-
 .../web-console-footer-links/component.js       |    23 +
 .../web-console-footer-links/style.scss         |    31 +
 .../web-console-footer-links/template.pug       |    17 +
 .../app/components/web-console-footer/index.js  |     4 +-
 .../components/web-console-footer/style.scss    |     8 +-
 .../components/web-console-footer/template.pug  |     3 +-
 .../components/web-console-header/component.js  |    18 +-
 .../web-console-header-extension/component.js   |    22 +
 .../web-console-header-extension/template.pug   |    15 +
 .../app/components/web-console-header/index.js  |     6 +-
 .../components/web-console-header/style.scss    |    92 +-
 .../components/web-console-header/template.pug  |    27 +-
 .../frontend/app/controllers/auth.controller.js |    30 -
 .../controllers/reset-password.controller.js    |    50 -
 .../app/core/activities/Activities.data.d.ts    |    37 +
 .../app/core/activities/Activities.data.js      |    10 +-
 .../frontend/app/core/admin/Admin.data.js       |    31 +-
 .../frontend/app/data/countries.json            |    74 +-
 .../frontend/app/data/getting-started.json      |    94 +-
 modules/web-console/frontend/app/data/i18n.js   |    18 +-
 .../frontend/app/data/jdbc-types.json           |     6 +-
 .../frontend/app/data/pom-dependencies.json     |     8 +-
 .../frontend/app/decorator/select.js            |    77 -
 .../frontend/app/decorator/tooltip.js           |    73 -
 .../app/directives/auto-focus.directive.js      |    15 +-
 .../app/directives/bs-affix-update.directive.js |    10 +-
 .../frontend/app/directives/btn-ignite-link.js  |    22 +-
 .../directives/centered/centered.directive.js   |     4 +-
 .../directives/copy-to-clipboard.directive.js   |    15 +-
 .../hide-on-state-change.directive.js           |    19 +-
 .../information/information.directive.js        |     4 +-
 .../app/directives/information/information.pug  |     2 +-
 .../app/directives/information/information.scss |     5 +-
 .../frontend/app/directives/match.directive.js  |    32 +-
 .../app/directives/match.directive.spec.js      |    84 +
 .../app/directives/on-click-focus.directive.js  |    22 +-
 .../directives/on-enter-focus-move.directive.js |    22 +-
 .../app/directives/on-enter.directive.js        |    22 +-
 .../app/directives/on-escape.directive.js       |    22 +-
 .../app/directives/on-focus-out.directive.js    |   100 +-
 .../directives/restore-input-focus.directive.js |    12 +-
 .../directives/retain-selection.directive.js    |    21 +-
 .../ui-ace-docker/ui-ace-docker.controller.js   |    32 +-
 .../ui-ace-docker/ui-ace-docker.directive.js    |     4 +-
 .../directives/ui-ace-docker/ui-ace-docker.pug  |    10 +-
 .../app/directives/ui-ace-java/index.js         |    26 +
 .../ui-ace-java/ui-ace-java.controller.js       |    93 +-
 .../ui-ace-java/ui-ace-java.directive.js        |    43 +-
 .../ui-ace-pojos/ui-ace-pojos.controller.js     |   155 +-
 .../ui-ace-pojos/ui-ace-pojos.directive.js      |     4 +-
 .../ui-ace-pom/ui-ace-pom.controller.js         |    32 +-
 .../ui-ace-pom/ui-ace-pom.directive.js          |     4 +-
 .../ui-ace-sharp/ui-ace-sharp.controller.js     |    23 +-
 .../ui-ace-sharp/ui-ace-sharp.directive.js      |    20 +-
 .../app/directives/ui-ace-spring/index.js       |    26 +
 .../ui-ace-spring/ui-ace-spring.controller.js   |    89 +-
 .../ui-ace-spring/ui-ace-spring.directive.js    |    46 +-
 .../app/directives/ui-ace-tabs.directive.js     |     6 +-
 .../app/directives/ui-ace.controller.js         |   123 +
 .../frontend/app/errors/CancellationError.js    |    28 +
 .../frontend/app/filters/byName.filter.js       |     6 +-
 .../frontend/app/filters/bytes.filter.js        |    40 +
 .../frontend/app/filters/bytes.filter.spec.js   |    36 +
 .../frontend/app/filters/default-name.filter.js |    16 +-
 .../app/filters/domainsValidation.filter.js     |    42 +-
 .../frontend/app/filters/duration.filter.js     |    12 +-
 .../frontend/app/filters/hasPojo.filter.js      |     4 +-
 .../frontend/app/filters/id8.filter.js          |     8 +-
 .../app/filters/uiGridSubcategories.filter.js   |     6 +-
 .../frontend/app/helpers/jade/form.pug          |    28 -
 .../helpers/jade/form/form-field-checkbox.pug   |    39 -
 .../helpers/jade/form/form-field-datalist.pug   |    51 -
 .../app/helpers/jade/form/form-field-down.pug   |    18 -
 .../helpers/jade/form/form-field-dropdown.pug   |    48 -
 .../helpers/jade/form/form-field-feedback.pug   |    32 -
 .../app/helpers/jade/form/form-field-label.pug  |    23 -
 .../app/helpers/jade/form/form-field-number.pug |    52 -
 .../helpers/jade/form/form-field-password.pug   |    47 -
 .../app/helpers/jade/form/form-field-text.pug   |    47 -
 .../app/helpers/jade/form/form-field-up.pug     |    18 -
 .../app/helpers/jade/form/form-group.pug        |    23 -
 .../frontend/app/helpers/jade/mixins.pug        |   811 +-
 .../frontend/app/modules/ace.module.js          |    73 +-
 .../app/modules/agent/AgentManager.service.js   |   447 +-
 .../app/modules/agent/AgentModal.service.js     |    49 +-
 .../frontend/app/modules/agent/agent.module.js  |     4 +-
 .../agent/components/cluster-login/component.js |    45 +
 .../agent/components/cluster-login/index.js     |    25 +
 .../agent/components/cluster-login/service.js   |    69 +
 .../agent/components/cluster-login/template.pug |    58 +
 .../app/modules/agent/decompress.worker.js      |    34 +
 .../frontend/app/modules/agent/types/Cluster.js |    37 +
 .../app/modules/agent/types/ClusterSecrets.js   |    61 +
 .../agent/types/ClusterSecretsManager.js        |    70 +
 .../app/modules/branding/branding.module.js     |    32 +-
 .../app/modules/branding/branding.provider.js   |   111 -
 .../app/modules/branding/branding.service.js    |    50 +
 .../app/modules/branding/features.directive.js  |     9 +-
 .../app/modules/branding/footer.directive.js    |     9 +-
 .../modules/branding/header-logo.directive.js   |     9 +-
 .../app/modules/branding/header-logo.pug        |     2 +-
 .../modules/branding/header-title.directive.js  |     9 +-
 .../branding/powered-by-apache.directive.js     |     9 +-
 .../app/modules/branding/powered-by-apache.pug  |     2 +-
 .../app/modules/branding/terms.directive.js     |     9 +-
 .../modules/configuration/Version.service.js    |   169 -
 .../configuration/configuration.module.js       |    10 +-
 .../generator/AbstractTransformer.js            |    28 +-
 .../modules/configuration/generator/Beans.js    |    60 +-
 .../generator/ConfigurationGenerator.js         |   553 +-
 .../configuration/generator/Docker.service.js   |    94 +-
 .../generator/Docker.service.spec.js            |   133 +
 .../generator/JavaTransformer.service.js        |    43 +-
 .../configuration/generator/Maven.service.js    |    20 +-
 .../generator/PlatformGenerator.js              |    31 +-
 .../configuration/generator/Readme.service.js   |     3 +-
 .../generator/SpringTransformer.service.js      |    16 +-
 .../generator/defaults/Cache.service.js         |    14 +-
 .../generator/defaults/Cluster.service.js       |    71 +-
 .../frontend/app/modules/demo/Demo.module.js    |   178 +-
 .../modules/dialog/dialog-content.directive.js  |     4 +-
 .../modules/dialog/dialog-title.directive.js    |     4 +-
 .../app/modules/dialog/dialog.controller.js     |    30 +-
 .../app/modules/dialog/dialog.directive.js      |     4 +-
 .../app/modules/dialog/dialog.factory.js        |     9 +-
 .../app/modules/dialog/dialog.module.js         |     8 +-
 .../field/bs-select-placeholder.directive.js    |    30 +-
 .../app/modules/form/field/down.directive.js    |    39 -
 .../app/modules/form/field/feedback.scss        |    37 -
 .../frontend/app/modules/form/field/field.scss  |    43 -
 .../field/form-control-feedback.directive.js    |    40 -
 .../form/field/input/autofocus.directive.js     |    16 +-
 .../app/modules/form/field/input/text.scss      |    40 -
 .../app/modules/form/field/label.directive.js   |    47 -
 .../app/modules/form/field/tooltip.directive.js |    49 -
 .../app/modules/form/field/up.directive.js      |    39 -
 .../frontend/app/modules/form/form.module.js    |    58 +-
 .../app/modules/form/group/add.directive.js     |    40 -
 .../app/modules/form/group/tooltip.directive.js |    40 -
 .../app/modules/form/panel/chevron.directive.js |    53 -
 .../app/modules/form/panel/field.directive.js   |    69 -
 .../app/modules/form/panel/panel.directive.js   |    37 -
 .../app/modules/form/panel/revert.directive.js  |    54 -
 .../modules/form/services/FormGUID.service.js   |     4 +-
 .../form/validator/ipaddress.directive.js       |    17 +-
 .../validator/java-built-in-class.directive.js  |    17 +-
 .../form/validator/java-identifier.directive.js |    22 +-
 .../form/validator/java-keywords.directive.js   |    17 +-
 .../validator/java-package-name.directive.js    |    17 +-
 .../java-package-specified.directive.js         |    17 +-
 .../form/validator/property-unique.directive.js |    17 +-
 .../property-value-specified.directive.js       |    12 +-
 .../modules/form/validator/unique.directive.js  |    87 +-
 .../modules/form/validator/uuid.directive.js    |    17 +-
 .../getting-started/GettingStarted.provider.js  |   161 +-
 .../app/modules/loading/loading.directive.js    |    10 +-
 .../app/modules/loading/loading.module.js       |     4 +-
 .../frontend/app/modules/loading/loading.scss   |     2 +-
 .../app/modules/loading/loading.service.js      |    14 +-
 .../app/modules/navbar/Navbar.provider.js       |    10 +-
 .../app/modules/navbar/Userbar.provider.js      |    10 +-
 .../app/modules/navbar/navbar.directive.js      |     6 +-
 .../app/modules/navbar/navbar.module.js         |     8 +-
 .../app/modules/navbar/userbar.directive.js     |    55 +-
 .../frontend/app/modules/nodes/Nodes.service.js |     4 +-
 .../modules/nodes/nodes-dialog.controller.js    |    14 +-
 .../app/modules/nodes/nodes-dialog.scss         |    17 +-
 .../app/modules/nodes/nodes-dialog.tpl.pug      |    29 +-
 .../frontend/app/modules/socket.module.js       |    16 +-
 .../frontend/app/modules/sql/Notebook.data.js   |   168 -
 .../app/modules/sql/Notebook.service.js         |    74 -
 .../app/modules/sql/notebook.controller.js      |    62 -
 .../frontend/app/modules/sql/sql.controller.js  |  1779 ---
 .../frontend/app/modules/sql/sql.module.js      |    63 -
 .../frontend/app/modules/states/admin.state.js  |    31 +-
 .../app/modules/states/configuration.state.js   |   143 -
 .../configuration/Configuration.resource.js     |    42 -
 .../states/configuration/caches/affinity.pug    |    89 -
 .../configuration/caches/client-near-cache.pug  |    50 -
 .../states/configuration/caches/concurrency.pug |    68 -
 .../states/configuration/caches/general.pug     |   119 -
 .../states/configuration/caches/memory.pug      |   130 -
 .../configuration/caches/near-cache-client.pug  |    51 -
 .../configuration/caches/near-cache-server.pug  |    52 -
 .../states/configuration/caches/node-filter.pug |    52 -
 .../states/configuration/caches/query.pug       |   131 -
 .../states/configuration/caches/rebalance.pug   |    66 -
 .../states/configuration/caches/statistics.pug  |    39 -
 .../states/configuration/caches/store.pug       |   255 -
 .../states/configuration/clusters/atomic.pug    |    79 -
 .../configuration/clusters/attributes.pug       |    57 -
 .../states/configuration/clusters/binary.pug    |    77 -
 .../configuration/clusters/cache-key-cfg.pug    |    50 -
 .../configuration/clusters/checkpoint.pug       |    86 -
 .../configuration/clusters/checkpoint/fs.pug    |    66 -
 .../configuration/clusters/checkpoint/jdbc.pug  |    48 -
 .../configuration/clusters/checkpoint/s3.pug    |   178 -
 .../states/configuration/clusters/collision.pug |    63 -
 .../configuration/clusters/collision/custom.pug |    24 -
 .../clusters/collision/fifo-queue.pug           |    27 -
 .../clusters/collision/job-stealing.pug         |    63 -
 .../clusters/collision/priority-queue.pug       |    42 -
 .../configuration/clusters/communication.pug    |   100 -
 .../states/configuration/clusters/connector.pug |   104 -
 .../configuration/clusters/deployment.pug       |   243 -
 .../states/configuration/clusters/discovery.pug |    92 -
 .../states/configuration/clusters/events.pug    |    70 -
 .../states/configuration/clusters/failover.pug  |    82 -
 .../states/configuration/clusters/general.pug   |    89 -
 .../clusters/general/discovery/cloud.pug        |   138 -
 .../clusters/general/discovery/google.pug       |    38 -
 .../clusters/general/discovery/jdbc.pug         |    32 -
 .../clusters/general/discovery/kubernetes.pug   |    38 -
 .../clusters/general/discovery/multicast.pug    |   102 -
 .../clusters/general/discovery/s3.pug           |    28 -
 .../clusters/general/discovery/shared.pug       |    24 -
 .../clusters/general/discovery/vm.pug           |    82 -
 .../clusters/general/discovery/zookeeper.pug    |    89 -
 .../retrypolicy/bounded-exponential-backoff.pug |    27 -
 .../discovery/zookeeper/retrypolicy/custom.pug  |    24 -
 .../retrypolicy/exponential-backoff.pug         |    27 -
 .../discovery/zookeeper/retrypolicy/forever.pug |    22 -
 .../discovery/zookeeper/retrypolicy/n-times.pug |    25 -
 .../zookeeper/retrypolicy/one-time.pug          |    23 -
 .../zookeeper/retrypolicy/until-elapsed.pug     |    25 -
 .../states/configuration/clusters/hadoop.pug    |   119 -
 .../states/configuration/clusters/igfs.pug      |    38 -
 .../configuration/clusters/load-balancing.pug   |   107 -
 .../states/configuration/clusters/logger.pug    |    66 -
 .../configuration/clusters/logger/custom.pug    |    25 -
 .../configuration/clusters/logger/log4j.pug     |    50 -
 .../configuration/clusters/logger/log4j2.pug    |    39 -
 .../configuration/clusters/marshaller.pug       |    83 -
 .../states/configuration/clusters/memory.pug    |   124 -
 .../states/configuration/clusters/metrics.pug   |    51 -
 .../states/configuration/clusters/misc.pug      |    64 -
 .../states/configuration/clusters/odbc.pug      |    59 -
 .../configuration/clusters/persistence.pug      |    82 -
 .../states/configuration/clusters/service.pug   |    88 -
 .../configuration/clusters/sql-connector.pug    |    60 -
 .../states/configuration/clusters/ssl.pug       |   110 -
 .../states/configuration/clusters/swap.pug      |    72 -
 .../states/configuration/clusters/thread.pug    |    92 -
 .../states/configuration/clusters/time.pug      |    50 -
 .../configuration/clusters/transactions.pug     |    69 -
 .../states/configuration/domains/general.pug    |    52 -
 .../states/configuration/domains/query.pug      |   183 -
 .../states/configuration/domains/store.pug      |   127 -
 .../modules/states/configuration/igfs/dual.pug  |    42 -
 .../states/configuration/igfs/fragmentizer.pug  |    43 -
 .../states/configuration/igfs/general.pug       |    57 -
 .../modules/states/configuration/igfs/ipc.pug   |    60 -
 .../modules/states/configuration/igfs/misc.pug  |   123 -
 .../states/configuration/igfs/secondary.pug     |    45 -
 .../configuration/preview-panel.directive.js    |   239 -
 .../summary/summary-tabs.directive.js           |    50 -
 .../summary/summary-zipper.service.js           |    37 -
 .../configuration/summary/summary.controller.js |   350 -
 .../configuration/summary/summary.worker.js     |   142 -
 .../frontend/app/modules/states/errors.state.js |     6 +-
 .../frontend/app/modules/states/logout.state.js |    14 +-
 .../app/modules/states/password.state.js        |    48 -
 .../app/modules/states/profile.state.js         |    37 -
 .../app/modules/states/settings.state.js        |    33 +
 .../frontend/app/modules/states/signin.state.js |    53 -
 .../app/modules/user/AclRoute.provider.js       |    52 -
 .../frontend/app/modules/user/Auth.service.js   |   111 +-
 .../frontend/app/modules/user/User.service.js   |    31 +-
 .../frontend/app/modules/user/permissions.js    |     4 +-
 .../frontend/app/modules/user/user.module.js    |    78 +-
 .../frontend/app/primitives/badge/index.scss    |     2 +-
 .../frontend/app/primitives/btn/index.scss      |    59 +-
 .../frontend/app/primitives/checkbox/index.scss |    32 +
 .../app/primitives/datepicker/index.pug         |    38 +-
 .../app/primitives/datepicker/index.scss        |    53 -
 .../frontend/app/primitives/dropdown/index.pug  |     6 +-
 .../frontend/app/primitives/dropdown/index.scss |    68 -
 .../frontend/app/primitives/file/index.pug      |    37 -
 .../frontend/app/primitives/file/index.scss     |    60 -
 .../app/primitives/form-field/checkbox.pug      |    30 +
 .../app/primitives/form-field/dropdown.pug      |    57 +
 .../app/primitives/form-field/email.pug         |    37 +
 .../app/primitives/form-field/error.pug         |    30 +
 .../app/primitives/form-field/index.pug         |    29 +
 .../app/primitives/form-field/index.scss        |   648 +-
 .../app/primitives/form-field/input.pug         |    29 +
 .../app/primitives/form-field/label.pug         |    31 +
 .../app/primitives/form-field/number.pug        |    48 +
 .../app/primitives/form-field/password.pug      |    47 +
 .../app/primitives/form-field/phone.pug         |    35 +
 .../app/primitives/form-field/radio.pug         |    32 +
 .../frontend/app/primitives/form-field/text.pug |    36 +
 .../app/primitives/form-field/tooltip.pug       |    26 +
 .../app/primitives/form-field/typeahead.pug     |    55 +
 .../frontend/app/primitives/index.js            |     3 +-
 .../frontend/app/primitives/modal/index.scss    |    47 +-
 .../frontend/app/primitives/panel/index.scss    |   122 +-
 .../frontend/app/primitives/radio/index.pug     |    41 -
 .../frontend/app/primitives/radio/index.scss    |    78 -
 .../app/primitives/spinner-circle/index.scss    |    59 +
 .../frontend/app/primitives/switcher/index.pug  |     2 +-
 .../frontend/app/primitives/switcher/index.scss |    67 +-
 .../frontend/app/primitives/tabs/index.scss     |    10 +-
 .../app/primitives/timepicker/index.pug         |    41 +-
 .../app/primitives/timepicker/index.scss        |   128 +-
 .../frontend/app/primitives/tooltip/index.pug   |    26 -
 .../frontend/app/primitives/tooltip/index.scss  |    17 +
 .../app/primitives/ui-grid-header/index.scss    |    38 +-
 .../app/primitives/ui-grid-settings/index.scss  |    18 +-
 .../frontend/app/primitives/ui-grid/index.scss  |   109 +-
 .../services/AngularStrapSelect.decorator.js    |    78 +
 .../services/AngularStrapTooltip.decorator.js   |   103 +
 .../web-console/frontend/app/services/CSV.js    |    22 +
 .../web-console/frontend/app/services/Caches.js |   212 +-
 .../app/services/ChartColors.service.js         |     4 +-
 .../frontend/app/services/Clusters.js           |   511 +-
 .../frontend/app/services/Clusters.spec.js      |     2 +-
 .../frontend/app/services/Confirm.service.js    |    56 +-
 .../app/services/ConfirmBatch.service.js        |   126 +-
 .../app/services/CopyToClipboard.service.js     |    22 +-
 .../frontend/app/services/Countries.service.js  |    20 +-
 .../frontend/app/services/DefaultState.js       |    39 +
 .../app/services/ErrorParser.service.js         |    89 +
 .../app/services/ErrorPopover.service.js        |    26 +-
 .../frontend/app/services/Focus.service.js      |    14 +-
 .../frontend/app/services/FormUtils.service.js  |    53 +-
 .../web-console/frontend/app/services/IGFSs.js  |    87 +
 .../app/services/InetAddress.service.js         |    10 +-
 .../frontend/app/services/JavaTypes.service.js  |    42 +-
 .../app/services/LegacyTable.service.js         |   338 +-
 .../app/services/LegacyUtils.service.js         |    48 +-
 .../frontend/app/services/Messages.service.js   |    50 +-
 .../app/services/ModelNormalizer.service.js     |     6 +-
 .../web-console/frontend/app/services/Models.js |   190 +
 .../frontend/app/services/SqlTypes.service.js   |     6 +-
 .../app/services/UnsavedChangesGuard.service.js |    38 -
 .../frontend/app/services/Version.service.js    |   192 +
 .../frontend/app/services/Version.spec.js       |   106 +
 .../frontend/app/services/exceptionHandler.js   |    32 +
 .../web-console/frontend/app/services/index.js  |    27 +
 modules/web-console/frontend/app/style.scss     |    22 +
 modules/web-console/frontend/app/types/index.ts |    33 +
 .../frontend/app/utils/SimpleWorkerPool.js      |   122 +
 modules/web-console/frontend/app/utils/id8.js   |    20 +
 .../frontend/app/utils/lodashMixins.js          |    23 +
 .../frontend/app/utils/uniqueName.js            |    27 +
 modules/web-console/frontend/app/vendor.js      |    14 +-
 .../frontend/controllers/caches-controller.js   |   653 -
 .../frontend/controllers/clusters-controller.js |   979 --
 .../frontend/controllers/domains-controller.js  |  1882 ---
 .../frontend/controllers/igfs-controller.js     |   415 -
 .../frontend/controllers/profile-controller.js  |    94 -
 .../frontend/ignite_modules/README.txt          |     6 -
 .../frontend/ignite_modules/index.js            |    22 -
 modules/web-console/frontend/index.js           |    22 +
 modules/web-console/frontend/package.json       |   191 +-
 .../frontend/public/images/cache.png            |   Bin 24791 -> 15087 bytes
 .../frontend/public/images/checkbox-active.svg  |    25 +
 .../frontend/public/images/checkbox.svg         |    22 +
 .../frontend/public/images/cluster-quick.png    |   Bin 0 -> 16407 bytes
 .../frontend/public/images/cluster.png          |   Bin 29376 -> 24083 bytes
 .../frontend/public/images/collapse.svg         |     3 +
 .../frontend/public/images/domains.png          |   Bin 22131 -> 17899 bytes
 .../frontend/public/images/expand.svg           |     3 +
 .../frontend/public/images/icons/alert.icon.svg |     1 +
 .../public/images/icons/attention.icon.svg      |     3 +
 .../frontend/public/images/icons/check.icon.svg |     3 +
 .../public/images/icons/checkmark.icon.svg      |     3 +
 .../frontend/public/images/icons/clock.icon.svg |     1 +
 .../frontend/public/images/icons/clock.svg      |     1 -
 .../public/images/icons/collapse.icon.svg       |     3 +
 .../images/icons/connectedClusters.icon.svg     |     1 +
 .../frontend/public/images/icons/copy.icon.svg  |     3 +
 .../frontend/public/images/icons/cross.icon.svg |     1 +
 .../frontend/public/images/icons/cross.svg      |     1 -
 .../frontend/public/images/icons/csv.icon.svg   |     1 +
 .../frontend/public/images/icons/csv.svg        |     1 -
 .../public/images/icons/download.icon.svg       |     2 +
 .../frontend/public/images/icons/download.svg   |     2 -
 .../public/images/icons/exclamation.icon.svg    |     3 +
 .../frontend/public/images/icons/exit.icon.svg  |     3 +
 .../public/images/icons/expand.icon.svg         |     3 +
 .../public/images/icons/eyeClosed.icon.svg      |     6 +
 .../public/images/icons/eyeOpened.icon.svg      |     7 +
 .../public/images/icons/filter.icon.svg         |     1 +
 .../frontend/public/images/icons/filter.svg     |     1 -
 .../frontend/public/images/icons/gear.icon.svg  |     1 +
 .../frontend/public/images/icons/gear.svg       |     1 -
 .../frontend/public/images/icons/home.icon.svg  |     3 +
 .../frontend/public/images/icons/index.js       |    36 +-
 .../frontend/public/images/icons/info.icon.svg  |     3 +
 .../public/images/icons/lockClosed.icon.svg     |     3 +
 .../public/images/icons/lockOpened.icon.svg     |     3 +
 .../public/images/icons/manual.icon.svg         |     1 +
 .../frontend/public/images/icons/manual.svg     |     1 -
 .../frontend/public/images/icons/plus.icon.svg  |     2 +
 .../public/images/icons/refresh.icon.svg        |     1 +
 .../public/images/icons/search.icon.svg         |     1 +
 .../frontend/public/images/icons/search.svg     |     1 -
 .../frontend/public/images/icons/sort.icon.svg  |     1 +
 .../public/images/icons/structure.icon.svg      |     3 +
 .../web-console/frontend/public/images/igfs.png |   Bin 14139 -> 14683 bytes
 .../frontend/public/images/multicluster.png     |   Bin 0 -> 31178 bytes
 .../public/images/page-landing-carousel-1.png   |   Bin 0 -> 20468 bytes
 .../public/images/page-landing-carousel-2.png   |   Bin 0 -> 34564 bytes
 .../public/images/page-landing-carousel-3.png   |   Bin 0 -> 27808 bytes
 .../frontend/public/images/pb-ignite@2x.png     |   Bin 8558 -> 0 bytes
 .../frontend/public/images/preview.png          |   Bin 0 -> 29829 bytes
 .../frontend/public/images/query-chart.png      |   Bin 17142 -> 0 bytes
 .../frontend/public/images/query-metadata.png   |   Bin 39361 -> 0 bytes
 .../frontend/public/images/query-table.png      |   Bin 28065 -> 19943 bytes
 .../frontend/public/images/summary.png          |   Bin 33650 -> 0 bytes
 .../public/stylesheets/_bootstrap-custom.scss   |     1 -
 .../stylesheets/_bootstrap-variables.scss       |     4 +-
 .../frontend/public/stylesheets/style.scss      |   415 +-
 .../frontend/public/stylesheets/variables.scss  |     6 +-
 .../frontend/test/check-doc-links/Dockerfile    |    31 +
 .../test/check-doc-links/check-doc-links.js     |   150 +
 .../test/check-doc-links/docker-compose.yml     |    25 +
 .../web-console/frontend/test/ci/.dockerignore  |     4 +
 modules/web-console/frontend/test/ci/Dockerfile |    32 +
 .../frontend/test/ci/docker-compose.yml         |    25 +
 .../frontend/test/e2e/exampe.test.js            |    42 -
 .../frontend/test/karma.conf.babel.js           |    97 -
 modules/web-console/frontend/test/karma.conf.js |    97 +-
 .../frontend/test/protractor.conf.js            |    50 -
 .../frontend/test/unit/JavaTransformer.test.js  |     2 +-
 .../frontend/test/unit/JavaTypes.test.js        |     2 +-
 .../test/unit/SpringTransformer.test.js         |     2 +-
 .../frontend/test/unit/SqlTypes.test.js         |     2 +-
 .../frontend/test/unit/Version.test.js          |   106 -
 .../test/unit/defaultName.filter.test.js        |     3 +-
 modules/web-console/frontend/tsconfig.json      |    14 +
 modules/web-console/frontend/views/403.tpl.pug  |     2 +-
 modules/web-console/frontend/views/404.tpl.pug  |     2 +-
 modules/web-console/frontend/views/base.pug     |     4 +-
 modules/web-console/frontend/views/base2.pug    |    26 -
 .../frontend/views/configuration/caches.tpl.pug |    55 -
 .../views/configuration/clusters.tpl.pug        |    85 -
 .../views/configuration/domains-import.tpl.pug  |   178 -
 .../views/configuration/domains.tpl.pug         |    65 -
 .../frontend/views/configuration/igfs.tpl.pug   |    54 -
 .../summary-project-structure.tpl.pug           |    28 -
 .../views/configuration/summary-tabs.pug        |    25 -
 .../views/configuration/summary.tpl.pug         |    90 -
 .../frontend/views/includes/header-left.pug     |    54 +-
 .../frontend/views/includes/header-right.pug    |    12 +-
 modules/web-console/frontend/views/index.pug    |    18 +-
 .../web-console/frontend/views/reset.tpl.pug    |    44 -
 .../frontend/views/settings/admin.tpl.pug       |    28 -
 .../frontend/views/settings/profile.tpl.pug     |    76 -
 .../web-console/frontend/views/signin.tpl.pug   |   159 -
 .../frontend/views/sql/cache-metadata.tpl.pug   |     3 +-
 .../frontend/views/sql/chart-settings.tpl.pug   |     2 +-
 .../frontend/views/sql/notebook-new.tpl.pug     |    33 -
 .../frontend/views/sql/paragraph-rate.tpl.pug   |    41 +-
 .../web-console/frontend/views/sql/sql.tpl.pug  |   288 -
 .../views/templates/agent-download.tpl.pug      |    28 +-
 .../views/templates/batch-confirm.tpl.pug       |    31 +-
 .../frontend/views/templates/confirm.tpl.pug    |    14 +-
 .../frontend/views/templates/demo-info.tpl.pug  |    38 +-
 .../frontend/views/templates/dropdown.tpl.pug   |     2 +-
 .../views/templates/getting-started.tpl.pug     |    31 +-
 .../frontend/views/templates/message.tpl.pug    |    16 +-
 .../views/templates/validation-error.tpl.pug    |     2 +-
 .../frontend/webpack/webpack.common.js          |   150 +-
 .../frontend/webpack/webpack.dev.babel.js       |    97 -
 .../web-console/frontend/webpack/webpack.dev.js |    92 +
 .../frontend/webpack/webpack.prod.babel.js      |    64 -
 .../frontend/webpack/webpack.prod.js            |    61 +
 .../frontend/webpack/webpack.test.js            |    24 +-
 modules/web-console/pom.xml                     |   426 +-
 modules/web-console/web-agent/README.txt        |    33 +-
 .../web-agent/bin/ignite-web-agent.bat          |    19 +
 .../web-agent/bin/ignite-web-agent.sh           |     5 +
 modules/web-console/web-agent/pom.xml           |     4 +-
 .../console/agent/AgentConfiguration.java       |   115 +-
 .../ignite/console/agent/AgentLauncher.java     |   337 +-
 .../apache/ignite/console/agent/AgentUtils.java |    24 +
 .../agent/db/dialect/OracleMetadataDialect.java |    13 +-
 .../agent/handlers/AbstractListener.java        |    47 +-
 .../console/agent/handlers/ClusterListener.java |   402 +-
 .../agent/handlers/DatabaseListener.java        |     2 +-
 .../console/agent/handlers/DemoListener.java    |   131 -
 .../console/agent/handlers/RestListener.java    |    46 +-
 .../ignite/console/agent/rest/RestExecutor.java |   353 +-
 .../ignite/console/agent/rest/RestResult.java   |    43 +-
 .../ignite/console/demo/AgentClusterDemo.java   |   130 +-
 .../ignite/console/demo/AgentMetadataDemo.java  |     7 +
 .../demo/service/DemoCachesLoadService.java     |    25 +-
 modules/web/ignite-appserver-test/pom.xml       |     2 +-
 modules/web/ignite-websphere-test/pom.xml       |     2 +-
 modules/web/pom.xml                             |     2 +-
 .../cache/websession/WebSessionFilter.java      |    14 +-
 .../internal/websession/WebSessionSelfTest.java |    41 +-
 modules/yardstick/DEVNOTES-standalone.txt       |     3 +-
 .../config/benchmark-atomic-sequence.properties |    84 +
 .../config/benchmark-atomic.properties          |     2 +-
 .../config/benchmark-bin-identity.properties    |     1 +
 .../config/benchmark-cache-load.properties      |     1 +
 .../config/benchmark-client-mode.properties     |     1 +
 .../config/benchmark-failover.properties        |     1 +
 .../yardstick/config/benchmark-full.properties  |     1 +
 .../yardstick/config/benchmark-h2.properties    |     1 +
 ...benchmark-jdbc-thin-insert-delete.properties |    87 +
 .../benchmark-jdbc-thin-select.properties       |    86 +
 .../benchmark-jdbc-thin-update.properties       |    86 +
 .../benchmark-jdbcv2-insert-delete.properties   |    87 +
 .../config/benchmark-jdbcv2-select.properties   |    86 +
 .../config/benchmark-jdbcv2-update.properties   |    88 +
 .../yardstick/config/benchmark-ml.properties    |    96 +
 .../config/benchmark-multicast.properties       |     1 +
 .../yardstick/config/benchmark-mysql.properties |     1 +
 ...enchmark-native-sql-insert-delete.properties |    87 +
 .../benchmark-native-sql-select-join.properties |    89 +
 .../benchmark-native-sql-select.properties      |    86 +
 .../benchmark-native-sql-update.properties      |    86 +
 .../yardstick/config/benchmark-pgsql.properties |     1 +
 .../config/benchmark-put-indexed-val.properties |     1 +
 .../benchmark-query-put-separated.properties    |     1 +
 .../yardstick/config/benchmark-query.properties |     1 +
 .../config/benchmark-remote.properties          |     1 +
 .../config/benchmark-sql-dml.properties         |     1 +
 .../yardstick/config/benchmark-store.properties |     1 +
 modules/yardstick/config/benchmark.properties   |     1 +
 modules/yardstick/config/ignite-jdbc-config.xml |     4 +-
 .../config/ignite-localhost-config.xml          |     2 -
 .../ignite-localhost-persistence-config.xml     |    71 +
 .../yardstick/config/ignite-pr-base-config.xml  |   150 +
 .../config/ignite-pr-localhost-config.xml       |   108 +
 .../config/mvcc/benchmark-mvcc-messages.sh      |    97 +
 .../config/mvcc/benchmark-mvcc-processor.sh     |    94 +
 .../mvcc/benchmark-mvcc-updates-contention.sh   |    95 +
 .../mvcc/benchmark-thin-native.properties       |   123 +
 ...benchmark-jdbc-thin-inmemory-mvcc.properties |   104 +
 .../benchmark-jdbc-thin-inmemory.properties     |   121 +
 .../benchmark-jdbc-thin-persistence.properties  |   128 +
 .../benchmark-jdbc-thin-streaming.properties    |   132 +
 modules/yardstick/pom-standalone.xml            |     8 +-
 modules/yardstick/pom.xml                       |    30 +-
 .../yardstick/IgniteBenchmarkArguments.java     |    97 +-
 .../org/apache/ignite/yardstick/IgniteNode.java |    33 +-
 .../yardstick/IgniteThinAbstractBenchmark.java  |   164 +
 .../ignite/yardstick/IgniteThinClient.java      |   146 +
 .../cache/IgniteAtomicSequenceBenchmark.java    |    47 -
 .../cache/IgniteCacheAbstractBenchmark.java     |    54 +-
 .../cache/IgniteCreateIndexBenchmark.java       |   245 +
 .../cache/IgnitePutAllSimpleBenchmark.java      |    44 +
 .../yardstick/cache/IntMaxValueEntriesTest.java |     4 +-
 .../apache/ignite/yardstick/cache/Loader.java   |   189 +
 .../cache/WaitMapExchangeFinishCallable.java    |     8 +-
 .../IgniteFailoverAbstractBenchmark.java        |     3 +-
 ...IgniteTransactionalWriteInvokeBenchmark.java |     2 +-
 .../cache/jdbc/JdbcAbstractBenchmark.java       |     4 +-
 .../jdbc/JdbcPutIndexedValue8Benchmark.java     |     3 -
 .../yardstick/cache/jdbc/RdbmsBenchmark.java    |     6 +-
 .../IgniteCacheRandomOperationBenchmark.java    |     2 +-
 .../cache/model/Person8NotIndexed.java          |   215 +
 .../yardstick/jdbc/AbstractJdbcBenchmark.java   |   171 +
 .../yardstick/jdbc/AbstractNativeBenchmark.java |    37 +
 .../yardstick/jdbc/DisjointRangeGenerator.java  |   101 +
 .../jdbc/JdbcSqlInsertDeleteBenchmark.java      |    66 +
 .../jdbc/JdbcSqlQueryRangeBenchmark.java        |    78 +
 .../yardstick/jdbc/JdbcSqlUpdateBenchmark.java  |    81 +
 .../apache/ignite/yardstick/jdbc/JdbcUtils.java |    62 +
 .../jdbc/NativeJavaApiPutRemoveBenchmark.java   |    52 +
 .../jdbc/NativeSqlInsertDeleteBenchmark.java    |    61 +
 .../jdbc/NativeSqlJoinQueryRangeBenchmark.java  |   135 +
 .../jdbc/NativeSqlQueryRangeBenchmark.java      |    77 +
 .../jdbc/NativeSqlUpdateRangeBenchmark.java     |    83 +
 .../mvcc/AbstractDistributedMvccBenchmark.java  |   101 +
 .../jdbc/mvcc/MvccProcessorBenchmark.java       |    61 +
 .../mvcc/MvccUpdateContentionBenchmark.java     |    78 +
 .../IgniteAtomicSequenceAbstractBenchmark.java  |    51 +
 .../IgniteAtomicSequenceAddAndGetBenchmark.java |    36 +
 .../IgniteAtomicSequenceGetAndAddBenchmark.java |    36 +
 ...eAtomicSequenceGetAndIncrementBenchmark.java |    33 +
 ...eAtomicSequenceIncrementAndGetBenchmark.java |    33 +
 .../thin/cache/IgniteThinBenchmarkUtils.java    |    95 +
 .../cache/IgniteThinCacheAbstractBenchmark.java |    45 +
 .../thin/cache/IgniteThinGetBenchmark.java      |    74 +
 .../thin/cache/IgniteThinGetTxBenchmark.java    |    30 +
 .../thin/cache/IgniteThinPutAllBenchmark.java   |    44 +
 .../thin/cache/IgniteThinPutAllTxBenchmark.java |    30 +
 .../thin/cache/IgniteThinPutBenchmark.java      |    41 +
 .../thin/cache/IgniteThinPutGetBenchmark.java   |    46 +
 .../thin/cache/IgniteThinPutTxBenchmark.java    |    30 +
 .../upload/AbstractNativeBenchmark.java         |   124 +
 .../upload/AbstractUploadBenchmark.java         |   213 +
 .../upload/BatchedInsertBenchmark.java          |    65 +
 .../ignite/yardstick/upload/CopyBenchmark.java  |   125 +
 .../yardstick/upload/InsertBenchmark.java       |    52 +
 .../yardstick/upload/NativePutBenchmark.java    |    39 +
 .../upload/NativeStreamerBenchmark.java         |    69 +
 .../ignite/yardstick/upload/StreamerParams.java |    51 +
 .../upload/UploadBenchmarkArguments.java        |   191 +
 .../yardstick/upload/model/QueryFactory.java    |   219 +
 .../ignite/yardstick/upload/model/Values10.java |    76 +
 .../org/yardstickframework/package-info.java    |    25 +
 .../probes/TotalTimeProbe.java                  |   137 +
 modules/yarn/pom.xml                            |    53 +-
 .../apache/ignite/yarn/ApplicationMaster.java   |     9 +-
 .../org/apache/ignite/yarn/IgniteProvider.java  |     6 +-
 modules/zeromq/pom.xml                          |     2 +-
 .../stream/zeromq/IgniteZeroMqStreamer.java     |    43 +-
 .../stream/zeromq/IgniteZeroMqStreamerTest.java |    29 +-
 modules/zookeeper/pom.xml                       |    97 +-
 .../zk/TcpDiscoveryZookeeperIpFinder.java       |     4 +-
 .../spi/discovery/zk/ZookeeperDiscoverySpi.java |   630 +
 .../zk/ZookeeperDiscoverySpiMBean.java          |    67 +
 .../zk/internal/ZkAbstractCallabck.java         |    83 +
 .../zk/internal/ZkAbstractChildrenCallback.java |    61 +
 .../zk/internal/ZkAbstractWatcher.java          |    55 +
 .../discovery/zk/internal/ZkAliveNodeData.java  |    40 +
 .../zk/internal/ZkBulkJoinContext.java          |    50 +
 .../discovery/zk/internal/ZkClusterNodes.java   |   103 +
 .../internal/ZkCommunicationErrorNodeState.java |    46 +
 .../ZkCommunicationErrorProcessFuture.java      |   411 +
 ...kCommunicationErrorResolveFinishMessage.java |    69 +
 .../ZkCommunicationErrorResolveResult.java      |    45 +
 ...ZkCommunicationErrorResolveStartMessage.java |    61 +
 .../internal/ZkCommunicationFailureContext.java |   187 +
 .../zk/internal/ZkDiscoveryCustomEventData.java |    89 +
 .../zk/internal/ZkDiscoveryEventData.java       |   165 +
 .../zk/internal/ZkDiscoveryEventsData.java      |   132 +
 .../internal/ZkDiscoveryNodeFailEventData.java  |    55 +
 .../internal/ZkDiscoveryNodeJoinEventData.java  |    60 +
 .../ZkDistributedCollectDataFuture.java         |   247 +
 .../zk/internal/ZkForceNodeFailMessage.java     |    65 +
 .../discovery/zk/internal/ZkIgnitePaths.java    |   307 +
 .../zk/internal/ZkInternalJoinErrorMessage.java |    44 +
 .../zk/internal/ZkInternalMessage.java          |    27 +
 .../zk/internal/ZkJoinEventDataForJoined.java   |    83 +
 .../zk/internal/ZkJoinedNodeEvtData.java        |    79 +
 .../zk/internal/ZkJoiningNodeData.java          |    87 +
 .../zk/internal/ZkNoServersMessage.java         |    50 +
 .../zk/internal/ZkNodeValidateResult.java       |    43 +
 .../spi/discovery/zk/internal/ZkPinger.java     |    88 +
 .../spi/discovery/zk/internal/ZkRunnable.java   |    51 +
 .../discovery/zk/internal/ZkRuntimeState.java   |   135 +
 .../discovery/zk/internal/ZkTimeoutObject.java  |    54 +
 .../discovery/zk/internal/ZookeeperClient.java  |  1332 ++
 .../ZookeeperClientFailedException.java         |    40 +
 .../zk/internal/ZookeeperClusterNode.java       |   407 +
 .../zk/internal/ZookeeperDiscoveryImpl.java     |  4489 +++++++
 .../internal/ZookeeperDiscoveryStatistics.java  |    55 +
 .../spi/discovery/zk/internal/package-info.java |    21 +
 .../ignite/spi/discovery/zk/package-info.java   |    21 +
 .../resources/META-INF/classnames.properties    |    18 +
 .../java/org/apache/ZookeeperNodeStart.java     |    46 +
 .../tcp/ipfinder/zk/ZookeeperIpFinderTest.java  |    37 +-
 .../zk/curator/FixedTestingQuorumPeerMain.java  |    87 +
 .../tcp/ipfinder/zk/curator/TestingCluster.java |   237 +
 .../zk/curator/TestingZooKeeperServer.java      |   169 +
 ...CacheEntryListenerWithZkDiscoAtomicTest.java |    32 +
 .../ZookeeperDiscoverySpiAbstractTestSuite.java |   123 +
 .../zk/ZookeeperDiscoverySpiTestSuite1.java     |    69 +
 .../zk/ZookeeperDiscoverySpiTestSuite2.java     |    99 +
 ...ZookeeperDiscoverySuitePreprocessorTest.java |   101 +
 .../zk/internal/ZookeeperClientTest.java        |   584 +
 ...okeeperDiscoverySpiSaslAuthAbstractTest.java |   261 +
 ...ZookeeperDiscoverySpiSaslFailedAuthTest.java |    49 +
 ...eeperDiscoverySpiSaslSuccessfulAuthTest.java |    48 +
 .../zk/internal/ZookeeperDiscoverySpiTest.java  |  5546 ++++++++
 .../zookeeper/ZkTestClientCnxnSocketNIO.java    |   137 +
 packaging/deb/changelog                         |    24 +
 packaging/deb/control                           |    17 +
 packaging/deb/copyright                         |    12 +
 packaging/deb/rules                             |    44 +
 packaging/package.sh                            |   250 +
 packaging/rpm/apache-ignite.spec                |   280 +
 packaging/rpm/name.service                      |    17 +
 packaging/rpm/service.sh                        |    28 +
 parent/pom.xml                                  |   233 +-
 pom.xml                                         |   245 +-
 scripts/update-versions.sh                      |    35 +
 7233 files changed, 737596 insertions(+), 173624 deletions(-)
----------------------------------------------------------------------



[16/50] [abbrv] ignite git commit: IGNITE-9717: [ML] Add setters methods to Logistic Regression and fix examples/tests

Posted by ag...@apache.org.
IGNITE-9717: [ML] Add setters methods to Logistic Regression and
fix examples/tests

this closes #4865


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4da48e6f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4da48e6f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4da48e6f

Branch: refs/heads/ignite-5797
Commit: 4da48e6f90ceb7ee585b66af4f384cc868f6ca8e
Parents: a373486
Author: zaleslaw <za...@gmail.com>
Authored: Fri Sep 28 16:05:39 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Fri Sep 28 16:05:39 2018 +0300

----------------------------------------------------------------------
 .../LogisticRegressionSGDTrainerExample.java    | 16 ++++---
 .../ml/tutorial/Step_1_Read_and_Learn.java      |  2 +-
 .../examples/ml/tutorial/Step_2_Imputing.java   |  2 +-
 .../examples/ml/tutorial/Step_3_Categorial.java |  2 +-
 .../Step_3_Categorial_with_One_Hot_Encoder.java |  2 +-
 .../ml/tutorial/Step_4_Add_age_fare.java        |  2 +-
 .../examples/ml/tutorial/Step_5_Scaling.java    |  2 +-
 .../tutorial/Step_5_Scaling_with_Pipeline.java  |  2 +-
 .../ignite/examples/ml/tutorial/Step_6_KNN.java |  2 +-
 .../ml/tutorial/Step_7_Split_train_test.java    |  2 +-
 .../ignite/examples/ml/tutorial/Step_8_CV.java  |  2 +-
 .../ml/tutorial/Step_8_CV_with_Param_Grid.java  |  2 +-
 .../ml/tutorial/Step_9_Go_to_LogReg.java        | 27 ++++++-----
 .../ml/tutorial/TutorialStepByStepExample.java  |  2 +-
 .../binomial/LogisticRegressionSGDTrainer.java  | 47 ++++++++++----------
 .../LogRegressionMultiClassTrainer.java         | 29 +++++++-----
 .../SVMLinearBinaryClassificationTrainer.java   |  2 +-
 ...VMLinearMultiClassClassificationTrainer.java |  2 +-
 .../apache/ignite/ml/pipeline/PipelineTest.java | 18 +++-----
 .../logistic/LogRegMultiClassTrainerTest.java   |  1 -
 .../logistic/LogisticRegressionModelTest.java   | 17 +++----
 .../LogisticRegressionSGDTrainerTest.java       | 24 +++++-----
 22 files changed, 111 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
index 8d4218d..15330d0 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/regression/logistic/binary/LogisticRegressionSGDTrainerExample.java
@@ -60,11 +60,16 @@ public class LogisticRegressionSGDTrainerExample {
             IgniteCache<Integer, double[]> dataCache = new TestCache(ignite).fillCacheWith(data);
 
             System.out.println(">>> Create new logistic regression trainer object.");
-            LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                new SimpleGDUpdateCalculator(0.2),
-                SimpleGDParameterUpdate::sumLocal,
-                SimpleGDParameterUpdate::avg
-            ), 100000,  10, 100, 123L);
+            LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>()
+                .withUpdatesStgy(new UpdatesStrategy<>(
+                    new SimpleGDUpdateCalculator(0.2),
+                    SimpleGDParameterUpdate::sumLocal,
+                    SimpleGDParameterUpdate::avg
+                ))
+                .withMaxIterations(100000)
+                .withLocIterations(100)
+                .withBatchSize(10)
+                .withSeed(123L);
 
             System.out.println(">>> Perform the training to get the model.");
             LogisticRegressionModel mdl = trainer.fit(
@@ -218,5 +223,4 @@ public class LogisticRegressionSGDTrainerExample {
         {1, 5.1, 2.5, 3, 1.1},
         {1, 5.7, 2.8, 4.1, 1.3},
     };
-
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
index 264dbf4..481fa1d 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_1_Read_and_Learn.java
@@ -42,7 +42,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_1_Read_and_Learn {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 1 (read and learn) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
index df73235..d60dc4b 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_2_Imputing.java
@@ -44,7 +44,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_2_Imputing {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 2 (imputing) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
index 463a6ba..ac2fe08 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial.java
@@ -47,7 +47,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_3_Categorial {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 3 (categorial) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
index 93e7e79..f0b6efe 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_3_Categorial_with_One_Hot_Encoder.java
@@ -48,7 +48,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_3_Categorial_with_One_Hot_Encoder {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 3 (categorial with One-hot encoder) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
index bbeedb6..71e9efd 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_4_Add_age_fare.java
@@ -45,7 +45,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_4_Add_age_fare {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 4 (add age and fare) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
index 7d934d7..fe7bf91 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling.java
@@ -48,7 +48,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_5_Scaling {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 5 (scaling) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
index cc0a278..bd7cc21 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_5_Scaling_with_Pipeline.java
@@ -48,7 +48,7 @@ import org.apache.ignite.ml.tree.DecisionTreeClassificationTrainer;
  */
 public class Step_5_Scaling_with_Pipeline {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 5 (scaling) via Pipeline example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
index 0c8b562..a35b841 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_6_KNN.java
@@ -49,7 +49,7 @@ import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
  */
 public class Step_6_KNN {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 6 (kNN) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
index c6d033c..53d4d0a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_7_Split_train_test.java
@@ -51,7 +51,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_7_Split_train_test {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 7 (split to train and test) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
index d83e14a..feedccf 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV.java
@@ -63,7 +63,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_8_CV {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 8 (cross-validation) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
index 594c0eb..670f025 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_8_CV_with_Param_Grid.java
@@ -65,7 +65,7 @@ import org.apache.ignite.ml.tree.DecisionTreeNode;
  */
 public class Step_8_CV_with_Param_Grid {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 8 (cross-validation with param grid) example started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
index 4e1e005..b98b0eb 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/Step_9_Go_to_LogReg.java
@@ -56,7 +56,7 @@ import org.apache.ignite.ml.selection.split.TrainTestSplit;
  */
 public class Step_9_Go_to_LogReg {
     /** Run example. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         System.out.println();
         System.out.println(">>> Tutorial step 9 (logistic regression) example started.");
 
@@ -124,12 +124,13 @@ public class Step_9_Go_to_LogReg {
                                             minMaxScalerPreprocessor
                                         );
 
-                                    LogisticRegressionSGDTrainer<?> trainer
-                                        = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                                        new SimpleGDUpdateCalculator(learningRate),
-                                        SimpleGDParameterUpdate::sumLocal,
-                                        SimpleGDParameterUpdate::avg
-                                    ), maxIterations, batchSize, locIterations, 123L);
+                                    LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>()
+                                        .withUpdatesStgy(new UpdatesStrategy<>(new SimpleGDUpdateCalculator(learningRate),
+                                            SimpleGDParameterUpdate::sumLocal, SimpleGDParameterUpdate::avg))
+                                        .withMaxIterations(maxIterations)
+                                        .withLocIterations(locIterations)
+                                        .withBatchSize(batchSize)
+                                        .withSeed(123L);
 
                                     CrossValidation<LogisticRegressionModel, Double, Integer, Object[]>
                                         scoreCalculator = new CrossValidation<>();
@@ -187,11 +188,13 @@ public class Step_9_Go_to_LogReg {
                         minMaxScalerPreprocessor
                     );
 
-                LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-                    new SimpleGDUpdateCalculator(bestLearningRate),
-                    SimpleGDParameterUpdate::sumLocal,
-                    SimpleGDParameterUpdate::avg
-                ), bestMaxIterations,  bestBatchSize, bestLocIterations, 123L);
+                LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>()
+                    .withUpdatesStgy(new UpdatesStrategy<>(new SimpleGDUpdateCalculator(bestLearningRate),
+                        SimpleGDParameterUpdate::sumLocal, SimpleGDParameterUpdate::avg))
+                    .withMaxIterations(bestMaxIterations)
+                    .withLocIterations(bestLocIterations)
+                    .withBatchSize(bestBatchSize)
+                    .withSeed(123L);
 
                 System.out.println(">>> Perform the training to get the model.");
                 LogisticRegressionModel bestMdl = trainer.fit(

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java
index 67f4bf5..a376ae6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ml/tutorial/TutorialStepByStepExample.java
@@ -23,7 +23,7 @@ package org.apache.ignite.examples.ml.tutorial;
  */
 public class TutorialStepByStepExample {
     /** Run examples with default settings. */
-    public static void main(String[] args) throws InterruptedException {
+    public static void main(String[] args) {
         Step_1_Read_and_Learn.main(args);
         Step_2_Imputing.main(args);
         Step_3_Categorial.main(args);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/binomial/LogisticRegressionSGDTrainer.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/binomial/LogisticRegressionSGDTrainer.java b/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/binomial/LogisticRegressionSGDTrainer.java
index fb5d5a0..74a296d 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/binomial/LogisticRegressionSGDTrainer.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/binomial/LogisticRegressionSGDTrainer.java
@@ -33,6 +33,8 @@ import org.apache.ignite.ml.nn.MultilayerPerceptron;
 import org.apache.ignite.ml.nn.UpdatesStrategy;
 import org.apache.ignite.ml.nn.architecture.MLPArchitecture;
 import org.apache.ignite.ml.optimization.LossFunctions;
+import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate;
+import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
 import org.apache.ignite.ml.trainers.SingleLabelDatasetTrainer;
 import org.jetbrains.annotations.NotNull;
 
@@ -41,37 +43,23 @@ import org.jetbrains.annotations.NotNull;
  */
 public class LogisticRegressionSGDTrainer<P extends Serializable> extends SingleLabelDatasetTrainer<LogisticRegressionModel> {
     /** Update strategy. */
-    private UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy;
+    private UpdatesStrategy updatesStgy = new UpdatesStrategy<>(
+        new SimpleGDUpdateCalculator(0.2),
+        SimpleGDParameterUpdate::sumLocal,
+        SimpleGDParameterUpdate::avg
+    );
 
     /** Max number of iteration. */
-    private int maxIterations;
+    private int maxIterations = 100;
 
     /** Batch size. */
-    private int batchSize;
+    private int batchSize = 100;
 
     /** Number of local iterations. */
-    private int locIterations;
+    private int locIterations = 100;
 
     /** Seed for random generator. */
-    private long seed;
-
-    /**
-     * Constructs a new instance of linear regression SGD trainer.
-     *
-     * @param updatesStgy Update strategy.
-     * @param maxIterations Max number of iteration.
-     * @param batchSize Batch size.
-     * @param locIterations Number of local iterations.
-     * @param seed Seed for random generator.
-     */
-    public LogisticRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy, int maxIterations,
-        int batchSize, int locIterations, long seed) {
-        this.updatesStgy = updatesStgy;
-        this.maxIterations = maxIterations;
-        this.batchSize = batchSize;
-        this.locIterations = locIterations;
-        this.seed = seed;
-    }
+    private long seed = 1234L;
 
     /** {@inheritDoc} */
     @Override public <K, V> LogisticRegressionModel fit(DatasetBuilder<K, V> datasetBuilder,
@@ -202,11 +190,22 @@ public class LogisticRegressionSGDTrainer<P extends Serializable> extends Single
     }
 
     /**
+     * Set up the regularization parameter.
+     *
+     * @param updatesStgy Update strategy.
+     * @return Trainer with new update strategy parameter value.
+     */
+    public LogisticRegressionSGDTrainer withUpdatesStgy(UpdatesStrategy updatesStgy) {
+        this.updatesStgy = updatesStgy;
+        return this;
+    }
+
+    /**
      * Get the update strategy.
      *
      * @return The property value.
      */
-    public UpdatesStrategy<? super MultilayerPerceptron, P> getUpdatesStgy() {
+    public UpdatesStrategy getUpdatesStgy() {
         return updatesStgy;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/multiclass/LogRegressionMultiClassTrainer.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/multiclass/LogRegressionMultiClassTrainer.java b/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/multiclass/LogRegressionMultiClassTrainer.java
index b9cdcc7..71d54fa 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/multiclass/LogRegressionMultiClassTrainer.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/multiclass/LogRegressionMultiClassTrainer.java
@@ -32,8 +32,9 @@ import org.apache.ignite.ml.dataset.PartitionDataBuilder;
 import org.apache.ignite.ml.dataset.primitive.context.EmptyContext;
 import org.apache.ignite.ml.math.functions.IgniteBiFunction;
 import org.apache.ignite.ml.math.primitives.vector.Vector;
-import org.apache.ignite.ml.nn.MultilayerPerceptron;
 import org.apache.ignite.ml.nn.UpdatesStrategy;
+import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate;
+import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
 import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionModel;
 import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionSGDTrainer;
 import org.apache.ignite.ml.structures.partition.LabelPartitionDataBuilderOnHeap;
@@ -46,19 +47,23 @@ import org.apache.ignite.ml.trainers.SingleLabelDatasetTrainer;
 public class LogRegressionMultiClassTrainer<P extends Serializable>
     extends SingleLabelDatasetTrainer<LogRegressionMultiClassModel> {
     /** Update strategy. */
-    private UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy;
+    private UpdatesStrategy updatesStgy = new UpdatesStrategy<>(
+        new SimpleGDUpdateCalculator(0.2),
+        SimpleGDParameterUpdate::sumLocal,
+        SimpleGDParameterUpdate::avg
+    );
 
     /** Max number of iteration. */
-    private int amountOfIterations;
+    private int amountOfIterations = 100;
 
     /** Batch size. */
-    private int batchSize;
+    private int batchSize = 100;
 
     /** Number of local iterations. */
-    private int amountOfLocIterations;
+    private int amountOfLocIterations = 100;
 
     /** Seed for random generator. */
-    private long seed;
+    private long seed = 1234L;
 
     /**
      * Trains model based on the specified data.
@@ -90,7 +95,11 @@ public class LogRegressionMultiClassTrainer<P extends Serializable>
 
         classes.forEach(clsLb -> {
             LogisticRegressionSGDTrainer<?> trainer =
-                new LogisticRegressionSGDTrainer<>(updatesStgy, amountOfIterations, batchSize, amountOfLocIterations, seed);
+                new LogisticRegressionSGDTrainer<>()
+                    .withBatchSize(batchSize)
+                    .withLocIterations(amountOfLocIterations)
+                    .withMaxIterations(amountOfIterations)
+                    .withSeed(seed);
 
             IgniteBiFunction<K, V, Double> lbTransformer = (k, v) -> {
                 Double lb = lbExtractor.apply(k, v);
@@ -238,7 +247,7 @@ public class LogRegressionMultiClassTrainer<P extends Serializable>
     }
 
     /**
-     * Set up the regularization parameter.
+     * Set up the updates strategy.
      *
      * @param updatesStgy Update strategy.
      * @return Trainer with new update strategy parameter value.
@@ -249,11 +258,11 @@ public class LogRegressionMultiClassTrainer<P extends Serializable>
     }
 
     /**
-     * Get the update strategy..
+     * Get the update strategy.
      *
      * @return The parameter value.
      */
-    public UpdatesStrategy<? super MultilayerPerceptron, P> getUpdatesStgy() {
+    public UpdatesStrategy getUpdatesStgy() {
         return updatesStgy;
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearBinaryClassificationTrainer.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearBinaryClassificationTrainer.java b/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearBinaryClassificationTrainer.java
index 2c621c8..47666f4 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearBinaryClassificationTrainer.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearBinaryClassificationTrainer.java
@@ -50,7 +50,7 @@ public class SVMLinearBinaryClassificationTrainer extends SingleLabelDatasetTrai
     private double lambda = 0.4;
 
     /** The seed number. */
-    private long seed;
+    private long seed = 1234L;
 
     /**
      * Trains model based on the specified data.

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearMultiClassClassificationTrainer.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearMultiClassClassificationTrainer.java b/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearMultiClassClassificationTrainer.java
index ec60034..b161914 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearMultiClassClassificationTrainer.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/svm/SVMLinearMultiClassClassificationTrainer.java
@@ -52,7 +52,7 @@ public class SVMLinearMultiClassClassificationTrainer
     private double lambda = 0.2;
 
     /** The seed number. */
-    private long seed;
+    private long seed = 1234L;
 
     /**
      * Trains model based on the specified data.

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/test/java/org/apache/ignite/ml/pipeline/PipelineTest.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/pipeline/PipelineTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/pipeline/PipelineTest.java
index 91bbcd4..d517ce6 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/pipeline/PipelineTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/pipeline/PipelineTest.java
@@ -51,11 +51,13 @@ public class PipelineTest extends TrainerTest {
             cacheMock.put(i, convertedRow);
         }
 
-        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-            new SimpleGDUpdateCalculator().withLearningRate(0.2),
-            SimpleGDParameterUpdate::sumLocal,
-            SimpleGDParameterUpdate::avg
-        ), 100000, 10, 100, 123L);
+        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>()
+            .withUpdatesStgy(new UpdatesStrategy<>(new SimpleGDUpdateCalculator(0.2),
+                SimpleGDParameterUpdate::sumLocal, SimpleGDParameterUpdate::avg))
+            .withMaxIterations(100000)
+            .withLocIterations(100)
+            .withBatchSize(10)
+            .withSeed(123L);
 
         PipelineMdl<Integer, Double[]> mdl = new Pipeline<Integer, Double[], Vector>()
             .addFeatureExtractor((k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)))
@@ -88,12 +90,6 @@ public class PipelineTest extends TrainerTest {
             cacheMock.put(i, convertedRow);
         }
 
-        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-            new SimpleGDUpdateCalculator().withLearningRate(0.2),
-            SimpleGDParameterUpdate::sumLocal,
-            SimpleGDParameterUpdate::avg
-        ), 100000, 10, 100, 123L);
-
         PipelineMdl<Integer, Double[]> mdl = new Pipeline<Integer, Double[], Vector>()
             .addFeatureExtractor((k, v) -> VectorUtils.of(Arrays.copyOfRange(v, 1, v.length)))
             .addLabelExtractor((k, v) -> v[0])

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogRegMultiClassTrainerTest.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogRegMultiClassTrainerTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogRegMultiClassTrainerTest.java
index 78cd08d..c99bf02 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogRegMultiClassTrainerTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogRegMultiClassTrainerTest.java
@@ -133,7 +133,6 @@ public class LogRegMultiClassTrainerTest extends TrainerTest {
             VectorUtils.of(10, -10)
         );
 
-
         for (Vector vec : vectors) {
             TestUtils.assertEquals(originalMdl.apply(vec), updatedOnSameDS.apply(vec), PRECISION);
             TestUtils.assertEquals(originalMdl.apply(vec), updatedOnEmptyDS.apply(vec), PRECISION);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionModelTest.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionModelTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionModelTest.java
index 89c9cca..e8aaacd 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionModelTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionModelTest.java
@@ -38,7 +38,7 @@ public class LogisticRegressionModelTest {
     /** */
     @Test
     public void testPredict() {
-        Vector weights = new DenseVector(new double[]{2.0, 3.0});
+        Vector weights = new DenseVector(new double[] {2.0, 3.0});
 
         assertFalse(new LogisticRegressionModel(weights, 1.0).isKeepingRawLabels());
 
@@ -57,35 +57,36 @@ public class LogisticRegressionModelTest {
     /** */
     @Test(expected = CardinalityException.class)
     public void testPredictOnAnObservationWithWrongCardinality() {
-        Vector weights = new DenseVector(new double[]{2.0, 3.0});
+        Vector weights = new DenseVector(new double[] {2.0, 3.0});
 
         LogisticRegressionModel mdl = new LogisticRegressionModel(weights, 1.0);
 
-        Vector observation = new DenseVector(new double[]{1.0});
+        Vector observation = new DenseVector(new double[] {1.0});
 
         mdl.apply(observation);
     }
 
     /** */
     private void verifyPredict(LogisticRegressionModel mdl) {
-        Vector observation = new DenseVector(new double[]{1.0, 1.0});
+        Vector observation = new DenseVector(new double[] {1.0, 1.0});
         TestUtils.assertEquals(sigmoid(1.0 + 2.0 * 1.0 + 3.0 * 1.0), mdl.apply(observation), PRECISION);
 
-        observation = new DenseVector(new double[]{2.0, 1.0});
+        observation = new DenseVector(new double[] {2.0, 1.0});
         TestUtils.assertEquals(sigmoid(1.0 + 2.0 * 2.0 + 3.0 * 1.0), mdl.apply(observation), PRECISION);
 
-        observation = new DenseVector(new double[]{1.0, 2.0});
+        observation = new DenseVector(new double[] {1.0, 2.0});
         TestUtils.assertEquals(sigmoid(1.0 + 2.0 * 1.0 + 3.0 * 2.0), mdl.apply(observation), PRECISION);
 
-        observation = new DenseVector(new double[]{-2.0, 1.0});
+        observation = new DenseVector(new double[] {-2.0, 1.0});
         TestUtils.assertEquals(sigmoid(1.0 - 2.0 * 2.0 + 3.0 * 1.0), mdl.apply(observation), PRECISION);
 
-        observation = new DenseVector(new double[]{1.0, -2.0});
+        observation = new DenseVector(new double[] {1.0, -2.0});
         TestUtils.assertEquals(sigmoid(1.0 + 2.0 * 1.0 - 3.0 * 2.0), mdl.apply(observation), PRECISION);
     }
 
     /**
      * Sigmoid function.
+     *
      * @param z The regression value.
      * @return The result.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/4da48e6f/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
index 723677c..d9b6f7a 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/regressions/logistic/LogisticRegressionSGDTrainerTest.java
@@ -45,11 +45,13 @@ public class LogisticRegressionSGDTrainerTest extends TrainerTest {
         for (int i = 0; i < twoLinearlySeparableClasses.length; i++)
             cacheMock.put(i, twoLinearlySeparableClasses[i]);
 
-        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-            new SimpleGDUpdateCalculator().withLearningRate(0.2),
-            SimpleGDParameterUpdate::sumLocal,
-            SimpleGDParameterUpdate::avg
-        ), 100000, 10, 100, 123L);
+        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>()
+            .withUpdatesStgy(new UpdatesStrategy<>(new SimpleGDUpdateCalculator(0.2),
+                SimpleGDParameterUpdate::sumLocal, SimpleGDParameterUpdate::avg))
+            .withMaxIterations(100000)
+            .withLocIterations(100)
+            .withBatchSize(10)
+            .withSeed(123L);
 
         LogisticRegressionModel mdl = trainer.fit(
             cacheMock,
@@ -70,11 +72,13 @@ public class LogisticRegressionSGDTrainerTest extends TrainerTest {
         for (int i = 0; i < twoLinearlySeparableClasses.length; i++)
             cacheMock.put(i, twoLinearlySeparableClasses[i]);
 
-        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>(new UpdatesStrategy<>(
-            new SimpleGDUpdateCalculator().withLearningRate(0.2),
-            SimpleGDParameterUpdate::sumLocal,
-            SimpleGDParameterUpdate::avg
-        ), 100000, 10, 100, 123L);
+        LogisticRegressionSGDTrainer<?> trainer = new LogisticRegressionSGDTrainer<>()
+            .withUpdatesStgy(new UpdatesStrategy<>(new SimpleGDUpdateCalculator(0.2),
+                SimpleGDParameterUpdate::sumLocal, SimpleGDParameterUpdate::avg))
+            .withMaxIterations(100000)
+            .withLocIterations(100)
+            .withBatchSize(10)
+            .withSeed(123L);
 
         LogisticRegressionModel originalMdl = trainer.fit(
             cacheMock,


[43/50] [abbrv] ignite git commit: IGNITE-9661 Improved performance of partition state validation during PME - Fixes #4850.

Posted by ag...@apache.org.
IGNITE-9661 Improved performance of partition state validation during PME - Fixes #4850.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e142b100
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e142b100
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e142b100

Branch: refs/heads/ignite-5797
Commit: e142b100f8cf651c2bfc45a1783282b8d85a220c
Parents: 76d6ef0
Author: Pavel Kovalenko <jo...@gmail.com>
Authored: Thu Oct 4 12:46:54 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 12:46:54 2018 +0300

----------------------------------------------------------------------
 .../GridDhtPartitionsStateValidator.java        | 31 ++++++++++++--------
 1 file changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e142b100/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionsStateValidator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionsStateValidator.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionsStateValidator.java
index d131d56..544d453 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionsStateValidator.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionsStateValidator.java
@@ -119,7 +119,9 @@ public class GridDhtPartitionsStateValidator {
 
         Set<Integer> ignore = null;
 
-        for (int p = 0; p < top.partitions(); p++) {
+        for (int i = 0; i < countersMap.size(); i++) {
+            int p = countersMap.partitionAt(i);
+
             if (top.partitionState(nodeId, p) != GridDhtPartitionState.OWNING) {
                 if (ignore == null)
                     ignore = new HashSet<>();
@@ -129,9 +131,8 @@ public class GridDhtPartitionsStateValidator {
                 continue;
             }
 
-            int partIdx = countersMap.partitionIndex(p);
-            long updateCounter = partIdx >= 0 ? countersMap.updateCounterAt(partIdx) : 0;
-            long size = sizesMap.containsKey(p) ? sizesMap.get(p) : 0;
+            long updateCounter = countersMap.updateCounterAt(i);
+            long size = sizesMap.getOrDefault(p, 0L);
 
             // Do not validate partitions with zero update counter and size.
             if (updateCounter == 0 && size == 0) {
@@ -186,14 +187,15 @@ public class GridDhtPartitionsStateValidator {
 
             Set<Integer> ignorePartitions = shouldIgnore(top, nodeId, e.getValue());
 
-            for (int part = 0; part < partitions; part++) {
-                if (ignorePartitions != null && ignorePartitions.contains(part))
+            for (int i = 0; i < countersMap.size(); i++) {
+                int p = countersMap.partitionAt(i);
+
+                if (ignorePartitions != null && ignorePartitions.contains(p))
                     continue;
 
-                int partIdx = countersMap.partitionIndex(part);
-                long currentCounter = partIdx >= 0 ? countersMap.updateCounterAt(partIdx) : 0;
+                long currentCounter = countersMap.updateCounterAt(i);
 
-                process(invalidPartitions, updateCountersAndNodesByPartitions, part, nodeId, currentCounter);
+                process(invalidPartitions, updateCountersAndNodesByPartitions, p, nodeId, currentCounter);
             }
         }
 
@@ -237,17 +239,20 @@ public class GridDhtPartitionsStateValidator {
             if (ignoringNodes.contains(nodeId))
                 continue;
 
+            CachePartitionPartialCountersMap countersMap = e.getValue().partitionUpdateCounters(top.groupId(), partitions);
             Map<Integer, Long> sizesMap = e.getValue().partitionSizes(top.groupId());
 
             Set<Integer> ignorePartitions = shouldIgnore(top, nodeId, e.getValue());
 
-            for (int part = 0; part < partitions; part++) {
-                if (ignorePartitions != null && ignorePartitions.contains(part))
+            for (int i = 0; i < countersMap.size(); i++) {
+                int p = countersMap.partitionAt(i);
+
+                if (ignorePartitions != null && ignorePartitions.contains(p))
                     continue;
 
-                long currentSize = sizesMap.containsKey(part) ? sizesMap.get(part) : 0L;
+                long currentSize = sizesMap.getOrDefault(p, 0L);
 
-                process(invalidPartitions, sizesAndNodesByPartitions, part, nodeId, currentSize);
+                process(invalidPartitions, sizesAndNodesByPartitions, p, nodeId, currentSize);
             }
         }
 


[21/50] [abbrv] ignite git commit: IGNITE-9612 Fixed checkpoint listener logic - Fixes #4864.

Posted by ag...@apache.org.
IGNITE-9612 Fixed checkpoint listener logic - Fixes #4864.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2f3b567f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2f3b567f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2f3b567f

Branch: refs/heads/ignite-5797
Commit: 2f3b567f61c2a9a1080ee7fda57f3a18231b1dae
Parents: 69adfd5
Author: Aleksei Scherbakov <al...@gmail.com>
Authored: Fri Sep 28 18:50:05 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Sep 28 18:50:05 2018 +0300

----------------------------------------------------------------------
 .../persistence/GridCacheOffheapManager.java    | 29 ++++++++++----------
 1 file changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f3b567f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
index 16c30c9..d704abd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
@@ -170,12 +170,24 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
 
         Executor execSvc = ctx.executor();
 
+        if (ctx.nextSnapshot() && ctx.needToSnapshot(grp.cacheOrGroupName())) {
+            if (execSvc == null)
+                updateSnapshotTag(ctx);
+            else {
+                execSvc.execute(() -> {
+                    try {
+                        updateSnapshotTag(ctx);
+                    }
+                    catch (IgniteCheckedException e) {
+                        throw new IgniteException(e);
+                    }
+                });
+            }
+        }
+
         if (execSvc == null) {
             reuseList.saveMetadata();
 
-            if (ctx.nextSnapshot())
-                updateSnapshotTag(ctx);
-
             for (CacheDataStore store : partDataStores.values())
                 saveStoreMetadata(store, ctx, false);
         }
@@ -189,17 +201,6 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
                 }
             });
 
-            if (ctx.nextSnapshot()) {
-                execSvc.execute(() -> {
-                    try {
-                        updateSnapshotTag(ctx);
-                    }
-                    catch (IgniteCheckedException e) {
-                        throw new IgniteException(e);
-                    }
-                });
-            }
-
             for (CacheDataStore store : partDataStores.values())
                 execSvc.execute(() -> {
                     try {


[27/50] [abbrv] ignite git commit: IGNITE-9658 Add an option to reuse memory after deactivation - Fixes #4874.

Posted by ag...@apache.org.
IGNITE-9658 Add an option to reuse memory after deactivation - Fixes #4874.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2f9faf1e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2f9faf1e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2f9faf1e

Branch: refs/heads/ignite-5797
Commit: 2f9faf1e0d885185348653d6e3b817d32b992261
Parents: 9aef609
Author: ascherbakoff <al...@gmail.com>
Authored: Mon Oct 1 14:54:41 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Oct 1 16:05:27 2018 +0300

----------------------------------------------------------------------
 .../benchmarks/jmh/tree/BPlusTreeBenchmark.java |  2 +-
 .../apache/ignite/IgniteSystemProperties.java   |  5 ++
 .../internal/mem/DirectMemoryProvider.java      |  6 +-
 .../mem/file/MappedFileMemoryProvider.java      |  6 +-
 .../mem/unsafe/UnsafeMemoryProvider.java        | 29 +++++--
 .../ignite/internal/pagemem/PageMemory.java     | 16 +++-
 .../pagemem/impl/PageMemoryNoStoreImpl.java     |  4 +-
 .../GridCacheDatabaseSharedManager.java         |  6 +-
 .../IgniteCacheDatabaseSharedManager.java       | 81 ++++++++++++++++----
 .../persistence/pagemem/PageMemoryImpl.java     |  4 +-
 .../pagemem/impl/PageMemoryNoLoadSelfTest.java  | 10 +--
 .../IgniteClusterActivateDeactivateTest.java    |  5 +-
 ...tivateTestWithPersistenceAndMemoryReuse.java | 40 ++++++++++
 .../pagemem/FullPageIdTableTest.java            |  4 +-
 ...gnitePageMemReplaceDelayedWriteUnitTest.java |  4 +-
 .../pagemem/PageIdDistributionTest.java         |  4 +-
 .../pagemem/PageMemoryNoStoreLeakTest.java      |  2 +-
 .../wal/memtracker/PageMemoryTracker.java       |  2 +-
 .../processors/database/BPlusTreeSelfTest.java  |  2 +-
 .../database/CacheFreeListImplSelfTest.java     |  2 +-
 .../database/IndexStorageSelfTest.java          |  2 +-
 .../ignite/testsuites/IgnitePdsTestSuite.java   |  9 +--
 .../ignite/testsuites/IgnitePdsTestSuite4.java  |  3 +
 .../h2/database/InlineIndexHelperTest.java      | 10 +--
 24 files changed, 191 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/tree/BPlusTreeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/tree/BPlusTreeBenchmark.java b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/tree/BPlusTreeBenchmark.java
index e80e13d..15c4710 100644
--- a/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/tree/BPlusTreeBenchmark.java
+++ b/modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/tree/BPlusTreeBenchmark.java
@@ -137,7 +137,7 @@ public class BPlusTreeBenchmark extends JmhAbstractBenchmark {
     public void tearDown() throws Exception {
         tree.destroy();
 
-        pageMem.stop();
+        pageMem.stop(true);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 01fb02a..892689c 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -994,6 +994,11 @@ public final class IgniteSystemProperties {
     public static final String IGNITE_ZOOKEEPER_DISCOVERY_MAX_RETRY_COUNT = "IGNITE_ZOOKEEPER_DISCOVERY_MAX_RETRY_COUNT";
 
     /**
+     * Try reuse memory on deactivation. Useful in case of huge page memory region size.
+     */
+    public static final String IGNITE_REUSE_MEMORY_ON_DEACTIVATE = "IGNITE_REUSE_MEMORY_ON_DEACTIVATE";
+
+    /**
      * Enforces singleton.
      */
     private IgniteSystemProperties() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/mem/DirectMemoryProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/mem/DirectMemoryProvider.java b/modules/core/src/main/java/org/apache/ignite/internal/mem/DirectMemoryProvider.java
index a90c6b8..03d386b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/mem/DirectMemoryProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/mem/DirectMemoryProvider.java
@@ -27,9 +27,11 @@ public interface DirectMemoryProvider {
     public void initialize(long[] chunkSizes);
 
     /**
-     * Shuts down the provider. Will deallocate all previously allocated regions.
+     * Shuts down the provider.
+     *
+     * @param deallocate {@code True} to deallocate memory, {@code false} to allow memory reuse.
      */
-    public void shutdown();
+    public void shutdown(boolean deallocate);
 
     /**
      * Attempts to allocate next memory region. Will return {@code null} if no more regions are available.

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/mem/file/MappedFileMemoryProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/mem/file/MappedFileMemoryProvider.java b/modules/core/src/main/java/org/apache/ignite/internal/mem/file/MappedFileMemoryProvider.java
index 54b4af4..67e86f5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/mem/file/MappedFileMemoryProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/mem/file/MappedFileMemoryProvider.java
@@ -30,7 +30,9 @@ import org.apache.ignite.internal.mem.DirectMemoryRegion;
 import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
- *
+ * Memory provider implementation based on memory mapped file.
+ * <p>
+ * Doesn't support memory reuse semantics.
  */
 public class MappedFileMemoryProvider implements DirectMemoryProvider {
     /** */
@@ -101,7 +103,7 @@ public class MappedFileMemoryProvider implements DirectMemoryProvider {
     }
 
     /** {@inheritDoc} */
-    @Override public void shutdown() {
+    @Override public void shutdown(boolean deallocate) {
         if (mappedFiles != null) {
             for (MappedFile file : mappedFiles) {
                 try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/mem/unsafe/UnsafeMemoryProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/mem/unsafe/UnsafeMemoryProvider.java b/modules/core/src/main/java/org/apache/ignite/internal/mem/unsafe/UnsafeMemoryProvider.java
index d964648..8cb8119 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/mem/unsafe/UnsafeMemoryProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/mem/unsafe/UnsafeMemoryProvider.java
@@ -29,7 +29,9 @@ import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
- *
+ * Memory provider implementation based on unsafe memory access.
+ * <p>
+ * Supports memory reuse semantics.
  */
 public class UnsafeMemoryProvider implements DirectMemoryProvider {
     /** */
@@ -44,6 +46,9 @@ public class UnsafeMemoryProvider implements DirectMemoryProvider {
     /** Flag shows if current memory provider have been already initialized. */
     private boolean isInit;
 
+    /** */
+    private int used = 0;
+
     /**
      * @param log Ignite logger to use.
      */
@@ -54,7 +59,7 @@ public class UnsafeMemoryProvider implements DirectMemoryProvider {
     /** {@inheritDoc} */
     @Override public void initialize(long[] sizes) {
         if (isInit)
-            throw new IgniteException("Second initialization does not allowed for current provider");
+            return;
 
         this.sizes = sizes;
 
@@ -64,24 +69,32 @@ public class UnsafeMemoryProvider implements DirectMemoryProvider {
     }
 
     /** {@inheritDoc} */
-    @Override public void shutdown() {
+    @Override public void shutdown(boolean deallocate) {
         if (regions != null) {
             for (Iterator<DirectMemoryRegion> it = regions.iterator(); it.hasNext(); ) {
                 DirectMemoryRegion chunk = it.next();
 
-                GridUnsafe.freeMemory(chunk.address());
+                if (deallocate) {
+                    GridUnsafe.freeMemory(chunk.address());
 
-                // Safety.
-                it.remove();
+                    // Safety.
+                    it.remove();
+                }
             }
+
+            if (!deallocate)
+                used = 0;
         }
     }
 
     /** {@inheritDoc} */
     @Override public DirectMemoryRegion nextRegion() {
-        if (regions.size() == sizes.length)
+        if (used == sizes.length)
             return null;
 
+        if (used < regions.size())
+            return regions.get(used++);
+
         long chunkSize = sizes[regions.size()];
 
         long ptr;
@@ -111,6 +124,8 @@ public class UnsafeMemoryProvider implements DirectMemoryProvider {
 
         regions.add(region);
 
+        used++;
+
         return region;
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
index 6f2e2c9..f7391d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
@@ -18,11 +18,25 @@
 package org.apache.ignite.internal.pagemem;
 
 import java.nio.ByteBuffer;
+import org.apache.ignite.IgniteException;
 import org.apache.ignite.lifecycle.LifecycleAware;
 
 /**
  */
-public interface PageMemory extends LifecycleAware, PageIdAllocator, PageSupport {
+public interface PageMemory extends PageIdAllocator, PageSupport {
+    /**
+     * Start page memory.
+     */
+    public void start() throws IgniteException;
+
+    /**
+     * Stop page memory.
+     *
+     * @param deallocate {@code True} to deallocate memory, {@code false} to allow memory reuse on subsequent {@link #start()}
+     * @throws IgniteException
+     */
+    public void stop(boolean deallocate) throws IgniteException;
+
     /**
      * @return Page size in bytes.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
index c5eba60..02afac8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
@@ -239,11 +239,11 @@ public class PageMemoryNoStoreImpl implements PageMemory {
 
     /** {@inheritDoc} */
     @SuppressWarnings("OverlyStrongTypeCast")
-    @Override public void stop() throws IgniteException {
+    @Override public void stop(boolean deallocate) throws IgniteException {
         if (log.isDebugEnabled())
             log.debug("Stopping page memory.");
 
-        directMemoryProvider.shutdown();
+        directMemoryProvider.shutdown(deallocate);
 
         if (directMemoryProvider instanceof Closeable) {
             try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 5e0b7cb..aff2b42 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -655,7 +655,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
             metaStorage = null;
 
-            storePageMem.stop();
+            storePageMem.stop(true);
         }
         catch (StorageException e) {
             cctx.kernalContext().failure().process(new FailureContext(FailureType.CRITICAL_ERROR, e));
@@ -1122,8 +1122,8 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
                 checkPointBufferIdxCnt.set(chunkSizes.length);
             }
 
-            @Override public void shutdown() {
-                memProvider.shutdown();
+            @Override public void shutdown(boolean deallocate) {
+                memProvider.shutdown(deallocate);
             }
 
             @Override public DirectMemoryRegion nextRegion() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
index 52430c0..f35d15a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
@@ -30,6 +30,7 @@ import org.apache.ignite.DataRegionMetrics;
 import org.apache.ignite.DataStorageMetrics;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.configuration.DataPageEvictionMode;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
@@ -69,6 +70,7 @@ import org.apache.ignite.lang.IgniteOutClosure;
 import org.apache.ignite.mxbean.DataRegionMetricsMXBean;
 import org.jetbrains.annotations.Nullable;
 
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_REUSE_MEMORY_ON_DEACTIVATE;
 import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME;
 import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_PAGE_SIZE;
 import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_ARCHIVE_MAX_SIZE;
@@ -88,6 +90,9 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     /** Maximum initial size on 32-bit JVM */
     private static final long MAX_PAGE_MEMORY_INIT_SIZE_32_BIT = 2L * 1024 * 1024 * 1024;
 
+    /** {@code True} to reuse memory on deactive. */
+    private final boolean reuseMemory = IgniteSystemProperties.getBoolean(IGNITE_REUSE_MEMORY_ON_DEACTIVATE);
+
     /** */
     protected volatile Map<String, DataRegion> dataRegionMap;
 
@@ -112,6 +117,9 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     /** First eviction was warned flag. */
     private volatile boolean firstEvictWarn;
 
+    /** Stores memory providers eligible for reuse. */
+    private Map<String, DirectMemoryProvider> memProviderMap;
+
     /** {@inheritDoc} */
     @Override protected void start0() throws IgniteCheckedException {
         if (cctx.kernalContext().clientNode() && cctx.kernalContext().config().getDataStorageConfiguration() == null)
@@ -243,6 +251,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
         dataRegionMap = U.newHashMap(3 + dataRegions);
         memMetricsMap = U.newHashMap(3 + dataRegions);
+        memProviderMap = reuseMemory ? U.newHashMap(3 + dataRegions) : null;
 
         if (dataRegionCfgs != null) {
             for (DataRegionConfiguration dataRegionCfg : dataRegionCfgs)
@@ -265,9 +274,8 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
             CU.isPersistenceEnabled(memCfg)
         );
 
-        for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext())) {
+        for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext()))
             lsnr.onInitDataRegions(this);
-        }
     }
 
     /**
@@ -706,7 +714,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
     /** {@inheritDoc} */
     @Override protected void stop0(boolean cancel) {
-        onDeActivate(cctx.kernalContext());
+        onDeActivate(true);
     }
 
     /**
@@ -935,17 +943,49 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
         DataRegionMetricsImpl memMetrics,
         boolean trackable
     ) throws IgniteCheckedException {
+        PageMemory pageMem = createPageMemory(createOrReuseMemoryProvider(plcCfg), memCfg, plcCfg, memMetrics, trackable);
+
+        return new DataRegion(pageMem, plcCfg, memMetrics, createPageEvictionTracker(plcCfg, pageMem));
+    }
+
+    /**
+     * @param plcCfg Policy config.
+     * @return DirectMemoryProvider provider.
+     */
+    private DirectMemoryProvider createOrReuseMemoryProvider(DataRegionConfiguration plcCfg)
+        throws IgniteCheckedException {
+        if (!supportsMemoryReuse(plcCfg))
+            return createMemoryProvider(plcCfg);
+
+        DirectMemoryProvider memProvider = memProviderMap.get(plcCfg.getName());
+
+        if (memProvider == null)
+            memProviderMap.put(plcCfg.getName(), (memProvider = createMemoryProvider(plcCfg)));
+
+        return memProvider;
+    }
+
+    /**
+     * @param plcCfg Policy config.
+     *
+     * @return {@code True} if policy supports memory reuse.
+     */
+    private boolean supportsMemoryReuse(DataRegionConfiguration plcCfg) {
+        return reuseMemory && plcCfg.getSwapPath() == null;
+    }
+
+    /**
+     * @param plcCfg Policy config.
+     * @return DirectMemoryProvider provider.
+     */
+    private DirectMemoryProvider createMemoryProvider(DataRegionConfiguration plcCfg) throws IgniteCheckedException {
         File allocPath = buildAllocPath(plcCfg);
 
-        DirectMemoryProvider memProvider = allocPath == null ?
+        return allocPath == null ?
             new UnsafeMemoryProvider(log) :
             new MappedFileMemoryProvider(
                 log,
                 allocPath);
-
-        PageMemory pageMem = createPageMemory(memProvider, memCfg, plcCfg, memMetrics, trackable);
-
-        return new DataRegion(pageMem, plcCfg, memMetrics, createPageEvictionTracker(plcCfg, pageMem));
     }
 
     /**
@@ -1045,8 +1085,8 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
                 memProvider.initialize(chunkSizes);
             }
 
-            @Override public void shutdown() {
-                memProvider.shutdown();
+            @Override public void shutdown(boolean deallocate) {
+                memProvider.shutdown(deallocate);
             }
 
             @Override public DirectMemoryRegion nextRegion() {
@@ -1095,20 +1135,25 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
         initPageMemoryDataStructures(memCfg);
 
-        for (DatabaseLifecycleListener lsnr : getDatabaseListeners(kctx)) {
+        for (DatabaseLifecycleListener lsnr : getDatabaseListeners(kctx))
             lsnr.afterInitialise(this);
-        }
     }
 
     /** {@inheritDoc} */
     @Override public void onDeActivate(GridKernalContext kctx) {
-        for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext())) {
+        onDeActivate(!reuseMemory);
+    }
+
+    /**
+     * @param shutdown Shutdown.
+     */
+    private void onDeActivate(boolean shutdown) {
+        for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext()))
             lsnr.beforeStop(this);
-        }
 
         if (dataRegionMap != null) {
             for (DataRegion memPlc : dataRegionMap.values()) {
-                memPlc.pageMemory().stop();
+                memPlc.pageMemory().stop(shutdown);
 
                 memPlc.evictionTracker().stop();
 
@@ -1119,6 +1164,12 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
             dataRegionMap = null;
 
+            if (shutdown && memProviderMap != null) {
+                memProviderMap.clear();
+
+                memProviderMap = null;
+            }
+
             dataRegionsInitialized = false;
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
index ba565c9..e49b7e2 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
@@ -387,7 +387,7 @@ public class PageMemoryImpl implements PageMemoryEx {
 
     /** {@inheritDoc} */
     @SuppressWarnings("OverlyStrongTypeCast")
-    @Override public void stop() throws IgniteException {
+    @Override public void stop(boolean deallocate) throws IgniteException {
         if (log.isDebugEnabled())
             log.debug("Stopping page memory.");
 
@@ -398,7 +398,7 @@ public class PageMemoryImpl implements PageMemoryEx {
                 seg.close();
         }
 
-        directMemoryProvider.shutdown();
+        directMemoryProvider.shutdown(deallocate);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
index 6ad977f..c5988e3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoLoadSelfTest.java
@@ -96,7 +96,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
             }
         }
         finally {
-            mem.stop();
+            mem.stop(true);
         }
     }
 
@@ -121,7 +121,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
             assertEquals(mem.loadedPages(), expPages);
         }
         finally {
-            mem.stop();
+            mem.stop(true);
         }
     }
 
@@ -173,7 +173,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
             }
         }
         finally {
-            mem.stop();
+            mem.stop(true);
         }
     }
 
@@ -200,7 +200,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
                 assertFalse(handles.add(allocatePage(mem)));
         }
         finally {
-            mem.stop();
+            mem.stop(true);
         }
     }
 
@@ -304,7 +304,7 @@ public class PageMemoryNoLoadSelfTest extends GridCommonAbstractTest {
             }
         }
         finally {
-            mem.stop();
+            mem.stop(true);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
index 6ed0ef7..f6b4ddd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
@@ -120,11 +120,11 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
         DataStorageConfiguration memCfg = new DataStorageConfiguration();
         memCfg.setPageSize(4 * 1024);
         memCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration()
-            .setMaxSize(300L * 1024 * 1024)
+            .setMaxSize(150L * 1024 * 1024)
             .setPersistenceEnabled(persistenceEnabled()));
 
         memCfg.setDataRegionConfigurations(new DataRegionConfiguration()
-            .setMaxSize(300L * 1024 * 1024)
+            .setMaxSize(150L * 1024 * 1024)
             .setName(NO_PERSISTENCE_REGION)
             .setPersistenceEnabled(false));
 
@@ -132,6 +132,7 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
             memCfg.setWalMode(WALMode.LOG_ONLY);
 
         cfg.setDataStorageConfiguration(memCfg);
+        cfg.setFailureDetectionTimeout(60_000);
 
         if (testSpi) {
             TestRecordingCommunicationSpi spi = new TestRecordingCommunicationSpi();

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.java
new file mode 100644
index 0000000..48d1754
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.java
@@ -0,0 +1,40 @@
+/*
+ * 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.internal.processors.cache;
+
+import org.apache.ignite.IgniteSystemProperties;
+
+/**
+ *
+ */
+public class IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse extends
+    IgniteClusterActivateDeactivateTestWithPersistence {
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        System.setProperty(IgniteSystemProperties.IGNITE_REUSE_MEMORY_ON_DEACTIVATE, "true");
+
+        super.beforeTest();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        System.clearProperty(IgniteSystemProperties.IGNITE_REUSE_MEMORY_ON_DEACTIVATE);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTableTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTableTest.java
index e337bb1..fd23ce5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTableTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTableTest.java
@@ -108,7 +108,7 @@ public class FullPageIdTableTest  {
             }
         }
         finally {
-            prov.shutdown();
+            prov.shutdown(true);
         }
     }
 
@@ -225,7 +225,7 @@ public class FullPageIdTableTest  {
         finally {
             long msPassed = U.currentTimeMillis() - seed;
             System.err.println("Seed used [" + seed + "] duration ["+ msPassed+ "] ms");
-            prov.shutdown();
+            prov.shutdown(true);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IgnitePageMemReplaceDelayedWriteUnitTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IgnitePageMemReplaceDelayedWriteUnitTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IgnitePageMemReplaceDelayedWriteUnitTest.java
index aa1e37d..5c965b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IgnitePageMemReplaceDelayedWriteUnitTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IgnitePageMemReplaceDelayedWriteUnitTest.java
@@ -127,7 +127,7 @@ public class IgnitePageMemReplaceDelayedWriteUnitTest {
 
         assert totalEvicted.get() > 0;
 
-        memory.stop();
+        memory.stop(true);
     }
 
     /**
@@ -182,7 +182,7 @@ public class IgnitePageMemReplaceDelayedWriteUnitTest {
 
         assert totalEvicted.get() > 0;
 
-        memory.stop();
+        memory.stop(true);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java
index 626e794..2008b22 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java
@@ -29,8 +29,6 @@ import org.apache.ignite.internal.mem.DirectMemoryRegion;
 import org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider;
 import org.apache.ignite.internal.pagemem.FullPageId;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
-import org.apache.ignite.internal.processors.cache.persistence.pagemem.FullPageIdTable;
-import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -228,7 +226,7 @@ public class PageIdDistributionTest extends GridCommonAbstractTest {
             }
         }
         finally {
-            prov.shutdown();
+            prov.shutdown(true);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java
index 65e8c36..8505a35 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java
@@ -71,7 +71,7 @@ public class PageMemoryNoStoreLeakTest extends GridCommonAbstractTest {
                 mem.start();
             }
             finally {
-                mem.stop();
+                mem.stop(true);
             }
 
             long committedVMSize = D.getCommittedVirtualMemorySize();

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/memtracker/PageMemoryTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/memtracker/PageMemoryTracker.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/memtracker/PageMemoryTracker.java
index 6649993..661b6c7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/memtracker/PageMemoryTracker.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/memtracker/PageMemoryTracker.java
@@ -283,7 +283,7 @@ public class PageMemoryTracker implements IgnitePlugin {
 
         stats.clear();
 
-        memoryProvider.shutdown();
+        memoryProvider.shutdown(true);
 
         if (checkpointLsnr != null) {
             ((GridCacheDatabaseSharedManager)gridCtx.cache().context().database())

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
index 487cdbe..6b694c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/BPlusTreeSelfTest.java
@@ -204,7 +204,7 @@ public class BPlusTreeSelfTest extends GridCommonAbstractTest {
         }
         finally {
             if (pageMem != null)
-                pageMem.stop();
+                pageMem.stop(true);
 
             MAX_PER_PAGE = 0;
             PUT_INC = 1;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java
index 7422815..d9804bf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/CacheFreeListImplSelfTest.java
@@ -71,7 +71,7 @@ public class CacheFreeListImplSelfTest extends GridCommonAbstractTest {
         super.afterTest();
 
         if (pageMem != null)
-            pageMem.stop();
+            pageMem.stop(true);
 
         pageMem = null;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java
index 69a86b4..bbdcd38 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IndexStorageSelfTest.java
@@ -129,7 +129,7 @@ public class IndexStorageSelfTest extends GridCommonAbstractTest {
             }
         }
         finally {
-            mem.stop();
+            mem.stop(true);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
index 2b57223..4b5327b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite.java
@@ -18,21 +18,17 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
-import org.apache.ignite.internal.pagemem.impl.PageMemoryNoLoadSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistence;
+import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheConfigurationFileConsistencyCheckTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheObjectBinaryProcessorOnDiscoveryTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsDestroyCacheTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsDestroyCacheWithoutCheckpointsTest;
-import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsCacheConfigurationFileConsistencyCheckTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsDynamicCacheTest;
-import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsRemoveDuringRebalancingTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsSingleNodePutGetPersistenceTest;
-import org.apache.ignite.internal.processors.cache.persistence.IgnitePersistenceSequentialCheckpointTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsCacheRestoreTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsDataRegionMetricsTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsWithTtlTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.file.DefaultPageSizeBackwardsCompatibilityTest;
-import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsCheckpointSimpleTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsCheckpointSimulationWithRealCpDisabledTest;
 import org.apache.ignite.internal.processors.cache.persistence.db.file.IgnitePdsPageReplacementTest;
 import org.apache.ignite.internal.processors.cache.persistence.metastorage.IgniteMetaStorageBasicTest;
@@ -40,17 +36,14 @@ import org.apache.ignite.internal.processors.cache.persistence.pagemem.BPlusTree
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.BPlusTreeReuseListPageMemoryImplTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.FillFactorMetricTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.IndexStoragePageMemoryImplTest;
-import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageIdDistributionTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImplNoLoadTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImplTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryNoStoreLeakTest;
 import org.apache.ignite.internal.processors.cache.persistence.pagemem.PagesWriteThrottleSmokeTest;
-import org.apache.ignite.internal.processors.cache.persistence.tree.io.TrackingPageIOTest;
 import org.apache.ignite.internal.processors.cache.persistence.wal.CpTriggeredWalDeltaConsistencyTest;
 import org.apache.ignite.internal.processors.cache.persistence.wal.ExplicitWalDeltaConsistencyTest;
 import org.apache.ignite.internal.processors.cache.persistence.wal.SegmentedRingByteBufferTest;
 import org.apache.ignite.internal.processors.cache.persistence.wal.SysPropWalDeltaConsistencyTest;
-import org.apache.ignite.internal.processors.cache.persistence.wal.aware.SegmentAware;
 import org.apache.ignite.internal.processors.cache.persistence.wal.aware.SegmentAwareTest;
 import org.apache.ignite.internal.processors.database.IgniteDbDynamicCacheSelfTest;
 import org.apache.ignite.internal.processors.database.IgniteDbMultiNodePutGetTest;

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
index 2e6a439..c164635 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
+import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsRecoveryAfterFileCorruptionTest;
 import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsTaskCancelingTest;
@@ -41,6 +42,8 @@ public class IgnitePdsTestSuite4 extends TestSuite {
 
         suite.addTestSuite(IgnitePdsTaskCancelingTest.class);
 
+        suite.addTestSuite(IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse.class);
+
         return suite;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f9faf1e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
index 4c64264..fe77da3 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
@@ -218,7 +218,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
             if (page != 0L)
                 pageMem.releasePage(CACHE_ID, pageId, page);
 
-            pageMem.stop();
+            pageMem.stop(true);
         }
     }
 
@@ -345,7 +345,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
         finally {
             if (page != 0L)
                 pageMem.releasePage(CACHE_ID, pageId, page);
-            pageMem.stop();
+            pageMem.stop(true);
         }
     }
 
@@ -403,7 +403,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
         finally {
             if (page != 0L)
                 pageMem.releasePage(CACHE_ID, pageId, page);
-            pageMem.stop();
+            pageMem.stop(true);
         }
     }
 
@@ -461,7 +461,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
         finally {
             if (page != 0L)
                 pageMem.releasePage(CACHE_ID, pageId, page);
-            pageMem.stop();
+            pageMem.stop(true);
         }
     }
 
@@ -582,7 +582,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
             if (page != 0L)
                 pageMem.releasePage(CACHE_ID, pageId, page);
 
-            pageMem.stop();
+            pageMem.stop(true);
         }
     }
 


[24/50] [abbrv] ignite git commit: IGNITE-7251 Remove term "fabric" from Ignite deliverables

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/dependencies-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-hadoop.xml b/assembly/dependencies-hadoop.xml
deleted file mode 100644
index 076f09c..0000000
--- a/assembly/dependencies-hadoop.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>dependencies</id>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <moduleSets>
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-spark</include>
-                <include>org.apache.ignite:ignite-spring</include>
-                <include>org.apache.ignite:ignite-log4j</include>
-                <include>org.apache.ignite:ignite-indexing</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>true</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <excludes>
-                            <exclude>hadoop*.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-core</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>false</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-hadoop</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>true</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>${basedir}</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>README.txt</include>
-                            <include>licenses/**</include>
-                        </includes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>${basedir}/target/licenses</directory>
-                        <outputDirectory>/licenses</outputDirectory>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target/libs</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <excludes>
-                            <exclude>hadoop*.jar</exclude>
-                            <exclude>log4j*.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-    </moduleSets>
-
-    <fileSets>
-        <fileSet>
-            <directory>modules/core/licenses</directory>
-            <outputDirectory>/licenses</outputDirectory>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/libs/README.txt
----------------------------------------------------------------------
diff --git a/assembly/libs/README.txt b/assembly/libs/README.txt
index 8e5f519..1365cc1 100644
--- a/assembly/libs/README.txt
+++ b/assembly/libs/README.txt
@@ -22,10 +22,10 @@ Importing Ignite Dependencies In Maven Project
 
 If you are using Maven to manage dependencies of your project, there are two options:
 
-1. Import fabric edition:
-  - ignite-fabric (all inclusive)
+1. Import:
+  - apache-ignite (all inclusive)
 
-Here is how 'ignite-fabric' can be added to your POM file (replace '${ignite.version}'
+Here is how 'apache-ignite' can be added to your POM file (replace '${ignite.version}'
 with actual Ignite version you are interested in):
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -37,7 +37,7 @@ with actual Ignite version you are interested in):
         ...
         <dependency>
             <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-fabric</artifactId>
+            <artifactId>apache-ignite</artifactId>
             <version>${ignite.version}</version>
         </dependency>
         ...

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-apache-ignite-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-apache-ignite-base.xml b/assembly/release-apache-ignite-base.xml
new file mode 100644
index 0000000..73c05be
--- /dev/null
+++ b/assembly/release-apache-ignite-base.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~  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.
+  -->
+
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2
+           http://maven.apache.org/xsd/component-1.1.2.xsd">
+    <files>
+        <!-- Copy CPP files. -->
+        <file>
+            <source>modules/platforms/cpp/project/vs/ignite.slnrel</source>
+            <outputDirectory>/platforms/cpp/project/vs</outputDirectory>
+            <destName>ignite.sln</destName>
+        </file>
+
+        <file>
+            <source>modules/platforms/cpp/project/vs/ignite_x86.slnrel</source>
+            <outputDirectory>/platforms/cpp/project/vs</outputDirectory>
+            <destName>ignite_x86.sln</destName>
+        </file>
+
+        <file>
+            <source>modules/platforms/cpp/configure.acrel</source>
+            <outputDirectory>/platforms/cpp</outputDirectory>
+            <destName>configure.ac</destName>
+        </file>
+
+        <file>
+            <source>modules/platforms/cpp/Makefile.amrel</source>
+            <outputDirectory>/platforms/cpp</outputDirectory>
+            <destName>Makefile.am</destName>
+        </file>
+
+        <!-- Other files. -->
+        <file>
+            <source>assembly/LICENSE_IGNITE</source>
+            <destName>LICENSE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
+            <source>assembly/NOTICE_IGNITE</source>
+            <destName>NOTICE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+    </files>
+
+    <fileSets>
+        <!-- Move platforms readme. -->
+        <fileSet>
+            <directory>modules/platforms</directory>
+            <outputDirectory>/platforms</outputDirectory>
+            <includes>
+                <include>README.txt</include>
+            </includes>
+        </fileSet>
+
+        <!-- Move .Net readme. -->
+        <fileSet>
+            <directory>modules/platforms/dotnet</directory>
+            <outputDirectory>/platforms/dotnet</outputDirectory>
+            <includes>
+                <include>README.txt</include>
+            </includes>
+        </fileSet>
+
+        <!-- Move .Net binaries. -->
+        <fileSet>
+            <directory>modules/platforms/dotnet/bin</directory>
+            <outputDirectory>/platforms/dotnet/bin</outputDirectory>
+        </fileSet>
+
+        <!-- Move .Net docs. -->
+        <fileSet>
+            <directory>modules/clients/target/dotnetdoc</directory>
+            <outputDirectory>/platforms/dotnet/docs</outputDirectory>
+        </fileSet>
+
+        <!-- Move .Net examples. -->
+        <fileSet>
+            <directory>modules/platforms/dotnet/examples</directory>
+            <outputDirectory>/platforms/dotnet/examples</outputDirectory>
+        </fileSet>
+
+        <!-- Move .Net licenses. -->
+        <fileSet>
+            <directory>modules/platforms/licenses</directory>
+            <outputDirectory>/platforms/dotnet/licenses</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP readme. -->
+        <fileSet>
+            <directory>modules/platforms/cpp</directory>
+            <outputDirectory>/platforms/cpp</outputDirectory>
+            <includes>
+                <include>README.txt</include>
+                <include>DEVNOTES.txt</include>
+            </includes>
+        </fileSet>
+
+        <!-- Move CPP "common" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/common</directory>
+            <outputDirectory>/platforms/cpp/common</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "jni" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/jni</directory>
+            <outputDirectory>/platforms/cpp/jni</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "core" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/core</directory>
+            <outputDirectory>/platforms/cpp/core</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "ignite" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/ignite</directory>
+            <outputDirectory>/platforms/cpp/ignite</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP examples. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/examples</directory>
+            <outputDirectory>/platforms/cpp/examples</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "odbc" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/odbc</directory>
+            <outputDirectory>/platforms/cpp/odbc</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "binary" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/binary</directory>
+            <outputDirectory>/platforms/cpp/binary</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "thin-client" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/thin-client</directory>
+            <outputDirectory>/platforms/cpp/thin-client</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP licenses. -->
+        <fileSet>
+            <directory>modules/platforms/licenses</directory>
+            <outputDirectory>/platforms/cpp/licenses</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP docs. -->
+        <fileSet>
+            <directory>modules/clients/target/cppdoc/html</directory>
+            <outputDirectory>/platforms/cpp/docs</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP binaries. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/bin</directory>
+            <outputDirectory>/platforms/cpp/bin</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP binaries. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/bin</directory>
+            <outputDirectory>/platforms/cpp/bin</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP binaries. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/bin</directory>
+            <outputDirectory>/platforms/cpp/bin</outputDirectory>
+        </fileSet>
+
+        <!-- Other files. -->
+        <fileSet>
+            <directory>bin</directory>
+            <outputDirectory>/bin</outputDirectory>
+            <includes>
+                <include>igniterouter.bat</include>
+            </includes>
+        </fileSet>
+
+        <fileSet>
+            <directory>bin</directory>
+            <outputDirectory>/bin</outputDirectory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>igniterouter.sh</include>
+            </includes>
+        </fileSet>
+
+        <fileSet>
+            <directory>config/router</directory>
+            <outputDirectory>/config/router</outputDirectory>
+        </fileSet>
+
+        <fileSet>
+            <directory>examples</directory>
+            <outputDirectory>/examples</outputDirectory>
+            <includes>
+                <include>rest/**</include>
+                <include>memcached/**</include>
+                <include>redis/**</include>
+                <include>sql/**</include>
+            </includes>
+        </fileSet>
+
+        <fileSet>
+            <directory>target/javadoc/core</directory>
+            <outputDirectory>/docs/javadoc</outputDirectory>
+        </fileSet>
+
+        <fileSet>
+            <directory>modules/scalar/target/site/scaladocs</directory>
+            <outputDirectory>/docs/scaladoc/scalar</outputDirectory>
+        </fileSet>
+
+        <fileSet>
+            <directory>examples</directory>
+            <outputDirectory>/examples</outputDirectory>
+            <includes>
+                <include>config/**</include>
+                <include>src/**</include>
+            </includes>
+            <excludes>
+                <exclude>**/package.html</exclude>
+                <exclude>src/test/**</exclude>
+            </excludes>
+        </fileSet>
+
+        <fileSet>
+            <directory>assembly/libs</directory>
+            <outputDirectory>/libs</outputDirectory>
+        </fileSet>
+    </fileSets>
+</component>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-apache-ignite-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/release-apache-ignite-hadoop.xml b/assembly/release-apache-ignite-hadoop.xml
new file mode 100644
index 0000000..3f61ec9
--- /dev/null
+++ b/assembly/release-apache-ignite-hadoop.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>hadoop</id>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <componentDescriptors>
+        <componentDescriptor>release-base.xml</componentDescriptor>
+    </componentDescriptors>
+
+    <files>
+        <file>
+            <source>assembly/LICENSE_HADOOP</source>
+            <destName>LICENSE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
+            <source>assembly/NOTICE_HADOOP</source>
+            <destName>NOTICE</destName>
+            <outputDirectory>/</outputDirectory>
+        </file>
+
+        <file>
+            <source>modules/hadoop/config/core-site.ignite.xml</source>
+            <outputDirectory>/config/hadoop</outputDirectory>
+        </file>
+        <file>
+            <source>modules/hadoop/config/mapred-site.ignite.xml</source>
+            <outputDirectory>/config/hadoop</outputDirectory>
+        </file>
+        <file>
+            <source>modules/hadoop/config/hive-site.ignite.xml</source>
+            <outputDirectory>/config/hadoop</outputDirectory>
+        </file>
+
+        <file>
+            <source>modules/hadoop/docs/HADOOP_README.txt</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+    </files>
+
+    <fileSets>
+        <fileSet>
+            <directory>libs</directory>
+            <outputDirectory>/libs</outputDirectory>
+            <excludes>
+                <exclude>optional/**</exclude>
+            </excludes>
+        </fileSet>
+
+        <fileSet>
+            <directory>bin</directory>
+            <outputDirectory>/bin</outputDirectory>
+            <includes>
+                <include>**/*hadoop*.bat</include>
+            </includes>
+        </fileSet>
+
+        <fileSet>
+            <directory>bin</directory>
+            <outputDirectory>/bin</outputDirectory>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>**/*hadoop*.sh</include>
+                <include>**/service.sh</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-apache-ignite-lgpl.xml
----------------------------------------------------------------------
diff --git a/assembly/release-apache-ignite-lgpl.xml b/assembly/release-apache-ignite-lgpl.xml
new file mode 100644
index 0000000..8777ea3
--- /dev/null
+++ b/assembly/release-apache-ignite-lgpl.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>apache-ignite-lgpl</id>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <componentDescriptors>
+        <componentDescriptor>release-base.xml</componentDescriptor>
+        <componentDescriptor>release-apache-ignite-base.xml</componentDescriptor>
+        <componentDescriptor>release-yardstick.xml</componentDescriptor>
+    </componentDescriptors>
+
+    <files>
+        <file>
+            <source>examples/pom-standalone-lgpl.xml</source>
+            <outputDirectory>/examples</outputDirectory>
+            <destName>pom.xml</destName>
+        </file>
+
+        <file>
+            <source>examples/README-LGPL.txt</source>
+            <outputDirectory>/examples</outputDirectory>
+            <destName>README.txt</destName>
+        </file>
+    </files>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-apache-ignite.xml
----------------------------------------------------------------------
diff --git a/assembly/release-apache-ignite.xml b/assembly/release-apache-ignite.xml
new file mode 100644
index 0000000..a815916
--- /dev/null
+++ b/assembly/release-apache-ignite.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>apache-ignite</id>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <componentDescriptors>
+        <componentDescriptor>release-base.xml</componentDescriptor>
+        <componentDescriptor>release-apache-ignite-base.xml</componentDescriptor>
+        <componentDescriptor>release-yardstick.xml</componentDescriptor>
+    </componentDescriptors>
+
+    <files>
+        <file>
+            <source>examples/pom-standalone.xml</source>
+            <outputDirectory>/examples</outputDirectory>
+            <destName>pom.xml</destName>
+        </file>
+
+        <file>
+            <source>examples/README.txt</source>
+            <outputDirectory>/examples</outputDirectory>
+            <destName>README.txt</destName>
+        </file>
+    </files>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-fabric-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric-base.xml b/assembly/release-fabric-base.xml
deleted file mode 100644
index efc643e..0000000
--- a/assembly/release-fabric-base.xml
+++ /dev/null
@@ -1,257 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~  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.
-  -->
-
-<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2
-           http://maven.apache.org/xsd/component-1.1.2.xsd">
-    <files>
-        <!-- Copy CPP files. -->
-        <file>
-            <source>modules/platforms/cpp/project/vs/ignite.slnrel</source>
-            <outputDirectory>/platforms/cpp/project/vs</outputDirectory>
-            <destName>ignite.sln</destName>
-        </file>
-
-        <file>
-            <source>modules/platforms/cpp/project/vs/ignite_x86.slnrel</source>
-            <outputDirectory>/platforms/cpp/project/vs</outputDirectory>
-            <destName>ignite_x86.sln</destName>
-        </file>
-
-        <file>
-            <source>modules/platforms/cpp/configure.acrel</source>
-            <outputDirectory>/platforms/cpp</outputDirectory>
-            <destName>configure.ac</destName>
-        </file>
-
-        <file>
-            <source>modules/platforms/cpp/Makefile.amrel</source>
-            <outputDirectory>/platforms/cpp</outputDirectory>
-            <destName>Makefile.am</destName>
-        </file>
-
-        <!-- Other files. -->
-        <file>
-            <source>assembly/LICENSE_FABRIC</source>
-            <destName>LICENSE</destName>
-            <outputDirectory>/</outputDirectory>
-        </file>
-
-        <file>
-            <source>assembly/NOTICE_FABRIC</source>
-            <destName>NOTICE</destName>
-            <outputDirectory>/</outputDirectory>
-        </file>
-    </files>
-
-    <fileSets>
-        <!-- Move platforms readme. -->
-        <fileSet>
-            <directory>modules/platforms</directory>
-            <outputDirectory>/platforms</outputDirectory>
-            <includes>
-                <include>README.txt</include>
-            </includes>
-        </fileSet>
-
-        <!-- Move .Net readme. -->
-        <fileSet>
-            <directory>modules/platforms/dotnet</directory>
-            <outputDirectory>/platforms/dotnet</outputDirectory>
-            <includes>
-                <include>README.txt</include>
-            </includes>
-        </fileSet>
-
-        <!-- Move .Net binaries. -->
-        <fileSet>
-            <directory>modules/platforms/dotnet/bin</directory>
-            <outputDirectory>/platforms/dotnet/bin</outputDirectory>
-        </fileSet>
-
-        <!-- Move .Net docs. -->
-        <fileSet>
-            <directory>modules/clients/target/dotnetdoc</directory>
-            <outputDirectory>/platforms/dotnet/docs</outputDirectory>
-        </fileSet>
-
-        <!-- Move .Net examples. -->
-        <fileSet>
-            <directory>modules/platforms/dotnet/examples</directory>
-            <outputDirectory>/platforms/dotnet/examples</outputDirectory>
-        </fileSet>
-
-        <!-- Move .Net licenses. -->
-        <fileSet>
-            <directory>modules/platforms/licenses</directory>
-            <outputDirectory>/platforms/dotnet/licenses</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP readme. -->
-        <fileSet>
-            <directory>modules/platforms/cpp</directory>
-            <outputDirectory>/platforms/cpp</outputDirectory>
-            <includes>
-                <include>README.txt</include>
-                <include>DEVNOTES.txt</include>
-            </includes>
-        </fileSet>
-
-        <!-- Move CPP "common" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/common</directory>
-            <outputDirectory>/platforms/cpp/common</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP "jni" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/jni</directory>
-            <outputDirectory>/platforms/cpp/jni</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP "core" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/core</directory>
-            <outputDirectory>/platforms/cpp/core</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP "ignite" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/ignite</directory>
-            <outputDirectory>/platforms/cpp/ignite</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP examples. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/examples</directory>
-            <outputDirectory>/platforms/cpp/examples</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP "odbc" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/odbc</directory>
-            <outputDirectory>/platforms/cpp/odbc</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP "binary" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/binary</directory>
-            <outputDirectory>/platforms/cpp/binary</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP "thin-client" module. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/thin-client</directory>
-            <outputDirectory>/platforms/cpp/thin-client</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP licenses. -->
-        <fileSet>
-            <directory>modules/platforms/licenses</directory>
-            <outputDirectory>/platforms/cpp/licenses</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP docs. -->
-        <fileSet>
-            <directory>modules/clients/target/cppdoc/html</directory>
-            <outputDirectory>/platforms/cpp/docs</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP binaries. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/bin</directory>
-            <outputDirectory>/platforms/cpp/bin</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP binaries. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/bin</directory>
-            <outputDirectory>/platforms/cpp/bin</outputDirectory>
-        </fileSet>
-
-        <!-- Move CPP binaries. -->
-        <fileSet>
-            <directory>modules/platforms/cpp/bin</directory>
-            <outputDirectory>/platforms/cpp/bin</outputDirectory>
-        </fileSet>
-
-        <!-- Other files. -->
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/bin</outputDirectory>
-            <includes>
-                <include>igniterouter.bat</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/bin</outputDirectory>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>igniterouter.sh</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>config/router</directory>
-            <outputDirectory>/config/router</outputDirectory>
-        </fileSet>
-
-        <fileSet>
-            <directory>examples</directory>
-            <outputDirectory>/examples</outputDirectory>
-            <includes>
-                <include>rest/**</include>
-                <include>memcached/**</include>
-                <include>redis/**</include>
-                <include>sql/**</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>target/javadoc/core</directory>
-            <outputDirectory>/docs/javadoc</outputDirectory>
-        </fileSet>
-
-        <fileSet>
-            <directory>modules/scalar/target/site/scaladocs</directory>
-            <outputDirectory>/docs/scaladoc/scalar</outputDirectory>
-        </fileSet>
-
-        <fileSet>
-            <directory>examples</directory>
-            <outputDirectory>/examples</outputDirectory>
-            <includes>
-                <include>config/**</include>
-                <include>src/**</include>
-            </includes>
-            <excludes>
-                <exclude>**/package.html</exclude>
-                <exclude>src/test/**</exclude>
-            </excludes>
-        </fileSet>
-
-        <fileSet>
-            <directory>assembly/libs</directory>
-            <outputDirectory>/libs</outputDirectory>
-        </fileSet>
-    </fileSets>
-</component>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-fabric-lgpl.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric-lgpl.xml b/assembly/release-fabric-lgpl.xml
deleted file mode 100644
index ff4d8c4..0000000
--- a/assembly/release-fabric-lgpl.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>fabric-lgpl</id>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <componentDescriptors>
-        <componentDescriptor>release-base.xml</componentDescriptor>
-        <componentDescriptor>release-fabric-base.xml</componentDescriptor>
-        <componentDescriptor>release-yardstick.xml</componentDescriptor>
-    </componentDescriptors>
-
-    <files>
-        <file>
-            <source>examples/pom-standalone-lgpl.xml</source>
-            <outputDirectory>/examples</outputDirectory>
-            <destName>pom.xml</destName>
-        </file>
-
-        <file>
-            <source>examples/README-LGPL.txt</source>
-            <outputDirectory>/examples</outputDirectory>
-            <destName>README.txt</destName>
-        </file>
-    </files>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric.xml b/assembly/release-fabric.xml
deleted file mode 100644
index 7536d4e..0000000
--- a/assembly/release-fabric.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>fabric</id>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <componentDescriptors>
-        <componentDescriptor>release-base.xml</componentDescriptor>
-        <componentDescriptor>release-fabric-base.xml</componentDescriptor>
-        <componentDescriptor>release-yardstick.xml</componentDescriptor>
-    </componentDescriptors>
-
-    <files>
-        <file>
-            <source>examples/pom-standalone.xml</source>
-            <outputDirectory>/examples</outputDirectory>
-            <destName>pom.xml</destName>
-        </file>
-
-        <file>
-            <source>examples/README.txt</source>
-            <outputDirectory>/examples</outputDirectory>
-            <destName>README.txt</destName>
-        </file>
-    </files>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/release-hadoop.xml b/assembly/release-hadoop.xml
deleted file mode 100644
index 3f61ec9..0000000
--- a/assembly/release-hadoop.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>hadoop</id>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <componentDescriptors>
-        <componentDescriptor>release-base.xml</componentDescriptor>
-    </componentDescriptors>
-
-    <files>
-        <file>
-            <source>assembly/LICENSE_HADOOP</source>
-            <destName>LICENSE</destName>
-            <outputDirectory>/</outputDirectory>
-        </file>
-
-        <file>
-            <source>assembly/NOTICE_HADOOP</source>
-            <destName>NOTICE</destName>
-            <outputDirectory>/</outputDirectory>
-        </file>
-
-        <file>
-            <source>modules/hadoop/config/core-site.ignite.xml</source>
-            <outputDirectory>/config/hadoop</outputDirectory>
-        </file>
-        <file>
-            <source>modules/hadoop/config/mapred-site.ignite.xml</source>
-            <outputDirectory>/config/hadoop</outputDirectory>
-        </file>
-        <file>
-            <source>modules/hadoop/config/hive-site.ignite.xml</source>
-            <outputDirectory>/config/hadoop</outputDirectory>
-        </file>
-
-        <file>
-            <source>modules/hadoop/docs/HADOOP_README.txt</source>
-            <outputDirectory>/</outputDirectory>
-        </file>
-    </files>
-
-    <fileSets>
-        <fileSet>
-            <directory>libs</directory>
-            <outputDirectory>/libs</outputDirectory>
-            <excludes>
-                <exclude>optional/**</exclude>
-            </excludes>
-        </fileSet>
-
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/bin</outputDirectory>
-            <includes>
-                <include>**/*hadoop*.bat</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/bin</outputDirectory>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>**/*hadoop*.sh</include>
-                <include>**/service.sh</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/assembly/release-sources.xml
----------------------------------------------------------------------
diff --git a/assembly/release-sources.xml b/assembly/release-sources.xml
deleted file mode 100644
index cc33f3e..0000000
--- a/assembly/release-sources.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
-  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.
--->
-
-<assembly>
-    <id>source-release</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-
-    <fileSets>
-        <!-- main project directory structure -->
-        <fileSet>
-            <directory>.</directory>
-            <outputDirectory>/</outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <excludes>
-                <!-- build output -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}/.*]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}]</exclude>
-
-                <!-- NOTE: Most of the following excludes should not be required
-                     if the standard release process is followed. This is because the
-                     release plugin checks out project sources into a location like
-                     target/checkout, then runs the build from there. The result is
-                     a source-release archive that comes from a pretty clean directory
-                     structure.
-
-                     HOWEVER, if the release plugin is configured to run extra goals
-                     or generate a project website, it's definitely possible that some
-                     of these files will be present. So, it's safer to exclude them.
-                -->
-
-                <!-- IDEs -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?out(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
-
-                <!-- misc -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
-
-                <!-- release-plugin temp files -->
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
-                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
-
-                <!-- dotnet assemblies -->
-                <exclude>modules/platforms/dotnet/bin/**</exclude>
-            </excludes>
-        </fileSet>
-        <!-- license, readme, etc. calculated at build time -->
-        <fileSet>
-            <directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory>
-            <outputDirectory>/</outputDirectory>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/docker/apache-ignite/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/apache-ignite/Dockerfile b/docker/apache-ignite/Dockerfile
index 15b5c3e..148ce42 100644
--- a/docker/apache-ignite/Dockerfile
+++ b/docker/apache-ignite/Dockerfile
@@ -19,7 +19,7 @@
 FROM openjdk:8-jre-alpine
 
 # Settings
-ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric
+ENV IGNITE_HOME /opt/ignite/apache-ignite
 WORKDIR /opt/ignite
 
 # Add missing software
@@ -27,7 +27,7 @@ RUN apk --no-cache \
     add bash
 
 # Copy main binary archive
-COPY apache-ignite-fabric* apache-ignite-fabric
+COPY apache-ignite* apache-ignite
 
 # Copy sh files and set permission
 COPY run.sh $IGNITE_HOME/

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/docker/apache-ignite/README.txt
----------------------------------------------------------------------
diff --git a/docker/apache-ignite/README.txt b/docker/apache-ignite/README.txt
index 6912bc4..98d67b2 100644
--- a/docker/apache-ignite/README.txt
+++ b/docker/apache-ignite/README.txt
@@ -13,11 +13,11 @@ Build image
 
 3) Copy Apache Ignite's binary archive to Docker module directory
 
-        cp -rfv ../../target/bin/apache-ignite-fabric-*.zip
+        cp -rfv ../../target/bin/apache-ignite-*.zip
 
 4) Unpack Apache Ignite's binary archive
 
-        unzip apache-ignite-fabric-*.zip
+        unzip apache-ignite-*.zip
 
 5) Build docker image
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/examples/README.txt
----------------------------------------------------------------------
diff --git a/examples/README.txt b/examples/README.txt
index 9da74a8..abb5d23 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -36,6 +36,6 @@ There are some ways to gain required libs from sources:
 1) Run "mvn clean install -DskipTests -P lgpl" at Apache Ignite sources.
 This case will install lgpl-based libs to local maven repository.
 
-2) Run "mvn clean package -DskipTests -Prelease,lgpl -Dignite.edition=fabric-lgpl" at Apache Ignite sources.
+2) Run "mvn clean package -DskipTests -Prelease,lgpl -Dignite.edition=apache-ignite-lgpl" at Apache Ignite sources.
 Required libs will appear at /target/release-package/libs/optional subfolders.
 Found libs should be copied to global or project's classpath.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/modules/kubernetes/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/kubernetes/DEVNOTES.txt b/modules/kubernetes/DEVNOTES.txt
index b2a8173..2e3d84d 100644
--- a/modules/kubernetes/DEVNOTES.txt
+++ b/modules/kubernetes/DEVNOTES.txt
@@ -10,7 +10,7 @@ Building Apache Ignite
 =========================
 
 Use the command below to assemble an Apache Ignite binary:
-    mvn clean package -Prelease -Dignite.edition=fabric-lgpl -DskipTests
+    mvn clean package -Prelease -Dignite.edition=apache-ignite-lgpl -DskipTests
 
 Note, if you alter the build instruction somehow make sure to update the files under 'config' folder if needed.
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/modules/kubernetes/config/Dockerfile
----------------------------------------------------------------------
diff --git a/modules/kubernetes/config/Dockerfile b/modules/kubernetes/config/Dockerfile
index 2274535..634e181 100644
--- a/modules/kubernetes/config/Dockerfile
+++ b/modules/kubernetes/config/Dockerfile
@@ -22,7 +22,7 @@ FROM java:8
 ENV IGNITE_VERSION 2.0.0-SNAPSHOT
 
 # Set IGNITE_HOME variable.
-ENV IGNITE_HOME /opt/ignite/apache-ignite-fabric-lgpl-${IGNITE_VERSION}-bin
+ENV IGNITE_HOME /opt/ignite/apache-ignite-lgpl-${IGNITE_VERSION}-bin
 
 # Setting a path to an Apache Ignite configuration file. Used by run.sh script below.
 ENV CONFIG_URI ${IGNITE_HOME}/config/example-kube.xml
@@ -40,11 +40,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends unzip
 WORKDIR /opt/ignite
 
 # Copying local Apache Ignite build to the docker image.
-COPY ./apache-ignite-fabric-lgpl-${IGNITE_VERSION}-bin.zip apache-ignite-fabric-lgpl-${IGNITE_VERSION}-bin.zip
+COPY ./apache-ignite-lgpl-${IGNITE_VERSION}-bin.zip apache-ignite-lgpl-${IGNITE_VERSION}-bin.zip
 
 # Unpacking the build.
-RUN unzip apache-ignite-fabric-lgpl-${IGNITE_VERSION}-bin.zip
-RUN rm apache-ignite-fabric-lgpl-${IGNITE_VERSION}-bin.zip
+RUN unzip apache-ignite-lgpl-${IGNITE_VERSION}-bin.zip
+RUN rm apache-ignite-lgpl-${IGNITE_VERSION}-bin.zip
 
 # Copying the executable file and setting permissions.
 COPY ./run.sh $IGNITE_HOME/

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index a5c711a..1841650 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -37,7 +37,7 @@
     <properties>
         <mesos.version>1.5.0</mesos.version>
         <ignite.version.url>https://ignite.apache.org/latest</ignite.version.url>
-        <ignite.path>/ignite/%s/apache-ignite-fabric-%s-bin.zip</ignite.path>
+        <ignite.path>/ignite/%s/apache-ignite-%s-bin.zip</ignite.path>
         <apache.mirror.url>https://www.apache.org/dyn/closer.cgi?as_json=1</apache.mirror.url>
     </properties>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
index 4cd0c0a..652879e 100644
--- a/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
+++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/resource/IgniteProvider.java
@@ -49,7 +49,7 @@ public class IgniteProvider {
 
     // This constants are set by maven-ant-plugin.
     /** */
-    private static final String DOWNLOAD_URL_PATTERN = "https://archive.apache.org/dist/ignite/%s/apache-ignite-fabric-%s-bin.zip";
+    private static final String DOWNLOAD_URL_PATTERN = "https://archive.apache.org/dist/ignite/%s/apache-ignite-%s-bin.zip";
 
     /** URL for request Ignite latest version. */
     private final static String IGNITE_LATEST_VERSION_URL = "https://ignite.apache.org/latest";

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/packaging/package.sh
----------------------------------------------------------------------
diff --git a/packaging/package.sh b/packaging/package.sh
index def4aeb..d409052 100755
--- a/packaging/package.sh
+++ b/packaging/package.sh
@@ -37,7 +37,7 @@ usage () {
 #######################################################################
 
 Prerequisites:
-     - RPM: binary archive with name 'apache-ignite-fabric-<version>-bin.zip'
+     - RPM: binary archive with name 'apache-ignite-<version>-bin.zip'
      - DEB: previously built corresponding RPM package
 
 Usage: ./$(basename ${BASH_SOURCE[0]}) --rpm,--deb [--batch]
@@ -95,7 +95,7 @@ prepEnv () {
 getBin () {
     set -x
     IGNITE_VERSION=$(cat rpm/apache-ignite.spec | grep Version: | head -1 | sed -r 's|.*:\s+(.*)|\1|')
-    BIN_NAME="apache-ignite-fabric-${IGNITE_VERSION}-bin.zip"
+    BIN_NAME="apache-ignite-${IGNITE_VERSION}-bin.zip"
     binPreparedFlag=false
 
     # Search binary in packaging root directory 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/packaging/rpm/apache-ignite.spec
----------------------------------------------------------------------
diff --git a/packaging/rpm/apache-ignite.spec b/packaging/rpm/apache-ignite.spec
index 18ffea1..90fa870 100644
--- a/packaging/rpm/apache-ignite.spec
+++ b/packaging/rpm/apache-ignite.spec
@@ -17,7 +17,7 @@ Summary:          Apache Ignite In-Memory Computing, Database and Caching Platfo
 Group:            Development/System
 License:          ASL 2.0
 URL:              https://ignite.apache.org/
-Source:           %{name}-fabric-%{version}-bin.zip
+Source:           %{name}-%{version}-bin.zip
 Requires:         java-1.8.0, chkconfig
 Requires(pre):    shadow-utils
 Provides:         %{name}
@@ -36,7 +36,7 @@ in-memory speeds at petabyte scale
 # Prepare step: unpack sources
 #
 
-%setup -q -n %{name}-fabric-%{version}-bin
+%setup -q -n %{name}-%{version}-bin
 
 
 #%pre

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index cc04175..412e81e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -36,7 +36,7 @@
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
 
-        <ignite.edition>fabric</ignite.edition>
+        <ignite.edition>apache-ignite</ignite.edition>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <maven.build.timestamp.format>MMMM d yyyy</maven.build.timestamp.format>
         <doxygen.exec>doxygen</doxygen.exec>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7989173b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ffedd71..ace8e8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,16 +30,10 @@
         <relativePath>parent</relativePath>
     </parent>
 
-    <groupId>org.apache.ignite</groupId>
     <artifactId>apache-ignite</artifactId>
     <version>2.7.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <properties>
-        <!--fix <attachartifact>...< /> at apache-release profile if changed-->
-        <ignite.zip.pattern>${project.artifactId}-${ignite.edition}-${project.version}-bin</ignite.zip.pattern>
-    </properties>
-
     <scm>
         <url>https://git-wip-us.apache.org/repos/asf/ignite</url>
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/ignite</connection>
@@ -396,15 +390,15 @@
                                             <include name="**/*.sh" />
                                         </fixcrlf>
 
-                                        <zip destfile="${basedir}/target/bin/${ignite.zip.pattern}.zip" encoding="UTF-8">
-                                            <zipfileset dir="${basedir}/target/release-package-${ignite.edition}" prefix="${ignite.zip.pattern}" filemode="755">
+                                        <zip destfile="${basedir}/target/bin/${ignite.edition}-${project.version}-bin.zip" encoding="UTF-8">
+                                            <zipfileset dir="${basedir}/target/release-package-${ignite.edition}" prefix="${ignite.edition}-${project.version}-bin" filemode="755">
                                                 <include name="**/*.sh" />
                                                 <include name="**/configure" />
                                                 <include name="**/install-sh" />
                                                 <include name="**/compile" />
                                                 <include name="**/missing" />
                                             </zipfileset>
-                                            <zipfileset dir="${basedir}/target/release-package-${ignite.edition}" prefix="${ignite.zip.pattern}">
+                                            <zipfileset dir="${basedir}/target/release-package-${ignite.edition}" prefix="${ignite.edition}-${project.version}-bin">
                                                 <exclude name="**/*.sh" />
                                                 <exclude name="**/configure" />
                                                 <exclude name="**/install-sh" />
@@ -574,35 +568,6 @@
         </profile>
 
         <profile>
-            <id>release-sources</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>source-release-assembly-ignite</id>
-                                <phase>validate</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
-                                    <descriptors>
-                                        <descriptor>assembly/release-sources.xml</descriptor>
-                                    </descriptors>
-                                    <tarLongFileMode>gnu</tarLongFileMode>
-                                    <finalName>${project.artifactId}-${project.version}-src</finalName>
-                                    <appendAssemblyId>false</appendAssemblyId>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <profile>
             <id>web-console</id>
             <modules>
                 <module>modules/web-console</module>


[26/50] [abbrv] ignite git commit: IGNITE-9723 Use blockingSectionBegin method to wrap exchange future

Posted by ag...@apache.org.
IGNITE-9723 Use blockingSectionBegin method to wrap exchange future

Signed-off-by: Andrey Gura <ag...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9aef6090
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9aef6090
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9aef6090

Branch: refs/heads/ignite-5797
Commit: 9aef609022fa0a85e7fa23ab2c0d8ec25b1906d8
Parents: 7989173
Author: Maxim Muzafarov <ma...@gmail.com>
Authored: Mon Oct 1 16:03:24 2018 +0300
Committer: Andrey Gura <ag...@apache.org>
Committed: Mon Oct 1 16:03:24 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCachePartitionExchangeManager.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9aef6090/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 731822b..4c254b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -2681,7 +2681,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                                         ? Math.min(curTimeout, dumpTimeout)
                                         : dumpTimeout;
 
-                                    blockingSectionEnd();
+                                    blockingSectionBegin();
 
                                     try {
                                         resVer = exchFut.get(exchTimeout, TimeUnit.MILLISECONDS);


[47/50] [abbrv] ignite git commit: Fixed messages

Posted by ag...@apache.org.
Fixed messages


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/987ba6ba
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/987ba6ba
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/987ba6ba

Branch: refs/heads/ignite-5797
Commit: 987ba6ba7603bff6359b4521984eeb0843b8cc36
Parents: 3dd9a3a
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Thu Oct 4 16:25:09 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Thu Oct 4 16:25:09 2018 +0300

----------------------------------------------------------------------
 .../GridDistributedTxFinishRequest.java         | 16 ++---
 .../GridDistributedTxFinishResponse.java        | 12 ++--
 .../GridDistributedTxPrepareRequest.java        | 20 +++---
 .../GridDistributedTxPrepareResponse.java       |  8 +--
 .../distributed/dht/GridDhtTxFinishRequest.java | 32 ++++++---
 .../dht/GridDhtTxPrepareRequest.java            | 72 ++++++++++++--------
 .../near/GridNearTxFinishRequest.java           | 16 ++++-
 .../near/GridNearTxPrepareResponse.java         | 36 +++++++---
 8 files changed, 134 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
index d552b95..cde92f3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
@@ -365,25 +365,25 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeByte("flags", flags))
+                if (!writer.writeMessage("eventsTrace", eventsTrace))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeByte("flags", flags))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeBoolean("invalidate", invalidate))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 13:
-                if (!writer.writeMessage("eventsTrace", eventsTrace))
+                if (!writer.writeBoolean("invalidate", invalidate))
                     return false;
 
                 writer.incrementState();
@@ -477,7 +477,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 10:
-                flags = reader.readByte("flags");
+                eventsTrace = reader.readMessage("eventsTrace");
 
                 if (!reader.isLastRead())
                     return false;
@@ -485,7 +485,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 11:
-                futId = reader.readIgniteUuid("futId");
+                flags = reader.readByte("flags");
 
                 if (!reader.isLastRead())
                     return false;
@@ -493,7 +493,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 12:
-                invalidate = reader.readBoolean("invalidate");
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -501,7 +501,7 @@ public class GridDistributedTxFinishRequest extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 13:
-                eventsTrace = reader.readMessage("eventsTrace");
+                invalidate = reader.readBoolean("invalidate");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
index 7e09d4b..eb8bee0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
@@ -165,19 +165,19 @@ public class GridDistributedTxFinishResponse extends GridCacheMessage implements
 
         switch (writer.state()) {
             case 2:
-                if (!writer.writeByte("flags", flags))
+                if (!writer.writeMessage("eventsTrace", eventsTrace))
                     return false;
 
                 writer.incrementState();
 
             case 3:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeByte("flags", flags))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeMessage("eventsTrace", eventsTrace))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
@@ -211,7 +211,7 @@ public class GridDistributedTxFinishResponse extends GridCacheMessage implements
 
         switch (reader.state()) {
             case 2:
-                flags = reader.readByte("flags");
+                eventsTrace = reader.readMessage("eventsTrace");
 
                 if (!reader.isLastRead())
                     return false;
@@ -219,7 +219,7 @@ public class GridDistributedTxFinishResponse extends GridCacheMessage implements
                 reader.incrementState();
 
             case 3:
-                futId = reader.readIgniteUuid("futId");
+                flags = reader.readByte("flags");
 
                 if (!reader.isLastRead())
                     return false;
@@ -227,7 +227,7 @@ public class GridDistributedTxFinishResponse extends GridCacheMessage implements
                 reader.incrementState();
 
             case 4:
-                eventsTrace = reader.readMessage("eventsTrace");
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index db73179..8aa3111 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -545,19 +545,19 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
                 writer.incrementState();
 
             case 10:
-                if (!writer.writeByte("flags", flags))
+                if (!writer.writeMessage("eventsTrace", eventsTrace))
                     return false;
 
                 writer.incrementState();
 
             case 11:
-                if (!writer.writeByte("isolation", isolation != null ? (byte)isolation.ordinal() : -1))
+                if (!writer.writeByte("flags", flags))
                     return false;
 
                 writer.incrementState();
 
             case 12:
-                if (!writer.writeMessage("eventsTrace", eventsTrace))
+                if (!writer.writeByte("isolation", isolation != null ? (byte)isolation.ordinal() : -1))
                     return false;
 
                 writer.incrementState();
@@ -655,7 +655,7 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 10:
-                flags = reader.readByte("flags");
+                eventsTrace = reader.readMessage("eventsTrace");
 
                 if (!reader.isLastRead())
                     return false;
@@ -663,23 +663,23 @@ public class GridDistributedTxPrepareRequest extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 11:
-                byte isolationOrd;
-
-                isolationOrd = reader.readByte("isolation");
+                flags = reader.readByte("flags");
 
                 if (!reader.isLastRead())
                     return false;
 
-                isolation = TransactionIsolation.fromOrdinal(isolationOrd);
-
                 reader.incrementState();
 
             case 12:
-                eventsTrace = reader.readMessage("eventsTrace");
+                byte isolationOrd;
+
+                isolationOrd = reader.readByte("isolation");
 
                 if (!reader.isLastRead())
                     return false;
 
+                isolation = TransactionIsolation.fromOrdinal(isolationOrd);
+
                 reader.incrementState();
 
             case 13:

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
index da87c03..7751ce9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareResponse.java
@@ -217,13 +217,13 @@ public class GridDistributedTxPrepareResponse extends GridDistributedBaseMessage
                 writer.incrementState();
 
             case 8:
-                if (!writer.writeByte("flags", flags))
+                if (!writer.writeMessage("eventsTrace", eventsTrace))
                     return false;
 
                 writer.incrementState();
 
             case 9:
-                if (!writer.writeMessage("eventsTrace", eventsTrace))
+                if (!writer.writeByte("flags", flags))
                     return false;
 
                 writer.incrementState();
@@ -259,7 +259,7 @@ public class GridDistributedTxPrepareResponse extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 8:
-                flags = reader.readByte("flags");
+                eventsTrace = reader.readMessage("eventsTrace");
 
                 if (!reader.isLastRead())
                     return false;
@@ -267,7 +267,7 @@ public class GridDistributedTxPrepareResponse extends GridDistributedBaseMessage
                 reader.incrementState();
 
             case 9:
-                eventsTrace = reader.readMessage("eventsTrace");
+                flags = reader.readByte("flags");
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index c305f97..93f0951 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -413,25 +413,25 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 writer.incrementState();
 
             case 24:
-                if (!writer.writeUuid("nearNodeId", nearNodeId))
+                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
                     return false;
 
                 writer.incrementState();
 
             case 25:
-                if (!writer.writeMessage("partUpdateCnt", partUpdateCnt))
+                if (!writer.writeUuid("nearNodeId", nearNodeId))
                     return false;
 
                 writer.incrementState();
 
             case 26:
-                if (!writer.writeCollection("pendingVers", pendingVers, MessageCollectionItemType.MSG))
+                if (!writer.writeMessage("partUpdateCnt", partUpdateCnt))
                     return false;
 
                 writer.incrementState();
 
             case 27:
-                if (!writer.writeMessage("writeVer", writeVer))
+                if (!writer.writeCollection("pendingVers", pendingVers, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
@@ -442,6 +442,12 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 writer.incrementState();
 
+            case 29:
+                if (!writer.writeMessage("writeVer", writeVer))
+                    return false;
+
+                writer.incrementState();
+
         }
 
         return true;
@@ -479,7 +485,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 reader.incrementState();
 
             case 24:
-                nearNodeId = reader.readUuid("nearNodeId");
+                mvccSnapshot = reader.readMessage("mvccSnapshot");
 
                 if (!reader.isLastRead())
                     return false;
@@ -487,7 +493,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 reader.incrementState();
 
             case 25:
-                partUpdateCnt = reader.readMessage("partUpdateCnt");
+                nearNodeId = reader.readUuid("nearNodeId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -495,7 +501,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 reader.incrementState();
 
             case 26:
-                pendingVers = reader.readCollection("pendingVers", MessageCollectionItemType.MSG);
+                partUpdateCnt = reader.readMessage("partUpdateCnt");
 
                 if (!reader.isLastRead())
                     return false;
@@ -503,7 +509,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
                 reader.incrementState();
 
             case 27:
-                writeVer = reader.readMessage("writeVer");
+                pendingVers = reader.readCollection("pendingVers", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -518,6 +524,14 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 reader.incrementState();
 
+            case 29:
+                writeVer = reader.readMessage("writeVer");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
         }
 
         return reader.afterMessageRead(GridDhtTxFinishRequest.class);
@@ -530,7 +544,7 @@ public class GridDhtTxFinishRequest extends GridDistributedTxFinishRequest {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 29;
+        return 30;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index 37ba055..90f0208 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -433,85 +433,91 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
 
         switch (writer.state()) {
             case 21:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeCollection("counters", counters, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 22:
-                if (!writer.writeBitSet("invalidateNearEntries", invalidateNearEntries))
+                if (!writer.writeIgniteUuid("futId", futId))
                     return false;
 
                 writer.incrementState();
 
             case 23:
-                if (!writer.writeInt("miniId", miniId))
+                if (!writer.writeBitSet("invalidateNearEntries", invalidateNearEntries))
                     return false;
 
                 writer.incrementState();
 
             case 24:
-                if (!writer.writeUuid("nearNodeId", nearNodeId))
+                if (!writer.writeInt("miniId", miniId))
                     return false;
 
                 writer.incrementState();
 
             case 25:
-                if (!writer.writeCollection("nearWrites", nearWrites, MessageCollectionItemType.MSG))
+                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
                     return false;
 
                 writer.incrementState();
 
             case 26:
-                if (!writer.writeMessage("nearXidVer", nearXidVer))
+                if (!writer.writeUuid("nearNodeId", nearNodeId))
                     return false;
 
                 writer.incrementState();
 
             case 27:
-                if (!writer.writeCollection("ownedKeys", ownedKeys, MessageCollectionItemType.MSG))
+                if (!writer.writeCollection("nearWrites", nearWrites, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 28:
-                if (!writer.writeCollection("ownedVals", ownedVals, MessageCollectionItemType.MSG))
+                if (!writer.writeMessage("nearXidVer", nearXidVer))
                     return false;
 
                 writer.incrementState();
 
             case 29:
-                if (!writer.writeBitSet("preloadKeys", preloadKeys))
+                if (!writer.writeCollection("ownedKeys", ownedKeys, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 30:
-                if (!writer.writeUuid("subjId", subjId))
+                if (!writer.writeCollection("ownedVals", ownedVals, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 31:
-                if (!writer.writeInt("taskNameHash", taskNameHash))
+                if (!writer.writeBitSet("preloadKeys", preloadKeys))
                     return false;
 
                 writer.incrementState();
 
             case 32:
-                if (!writer.writeMessage("topVer", topVer))
+                if (!writer.writeBoolean("skipCompletedVers", skipCompletedVers))
                     return false;
 
                 writer.incrementState();
 
             case 33:
-                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
+                if (!writer.writeUuid("subjId", subjId))
                     return false;
 
                 writer.incrementState();
 
             case 34:
-                if (!writer.writeCollection("counters", counters, MessageCollectionItemType.MSG))
+                if (!writer.writeInt("taskNameHash", taskNameHash))
+                    return false;
+
+                writer.incrementState();
+
+            case 35:
+                if (!writer.writeMessage("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -533,7 +539,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
 
         switch (reader.state()) {
             case 21:
-                futId = reader.readIgniteUuid("futId");
+                counters = reader.readCollection("counters", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -541,7 +547,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 22:
-                invalidateNearEntries = reader.readBitSet("invalidateNearEntries");
+                futId = reader.readIgniteUuid("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -549,7 +555,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 23:
-                miniId = reader.readInt("miniId");
+                invalidateNearEntries = reader.readBitSet("invalidateNearEntries");
 
                 if (!reader.isLastRead())
                     return false;
@@ -557,7 +563,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 24:
-                nearNodeId = reader.readUuid("nearNodeId");
+                miniId = reader.readInt("miniId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -565,7 +571,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 25:
-                nearWrites = reader.readCollection("nearWrites", MessageCollectionItemType.MSG);
+                mvccSnapshot = reader.readMessage("mvccSnapshot");
 
                 if (!reader.isLastRead())
                     return false;
@@ -573,7 +579,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 26:
-                nearXidVer = reader.readMessage("nearXidVer");
+                nearNodeId = reader.readUuid("nearNodeId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -581,7 +587,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 27:
-                ownedKeys = reader.readCollection("ownedKeys", MessageCollectionItemType.MSG);
+                nearWrites = reader.readCollection("nearWrites", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -589,7 +595,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 28:
-                ownedVals = reader.readCollection("ownedVals", MessageCollectionItemType.MSG);
+                nearXidVer = reader.readMessage("nearXidVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -597,7 +603,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 29:
-                preloadKeys = reader.readBitSet("preloadKeys");
+                ownedKeys = reader.readCollection("ownedKeys", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -605,7 +611,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 30:
-                subjId = reader.readUuid("subjId");
+                ownedVals = reader.readCollection("ownedVals", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -613,7 +619,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 31:
-                taskNameHash = reader.readInt("taskNameHash");
+                preloadKeys = reader.readBitSet("preloadKeys");
 
                 if (!reader.isLastRead())
                     return false;
@@ -621,7 +627,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 32:
-                topVer = reader.readMessage("topVer");
+                skipCompletedVers = reader.readBoolean("skipCompletedVers");
 
                 if (!reader.isLastRead())
                     return false;
@@ -629,7 +635,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 33:
-                mvccSnapshot = reader.readMessage("mvccSnapshot");
+                subjId = reader.readUuid("subjId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -637,7 +643,15 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
                 reader.incrementState();
 
             case 34:
-                counters = reader.readCollection("counters", MessageCollectionItemType.MSG);
+                taskNameHash = reader.readInt("taskNameHash");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 35:
+                topVer = reader.readMessage("topVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -656,7 +670,7 @@ public class GridDhtTxPrepareRequest extends GridDistributedTxPrepareRequest {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 35;
+        return 36;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
index eb9c371..cc06bbf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishRequest.java
@@ -198,6 +198,12 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 writer.incrementState();
 
+            case 23:
+                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
+                    return false;
+
+                writer.incrementState();
+
         }
 
         return true;
@@ -222,6 +228,14 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
 
                 reader.incrementState();
 
+            case 23:
+                mvccSnapshot = reader.readMessage("mvccSnapshot");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
         }
 
         return reader.afterMessageRead(GridNearTxFinishRequest.class);
@@ -234,7 +248,7 @@ public class GridNearTxFinishRequest extends GridDistributedTxFinishRequest {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 23;
+        return 24;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/987ba6ba/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index bc6a021..166287d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@ -411,31 +411,37 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 writer.incrementState();
 
             case 16:
-                if (!writer.writeCollection("ownedValKeys", ownedValKeys, MessageCollectionItemType.MSG))
+                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
                     return false;
 
                 writer.incrementState();
 
             case 17:
-                if (!writer.writeCollection("ownedValVals", ownedValVals, MessageCollectionItemType.MSG))
+                if (!writer.writeCollection("ownedValKeys", ownedValKeys, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 18:
-                if (!writer.writeCollection("pending", pending, MessageCollectionItemType.MSG))
+                if (!writer.writeCollection("ownedValVals", ownedValVals, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 19:
-                if (!writer.writeMessage("retVal", retVal))
+                if (!writer.writeCollection("pending", pending, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 20:
-                if (!writer.writeMessage("mvccSnapshot", mvccSnapshot))
+                if (!writer.writeMessage("retVal", retVal))
+                    return false;
+
+                writer.incrementState();
+
+            case 21:
+                if (!writer.writeMessage("writeVer", writeVer))
                     return false;
 
                 writer.incrementState();
@@ -497,7 +503,7 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 reader.incrementState();
 
             case 16:
-                ownedValKeys = reader.readCollection("ownedValKeys", MessageCollectionItemType.MSG);
+                mvccSnapshot = reader.readMessage("mvccSnapshot");
 
                 if (!reader.isLastRead())
                     return false;
@@ -505,7 +511,7 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 reader.incrementState();
 
             case 17:
-                ownedValVals = reader.readCollection("ownedValVals", MessageCollectionItemType.MSG);
+                ownedValKeys = reader.readCollection("ownedValKeys", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -513,7 +519,7 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 reader.incrementState();
 
             case 18:
-                pending = reader.readCollection("pending", MessageCollectionItemType.MSG);
+                ownedValVals = reader.readCollection("ownedValVals", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -521,7 +527,7 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 reader.incrementState();
 
             case 19:
-                retVal = reader.readMessage("retVal");
+                pending = reader.readCollection("pending", MessageCollectionItemType.MSG);
 
                 if (!reader.isLastRead())
                     return false;
@@ -529,7 +535,15 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
                 reader.incrementState();
 
             case 20:
-                mvccSnapshot = reader.readMessage("mvccSnapshot");
+                retVal = reader.readMessage("retVal");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 21:
+                writeVer = reader.readMessage("writeVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -548,7 +562,7 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 21;
+        return 22;
     }
 
     /** {@inheritDoc} */


[12/50] [abbrv] ignite git commit: IGNITE-7764: MVCC: cache API support. This closes #4725.

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index b8c78bd..9493510 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -62,7 +62,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrep
 import org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtDetachedCacheEntry;
 import org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTrackerImpl;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
@@ -72,6 +71,7 @@ import org.apache.ignite.internal.processors.cache.transactions.TransactionProxy
 import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl;
 import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyRollbackOnlyImpl;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.query.EnlistOperation;
 import org.apache.ignite.internal.processors.query.UpdateSourceIterator;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
 import org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException;
@@ -95,6 +95,7 @@ import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiClosure;
+import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgniteUuid;
@@ -191,11 +192,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     /** */
     private MvccQueryTracker mvccTracker;
 
-    /** Whether this transaction is for SQL operations or not.<p>
+    /** Whether this is Mvcc transaction or not.<p>
      * {@code null} means there haven't been any calls made on this transaction, and first operation will give this
      * field actual value.
      */
-    private Boolean sql;
+    private Boolean mvccOp;
 
     /**
      * Empty constructor required for {@link Externalizable}.
@@ -205,7 +206,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
-     * @param ctx   Cache registry.
+     * @param ctx Cache registry.
      * @param implicit Implicit flag.
      * @param implicitSingle Implicit with one key flag.
      * @param sys System flag.
@@ -214,7 +215,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
      * @param isolation Isolation.
      * @param timeout Timeout.
      * @param storeEnabled Store enabled flag.
-     * @param sql Whether this transaction was started via SQL API or not, or {@code null} if unknown.
+     * @param mvccOp Whether this transaction was started via SQL API or not, or {@code null} if unknown.
      * @param txSize Transaction size.
      * @param subjId Subject ID.
      * @param taskNameHash Task name hash code.
@@ -230,7 +231,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         TransactionIsolation isolation,
         long timeout,
         boolean storeEnabled,
-        Boolean sql,
+        Boolean mvccOp,
         int txSize,
         @Nullable UUID subjId,
         int taskNameHash,
@@ -257,7 +258,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
 
         mappings = implicitSingle ? new IgniteTxMappingsSingleImpl() : new IgniteTxMappingsImpl();
 
-        this.sql = sql;
+        this.mvccOp = mvccOp;
 
         initResult();
 
@@ -574,6 +575,10 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     ) {
         assert key != null;
 
+        if (cacheCtx.mvccEnabled())
+            return mvccPutAllAsync0(cacheCtx, Collections.singletonMap(key, val),
+                entryProcessor == null ? null : Collections.singletonMap(key, entryProcessor), invokeArgs, retval, filter);
+
         try {
             beforePut(cacheCtx, retval, false);
 
@@ -628,7 +633,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                 if (log.isDebugEnabled())
                     log.debug("Before acquiring transaction lock for put on key: " + enlisted);
 
-                IgniteInternalFuture<Boolean>fut = cacheCtx.cache().txLockAsync(enlisted,
+                IgniteInternalFuture<Boolean> fut = cacheCtx.cache().txLockAsync(enlisted,
                     timeout,
                     this,
                     /*read*/entryProcessor != null, // Needed to force load from store.
@@ -696,6 +701,142 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
+     * Validate Tx mode.
+     *
+     * @param ctx Cache context.
+     * @throws IgniteCheckedException If tx mode is not supported.
+     */
+    protected void validateTxMode(GridCacheContext ctx) throws IgniteCheckedException {
+        if(!ctx.mvccEnabled() || pessimistic() && repeatableRead())
+            return;
+
+        throw new IgniteCheckedException("Only pessimistic repeatable read transactions are supported at the moment.");
+    }
+
+    /**
+     * Internal method for put and transform operations in Mvcc mode.
+     * Note: Only one of {@code map}, {@code transformMap} maps must be non-null.
+     *
+     * @param cacheCtx Context.
+     * @param map Key-value map to store.
+     * @param invokeMap Invoke map.
+     * @param invokeArgs Optional arguments for EntryProcessor.
+     * @param retval Key-transform value map to store.
+     * @param filter Filter.
+     * @return Operation future.
+     */
+    private <K, V> IgniteInternalFuture mvccPutAllAsync0(
+        final GridCacheContext cacheCtx,
+        @Nullable Map<? extends K, ? extends V> map,
+        @Nullable Map<? extends K, ? extends EntryProcessor<K, V, Object>> invokeMap,
+        @Nullable final Object[] invokeArgs,
+        final boolean retval,
+        @Nullable final CacheEntryPredicate filter
+    ) {
+        try {
+            validateTxMode(cacheCtx);
+
+            // TODO: IGNITE-9540: Fix invoke/invokeAll.
+            if(invokeMap != null)
+                MvccUtils.verifyMvccOperationSupport(cacheCtx, "invoke/invokeAll");
+
+            if (mvccSnapshot == null) {
+                MvccUtils.mvccTracker(cacheCtx, this);
+
+                assert mvccSnapshot != null;
+            }
+
+            beforePut(cacheCtx, retval, true);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
+
+        // Cached entry may be passed only from entry wrapper.
+        final Map<?, ?> map0 = map;
+        final Map<?, EntryProcessor<K, V, Object>> invokeMap0 = (Map<K, EntryProcessor<K, V, Object>>)invokeMap;
+
+        if (log.isDebugEnabled())
+            log.debug("Called putAllAsync(...) [tx=" + this + ", map=" + map0 + ", retval=" + retval + "]");
+
+        assert map0 != null || invokeMap0 != null;
+
+        if (F.isEmpty(map0) && F.isEmpty(invokeMap0)) {
+            if (implicit())
+                try {
+                    commit();
+                }
+                catch (IgniteCheckedException e) {
+                    return new GridFinishedFuture<>(e);
+                }
+
+            return new GridFinishedFuture<>(new GridCacheReturn(true, false));
+        }
+
+        try {
+            // Set transform flag for transaction.
+            if (invokeMap != null)
+                transform = true;
+
+            Set<?> keys = map0 != null ? map0.keySet() : invokeMap0.keySet();
+
+            final Map<KeyCacheObject, CacheObject> enlisted = new HashMap<>(keys.size());
+
+            for (Object key : keys) {
+                if (isRollbackOnly())
+                    return new GridFinishedFuture<>(timedOut() ? timeoutException() : rollbackException());
+
+                if (key == null) {
+                    rollback();
+
+                    throw new NullPointerException("Null key.");
+                }
+
+                Object val = map0 == null ? null : map0.get(key);
+                EntryProcessor entryProcessor = transform ? invokeMap.get(key) : null;
+
+                if (val == null && entryProcessor == null) {
+                    setRollbackOnly();
+
+                    throw new NullPointerException("Null value.");
+                }
+
+                KeyCacheObject cacheKey = cacheCtx.toCacheKeyObject(key);
+                CacheObject cacheVal = cacheCtx.toCacheObject(val);
+
+                enlisted.put(cacheKey, cacheVal);
+            }
+
+            return updateAsync(cacheCtx, new UpdateSourceIterator<IgniteBiTuple<KeyCacheObject, CacheObject>>() {
+
+                private Iterator<Map.Entry<KeyCacheObject, CacheObject>> it = enlisted.entrySet().iterator();
+
+                @Override public EnlistOperation operation() {
+                    return EnlistOperation.UPSERT;
+                }
+
+                @Override public boolean hasNextX() throws IgniteCheckedException {
+                    return it.hasNext();
+                }
+
+                @Override public IgniteBiTuple<KeyCacheObject, CacheObject> nextX() throws IgniteCheckedException {
+                    Map.Entry<KeyCacheObject, CacheObject> next = it.next();
+
+                    return new IgniteBiTuple<>(next.getKey(), next.getValue());
+                }
+            }, retval, filter, remainingTime(), true);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
+        catch (RuntimeException e) {
+            onException();
+
+            throw e;
+        }
+    }
+
+    /**
      * Internal method for all put and transform operations. Only one of {@code map}, {@code transformMap}
      * maps must be non-null.
      *
@@ -717,6 +858,9 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         @Nullable Map<KeyCacheObject, GridCacheDrInfo> drMap,
         final boolean retval
     ) {
+        if (cacheCtx.mvccEnabled())
+            return mvccPutAllAsync0(cacheCtx, map, invokeMap, invokeArgs, retval, null);
+
         try {
             beforePut(cacheCtx, retval, false);
         }
@@ -1549,6 +1693,9 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         final boolean retval,
         @Nullable final CacheEntryPredicate filter,
         boolean singleRmv) {
+        if(cacheCtx.mvccEnabled())
+            return mvccRemoveAllAsync0(cacheCtx, keys, retval, filter);
+
         try {
             checkUpdatesAllowed(cacheCtx);
         }
@@ -1558,9 +1705,6 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
 
         cacheCtx.checkSecurity(SecurityPermission.CACHE_REMOVE);
 
-        if (cacheCtx.mvccEnabled() && !isOperationAllowed(false))
-            return txTypeMismatchFinishFuture();
-
         if (retval)
             needReturnValue(true);
 
@@ -1690,9 +1834,9 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                 -1L);
 
             PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
+                /** {@inheritDoc} */
                 @Override protected GridCacheReturn postLock(GridCacheReturn ret)
-                    throws IgniteCheckedException
-                {
+                    throws IgniteCheckedException {
                     if (log.isDebugEnabled())
                         log.debug("Acquired transaction lock for remove on keys: " + enlisted);
 
@@ -1769,6 +1913,93 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
+     * Internal method for remove operations in Mvcc mode.
+     *
+     * @param cacheCtx Cache context.
+     * @param keys Keys to remove.
+     * @param retval Flag indicating whether a value should be returned.
+     * @param filter Filter.
+     * @return Future for asynchronous remove.
+     */
+    @SuppressWarnings("unchecked")
+    private <K, V> IgniteInternalFuture<GridCacheReturn> mvccRemoveAllAsync0(
+        final GridCacheContext cacheCtx,
+        @Nullable final Collection<? extends K> keys,
+        final boolean retval,
+        @Nullable final CacheEntryPredicate filter
+    ) {
+        try {
+            validateTxMode(cacheCtx);
+
+            if (mvccSnapshot == null) {
+                MvccUtils.mvccTracker(cacheCtx, this);
+
+                assert mvccSnapshot != null;
+            }
+
+            beforeRemove(cacheCtx, retval, true);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
+
+        if (F.isEmpty(keys)) {
+            if (implicit()) {
+                try {
+                    commit();
+                }
+                catch (IgniteCheckedException e) {
+                    return new GridFinishedFuture<>(e);
+                }
+            }
+
+            return new GridFinishedFuture<>(new GridCacheReturn(localResult(), true));
+        }
+
+        init();
+
+        Set<KeyCacheObject> enlisted = new HashSet<>(keys.size());
+
+        try {
+            for (Object key : keys) {
+                if (isRollbackOnly())
+                    return new GridFinishedFuture<>(timedOut() ? timeoutException() : rollbackException());
+
+                if (key == null) {
+                    rollback();
+
+                    throw new NullPointerException("Null key.");
+                }
+
+                KeyCacheObject cacheKey = cacheCtx.toCacheKeyObject(key);
+
+                enlisted.add(cacheKey);
+            }
+
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
+
+        return updateAsync(cacheCtx, new UpdateSourceIterator<KeyCacheObject>() {
+
+            private Iterator<KeyCacheObject> it = enlisted.iterator();
+
+            @Override public EnlistOperation operation() {
+                return EnlistOperation.DELETE;
+            }
+
+            @Override public boolean hasNextX() throws IgniteCheckedException {
+                return it.hasNext();
+            }
+
+            @Override public KeyCacheObject nextX() throws IgniteCheckedException {
+                return it.next();
+            }
+        }, retval, filter, remainingTime(), true);
+    }
+
+    /**
      * @param cctx Cache context.
      * @return Mvcc snapshot for read inside tx (initialized once for OPTIMISTIC SERIALIZABLE and REPEATABLE_READ txs).
      */
@@ -1846,10 +2077,67 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
+     * Executes key-value update operation in Mvcc mode.
+     *
+     * @param cacheCtx Cache context.
+     * @param it Entries iterator.
+     * @param retval Return value flag.
+     * @param filter Filter.
+     * @param timeout Timeout.
+     * @param sequential Sequential locking flag.
+     * @return Operation future.
+     */
+    private IgniteInternalFuture<GridCacheReturn> updateAsync(GridCacheContext cacheCtx,
+        UpdateSourceIterator<?> it,
+        boolean retval,
+        @Nullable CacheEntryPredicate filter,
+        long timeout,
+        boolean sequential) {
+        try {
+            final CacheOperationContext opCtx = cacheCtx.operationContextPerCall();
+
+            final boolean keepBinary = opCtx != null && opCtx.isKeepBinary();
+
+            /* TODO: IGNITE-9688: 'sequential' is always true here which can slowdown bulk operations,
+             but possibly we can safely optimize this. */
+
+            GridNearTxEnlistFuture fut = new GridNearTxEnlistFuture(cacheCtx, this,
+                timeout, it, 0, sequential, filter, retval);
+
+            fut.init();
+
+            return nonInterruptable(new GridEmbeddedFuture<>(fut.chain(new CX1<IgniteInternalFuture<GridCacheReturn>, Boolean>() {
+                @Override public Boolean applyx(IgniteInternalFuture<GridCacheReturn> fut0) throws IgniteCheckedException {
+                    fut0.get();
+
+                    return true;
+                }
+            }), new PLC1<GridCacheReturn>(null) {
+                @Override protected GridCacheReturn postLock(GridCacheReturn ret) throws IgniteCheckedException {
+                    GridCacheReturn futRes = fut.get();
+
+                    assert futRes != null;
+
+                    mvccSnapshot.incrementOperationCounter();
+
+                    return new GridCacheReturn(cacheCtx, true, keepBinary, futRes.value(), futRes.success());
+                }
+            }));
+        }
+        catch (RuntimeException e) {
+            onException();
+
+            throw e;
+        }
+    }
+
+    /**
+     * Executes update query operation in Mvcc mode.
+     *
      * @param fut Enlist future.
      * @return Operation future.
      */
-    public IgniteInternalFuture<Long> updateAsync(GridNearTxAbstractEnlistFuture fut) {
+    public IgniteInternalFuture<Long> updateAsync(GridNearTxQueryAbstractEnlistFuture fut) {
         fut.init();
 
         return nonInterruptable(new GridEmbeddedFuture<>(fut.chain(new CX1<IgniteInternalFuture<Long>, Boolean>() {
@@ -1900,36 +2188,18 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         if (F.isEmpty(keys))
             return new GridFinishedFuture<>(Collections.<K, V>emptyMap());
 
-        if (cacheCtx.mvccEnabled() && !isOperationAllowed(false))
+        try {
+            validateTxMode(cacheCtx);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
+
+        if (cacheCtx.mvccEnabled() && !isOperationAllowed(true))
             return txTypeMismatchFinishFuture();
 
         init();
 
-        if (cacheCtx.mvccEnabled() && (optimistic() && !readCommitted()) && mvccTracker == null) {
-            // TODO IGNITE-7388: support async tx rollback (e.g. on timeout).
-            boolean canRemap = cctx.lockedTopologyVersion(null) == null;
-
-            mvccTracker = new MvccQueryTrackerImpl(cacheCtx, canRemap);
-
-            return new GridEmbeddedFuture<>(mvccTracker.requestSnapshot(topologyVersion()),
-                new IgniteBiClosure<MvccSnapshot, Exception, IgniteInternalFuture<Map<K, V>>>() {
-                @Override public IgniteInternalFuture<Map<K, V>> apply(MvccSnapshot snapshot, Exception e) {
-                    if (e != null)
-                        return new GridFinishedFuture<>(e);
-
-                    return getAllAsync(cacheCtx,
-                        entryTopVer,
-                        keys,
-                        deserializeBinary,
-                        skipVals,
-                        keepCacheObjects,
-                        skipStore,
-                        recovery,
-                        needVer);
-                }
-            });
-        }
-
         int keysCnt = keys.size();
 
         boolean single = keysCnt == 1;
@@ -2234,8 +2504,8 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
      * @param keepCacheObjects Keep cache objects flag.
      * @param skipStore Skip store flag.
      * @param recovery Recovery flag..
-     * @throws IgniteCheckedException If failed.
      * @return Enlisted keys.
+     * @throws IgniteCheckedException If failed.
      */
     @SuppressWarnings({"RedundantTypeArguments"})
     private <K, V> Collection<KeyCacheObject> enlistRead(
@@ -2568,8 +2838,8 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         GridInClosure3<KeyCacheObject, Object, GridCacheVersion> c =
             new GridInClosure3<KeyCacheObject, Object, GridCacheVersion>() {
                 @Override public void apply(KeyCacheObject key,
-                                            @Nullable Object val,
-                                            @Nullable GridCacheVersion loadVer) {
+                    @Nullable Object val,
+                    @Nullable GridCacheVersion loadVer) {
                     if (log.isDebugEnabled())
                         log.debug("Loaded value from remote node [key=" + key + ", val=" + val + ']');
 
@@ -2729,7 +2999,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
-     * @param cacheCtx  Cache context.
+     * @param cacheCtx Cache context.
      * @param readThrough Read through flag.
      * @param async if {@code True}, then loading will happen in a separate thread.
      * @param keys Keys.
@@ -2868,7 +3138,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
-     * @param cacheCtx  Cache context.
+     * @param cacheCtx Cache context.
      * @param readThrough Read through flag.
      * @param async if {@code True}, then loading will happen in a separate thread.
      * @param keys Keys.
@@ -3498,7 +3768,10 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         if (log.isDebugEnabled())
             log.debug("Committing near local tx: " + this);
 
-        final NearTxFinishFuture fut, fut0 = finishFut; boolean fastFinish;
+        final NearTxFinishFuture fut;
+        final NearTxFinishFuture fut0 = finishFut;
+
+        boolean fastFinish;
 
         if (fut0 != null || !FINISH_FUT_UPD.compareAndSet(this, null, fut = finishFuture(fastFinish = fastFinish(), true)))
             return chainFinishFuture(finishFut, true, true, false);
@@ -3577,9 +3850,12 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         IgniteInternalFuture<?> prepFut = this.prepFut;
 
         if (onTimeout && prepFut instanceof GridNearTxPrepareFutureAdapter && !prepFut.isDone())
-            ((GridNearTxPrepareFutureAdapter) prepFut).onNearTxLocalTimeout();
+            ((GridNearTxPrepareFutureAdapter)prepFut).onNearTxLocalTimeout();
+
+        final NearTxFinishFuture fut;
+        final NearTxFinishFuture fut0 = finishFut;
 
-        final NearTxFinishFuture fut, fut0 = finishFut; boolean fastFinish;
+        boolean fastFinish;
 
         if (fut0 != null)
             return chainFinishFuture(finishFut, false, clearThreadMap, onTimeout);
@@ -3627,9 +3903,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     }
 
     /**
-     * @return Transaction commit future.
+     * Finish transaction.
+     *
      * @param fast {@code True} in case of fast finish.
      * @param commit {@code True} if commit.
+     * @return Transaction commit future.
      */
     private NearTxFinishFuture finishFuture(boolean fast, boolean commit) {
         NearTxFinishFuture fut = fast ? new GridNearTxFastFinishFuture(this, commit) :
@@ -3724,7 +4002,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
      * @return {@code True} if 'fast finish' path can be used for transaction completion.
      */
     private boolean fastFinish() {
-        return writeMap().isEmpty()
+        return writeMap().isEmpty() && !queryEnlisted()
             && ((optimistic() && !serializable()) || readMap().isEmpty())
             && (mappings.single() || F.view(mappings.mappings(), CU.FILTER_QUERY_MAPPING).isEmpty());
     }
@@ -4174,14 +4452,14 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
      * @return {@code true} if this transaction does not have type flag set or it matches invoking operation,
      * {@code false} otherwise.
      */
-    public boolean isOperationAllowed(boolean sqlOp) {
-        if (sql == null) {
-            sql = sqlOp;
+    public boolean isOperationAllowed(boolean mvccOp) {
+        if (this.mvccOp == null) {
+            this.mvccOp = mvccOp;
 
             return true;
         }
 
-        return sql == sqlOp;
+        return this.mvccOp == mvccOp;
     }
 
     /**
@@ -4385,17 +4663,17 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     /**
      * @param cacheCtx Cache context.
      * @param retval Return value flag.
-     * @param sql SQL operation flag.
+     * @param mvccOp SQL operation flag.
      * @throws IgniteCheckedException If failed.
      */
-    private void beforePut(GridCacheContext cacheCtx, boolean retval, boolean sql) throws IgniteCheckedException {
-        assert !sql || cacheCtx.mvccEnabled();
+    private void beforePut(GridCacheContext cacheCtx, boolean retval, boolean mvccOp) throws IgniteCheckedException {
+        assert !mvccOp || cacheCtx.mvccEnabled();
 
         checkUpdatesAllowed(cacheCtx);
 
         cacheCtx.checkSecurity(SecurityPermission.CACHE_PUT);
 
-        if (cacheCtx.mvccEnabled() && !isOperationAllowed(sql))
+        if (cacheCtx.mvccEnabled() && !isOperationAllowed(mvccOp))
             throw new IgniteCheckedException(TX_TYPE_MISMATCH_ERR_MSG);
 
         if (retval)
@@ -4408,6 +4686,28 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
 
     /**
      * @param cacheCtx Cache context.
+     * @param retval Return value flag.
+     * @param mvccOp SQL operation flag.
+     * @throws IgniteCheckedException If failed.
+     */
+    private void beforeRemove(GridCacheContext cacheCtx, boolean retval, boolean mvccOp) throws IgniteCheckedException {
+        assert !mvccOp || cacheCtx.mvccEnabled();
+
+        checkUpdatesAllowed(cacheCtx);
+
+        cacheCtx.checkSecurity(SecurityPermission.CACHE_REMOVE);
+
+        if (cacheCtx.mvccEnabled() && !isOperationAllowed(mvccOp))
+            throw new IgniteCheckedException(TX_TYPE_MISMATCH_ERR_MSG);
+
+        if (retval)
+            needReturnValue(true);
+
+        checkValid();
+    }
+
+    /**
+     * @param cacheCtx Cache context.
      * @throws IgniteCheckedException If updates are not allowed.
      */
     private void checkUpdatesAllowed(GridCacheContext cacheCtx) throws IgniteCheckedException {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryAbstractEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryAbstractEnlistFuture.java
new file mode 100644
index 0000000..714c62d
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryAbstractEnlistFuture.java
@@ -0,0 +1,36 @@
+/*
+ * 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.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+
+/**
+ *
+ */
+public abstract class GridNearTxQueryAbstractEnlistFuture extends GridNearTxAbstractEnlistFuture<Long> {
+    /**
+     * @param cctx Cache context.
+     * @param tx Transaction.
+     * @param timeout Timeout.
+     */
+    public GridNearTxQueryAbstractEnlistFuture(
+        GridCacheContext<?, ?> cctx, GridNearTxLocal tx, long timeout) {
+        super(cctx, tx, timeout, CU.longReducer());
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java
index 9a2dfa3..6d48b97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistFuture.java
@@ -43,9 +43,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.NearTx
  * Cache lock future.
  */
 @SuppressWarnings("ForLoopReplaceableByForEach")
-public class GridNearTxQueryEnlistFuture extends GridNearTxAbstractEnlistFuture {
-    /** */
-    private static final long serialVersionUID = -2155104765461405820L;
+public class GridNearTxQueryEnlistFuture extends GridNearTxQueryAbstractEnlistFuture {
     /** Involved cache ids. */
     private final int[] cacheIds;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistResponse.java
index dae1e81..d628de1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryEnlistResponse.java
@@ -38,7 +38,7 @@ import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 import org.jetbrains.annotations.Nullable;
 
 /**
- *
+ * A response to {@link GridNearTxQueryEnlistRequest}.
  */
 public class GridNearTxQueryEnlistResponse extends GridCacheIdMessage implements ExceptionAware {
     /** */
@@ -99,6 +99,7 @@ public class GridNearTxQueryEnlistResponse extends GridCacheIdMessage implements
      * @param lockVer Lock version.
      * @param res Result.
      * @param removeMapping Remove mapping flag.
+     * @param newDhtNodes New DHT nodes involved into transaction.
      */
     public GridNearTxQueryEnlistResponse(int cacheId, IgniteUuid futId, int miniId, GridCacheVersion lockVer, long res,
         boolean removeMapping, Set<UUID> newDhtNodes) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java
index 2452b92..b83339b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistFuture.java
@@ -62,10 +62,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
  * A future tracking requests for remote nodes transaction enlisting and locking
  * of entries produced with complex DML queries requiring reduce step.
  */
-public class GridNearTxQueryResultsEnlistFuture extends GridNearTxAbstractEnlistFuture {
-    /** */
-    private static final long serialVersionUID = 4339957209840477447L;
-
+public class GridNearTxQueryResultsEnlistFuture extends GridNearTxQueryAbstractEnlistFuture {
     /** */
     public static final int DFLT_BATCH_SIZE = 1024;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistResponse.java
index 94cacfa..48c63bc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxQueryResultsEnlistResponse.java
@@ -54,7 +54,7 @@ public class GridNearTxQueryResultsEnlistResponse extends GridNearTxQueryEnlistR
      * @param res Result.
      * @param dhtFutId Dht future id.
      * @param dhtVer Dht version.
-     * @param newDhtNodes New
+     * @param newDhtNodes New DHT nodes involved into transaction.
      */
     public GridNearTxQueryResultsEnlistResponse(int cacheId,
         IgniteUuid futId,

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
index ff1c85f..ca77bf9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java
@@ -1233,7 +1233,8 @@ public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProce
                                             for (TxKey key : waitMap.keySet()) {
                                                 assert key.major() == snapshot.coordinatorVersion()
                                                     && key.minor() > snapshot.cleanupVersion()
-                                                    || key.major() > snapshot.coordinatorVersion();
+                                                    || key.major() > snapshot.coordinatorVersion() :
+                                                    "key=" + key + ", snapshot=" + snapshot;
                                             }
                                         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTrackerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTrackerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTrackerImpl.java
index f46d1e0..9a767ec 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTrackerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTrackerImpl.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.jetbrains.annotations.NotNull;
 
@@ -46,7 +47,6 @@ public class MvccQueryTrackerImpl implements MvccQueryTracker {
     private final IgniteLogger log;
 
     /** */
-    @GridToStringExclude
     private long crdVer;
 
     /** */
@@ -259,6 +259,9 @@ public class MvccQueryTrackerImpl implements MvccQueryTracker {
         IgniteInternalFuture<AffinityTopologyVersion> waitFut =
             cctx.shared().exchange().affinityReadyFuture(topVer.nextMinorVersion());
 
+        if(log.isDebugEnabled())
+            log.debug("Remap on new topology: " + waitFut);
+
         if (waitFut == null)
             requestSnapshot(cctx.shared().exchange().readyAffinityVersion(), lsnr);
         else {
@@ -325,6 +328,11 @@ public class MvccQueryTrackerImpl implements MvccQueryTracker {
         return true;
     }
 
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(MvccQueryTrackerImpl.class, this);
+    }
+
     /** */
     private final class ListenerDecorator implements MvccSnapshotResponseListener {
         /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
index c57a790..16c30c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
@@ -49,6 +49,7 @@ import org.apache.ignite.internal.pagemem.wal.record.delta.MetaPageUpdateNextSna
 import org.apache.ignite.internal.pagemem.wal.record.delta.MetaPageUpdatePartitionDataRecord;
 import org.apache.ignite.internal.pagemem.wal.record.delta.PartitionDestroyRecord;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheGroupContext;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@ -1795,13 +1796,15 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
             GridCacheVersion ver,
             long expireTime,
             MvccSnapshot mvccVer,
+            CacheEntryPredicate filter,
             boolean primary,
             boolean needHistory,
-            boolean noCreate) throws IgniteCheckedException {
+            boolean noCreate,
+            boolean retVal) throws IgniteCheckedException {
             CacheDataStore delegate = init0(false);
 
-            return delegate.mvccUpdate(
-                cctx, key, val, ver, expireTime, mvccVer, primary, needHistory, noCreate);
+            return delegate.mvccUpdate(cctx, key, val, ver, expireTime, mvccVer, filter, primary,
+                needHistory, noCreate, retVal);
         }
 
         /** {@inheritDoc} */
@@ -1809,11 +1812,13 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
             GridCacheContext cctx,
             KeyCacheObject key,
             MvccSnapshot mvccVer,
+            CacheEntryPredicate filter,
             boolean primary,
-            boolean needHistory) throws IgniteCheckedException {
+            boolean needHistory,
+            boolean retVal) throws IgniteCheckedException {
             CacheDataStore delegate = init0(false);
 
-            return delegate.mvccRemove(cctx, key, mvccVer, primary, needHistory);
+            return delegate.mvccRemove(cctx, key, mvccVer, filter, primary, needHistory, retVal);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index fb6293c..d0e3dca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -1720,10 +1720,13 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
      */
     public void markQueryEnlisted(MvccSnapshot ver) {
         if (!qryEnlisted) {
+            assert ver != null || mvccSnapshot != null;
+
             if (mvccSnapshot == null)
                 mvccSnapshot = ver;
 
-            cctx.coordinators().registerLocalTransaction(ver.coordinatorVersion(), ver.counter());
+            if(dht())
+                cctx.coordinators().registerLocalTransaction(mvccSnapshot.coordinatorVersion(), mvccSnapshot.counter());
 
             qryEnlisted = true;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index 7cc3e55..438c8ab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -466,7 +466,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
      * @param concurrency Concurrency.
      * @param isolation Isolation.
      * @param timeout transaction timeout.
-     * @param sql Whether this transaction is being started via SQL API or not, or {@code null} if unknown.
+     * @param mvccOp Whether this transaction is being started via SQL API or not, or {@code null} if unknown.
      * @param txSize Expected transaction size.
      * @param lb Label.
      * @return New transaction.
@@ -479,7 +479,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
         TransactionIsolation isolation,
         long timeout,
         boolean storeEnabled,
-        Boolean sql,
+        Boolean mvccOp,
         int txSize,
         @Nullable String lb
     ) {
@@ -499,7 +499,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
             isolation,
             timeout,
             storeEnabled,
-            sql,
+            mvccOp,
             txSize,
             subjId,
             taskNameHash,

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
index 716094e..2a0b582 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/MvccUpdateDataRow.java
@@ -21,9 +21,12 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtDetachedCacheEntry;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccVersion;
@@ -38,6 +41,8 @@ import org.apache.ignite.internal.processors.cache.tree.mvcc.search.MvccLinkAwar
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_COUNTER_NA;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.MVCC_CRD_COUNTER_NA;
@@ -49,6 +54,7 @@ import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.isActiv
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.isVisible;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.mvccVersionIsValid;
 import static org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.unexpectedStateException;
+import static org.apache.ignite.internal.processors.cache.tree.mvcc.data.ResultType.FILTERED;
 
 /**
  *
@@ -94,6 +100,9 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
     /** Whether tx has overridden it's own update. */
     private static final int OWN_VALUE_OVERRIDDEN = DELETED << 1;
 
+    /** Force read full entry instead of header only.  */
+    private static final int NEED_PREV_VALUE = OWN_VALUE_OVERRIDDEN << 1;
+
     /** */
     @GridToStringExclude
     private final GridCacheContext cctx;
@@ -125,6 +134,10 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
     /** */
     private List<MvccLinkAwareSearchRow> historyRows;
 
+    /** */
+    @GridToStringExclude
+    private CacheEntryPredicate filter;
+
     /**
      * @param cctx Cache context.
      * @param key Key.
@@ -148,10 +161,12 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
         long expireTime,
         MvccSnapshot mvccSnapshot,
         MvccVersion newVer,
+        @Nullable CacheEntryPredicate filter,
         boolean primary,
         boolean lockOnly,
         boolean needHistory,
-        boolean fastUpdate) {
+        boolean fastUpdate,
+        boolean needPrevValue) {
         super(key,
             val,
             ver,
@@ -163,6 +178,7 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
 
         this.mvccSnapshot = mvccSnapshot;
         this.cctx = cctx;
+        this.filter = filter;
         this.keyAbsentBefore = primary; // True for primary and false for backup (backups do not use this flag).
 
         assert !lockOnly || val == null;
@@ -181,6 +197,9 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
         if (fastUpdate)
             flags |= FAST_UPDATE;
 
+        if(needPrevValue)
+            flags |= NEED_PREV_VALUE;
+
         setFlags(flags);
     }
 
@@ -237,8 +256,18 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
 
                 if (removed)
                     setFlags(DELETED);
-                else
-                    oldRow = row;
+                else {
+                    // Actually, full row can be omitted for replace(k,newval) and putIfAbsent, but
+                    // operation context is not available here and full row required if filter is set.
+                    if (res == ResultType.PREV_NOT_NULL && (isFlagsSet(NEED_PREV_VALUE) || filter != null))
+                        oldRow = tree.getRow(io, pageAddr, idx, RowData.FULL);
+                    else
+                        oldRow = row;
+                }
+
+                // TODO: IGNITE-9689: optimize filter usage here. See {@link org.apache.ignite.internal.processors.cache.CacheOperationFilter}.
+                if(filter != null && !applyFilter(res == ResultType.PREV_NOT_NULL ? oldRow.value() : null))
+                    res = FILTERED;
 
                 setFlags(LAST_COMMITTED_FOUND | OWN_VALUE_OVERRIDDEN);
 
@@ -293,9 +322,14 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
                     else {
                         res = ResultType.PREV_NOT_NULL;
 
-                        oldRow = row;
-
                         keyAbsentBefore = false;
+
+                        // Actually, full row can be omitted for replace(k,newval) and putIfAbsent, but
+                        // operation context is not available here and full row required if filter is set.
+                        if( (isFlagsSet(NEED_PREV_VALUE) || filter != null))
+                            oldRow = tree.getRow(io, pageAddr, idx, RowData.FULL);
+                        else
+                            oldRow = row;
                     }
 
                     if (isFlagsSet(CHECK_VERSION)) {
@@ -337,9 +371,13 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
                         }
                     }
 
+                    // TODO: IGNITE-9689: optimize filter usage here. See {@link org.apache.ignite.internal.processors.cache.CacheOperationFilter}.
+                    if(filter != null && !applyFilter(res == ResultType.PREV_NOT_NULL ? oldRow.value() : null))
+                        res = FILTERED;
+
                     // Lock entry for primary partition if needed.
                     // If invisible row is found for FAST_UPDATE case we should not lock row.
-                    if (isFlagsSet(PRIMARY | REMOVE_OR_LOCK) && !isFlagsSet(FAST_MISMATCH)) {
+                    if (!isFlagsSet(DELETED) && isFlagsSet(PRIMARY | REMOVE_OR_LOCK) && !isFlagsSet(FAST_MISMATCH)) {
                         rowIo.setMvccLockCoordinatorVersion(pageAddr, idx, mvccCrd);
                         rowIo.setMvccLockCounter(pageAddr, idx, mvccCntr);
 
@@ -423,6 +461,22 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
         return unsetFlags(FIRST);
     }
 
+    /**
+     * Apply filter.
+     *
+     * @param val0 Previous value.
+     * @return Filter result.
+     */
+    private boolean applyFilter(final CacheObject val0) {
+        GridCacheEntryEx e = new GridDhtDetachedCacheEntry(cctx, key) {
+            @Nullable @Override public CacheObject peekVisibleValue() {
+                return val0;
+            }
+        };
+
+        return filter.apply(e);
+    }
+
     /** {@inheritDoc} */
     @Override public int state() {
         return state;
@@ -436,10 +490,26 @@ public class MvccUpdateDataRow extends MvccDataRow implements MvccUpdateResult,
     }
 
     /**
-     * @return {@code True} if previous value was non-null.
+     * @return Result type.
      */
-    @Override public ResultType resultType() {
-        return res == null ? ResultType.PREV_NULL : res;
+    @NotNull @Override public ResultType resultType() {
+        return res == null ? defaultResult() : res;
+    }
+
+    /**
+     * Evaluate default result type.
+     *
+     * @return Result type.
+     */
+    @NotNull private ResultType defaultResult() {
+        assert res == null;
+
+        if (filter != null && !applyFilter(null))
+            res = FILTERED;
+        else
+            res = ResultType.PREV_NULL; // Default.
+
+        return res;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
index eecb4a5..16e7e1e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/mvcc/data/ResultType.java
@@ -30,5 +30,7 @@ public enum ResultType {
     /** */
     LOCKED,
     /** */
-    VERSION_MISMATCH
+    VERSION_MISMATCH,
+    /** */
+    FILTERED
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index 9bbf03d..1a3c8d7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -483,8 +483,8 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
     /** {@inheritDoc} */
     @Override public GridCacheUpdateTxResult mvccSet(@Nullable IgniteInternalTx tx, UUID affNodeId, CacheObject val,
         long ttl0, AffinityTopologyVersion topVer, MvccSnapshot mvccVer,
-        GridCacheOperation op, boolean needHistory,
-        boolean noCreate) throws IgniteCheckedException, GridCacheEntryRemovedException {
+        GridCacheOperation op, boolean needHistory, boolean noCreate, CacheEntryPredicate filter, boolean retVal)
+        throws IgniteCheckedException, GridCacheEntryRemovedException {
         rawPut(val, ttl);
 
         return new GridCacheUpdateTxResult(true);
@@ -492,7 +492,8 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
 
     /** {@inheritDoc} */
     @Override public GridCacheUpdateTxResult mvccRemove(@Nullable IgniteInternalTx tx, UUID affNodeId,
-        AffinityTopologyVersion topVer, MvccSnapshot mvccVer, boolean needHistory)
+        AffinityTopologyVersion topVer, MvccSnapshot mvccVer, boolean needHistory,
+        CacheEntryPredicate filter, boolean retVal)
         throws IgniteCheckedException, GridCacheEntryRemovedException {
         obsoleteVer = ver;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
index dfc8b05..6a00ea4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
@@ -27,6 +27,9 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
+import org.apache.ignite.internal.processors.cache.mvcc.MvccUtils;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
@@ -154,6 +157,13 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
                 for (TransactionIsolation iso : TransactionIsolation.values()) {
                     for (TransactionConcurrency con : TransactionConcurrency.values()) {
                         try (Transaction transaction = ignite.transactions().txStart(con, iso)) {
+                            //TODO: IGNITE-7187: Fix when ticket will be implemented. (Near cache)
+                            //TODO: IGNITE-7956: Fix when ticket will be implemented. (Eviction)
+                            if (((IgniteCacheProxy)cache).context().mvccEnabled() &&
+                                ((iso != TransactionIsolation.REPEATABLE_READ && con != TransactionConcurrency.PESSIMISTIC)
+                                    || nearEnabled || useEvicPlc))
+                                return; // Nothing to do. Mode is not supported.
+
                             assertEquals(val, cache.get(key));
 
                             transaction.commit();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java
index b2cbe05..c1718b5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractBasicCoordinatorFailoverTest.java
@@ -18,11 +18,11 @@
 package org.apache.ignite.internal.processors.cache.mvcc;
 
 import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeSet;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -52,10 +52,8 @@ import org.apache.ignite.transactions.TransactionIsolation;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
 
 /**
  * Base class for Mvcc coordinator failover test.
@@ -73,6 +71,8 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
         ReadMode readMode,
         WriteMode writeMode
     ) throws Exception {
+        assert concurrency == PESSIMISTIC && isolation == REPEATABLE_READ;
+
         testSpi = true;
 
         startGrids(3);
@@ -169,7 +169,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
 
         final int KEYS = 100;
 
-        final Map<Integer, Integer> vals = new HashMap<>();
+        final Map<Integer, Integer> vals = new LinkedHashMap<>();
 
         for (int i = 0; i < KEYS; i++)
             vals.put(i, 0);
@@ -298,7 +298,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
                     Integer val = 1;
 
                     while (!done.get()) {
-                        Map<Integer, Integer> vals = new HashMap<>();
+                        Map<Integer, Integer> vals = new LinkedHashMap<>();
 
                         for (int i = 0; i < KEYS; i++)
                             vals.put(i, val);
@@ -479,9 +479,6 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
             ", crdChangeCnt=" + crdChangeCnt +
             ", readInTx=" + readInTx + ']');
 
-        TransactionConcurrency concurrency = readMode == ReadMode.GET ? OPTIMISTIC : PESSIMISTIC; // TODO IGNITE-7184
-        TransactionIsolation isolation = readMode == ReadMode.GET ? SERIALIZABLE : REPEATABLE_READ; // TODO IGNITE-7184
-
         testSpi = true;
 
         client = false;
@@ -510,7 +507,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
 
         final IgniteCache cache = getNode.createCache(ccfg);
 
-        final Set<Integer> keys = new HashSet<>();
+        final Set<Integer> keys = new TreeSet<>();
 
         List<Integer> keys1 = primaryKeys(jcache(COORDS), 10);
         List<Integer> keys2 = primaryKeys(jcache(COORDS + 1), 10);
@@ -518,7 +515,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
         keys.addAll(keys1);
         keys.addAll(keys2);
 
-        Map<Integer, Integer> vals = new HashMap();
+        Map<Integer, Integer> vals = new LinkedHashMap();
 
         for (Integer key : keys)
             vals.put(key, -1);
@@ -544,7 +541,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
                 Map<Integer, Integer> res = null;
 
                 if (readInTx) {
-                    try (Transaction tx = getNode.transactions().txStart(concurrency, isolation)) {
+                    try (Transaction tx = getNode.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                         res = readAllByMode(cache, keys, readMode, INTEGER_CODEC);
 
                         tx.rollback();
@@ -581,7 +578,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
             stopGrid(i);
 
         for (int i = 0; i < 10; i++) {
-            vals = new HashMap();
+            vals = new LinkedHashMap();
 
             for (Integer key : keys)
                 vals.put(key, i);
@@ -636,7 +633,7 @@ public abstract class CacheMvccAbstractBasicCoordinatorFailoverTest extends Cach
 
         final IgniteCache cache = client.createCache(ccfg);
 
-        final Map<Integer, Integer> vals = new HashMap();
+        final Map<Integer, Integer> vals = new LinkedHashMap<>();
 
         for (int i = 0; i < 100; i++)
             vals.put(i, i);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java
index 54e4315..60f1a2f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractCoordinatorFailoverTest.java
@@ -113,27 +113,6 @@ public abstract class CacheMvccAbstractCoordinatorFailoverTest extends CacheMvcc
     /**
      * @throws Exception If failed.
      */
-    public void testCoordinatorFailureSimpleSerializableTxPutGet() throws Exception {
-        coordinatorFailureSimple(OPTIMISTIC, SERIALIZABLE, GET, PUT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCoordinatorFailureSimpleOptimisticTxPutGet() throws Exception {
-        coordinatorFailureSimple(OPTIMISTIC, REPEATABLE_READ, GET, PUT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxInProgressCoordinatorChangeSimple_ReadonlyPutGet() throws Exception {
-        txInProgressCoordinatorChangeSimple(OPTIMISTIC, SERIALIZABLE, null, GET, PUT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testReadInProgressCoordinatorFailsSimple_FromClientPutGet() throws Exception {
         readInProgressCoordinatorFailsSimple(true, null, GET, PUT);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractFeatureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractFeatureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractFeatureTest.java
index fe450d1..6c6b8df 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractFeatureTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractFeatureTest.java
@@ -173,7 +173,7 @@ public abstract class CacheMvccAbstractFeatureTest extends CacheMvccAbstractTest
             int idx;
 
             do {
-                idx = (int) (Math.random() * 100) + 1;
+                idx = (int) (Math.random() * 100);
             }
             while (!keys.add(idx));
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f7f834bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
index a4962d1..c191849 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccAbstractTest.java
@@ -22,10 +22,13 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
@@ -45,6 +48,7 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cache.query.FieldsQueryCursor;
+import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.SqlQuery;
@@ -92,11 +96,9 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SCAN;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL_SUM;
 import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.DML;
-import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.WriteMode.PUT;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
 
@@ -223,18 +225,21 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
+        persistence = false;
+
         try {
-            verifyOldVersionsCleaned();
+            if(disableScheduledVacuum)
+                verifyOldVersionsCleaned();
 
             verifyCoordinatorInternalState();
         }
         finally {
             stopAllGrids();
-        }
 
-        MvccProcessorImpl.coordinatorAssignClosure(null);
+            MvccProcessorImpl.coordinatorAssignClosure(null);
 
-        cleanPersistenceDir();
+            cleanPersistenceDir();
+        }
 
         super.afterTest();
     }
@@ -420,7 +425,7 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                             Integer id1 = Math.min(i1, i2);
                             Integer id2 = Math.max(i1, i2);
 
-                            TreeSet<Integer> keys = new TreeSet<>();
+                            Set<Integer> keys = new HashSet<>();
 
                             keys.add(id1);
                             keys.add(id2);
@@ -787,7 +792,7 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
      * @param cache Cache.
      * @return All accounts
      */
-    private static Map<Integer, MvccTestAccount> getAllSql(TestCache<Integer, MvccTestAccount> cache) {
+    protected static Map<Integer, MvccTestAccount> getAllSql(TestCache<Integer, MvccTestAccount> cache) {
         Map<Integer, MvccTestAccount> accounts = new HashMap<>();
 
         SqlFieldsQuery qry = new SqlFieldsQuery("select _key, val, updateCnt from MvccTestAccount");
@@ -826,12 +831,28 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
      * @param cache Cache.
      * @param key Key.
      */
-    private static void removeSql(TestCache<Integer, MvccTestAccount> cache, Integer key) {
+    protected static void removeSql(TestCache<Integer, MvccTestAccount> cache, Integer key) {
         SqlFieldsQuery qry = new SqlFieldsQuery("delete from MvccTestAccount where _key=" + key);
 
         cache.cache.query(qry).getAll();
     }
 
+
+    /**
+     * Merge account by means of SQL API.
+     *
+     * @param cache Cache.
+     * @param key Key.
+     * @param val Value.
+     * @param updateCnt Update counter.
+     */
+    protected static void mergeSql(TestCache<Integer, MvccTestAccount> cache, Integer key, Integer val, Integer updateCnt) {
+        SqlFieldsQuery qry = new SqlFieldsQuery("merge into MvccTestAccount(_key, val, updateCnt) values " +
+            " (" + key+ ", " + val + ", " + updateCnt + ")");
+
+        cache.cache.query(qry).getAll();
+    }
+
     /**
      * Inserts account by means of SQL API.
      *
@@ -867,9 +888,6 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
         ReadMode readMode,
         WriteMode writeMode
     ) throws Exception {
-        if(readMode == SCAN && writeMode == PUT)
-            fail("https://issues.apache.org/jira/browse/IGNITE-7764");
-
         final int RANGE = 20;
 
         final int writers = 4;
@@ -886,15 +904,23 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
 
                     info("Thread range [min=" + min + ", max=" + max + ']');
 
-                    Map<Integer, Integer> map = new HashMap<>();
+                    // Sorted map for put to avoid deadlocks.
+                    Map<Integer, Integer> map = new TreeMap<>();
+
+                    // Unordered key sequence.
+                    Set<Integer> keys = new LinkedHashSet<>();
 
                     int v = idx * 1_000_000;
 
                     boolean first = true;
 
                     while (!stop.get()) {
-                        while (map.size() < RANGE)
-                            map.put(rnd.nextInt(min, max), v);
+                        while (keys.size() < RANGE) {
+                            int key = rnd.nextInt(min, max);
+
+                            if (keys.add(key))
+                                map.put(key, v);
+                        }
 
                         TestCache<Integer, Integer> cache = randomCache(caches, rnd);
 
@@ -903,9 +929,9 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
 
                             try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                                 if (!first && rnd.nextBoolean()) {
-                                    Map<Integer, Integer> res = readAllByMode(cache.cache, map.keySet(), readMode, INTEGER_CODEC);
+                                    Map<Integer, Integer> res = readAllByMode(cache.cache, keys, readMode, INTEGER_CODEC);
 
-                                    for (Integer k : map.keySet())
+                                    for (Integer k : keys)
                                         assertEquals("res=" + res, v - 1, (Object)res.get(k));
                                 }
 
@@ -917,14 +943,12 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                             }
 
                             if (rnd.nextBoolean()) {
-                                Map<Integer, Integer> res = readAllByMode(cache.cache, map.keySet(), readMode, INTEGER_CODEC);
+                                Map<Integer, Integer> res = readAllByMode(cache.cache, keys, readMode, INTEGER_CODEC);
 
-                                for (Integer k : map.keySet())
+                                for (Integer k : keys)
                                     assertEquals("key=" + k, v, (Object)res.get(k));
                             }
 
-                            map.clear();
-
                             v++;
                         }
                         catch (Exception e) {
@@ -933,6 +957,8 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                         finally {
                             cache.readUnlock();
 
+                            keys.clear();
+
                             map.clear();
                         }
                     }
@@ -956,6 +982,8 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                         int min = range * RANGE;
                         int max = min + RANGE;
 
+                        keys.clear();
+
                         while (keys.size() < RANGE)
                             keys.add(rnd.nextInt(min, max));
 
@@ -1003,8 +1031,6 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                                 }
                             }
                         }
-
-                        keys.clear();
                     }
                 }
             };
@@ -1054,9 +1080,6 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
     )
         throws Exception
     {
-        if(readMode == SCAN && writeMode == PUT)
-            fail("https://issues.apache.org/jira/browse/IGNITE-7764");
-
         final int TOTAL = 20;
 
         assert N <= TOTAL;
@@ -1071,7 +1094,7 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
             @Override public void apply(IgniteCache<Object, Object> cache) {
                 final IgniteTransactions txs = cache.unwrap(Ignite.class).transactions();
 
-                Map<Integer, Integer> vals = new HashMap<>();
+                Map<Integer, Integer> vals = new LinkedHashMap<>();
 
                 for (int i = 0; i < TOTAL; i++)
                     vals.put(i, N);
@@ -1341,6 +1364,9 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
             while (System.currentTimeMillis() < stopTime && !stop.get()) {
                 Thread.sleep(1000);
 
+                if (System.currentTimeMillis() >= stopTime || stop.get())
+                    break;
+
                 if (restartMode != null) {
                     switch (restartMode) {
                         case RESTART_CRD: {
@@ -1806,12 +1832,15 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                     }
                 });
 
+                Map res;
 
-                Map res = (Map)cache.query(scanQry).getAll()
-                    .stream()
-                    .collect(Collectors.toMap(v -> ((IgniteBiTuple)v).getKey(), v -> ((IgniteBiTuple)v).getValue()));
+                try (QueryCursor qry = cache.query(scanQry)) {
+                    res = (Map)qry.getAll()
+                        .stream()
+                        .collect(Collectors.toMap(v -> ((IgniteBiTuple)v).getKey(), v -> ((IgniteBiTuple)v).getValue()));
 
-                assertTrue("res.size()=" + res.size() + ", keys.size()=" + keys.size(), res.size() <= keys.size());
+                    assertTrue("res.size()=" + res.size() + ", keys.size()=" + keys.size(), res.size() <= keys.size());
+                }
 
                 return res;
 
@@ -1833,29 +1862,29 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
 
                 String qry = b.toString();
 
-                SqlFieldsQuery sqlFieldsQry =  new SqlFieldsQuery(qry);
+                SqlFieldsQuery sqlFieldsQry = new SqlFieldsQuery(qry);
 
                 if (emulateLongQry)
                     sqlFieldsQry.setLazy(true).setPageSize(1);
 
                 List<List> rows;
 
-                if (emulateLongQry) {
-                    FieldsQueryCursor<List> cur = cache.query(sqlFieldsQry);
-
-                    rows = new ArrayList<>();
+                try (FieldsQueryCursor<List> cur = cache.query(sqlFieldsQry)) {
+                    if (emulateLongQry) {
+                        rows = new ArrayList<>();
 
-                    for (List row : cur) {
-                        rows.add(row);
+                        for (List row : cur) {
+                            rows.add(row);
 
-                        doSleep(ThreadLocalRandom.current().nextInt(50));
+                            doSleep(ThreadLocalRandom.current().nextInt(50));
+                        }
                     }
+                    else
+                        rows = cur.getAll();
                 }
-                else
-                    rows = cache.query(sqlFieldsQry).getAll();
 
                 if (rows.isEmpty())
-                    return Collections.EMPTY_MAP;
+                    return Collections.emptyMap();
 
                 res = new HashMap();
 
@@ -1887,7 +1916,7 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
                 rows = cur.getAll();
 
                 if (rows.isEmpty())
-                    return Collections.EMPTY_MAP;
+                    return Collections.emptyMap();
 
                 res = new HashMap();
 
@@ -2104,6 +2133,23 @@ public abstract class CacheMvccAbstractTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            if (this == o)
+                return true;
+            if (o == null || getClass() != o.getClass())
+                return false;
+            MvccTestAccount account = (MvccTestAccount)o;
+            return val == account.val &&
+                updateCnt == account.updateCnt;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+
+            return Objects.hash(val, updateCnt);
+        }
+
+        /** {@inheritDoc} */
         @Override public String toString() {
             return "MvccTestAccount{" +
                 "val=" + val +