[2/2] incubator-ignite git commit: IGNITE-843: Move write behind to sub group of Store group.

2015-08-18 Thread akuznetsov
IGNITE-843: Move write behind to sub group of Store group.


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

Branch: refs/heads/ignite-843
Commit: dc2cee3d7141e2b3843b39db4bad11a6cf73cee2
Parents: a3d2f82
Author: AKuznetsov 
Authored: Tue Aug 18 15:15:40 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 15:15:40 2015 +0700

--
 .../src/main/js/controllers/models/caches.json  | 119 ++-
 .../src/main/js/views/includes/controls.jade|  20 +++-
 2 files changed, 75 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc2cee3d/modules/control-center-web/src/main/js/controllers/models/caches.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/caches.json 
b/modules/control-center-web/src/main/js/controllers/models/caches.json
index c0bff96..b34dcea 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -599,6 +599,66 @@
   "tip": [
 "Flag indicating whether write-through caching should be used."
   ]
+},
+{
+  "label": "Write behind",
+  "type": "panel-details",
+  "tip": [
+"Cache write behind settings.",
+"Write-behind is a special mode when updates to cache accumulated 
and then asynchronously flushed to persistent store as a bulk operation."
+  ],
+  "details": [
+{
+  "label": "Enabled",
+  "type": "check",
+  "model": "writeBehindEnabled",
+  "tip": [
+"Flag indicating whether Ignite should use write-behind 
behaviour for the cache store."
+  ]
+},
+{
+  "label": "Batch size",
+  "type": "number",
+  "model": "writeBehindBatchSize",
+  "disabled": "!backupItem.writeBehindEnabled",
+  "placeholder": 512,
+  "tip": [
+"Maximum batch size for write-behind cache store operations.",
+"Store operations (get or remove) are combined in a batch of 
this size to be passed to cache store."
+  ]
+},
+{
+  "label": "Flush size",
+  "type": "number",
+  "model": "writeBehindFlushSize",
+  "disabled": "!backupItem.writeBehindEnabled",
+  "placeholder": 10240,
+  "tip": [
+"Maximum size of the write-behind cache.",
+"If cache size exceeds this value, all cached items are 
flushed to the cache store and write cache is cleared."
+  ]
+},
+{
+  "label": "Flush frequency",
+  "type": "number",
+  "model": "writeBehindFlushFrequency",
+  "disabled": "!backupItem.writeBehindEnabled",
+  "placeholder": 5000,
+  "tip": [
+"Frequency with which write-behind cache is flushed to the 
cache store in milliseconds."
+  ]
+},
+{
+  "label": "Flush threads count",
+  "type": "number",
+  "model": "writeBehindFlushThreadCount",
+  "disabled": "!backupItem.writeBehindEnabled",
+  "placeholder": 1,
+  "tip": [
+"Number of threads that will perform cache flushing."
+  ]
+}
+  ]
 }
   ]
 }
@@ -915,65 +975,6 @@
   ]
 }
   ]
-},
-{
-  "label": "Write behind",
-  "tip": [
-"Cache write behind settings.",
-"Write-behind is a special mode when updates to cache accumulated and 
then asynchronously flushed to persistent store as a bulk operation."
-  ],
-  "fields": [
-{
-  "label": "Enabled",
-  "type": "check",
-  "model": "writeBehindEnabled",
-  "tip": [
-"Flag indicating whether Ignite should use write-behind behaviour 
for the cache store."
-  ]
-},
-{
-  "label": "Batch size",
-  "type": "number",
-  "model": "writeBehindBatchSize",
-  "hide": "!backupItem.writeBehindEnabled",
-  "placeholder": 512,
-  "tip": [
-"Maximum batch size for write-behind cache store operations.",
-"Store operations (get or remove) are combined in a batch of this 
si

[1/2] incubator-ignite git commit: IGNITE-843: Fixed special cases of linking clusters an caches.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 e828e466c -> dc2cee3d7


IGNITE-843: Fixed special cases of linking clusters an caches.


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

Branch: refs/heads/ignite-843
Commit: a3d2f826f650ad59cdbf0acbccb1ce7283e3797e
Parents: e828e46
Author: AKuznetsov 
Authored: Tue Aug 18 15:15:04 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 15:15:04 2015 +0700

--
 .../main/js/controllers/caches-controller.js| 39 +++-
 .../main/js/controllers/clusters-controller.js  | 33 ++---
 .../src/main/js/routes/caches.js| 11 +-
 3 files changed, 52 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3d2f826/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 6cd0727..604a39e 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -220,8 +220,7 @@ controlCenterModule.controller('cachesController', [
 });
 }
 
-$scope.selectedItem = cache;
-$scope.backupItem = restoredItem;
+$scope.selectItem(cache, restoredItem);
 }
 else
 sessionStorage.removeItem('cacheBackupItem');
@@ -241,13 +240,22 @@ controlCenterModule.controller('cachesController', [
 $common.showError(errMsg);
 });
 
-$scope.selectItem = function (item) {
+$scope.selectItem = function (item, backup) {
 $table.tableReset();
 
 $scope.selectedItem = item;
-$scope.backupItem = angular.copy(item);
 
-sessionStorage.cacheSelectedItem = angular.toJson(item);
+if (backup)
+$scope.backupItem = backup;
+else if (item)
+$scope.backupItem = angular.copy(item);
+else
+$scope.backupItem = undefined;
+
+if (item)
+sessionStorage.cacheSelectedItem = angular.toJson(item);
+else
+sessionStorage.removeItem(cacheSelectedItem);
 };
 
 // Add new cache.
@@ -255,19 +263,18 @@ controlCenterModule.controller('cachesController', [
 $table.tableReset();
 $common.ensureActivePanel($scope.panels, 'general-data');
 
-$scope.selectedItem = undefined;
-
-$scope.backupItem = {
+var newItem = {
+space: $scope.spaces[0]._id,
 mode: 'PARTITIONED',
 atomicityMode: 'ATOMIC',
 readFromBackup: true,
-copyOnRead: true
+copyOnRead: true,
+clusters: [],
+queryMetadata: [],
+spaceMetadata: []
 };
 
-$scope.backupItem.space = $scope.spaces[0]._id;
-$scope.backupItem.clusters = [];
-$scope.backupItem.queryMetadata = [];
-$scope.backupItem.spaceMetadata = [];
+$scope.selectItem(undefined, newItem);
 };
 
 // Check cache logical consistency.
@@ -370,10 +377,8 @@ controlCenterModule.controller('cachesController', [
 
 if (caches.length > 0)
 $scope.selectItem(caches[0]);
-else {
-$scope.selectedItem = undefined;
-$scope.backupItem = undefined;
-}
+else
+$scope.selectItem(undefined, 
undefined);
 }
 })
 .error(function (errMsg) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3d2f826/modules/control-center-web/src/main/js/controllers/clusters-controller.js
--

incubator-ignite git commit: IGNITE-843: Sort caches for clusters and clusters for caches.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 dc2cee3d7 -> 7f915a5f5


IGNITE-843: Sort caches for clusters and clusters for caches.


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

Branch: refs/heads/ignite-843
Commit: 7f915a5f5fa094b9cf88e3b256fff84dd3572572
Parents: dc2cee3
Author: AKuznetsov 
Authored: Tue Aug 18 15:24:00 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 15:24:00 2015 +0700

--
 modules/control-center-web/src/main/js/routes/caches.js   | 2 +-
 modules/control-center-web/src/main/js/routes/clusters.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f915a5f/modules/control-center-web/src/main/js/routes/caches.js
--
diff --git a/modules/control-center-web/src/main/js/routes/caches.js 
b/modules/control-center-web/src/main/js/routes/caches.js
index 9f3e255..7edd742 100644
--- a/modules/control-center-web/src/main/js/routes/caches.js
+++ b/modules/control-center-web/src/main/js/routes/caches.js
@@ -51,7 +51,7 @@ router.post('/list', function (req, res) {
 });
 
 // Get all clusters for spaces.
-db.Cluster.find({space: {$in: space_ids}}, '_id name', function 
(err, clusters) {
+db.Cluster.find({space: {$in: space_ids}}, '_id 
name').sort('name').exec(function (err, clusters) {
 if (_processed(err, res)) {
 // Get all caches type metadata for spaces.
 db.CacheTypeMetadata.find({space: {$in: space_ids}}, '_id 
name kind', function (err, metadatas) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f915a5f/modules/control-center-web/src/main/js/routes/clusters.js
--
diff --git a/modules/control-center-web/src/main/js/routes/clusters.js 
b/modules/control-center-web/src/main/js/routes/clusters.js
index a027552..9da8200 100644
--- a/modules/control-center-web/src/main/js/routes/clusters.js
+++ b/modules/control-center-web/src/main/js/routes/clusters.js
@@ -51,7 +51,7 @@ router.post('/list', function (req, res) {
 });
 
 // Get all caches for spaces.
-db.Cache.find({space: {$in: space_ids}}, '_id name swapEnabled', 
function (err, caches) {
+db.Cache.find({space: {$in: space_ids}}, '_id name 
swapEnabled').sort('name').exec(function (err, caches) {
 if (_processed(err, res)) {
 // Get all clusters for spaces.
 db.Cluster.find({space: {$in: 
space_ids}}).sort('name').exec(function (err, clusters) {



incubator-ignite git commit: IGNITE-843: Caches validation.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 7f915a5f5 -> cc29f79ad


IGNITE-843: Caches validation.


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

Branch: refs/heads/ignite-843
Commit: cc29f79adf41fd89895e42d0f05df1b476d490bf
Parents: 7f915a5
Author: AKuznetsov 
Authored: Tue Aug 18 15:42:42 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 15:42:42 2015 +0700

--
 .../main/js/controllers/caches-controller.js| 49 
 .../src/main/js/controllers/models/caches.json  | 12 +++--
 .../main/js/controllers/models/clusters.json|  4 +-
 .../src/main/js/views/configuration/caches.jade |  4 +-
 .../src/main/js/views/includes/controls.jade| 10 ++--
 5 files changed, 58 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cc29f79a/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 604a39e..17932f4 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -40,6 +40,8 @@ controlCenterModule.controller('cachesController', [
 
 $scope.compactJavaName = $common.compactJavaName;
 
+$scope.hidePopover = $common.hidePopover;
+
 $scope.atomicities = $common.mkOptions(['ATOMIC', 
'TRANSACTIONAL']);
 
 $scope.modes = $common.mkOptions(['PARTITIONED', 'REPLICATED', 
'LOCAL']);
@@ -78,6 +80,8 @@ controlCenterModule.controller('cachesController', [
 
 $scope.toggleExpanded = function () {
 $scope.ui.expanded = !$scope.ui.expanded;
+
+$common.hidePopover();
 };
 
 $scope.panels = {activePanels: [0]};
@@ -279,24 +283,51 @@ controlCenterModule.controller('cachesController', [
 
 // Check cache logical consistency.
 function validate(item) {
+if ($common.isEmptyString(item.name))
+return $common.showPopoverMessage($scope.panels, 
'general-data', 'cacheName', 'Name should not be empty');
+
+if (item.memoryMode == 'OFFHEAP_TIERED' && 
item.offHeapMaxMemory == null)
+return $common.showPopoverMessage($scope.panels, 
'memory-data', 'offHeapMaxMemory',
+'Off-heap max memory should be specified');
+
 var cacheStoreFactorySelected = item.cacheStoreFactory && 
item.cacheStoreFactory.kind;
 
-if (cacheStoreFactorySelected && !(item.readThrough || 
item.writeThrough)) {
-$common.showError('Store is configured but read/write 
through are not enabled!');
+if (cacheStoreFactorySelected) {
+if (item.cacheStoreFactory.kind == 
'CacheJdbcPojoStoreFactory') {
+if 
($common.isEmptyString(item.cacheStoreFactory.CacheJdbcPojoStoreFactory.dataSourceBean))
+return $common.showPopoverMessage($scope.panels, 
'store-data', 'dataSourceBean',
+'Data source bean should not be empty');
+
+if 
(!item.cacheStoreFactory.CacheJdbcPojoStoreFactory.dialect)
+return $common.showPopoverMessage($scope.panels, 
'store-data', 'dialect',
+'Dialect should not be empty');
+}
+
+if (item.cacheStoreFactory.kind == 
'CacheJdbcBlobStoreFactory') {
+if 
($common.isEmptyString(item.cacheStoreFactory.CacheJdbcBlobStoreFactory.user))
+return $common.showPopoverMessage($scope.panels, 
'store-data', 'user',
+'User should not be empty');
 
-return false;
+if 
($common.isEmptyString(item.cacheStoreFactory.CacheJdbcBlobStoreFactory.dataSourceBean))
+return $common.showPopoverMessage($scope.panels, 
'store-data', 'dataSourceBean',
+'Data source bean should not be empty');
+}
 }
 
-if ((item.readThrough || item.writeThrough) && 
!cacheStoreFactorySelected) {
-$common.showError('Read / write through are enabled but 
store is not configured!');
 
-

incubator-ignite git commit: IGNITE-843: Minor.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 cc29f79ad -> 2b22485d7


IGNITE-843: Minor.


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

Branch: refs/heads/ignite-843
Commit: 2b22485d77219cb041ef2a8e751c80f63638e2ff
Parents: cc29f79
Author: AKuznetsov 
Authored: Tue Aug 18 15:44:05 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 15:44:05 2015 +0700

--
 .../src/main/js/controllers/caches-controller.js   | 1 -
 .../control-center-web/src/main/js/controllers/models/caches.json  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2b22485d/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 17932f4..c8dd1fa 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -314,7 +314,6 @@ controlCenterModule.controller('cachesController', [
 }
 }
 
-
 if (cacheStoreFactorySelected && !(item.readThrough || 
item.writeThrough)) {
 return $common.showPopoverMessage($scope.panels, 
'store-data', 'readThrough',
 'Store is configured but read/write through are not 
enabled!');

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2b22485d/modules/control-center-web/src/main/js/controllers/models/caches.json
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/models/caches.json 
b/modules/control-center-web/src/main/js/controllers/models/caches.json
index 9162a85..740df17 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -12,7 +12,7 @@
 "whatsNextContent": [
   "",
   "  Continue to Summary",
-  "  Back to Metadata",
+  "  Continue to Metadata",
   "  Back to Clusters",
   ""
 ]



[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

2015-08-18 Thread anovikov
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


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

Branch: refs/heads/ignite-843
Commit: 341adbc288d838696e0dbf6d648ed88f0c08a302
Parents: 774259b 2b22485
Author: Andrey 
Authored: Tue Aug 18 15:56:24 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 15:56:24 2015 +0700

--
 .../main/js/controllers/caches-controller.js|  87 
 .../main/js/controllers/clusters-controller.js  |  33 +++--
 .../src/main/js/controllers/models/caches.json  | 133 ++-
 .../main/js/controllers/models/clusters.json|   4 +-
 .../src/main/js/routes/caches.js|  13 +-
 .../src/main/js/routes/clusters.js  |   2 +-
 .../src/main/js/views/configuration/caches.jade |   4 +-
 .../src/main/js/views/includes/controls.jade|  24 +++-
 8 files changed, 184 insertions(+), 116 deletions(-)
--




[1/2] incubator-ignite git commit: # IGNITE-843 Added db cleanup on user remove.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 2b22485d7 -> 341adbc28


# IGNITE-843 Added db cleanup on user remove.


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

Branch: refs/heads/ignite-843
Commit: 774259b3cb588f571069dd7588dd27157ee364a7
Parents: e828e46
Author: Andrey 
Authored: Tue Aug 18 15:55:54 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 15:55:54 2015 +0700

--
 .../src/main/js/routes/admin.js | 50 ++--
 1 file changed, 46 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/774259b3/modules/control-center-web/src/main/js/routes/admin.js
--
diff --git a/modules/control-center-web/src/main/js/routes/admin.js 
b/modules/control-center-web/src/main/js/routes/admin.js
index 5af72f7..78c835c 100644
--- a/modules/control-center-web/src/main/js/routes/admin.js
+++ b/modules/control-center-web/src/main/js/routes/admin.js
@@ -15,8 +15,12 @@
  * limitations under the License.
  */
 
+var _ = require('lodash');
 var router = require('express').Router();
+var nodemailer = require('nodemailer');
+
 var db = require('../db');
+var config = require('../helpers/configuration-loader.js');
 
 router.get('/', function (req, res) {
 res.render('settings/admin');
@@ -37,11 +41,49 @@ router.post('/list', function (req, res) {
 router.post('/remove', function (req, res) {
 var userId = req.body.userId;
 
-db.Account.findByIdAndRemove(userId, function (err) {
+db.Account.findByIdAndRemove(userId, function (err, user) {
 if (err)
-return res.status(500).send(err);
+return res.status(500).send(err.message);
 
-res.sendStatus(200);
+db.Space.find({owner: userId}, function(err, spaces) {
+_.forEach(spaces, function (space) {
+db.Cluster.remove({space: space._id}).exec();
+db.Cache.remove({space: space._id}).exec();
+db.Persistence.remove({space: space._id}).exec();
+db.Notebook.remove({space: space._id}).exec();
+db.Space.remove({owner: space._id}).exec();
+});
+});
+
+var transporter = {
+service: config.get('smtp:service'),
+auth: {
+user:config.get('smtp:username'),
+pass: config.get('smtp:password')
+}
+};
+
+if (transporter.service != '' || transporter.auth.user != '' || 
transporter.auth.pass != '') {
+var mailer  = nodemailer.createTransport(transporter);
+
+var mailOptions = {
+from: transporter.auth.user,
+to: user.email,
+subject: 'Your account was deleted',
+text: 'You are receiving this e-mail because admin removed 
your account.\n\n' +
+'--\n' +
+'Apache Ignite Web Control Center http://' + req.headers.host 
+ '\n'
+};
+
+mailer.sendMail(mailOptions, function(err){
+if (err)
+return res.status(500).send('Failed to send e-mail 
notification to user!' + err);
+
+res.sendStatus(200);
+});
+}
+else
+res.sendStatus(200);
 });
 });
 
@@ -76,4 +118,4 @@ router.get('/become', function (req, res) {
 })
 });
 
-module.exports = router;
\ No newline at end of file
+module.exports = router;



incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 341adbc28 -> 5c2784eb0


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: 5c2784eb0146bea38dc41d707a3471c1506f726f
Parents: 341adbc
Author: Andrey 
Authored: Tue Aug 18 16:06:06 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 16:06:06 2015 +0700

--
 .../src/main/js/controllers/admin-controller.js | 9 ++---
 modules/control-center-web/src/main/js/routes/admin.js  | 4 ++--
 .../src/main/js/views/includes/controls.jade| 2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c2784eb/modules/control-center-web/src/main/js/controllers/admin-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/admin-controller.js 
b/modules/control-center-web/src/main/js/controllers/admin-controller.js
index 894ead6..c0d48c8 100644
--- a/modules/control-center-web/src/main/js/controllers/admin-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/admin-controller.js
@@ -47,8 +47,11 @@ controlCenterModule.controller('adminController', ['$scope', 
'$window', '$http',
 $scope.users.splice(i, 1);
 
 $common.showInfo('User has been removed: "' + 
user.username + '"');
-}).error(function (errMsg) {
-$common.showError('Failed to remove user: "' + 
$common.errorMessage(errMsg) + '"');
+}).error(function (errMsg, status) {
+if (status == 503)
+$common.showInfo(errMsg);
+else
+$common.showError('Failed to remove user: "' + 
$common.errorMessage(errMsg) + '"');
 });
 });
 };
@@ -70,4 +73,4 @@ controlCenterModule.controller('adminController', ['$scope', 
'$window', '$http',
 user.adminChanging = false;
 });
 }
-}]);
\ No newline at end of file
+}]);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c2784eb/modules/control-center-web/src/main/js/routes/admin.js
--
diff --git a/modules/control-center-web/src/main/js/routes/admin.js 
b/modules/control-center-web/src/main/js/routes/admin.js
index 78c835c..646b812 100644
--- a/modules/control-center-web/src/main/js/routes/admin.js
+++ b/modules/control-center-web/src/main/js/routes/admin.js
@@ -70,14 +70,14 @@ router.post('/remove', function (req, res) {
 from: transporter.auth.user,
 to: user.email,
 subject: 'Your account was deleted',
-text: 'You are receiving this e-mail because admin removed 
your account.\n\n' +
+text: 'You are receiving this e-mail because admin remove your 
account.\n\n' +
 '--\n' +
 'Apache Ignite Web Control Center http://' + req.headers.host 
+ '\n'
 };
 
 mailer.sendMail(mailOptions, function(err){
 if (err)
-return res.status(500).send('Failed to send e-mail 
notification to user!' + err);
+return res.status(503).send('Account was removed, but 
failed to send e-mail notification to user!' + err);
 
 res.sendStatus(200);
 });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5c2784eb/modules/control-center-web/src/main/js/views/includes/controls.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/includes/controls.jade 
b/modules/control-center-web/src/main/js/views/includes/controls.jade
index 5c6adb5..b9c753f 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -244,7 +244,7 @@ mixin table-group-item-edit(prefix, index)
 .col-xs-3.col-sm-3.col-md-3
 +btn-save(btnVisible, btnSave)
 .input-tip
-button.form-control(id=direction ng-model=directionModel 
ng-options='item.value as item.label for item in {{sortDirections}}' 
on-enter=btnVisibleAndSave on-escape='tableReset()' tabindex='0')
+button.form-control(id=direction ng-model=directionModel bs-select 
bs-options='item.value as item.label for item in {{sortDirections}}' 
on-enter=btnVisibleAndSave on

incubator-ignite git commit: IGNITE-843: Meta validation and fix meta + cache selection.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 5c2784eb0 -> 9672838ea


IGNITE-843: Meta validation and fix meta + cache selection.


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

Branch: refs/heads/ignite-843
Commit: 9672838ea773f94f7b3beda6305d89f43ee044f0
Parents: 5c2784e
Author: AKuznetsov 
Authored: Tue Aug 18 16:53:37 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 16:53:37 2015 +0700

--
 .../main/js/controllers/metadata-controller.js  | 106 ---
 .../main/js/controllers/models/metadata.json|  21 +++-
 modules/control-center-web/src/main/js/db.js|   1 +
 .../main/js/views/configuration/metadata.jade   |   8 +-
 .../src/main/js/views/includes/controls.jade|  22 ++--
 .../src/main/js/views/login.jade|   4 +-
 6 files changed, 100 insertions(+), 62 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9672838e/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/metadata-controller.js 
b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index cf69262..17ed895 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -44,6 +44,8 @@ controlCenterModule.controller('metadataController', [
 
 $scope.compactJavaName = $common.compactJavaName;
 
+$scope.hidePopover = $common.hidePopover;
+
 var presets = [
 {
 db: 'oracle',
@@ -329,66 +331,90 @@ controlCenterModule.controller('metadataController', [
 $scope.backupItem = {space: $scope.spaces[0]._id};
 };
 
+function queryConfigured(item) {
+return !($common.isEmptyArray(item.queryFields)
+&& $common.isEmptyArray(item.ascendingFields)
+&& $common.isEmptyArray(item.descendingFields)
+&& $common.isEmptyArray(item.textFields)
+&& $common.isEmptyArray(item.groups))
+}
+
+function storeConfigured(item) {
+return !($common.isEmptyString(item.databaseSchema)
+&& $common.isEmptyString(item.databaseTable)
+&& $common.isEmptyArray(item.keyFields)
+&& $common.isEmptyArray(item.valueFields))
+}
+
 // Check metadata logical consistency.
 function validate(item) {
-/*
- if (!$common.isValidJavaClass('Key type', item.keyType, 
true)) {
- $focus('keyType');
-
- return false;
- }
+if ($common.isEmptyString(item.name))
+return $common.showPopoverMessage($scope.panels, 
'metadata-data', 'metadataName', 'Name should not be empty');
 
- if (!$common.isValidJavaClass('Value type', item.valueType, 
false)) {
- $focus('valueType');
+if ($common.isEmptyString(item.keyType))
+return $common.showPopoverMessage($scope.panels, 
'metadata-data', 'keyType', 'Key type should not be empty');
+else if (!$common.isValidJavaClass('Key type', item.keyType, 
true))
+return $common.showPopoverMessage($scope.panels, 
'metadata-data', 'keyType', 'Key type should be valid Java class');
 
- return false;
- }
+if ($common.isEmptyString(item.valueType))
+return $common.showPopoverMessage($scope.panels, 
'metadata-data', 'valueType', 'Value type should not be empty');
+else if (!$common.isValidJavaClass('Value type', 
item.valueType, false))
+return $common.showPopoverMessage($scope.panels, 
'metadata-data', 'valueType', 'Value type should valid Java class');
 
- if ($common.isEmptyArray(item.queryFields) && 
$common.isEmptyArray(item.ascendingFields) &&
- $common.isEmptyArray(item.descendingFields) && 
$common.isEmptyArray(item.textFields) &&
- $common.isEmptyArray(item.groups)) {
- $common.showError('SQL fields are not specified!');
+var qry = queryConfigured(item);
 
- return false;
- }
+if (qry) {
+var groups = item.groups;
 
-   

incubator-ignite git commit: IGNITE-843: Minor text fix.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 9672838ea -> cce965c2f


IGNITE-843: Minor text fix.


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

Branch: refs/heads/ignite-843
Commit: cce965c2fc0f6177f38b78d276ad9a3eba3f245b
Parents: 9672838
Author: AKuznetsov 
Authored: Tue Aug 18 17:23:55 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 17:23:55 2015 +0700

--
 .../src/main/js/views/templates/agent-download.jade  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cce965c2/modules/control-center-web/src/main/js/views/templates/agent-download.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/templates/agent-download.jade 
b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index 617b053..cffd6af 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -25,6 +25,6 @@
  li Download zip file distribution.
  li Unzip agent to some folder.
  li Specify the agent's properties, refer to the README.txt 
how to configure and start Control Center Agent.
- li Run the executable file.
+ li Run 'ignite-control-center-agent.{sh | bat}'.
 .modal-footer
-button.btn.btn-primary(ng-click='downloadAgent()') Download zip
\ No newline at end of file
+button.btn.btn-primary(ng-click='downloadAgent()') Download zip



[1/2] incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 cce965c2f -> d8d2737b6


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: 38302355752aae214622852c5f7d2cb49c69ee35
Parents: 5c2784e
Author: Andrey 
Authored: Tue Aug 18 17:23:45 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 17:23:45 2015 +0700

--
 .../control-center-web/src/main/js/views/includes/header.jade  | 2 +-
 .../src/main/js/views/templates/agent-download.jade| 6 +++---
 .../src/main/js/views/templates/confirm.jade   | 4 ++--
 .../control-center-web/src/main/js/views/templates/copy.jade   | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38302355/modules/control-center-web/src/main/js/views/includes/header.jade
--
diff --git a/modules/control-center-web/src/main/js/views/includes/header.jade 
b/modules/control-center-web/src/main/js/views/includes/header.jade
index aecdf16..1e200f3 100644
--- a/modules/control-center-web/src/main/js/views/includes/header.jade
+++ b/modules/control-center-web/src/main/js/views/includes/header.jade
@@ -30,7 +30,7 @@ header#header.header
 +header-item('/configuration', '/configuration/clusters', 
'Configuration')
 //+header-item('/monitoring', '/monitoring', 'Monitoring')
 li(ng-controller='notebooks')
-a.dropdown-toggle(ng-hide='notebooks.length == 0' 
data-toggle='dropdown' bs-dropdown='notebookDropdown' 
data-placement='bottom-right') SQL
+a.dropdown-toggle(ng-hide='notebooks.length == 0' 
ng-class='{active: isActive("/sql")}' data-toggle='dropdown' 
bs-dropdown='notebookDropdown' data-placement='bottom-right') SQL
 span.caret
 a(ng-hide='notebooks.length > 0' href='/notebooks/new') SQL
 //+header-item('/deploy', '/deploy', 'Deploy')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38302355/modules/control-center-web/src/main/js/views/templates/agent-download.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/templates/agent-download.jade 
b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index 617b053..3ad4399 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -12,11 +12,11 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 
-.modal.center(role='dialog')
+.modal.center(tabindex='-1' role='dialog')
 .modal-dialog
 .modal-content
#errors-container.modal-header.header
-  button.close(type='button' ng-click='$hide()' 
aria-hidden='true') ×
+  button.close(type='button' ng-click='$hide()')
   h4.modal-title Connection to Control Center Agent is not 
established
.metadata-download
   p Please install and run agent for use this functionality.
@@ -27,4 +27,4 @@
  li Specify the agent's properties, refer to the README.txt 
how to configure and start Control Center Agent.
  li Run the executable file.
 .modal-footer
-button.btn.btn-primary(ng-click='downloadAgent()') Download zip
\ No newline at end of file
+button.btn.btn-primary(ng-click='downloadAgent()') Download zip

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38302355/modules/control-center-web/src/main/js/views/templates/confirm.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/templates/confirm.jade 
b/modules/control-center-web/src/main/js/views/templates/confirm.jade
index 949318a..c98ecf4 100644
--- a/modules/control-center-web/src/main/js/views/templates/confirm.jade
+++ b/modules/control-center-web/src/main/js/views/templates/confirm.jade
@@ -18,10 +18,10 @@
 .modal-dialog
 .modal-content
 .modal-header
-button.close(type='button' ng-click='$hide()') ×
+button.close(type='button' ng-click='$hide()')
 h4.modal-title Confirmation
 .modal-body(ng-show='content')
 p(ng-bind-html='content' style='text-align: center;')
   

[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

2015-08-18 Thread anovikov
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


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

Branch: refs/heads/ignite-843
Commit: d8d2737b61342c40a63866fc81a27f7731a7b75c
Parents: 3830235 cce965c
Author: Andrey 
Authored: Tue Aug 18 17:25:10 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 17:25:10 2015 +0700

--
 .../main/js/controllers/metadata-controller.js  | 106 ---
 .../main/js/controllers/models/metadata.json|  21 +++-
 modules/control-center-web/src/main/js/db.js|   1 +
 .../main/js/views/configuration/metadata.jade   |   8 +-
 .../src/main/js/views/includes/controls.jade|  22 ++--
 .../src/main/js/views/login.jade|   4 +-
 .../main/js/views/templates/agent-download.jade |   2 +-
 7 files changed, 101 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8d2737b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
--



incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 d8d2737b6 -> 519d4be1e


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: 519d4be1ed1c95bf462035d55fc4ff8bf4f4e413
Parents: d8d2737
Author: Andrey 
Authored: Tue Aug 18 17:32:46 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 17:32:46 2015 +0700

--
 .../src/main/js/views/templates/agent-download.jade| 2 +-
 .../control-center-web/src/main/js/views/templates/confirm.jade| 2 +-
 modules/control-center-web/src/main/js/views/templates/copy.jade   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/519d4be1/modules/control-center-web/src/main/js/views/templates/agent-download.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/templates/agent-download.jade 
b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index 70287c8..87264a2 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -16,7 +16,7 @@
 .modal-dialog
 .modal-content
#errors-container.modal-header.header
-  button.close(type='button' ng-click='$hide()')
+  button.close(type='button' ng-click='$hide()') ×
   h4.modal-title Connection to Control Center Agent is not 
established
.metadata-download
   p Please install and run agent for use this functionality.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/519d4be1/modules/control-center-web/src/main/js/views/templates/confirm.jade
--
diff --git 
a/modules/control-center-web/src/main/js/views/templates/confirm.jade 
b/modules/control-center-web/src/main/js/views/templates/confirm.jade
index c98ecf4..2a7dbdf 100644
--- a/modules/control-center-web/src/main/js/views/templates/confirm.jade
+++ b/modules/control-center-web/src/main/js/views/templates/confirm.jade
@@ -18,7 +18,7 @@
 .modal-dialog
 .modal-content
 .modal-header
-button.close(type='button' ng-click='$hide()')
+button.close(type='button' ng-click='$hide()' 
aria-hidden='true') ×
 h4.modal-title Confirmation
 .modal-body(ng-show='content')
 p(ng-bind-html='content' style='text-align: center;')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/519d4be1/modules/control-center-web/src/main/js/views/templates/copy.jade
--
diff --git a/modules/control-center-web/src/main/js/views/templates/copy.jade 
b/modules/control-center-web/src/main/js/views/templates/copy.jade
index f8aa4d1..8f921d9 100644
--- a/modules/control-center-web/src/main/js/views/templates/copy.jade
+++ b/modules/control-center-web/src/main/js/views/templates/copy.jade
@@ -18,7 +18,7 @@
 .modal-dialog
 .modal-content
 .modal-header
-button.close(type='button' ng-click='$hide()')
+button.close(type='button' ng-click='$hide()') ×
 h4.modal-title Copy
 form.form-horizontal(name='inputForm' novalidate)
 .modal-body.row



incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 519d4be1e -> 28c180bae


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: 28c180bae3c5386ce6e460968e6bb068338c9a11
Parents: 519d4be
Author: Andrey 
Authored: Tue Aug 18 17:40:26 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 17:40:26 2015 +0700

--
 .../assembly/release-control-center-agent.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/28c180ba/modules/control-center-agent/assembly/release-control-center-agent.xml
--
diff --git 
a/modules/control-center-agent/assembly/release-control-center-agent.xml 
b/modules/control-center-agent/assembly/release-control-center-agent.xml
index d0a527c..465190b 100644
--- a/modules/control-center-agent/assembly/release-control-center-agent.xml
+++ b/modules/control-center-agent/assembly/release-control-center-agent.xml
@@ -40,14 +40,15 @@
 
 ${basedir}/bin
 /
+true
 
 **/*.bat
-**/*.exe
 
 
 
 ${basedir}/bin
 /
+true
 0755
 
 **/*.sh



incubator-ignite git commit: IGNITE-843: Java classes validation.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 28c180bae -> c1e4f2e00


IGNITE-843: Java classes validation.


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

Branch: refs/heads/ignite-843
Commit: c1e4f2e0009cd22149433cc51abd3e93e8b0c4eb
Parents: 28c180b
Author: AKuznetsov 
Authored: Tue Aug 18 17:55:46 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 17:55:46 2015 +0700

--
 .../main/js/controllers/caches-controller.js| 41 +--
 .../main/js/controllers/clusters-controller.js  | 29 
 .../src/main/js/controllers/common-module.js| 72 
 .../main/js/controllers/metadata-controller.js  | 57 +++-
 4 files changed, 98 insertions(+), 101 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1e4f2e0/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index c8dd1fa..3229604 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -41,6 +41,7 @@ controlCenterModule.controller('cachesController', [
 $scope.compactJavaName = $common.compactJavaName;
 
 $scope.hidePopover = $common.hidePopover;
+var showPopoverMessage = $common.showPopoverMessage;
 
 $scope.atomicities = $common.mkOptions(['ATOMIC', 
'TRANSACTIONAL']);
 
@@ -124,15 +125,9 @@ controlCenterModule.controller('cachesController', [
 return false;
 };
 
-function focusInvalidField(index, id) {
-$focus(index < 0 ? 'new' + id : 'cur' + id);
-
-return false;
-}
-
 $scope.tableSimpleValid = function (item, field, fx, index) {
-if (!$common.isValidJavaClass('SQL function', fx, false))
-return focusInvalidField(index, 'SqlFx');
+if (!$common.isValidJavaClass('SQL function', fx, false, 
$table.tableFieldId(index, 'SqlFx')))
+return $table.tableFocusInvalidField(index, 'SqlFx');
 
 var model = item[field.model];
 
@@ -143,7 +138,7 @@ controlCenterModule.controller('cachesController', [
 if (idx >= 0 && idx != index) {
 $common.showError('SQL function with such class name 
already exists!');
 
-return focusInvalidField(index, 'SqlFx');
+return $table.tableFocusInvalidField(index, 'SqlFx');
 }
 }
 
@@ -153,11 +148,11 @@ controlCenterModule.controller('cachesController', [
 $scope.tablePairValid = function (item, field, index) {
 var pairValue = $table.tablePairValue(field, index);
 
-if (!$common.isValidJavaClass('Indexed type key', 
pairValue.key, true))
-return focusInvalidField(index, 'KeyIndexedType');
+if (!$common.isValidJavaClass('Indexed type key', 
pairValue.key, true, $table.tableFieldId(index, 'KeyIndexedType')))
+return $table.tableFocusInvalidField(index, 
'KeyIndexedType');
 
-if (!$common.isValidJavaClass('Indexed type value', 
pairValue.value, true))
-return focusInvalidField(index, 'ValueIndexedType');
+if (!$common.isValidJavaClass('Indexed type value', 
pairValue.value, true, $table.tableFieldId(index, 'ValueIndexedType')))
+return $table.tableFocusInvalidField(index, 
'ValueIndexedType');
 
 var model = item[field.model];
 
@@ -170,7 +165,7 @@ controlCenterModule.controller('cachesController', [
 if (idx >= 0 && idx != index) {
 $common.showError('Indexed type with such key class 
already exists!');
 
-return focusInvalidField(index, 'KeyIndexedType');
+return $table.tableFocusInvalidField(index, 
'KeyIndexedType');
 }
 }
 
@@ -284,10 +279,10 @@ controlCenterModule.controller('cachesController', [
 // Check cache logical consistency.
 function validate(item) {
 if ($common.isEmptyString(item.name))
-return $common.showPopoverMessage($scope.panels, 
'general-data', 'cacheName', 'Na

[1/2] incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 c1e4f2e00 -> 627dd465e


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: d79b3ce3ffa1c4b0e146164208e8b73989c65cad
Parents: 28c180b
Author: Andrey 
Authored: Tue Aug 18 18:07:58 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 18:07:58 2015 +0700

--
 .../src/main/js/controllers/metadata-controller.js   | 15 ---
 1 file changed, 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d79b3ce3/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/metadata-controller.js 
b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 17ed895..6037f57 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -240,21 +240,6 @@ controlCenterModule.controller('metadataController', [
 });
 };
 
-$scope.downloadAgent = function () {
-loadMetaModal.hide();
-
-var lnk = document.createElement('a');
-
-lnk.setAttribute('href', '/agent/agent.zip');
-lnk.style.display = 'none';
-
-document.body.appendChild(lnk);
-
-lnk.click();
-
-document.body.removeChild(lnk);
-};
-
 $scope.saveSelectedMetadata = function (preset) {
 loadMetaModal.hide();
 



[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

2015-08-18 Thread anovikov
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


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

Branch: refs/heads/ignite-843
Commit: 627dd465e1eed6e92957c6599eb5ecdbac454947
Parents: d79b3ce c1e4f2e
Author: Andrey 
Authored: Tue Aug 18 18:08:14 2015 +0700
Committer: Andrey 
Committed: Tue Aug 18 18:08:14 2015 +0700

--
 .../main/js/controllers/caches-controller.js| 41 +--
 .../main/js/controllers/clusters-controller.js  | 29 
 .../src/main/js/controllers/common-module.js| 72 
 .../main/js/controllers/metadata-controller.js  | 57 +++-
 4 files changed, 98 insertions(+), 101 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/627dd465/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--



[12/46] incubator-ignite git commit: review

2015-08-18 Thread akuznetsov
review


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

Branch: refs/heads/ignite-843
Commit: 53557e327721fee683b9b37217d530db44166aec
Parents: fe2be79
Author: Yakov Zhdanov 
Authored: Wed Aug 5 10:15:52 2015 +0300
Committer: Yakov Zhdanov 
Committed: Wed Aug 5 10:15:52 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/53557e32/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 e03f34d..a209780 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
@@ -1937,7 +1937,7 @@ public abstract class IgniteTxLocalAdapter extends 
IgniteTxAdapter
 GridCacheContext cacheCtx,
 Map drMap
 ) {
-return putAllAsync0(cacheCtx,
+return this.putAllAsync0(cacheCtx,
 null,
 null,
 null,



[02/46] incubator-ignite git commit: ignite-946: introduced VersionedEntry, supported versioned entry for Cache.invoke/randomEntry/localEntries methods

2015-08-18 Thread akuznetsov
ignite-946: introduced VersionedEntry, supported versioned entry for 
Cache.invoke/randomEntry/localEntries methods


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

Branch: refs/heads/ignite-843
Commit: 01c02465ff6924842644bf5b3447d324966cc5f9
Parents: 7ed4d15
Author: Denis Magda 
Authored: Thu Jul 30 13:50:40 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:10 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java|  73 +
 .../ignite/cache/version/package-info.java  |  21 
 .../processors/cache/CacheEntryImpl.java|  20 
 .../processors/cache/CacheInvokeEntry.java  |  24 -
 .../cache/CacheVersionedEntryImpl.java  |  80 ---
 .../processors/cache/GridCacheAdapter.java  |  13 ++-
 .../processors/cache/GridCacheMapEntry.java |  42 +---
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/transactions/IgniteTxAdapter.java |   2 +-
 .../cache/transactions/IgniteTxEntry.java   |   3 +-
 .../transactions/IgniteTxLocalAdapter.java  |   3 +-
 .../cache/version/CacheVersionedEntryImpl.java  | 102 +++
 .../resources/META-INF/classnames.properties|   2 +-
 15 files changed, 287 insertions(+), 106 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c02465/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
new file mode 100644
index 000..6f9d8f6
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -0,0 +1,73 @@
+/*
+ * 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.cache.version;
+
+import javax.cache.*;
+import java.util.*;
+
+/**
+ * Cache entry along with version information.
+ */
+public interface VersionedEntry extends Cache.Entry {
+/**
+ * Versions comparator.
+ */
+public static final Comparator VERSIONS_COMPARATOR = new 
Comparator() {
+@Override public int compare(VersionedEntry o1, VersionedEntry o2) {
+int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
+
+if (res != 0)
+return res;
+
+res = Long.compare(o1.order(), o2.order());
+
+if (res != 0)
+return res;
+
+return Integer.compare(o1.nodeOrder(), o2.nodeOrder());
+}
+};
+
+/**
+ * Gets entry's topology version.
+ *
+ * @return Topology version plus number of seconds from the start time of 
the first grid node.
+ */
+public int topologyVersion();
+
+/**
+ * Gets entry's order.
+ *
+ * @return Version order.
+ */
+public long order();
+
+/**
+ * Gets entry's node order.
+ *
+ * @return Node order on which this version was assigned.
+ */
+public int nodeOrder();
+
+/**
+ * Gets entry's global time.
+ *
+ * @return Adjusted time.
+ */
+public long globalTime();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c02465/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
new file mode 100644
index 000..9aeaba2
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/i

[21/46] incubator-ignite git commit: # ignite-1175: call 'onDeferredDelete' from innerRemover

2015-08-18 Thread akuznetsov
# ignite-1175: call 'onDeferredDelete' from innerRemover


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

Branch: refs/heads/ignite-843
Commit: 51dcd518e51883ca043492a86928cf3488db4bd7
Parents: 834b347
Author: sboikov 
Authored: Tue Aug 11 11:30:02 2015 +0300
Committer: sboikov 
Committed: Tue Aug 11 11:39:54 2015 +0300

--
 .../processors/cache/GridCacheMapEntry.java |   4 +-
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java | 112 +++
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 3 files changed, 116 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51dcd518/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 4680994..a078bed 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
@@ -1232,7 +1232,9 @@ public abstract class GridCacheMapEntry implements 
GridCacheEntryEx {
 if (writeThrough)
 cctx.store().remove(tx, keyValue(false));
 
-if (!cctx.deferredDelete()) {
+if (cctx.deferredDelete() && !detached() && !isInternal())
+cctx.onDeferredDelete(this, newVer);
+else {
 boolean marked = false;
 
 synchronized (this) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51dcd518/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
new file mode 100644
index 000..a930d35
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
@@ -0,0 +1,112 @@
+/*
+ * 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.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ * Test for remove operation.
+ */
+public class CacheDhtLocalPartitionAfterRemoveSelfTest extends 
GridCommonAbstractTest {
+/** Grid count. */
+private static final int GRID_CNT = 3;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration ccfg = new CacheConfiguration();
+
+ccfg.setAtomicityMode(TRANSACTIONAL);
+ccfg.setNearConfiguration(null);
+
+cfg.setCacheConfiguration(ccfg);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTestsStarted() throws Exception {
+startGrids(GRID_CNT);
+}
+
+/** {@inheritDoc} */
+@Override protected void afterTestsStopped() throws Exception {
+stopAllGrids();
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testMemoryUsage() throws Exception {
+assertEquals(10_000, GridDhtLocalPartition.MAX_DELETE_QUEUE_SIZE);
+
+   

[43/46] incubator-ignite git commit: master - OFFSET clause fix IGNITE-1259

2015-08-18 Thread akuznetsov
master - OFFSET clause fix IGNITE-1259


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

Branch: refs/heads/ignite-843
Commit: d31c8c6477e03563bf73db3cf216250b9c22b562
Parents: 9c939be
Author: S.Vladykin 
Authored: Mon Aug 17 21:25:25 2015 +0300
Committer: S.Vladykin 
Committed: Mon Aug 17 21:25:25 2015 +0300

--
 .../query/h2/sql/GridSqlQuerySplitter.java  |   3 +
 .../query/IgniteSqlSplitterSelfTest.java| 152 +++
 .../IgniteCacheQuerySelfTestSuite.java  |   2 +
 3 files changed, 157 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d31c8c64/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
--
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index 2f8bcdd..34aef87 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -205,6 +205,9 @@ public class GridSqlQuerySplitter {
 if (mapQry.offset() != null) {
 rdcQry.offset(mapQry.offset());
 
+if (mapQry.limit() != null) // LIMIT off + lim
+mapQry.limit(op(GridSqlOperationType.PLUS, mapQry.offset(), 
mapQry.limit()));
+
 mapQry.offset(null);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d31c8c64/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
new file mode 100644
index 000..6ec6bb3
--- /dev/null
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -0,0 +1,152 @@
+/*
+ * 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.query;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.*;
+
+/**
+ * Tests for correct distributed partitioned queries.
+ */
+@SuppressWarnings("unchecked")
+public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
+/** */
+private static final TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration() throws 
Exception {
+IgniteConfiguration cfg = super.getConfiguration();
+
+cfg.setPeerClassLoadingEnabled(false);
+
+TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+disco.setIpFinder(ipFinder);
+
+cfg.setDiscoverySpi(disco);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTestsStarted() throws Exception {
+startGridsMultiThreaded(3, false);
+}
+
+/** {@inheritDoc} */
+@Override protected void afterTestsStopped() throws Exception {
+stopAllGrids();
+}
+
+/**
+ * @param name Cache name.
+ *

[19/46] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


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

Branch: refs/heads/ignite-843
Commit: 801d6df1acd2615c1a85e9e3829983011b5fd0a3
Parents: b6bef13 ae11e9b
Author: Denis Magda 
Authored: Tue Aug 11 10:19:21 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 10:19:21 2015 +0300

--
 .../configuration/IgniteConfiguration.java  |  1 -
 .../GridCachePartitionExchangeManager.java  | 48 +++
 .../dht/atomic/GridDhtAtomicCache.java  | 36 +---
 .../cache/CacheStopAndDestroySelfTest.java  | 87 
 4 files changed, 56 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/801d6df1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
--



[25/46] incubator-ignite git commit: # ignite-1228

2015-08-18 Thread akuznetsov
# ignite-1228

Signed-off-by: Valentin Kulichenko 


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

Branch: refs/heads/ignite-843
Commit: e5eef50844580bd9ef2dba6bdfc1efca8992e78a
Parents: 8ecddcc
Author: Valentin Kulichenko 
Authored: Tue Aug 11 18:34:58 2015 -0700
Committer: Valentin Kulichenko 
Committed: Thu Aug 13 18:57:20 2015 -0700

--
 .../main/java/org/apache/ignite/logger/log4j/Log4JLogger.java| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5eef508/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
--
diff --git 
a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java 
b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
index e3828ab..bc843fb 100644
--- 
a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
+++ 
b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
@@ -342,6 +342,10 @@ public class Log4JLogger implements IgniteLogger, 
LoggerNodeIdAware, Log4jFileAw
 impl.setLevel(logLevel);
 }
 
+// If still don't have appenders, disable logging.
+if (!isConfigured())
+impl.setLevel(Level.OFF);
+
 quiet0 = quiet;
 inited = true;
 }



[03/46] incubator-ignite git commit: ignite-946: improving tests

2015-08-18 Thread akuznetsov
ignite-946: improving tests


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

Branch: refs/heads/ignite-843
Commit: 719161f2d02dd1c589155800f60e02f86c469de4
Parents: 4b9f4ba
Author: Denis Magda 
Authored: Fri Jul 31 10:20:22 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:11 2015 +0300

--
 .../internal/processors/cache/query/GridCacheQueryManager.java  | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/719161f2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 400d997..5d3f6a3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -845,7 +845,6 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 
 try {
 val = prj.localPeek(key, 
CachePeekModes.ONHEAP_ONLY, expiryPlc);
-
 }
 catch (IgniteCheckedException e) {
 if (log.isDebugEnabled())



[06/46] incubator-ignite git commit: ignite-946: supported VersionedEntry for IgniteCache.localEntries() when OFF_HEAP mode is used

2015-08-18 Thread akuznetsov
ignite-946: supported VersionedEntry for IgniteCache.localEntries() when 
OFF_HEAP mode is used


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

Branch: refs/heads/ignite-843
Commit: 2d200a31b9903a165c9d70ec84b687e7bcc55c44
Parents: 719161f
Author: Denis Magda 
Authored: Fri Jul 31 11:39:47 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:12 2015 +0300

--
 .../processors/cache/CacheEntryImpl0.java   |  5 +++
 .../processors/cache/GridCacheSwapManager.java  |  8 -
 .../cache/version/GridVersionedMapEntry.java| 33 +++
 .../CacheVersionedEntryAbstractTest.java| 34 ++--
 4 files changed, 55 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d200a31/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
index d2b1923..a5e27d6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
@@ -17,6 +17,9 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.cache.version.*;
+import org.apache.ignite.internal.processors.cache.version.*;
+
 import javax.cache.*;
 import java.util.*;
 
@@ -49,6 +52,8 @@ public class CacheEntryImpl0 implements Cache.Entry {
 @Override public  T unwrap(Class cls) {
 if(cls.isAssignableFrom(getClass()))
 return cls.cast(this);
+else if (cls.isAssignableFrom(VersionedEntry.class) && e instanceof 
GridVersionedMapEntry)
+return (T)new CacheVersionedEntryImpl<>(e.getKey(), e.getValue(), 
((GridVersionedMapEntry)e).version());
 
 throw new IllegalArgumentException("Unwrapping to class is not 
supported: " + cls);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d200a31/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index 9e9c958..0530c19 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -1513,7 +1513,7 @@ public class GridCacheSwapManager extends 
GridCacheManagerAdapter {
 @Override protected Map.Entry onNext() {
 final Map.Entry cur0 = it.next();
 
-cur = new Map.Entry() {
+cur = new GridVersionedMapEntry() {
 @Override public K getKey() {
 try {
 KeyCacheObject key = 
cctx.toCacheKeyObject(cur0.getKey());
@@ -1538,6 +1538,12 @@ public class GridCacheSwapManager extends 
GridCacheManagerAdapter {
 }
 }
 
+@Override public GridCacheVersion version() {
+GridCacheSwapEntry e = 
unmarshalSwapEntry(cur0.getValue());
+
+return e.version();
+}
+
 @Override public V setValue(V val) {
 throw new UnsupportedOperationException();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2d200a31/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
new file mode 100644
index 000..f653fac
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridVersionedMapEntry.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * t

[22/46] incubator-ignite git commit: ignite-946: reverted renaming topVer to avoid breaking compatibility

2015-08-18 Thread akuznetsov
ignite-946: reverted renaming topVer to avoid breaking compatibility


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

Branch: refs/heads/ignite-843
Commit: 954c4591c95b7625042657f7a7311f4ea0f17c19
Parents: 801d6df
Author: Denis Magda 
Authored: Tue Aug 11 15:00:47 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 15:00:47 2015 +0300

--
 .../cache/GridCacheAtomicVersionComparator.java |  4 +--
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheUtils.java|  2 +-
 .../cache/transactions/IgniteTxManager.java |  2 +-
 .../cache/version/CacheVersionedEntryImpl.java  |  4 +--
 .../version/GridCachePlainVersionedEntry.java   |  2 +-
 .../version/GridCacheRawVersionedEntry.java |  2 +-
 .../cache/version/GridCacheVersion.java | 26 ++--
 .../cache/version/GridCacheVersionManager.java  |  4 +--
 .../ignite/internal/util/IgniteUtils.java   |  4 +--
 .../cache/GridCacheEntryVersionSelfTest.java|  4 +--
 11 files changed, 28 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
index 45288d9..3a06100 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
@@ -32,8 +32,8 @@ public class GridCacheAtomicVersionComparator {
  * @return Comparison value.
  */
 public int compare(GridCacheVersion one, GridCacheVersion other, boolean 
ignoreTime) {
-int topVer = one.topologyOrder();
-int otherTopVer = other.topologyOrder();
+int topVer = one.topologyVersion();
+int otherTopVer = other.topologyVersion();
 
 if (topVer == otherTopVer) {
 long globalTime = one.globalTime();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/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 33c42c4..298f7a6 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
@@ -1927,7 +1927,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 // Incorporate conflict version into new version if needed.
 if (conflictVer != null && conflictVer != newVer)
-newVer = new GridCacheVersionEx(newVer.topologyOrder(),
+newVer = new GridCacheVersionEx(newVer.topologyVersion(),
 newVer.globalTime(),
 newVer.order(),
 newVer.nodeOrder(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 75f1dee..a313e3d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1060,7 +1060,7 @@ public class GridCacheUtils {
 
 byte[] bytes = new byte[28];
 
-U.intToBytes(ver.topologyOrder(), bytes, 0);
+U.intToBytes(ver.topologyVersion(), bytes, 0);
 U.longToBytes(ver.globalTime(), bytes, 4);
 U.longToBytes(ver.order(), bytes, 12);
 U.intToBytes(ver.nodeOrderAndDrIdRaw(), bytes, 20);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/954c4591/modules/core/src/main/java/org/apache/ignite/

[14/46] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-946' into ignite-946

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'origin/ignite-946' into ignite-946


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

Branch: refs/heads/ignite-843
Commit: 9f16eb165f2aad48f05cef17f608eb2898c078a3
Parents: 92e81dc 53557e3
Author: Denis Magda 
Authored: Mon Aug 10 09:58:27 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 09:58:27 2015 +0300

--
 .../apache/ignite/cache/version/package-info.java |  4 ++--
 .../processors/cache/CacheInvokeEntry.java|  5 +++--
 .../cache/transactions/IgniteTxEntry.java |  4 +++-
 .../cache/transactions/IgniteTxLocalAdapter.java  | 18 +-
 4 files changed, 17 insertions(+), 14 deletions(-)
--




[18/46] incubator-ignite git commit: ignite-946: simplified VersionedEntry interface

2015-08-18 Thread akuznetsov
ignite-946: simplified VersionedEntry interface


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

Branch: refs/heads/ignite-843
Commit: b6bef13eef82d9a2e040c01881d07c186ade372e
Parents: dd3cecf
Author: Denis Magda 
Authored: Tue Aug 11 10:17:24 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 10:17:24 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java| 83 +---
 .../cache/version/CacheVersionedEntryImpl.java  | 23 +-
 .../cache/version/GridCacheVersionManager.java  |  4 +-
 .../CacheVersionedEntryAbstractTest.java|  9 +--
 4 files changed, 45 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b6bef13e/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 1aac68a..135d681 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -24,7 +24,7 @@ import javax.cache.processor.*;
 import java.util.*;
 
 /**
- * Cache entry that stores entry's version related information.
+ * Cache entry that stores entry's version related information along with its 
data.
  *
  * To get a {@code VersionedEntry} of an {@link Cache.Entry} use {@link 
Cache.Entry#unwrap(Class)} by passing
  * {@code VersionedEntry} class to it as the argument.
@@ -42,62 +42,51 @@ import java.util.*;
  * is excluded from responses.
  * Java Example
  * 
- * Cache cache = grid(0).cache(null);
+ * IgniteCache cache = grid(0).cache(null);
  *
- *  cache.invoke(100, new EntryProcessor() {
- *  public Object process(MutableEntry entry, Object... 
arguments) throws EntryProcessorException {
- *  VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
- *  return entry;
- *   }
- *   });
+ * VersionedEntry entry1 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public VersionedEntry 
process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(VersionedEntry.class);
+ *  }
+ * });
+ *
+ * // Cache entry for the given key may be updated at some point later.
+ *
+ * VersionedEntry entry2 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public VersionedEntry 
process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(VersionedEntry.class);
+ *  }
+ * });
+ *
+ * if (entry1.version().compareTo(entry2.version()) < 0) {
+ * // the entry has been updated
+ * }
  * 
  */
 public interface VersionedEntry extends Cache.Entry {
 /**
- * Versions comparator.
- */
-public static final Comparator VER_COMP = new 
Comparator() {
-@Override public int compare(VersionedEntry o1, VersionedEntry o2) {
-int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
-
-if (res != 0)
-return res;
-
-res = Long.compare(o1.order(), o2.order());
-
-if (res != 0)
-return res;
-
-return Integer.compare(o1.nodeOrder(), o2.nodeOrder());
-}
-};
-
-/**
- * Gets the topology version at the time when the entry with a given pair 
of key and value has been created.
- *
- * @return Topology version plus number of seconds from the start time of 
the first grid node.
- */
-public int topologyVersion();
-
-/**
- * Gets versioned entry unique order.
- * Each time a cache entry for a given key is updated a new {@code 
VersionedEntry} with increased order is created.
- *
- * @return Versioned entry unique order.
- */
-public long order();
-
-/**
- * Gets local node order at the time when the entry with a given pair of 
key and value has been created.
+ * Returns a comparable object representing the version of this cache 
entry.
+ * 
+ * It is valid to compare cache entries' versions for the same key. In 
this case the latter update will be
+ * represented by a higher version. The result of versions comparison of 
cache entries of different keys is
+ * undefined.
  *
- * @return Local node order on which this version has been assigned.
+ * @return Version of

[34/46] incubator-ignite git commit: ignite-1228 - Closed #18

2015-08-18 Thread akuznetsov
ignite-1228 - Closed #18


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

Branch: refs/heads/ignite-843
Commit: d0536dcec02e46cc1e68a13676e87a140d511db2
Parents: 7760847 e5eef50
Author: Valentin Kulichenko 
Authored: Fri Aug 14 15:31:34 2015 -0700
Committer: Valentin Kulichenko 
Committed: Fri Aug 14 15:31:34 2015 -0700

--
 .../main/java/org/apache/ignite/logger/log4j/Log4JLogger.java| 4 
 1 file changed, 4 insertions(+)
--




[29/46] incubator-ignite git commit: Merge branch 'ignite-946'

2015-08-18 Thread akuznetsov
Merge branch 'ignite-946'


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

Branch: refs/heads/ignite-843
Commit: 776084772c06f6149d09726b2f6c3c7a08cef7bc
Parents: 8ecddcc 51a9bd8
Author: nikolay_tikhonov 
Authored: Fri Aug 14 12:54:34 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Aug 14 12:54:34 2015 +0300

--
 .../org/apache/ignite/cache/CacheEntry.java |  94 ++
 .../processors/cache/CacheEntryImpl.java|  20 +++
 .../processors/cache/CacheEntryImpl0.java   |   5 +
 .../processors/cache/CacheEntryImplEx.java  |  83 +
 .../processors/cache/CacheInvokeEntry.java  |  27 ++-
 .../cache/CacheVersionedEntryImpl.java  |  80 -
 .../processors/cache/GridCacheAdapter.java  |  13 +-
 .../processors/cache/GridCacheEntryEx.java  |   2 +-
 .../processors/cache/GridCacheMapEntry.java |  28 ++-
 .../processors/cache/GridCacheSwapManager.java  |  82 +
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/transactions/IgniteTxAdapter.java |  16 +-
 .../cache/transactions/IgniteTxEntry.java   |  16 +-
 .../transactions/IgniteTxLocalAdapter.java  |  83 +++--
 .../cache/version/GridCacheVersion.java |   2 +-
 .../cache/version/GridCacheVersionAware.java|  30 
 .../cache/version/GridCacheVersionManager.java  |   5 +-
 .../clock/GridClockSyncProcessor.java   |   2 +-
 .../resources/META-INF/classnames.properties|   3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |   2 +-
 .../CacheVersionedEntryAbstractTest.java| 170 +++
 ...nedEntryLocalAtomicSwapDisabledSelfTest.java |  45 +
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 +
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 
 ...edEntryPartitionedTransactionalSelfTest.java |  35 
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 
 .../testsuites/IgniteCacheTestSuite4.java   |  13 ++
 34 files changed, 1005 insertions(+), 146 deletions(-)
--




[38/46] incubator-ignite git commit: Squashed commit of the IGNITE-1229

2015-08-18 Thread akuznetsov
Squashed commit of the IGNITE-1229


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

Branch: refs/heads/ignite-843
Commit: 7635e5894df6aab477b82253451b729985f632be
Parents: 1f00c70
Author: Denis Magda 
Authored: Mon Aug 17 16:41:03 2015 +0300
Committer: Yakov Zhdanov 
Committed: Mon Aug 17 16:41:03 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java|  57 ++-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  45 --
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 152 ++-
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |   8 +-
 4 files changed, 245 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7635e589/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 76144e3..40e110f 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
@@ -114,7 +114,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 protected TcpDiscoverySpiState spiState = DISCONNECTED;
 
 /** Map with proceeding ping requests. */
-private final ConcurrentMap>> pingMap =
+private final ConcurrentMap>> pingMap =
 new ConcurrentHashMap8<>();
 
 /**
@@ -497,9 +497,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 return F.t(getLocalNodeId(), clientPingRes);
 }
 
-GridFutureAdapter> fut = new 
GridFutureAdapter<>();
+GridPingFutureAdapter> fut = new 
GridPingFutureAdapter<>();
 
-IgniteInternalFuture> oldFut = 
pingMap.putIfAbsent(addr, fut);
+GridPingFutureAdapter> oldFut = 
pingMap.putIfAbsent(addr, fut);
 
 if (oldFut != null)
 return oldFut.get();
@@ -520,7 +520,11 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 long tstamp = U.currentTimeMillis();
 
-sock = spi.openSocket(addr, timeoutHelper);
+sock = spi.createSocket();
+
+fut.sock = sock;
+
+sock = spi.openSocket(sock, addr, timeoutHelper);
 
 openedSock = true;
 
@@ -597,6 +601,21 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 }
 
+/**
+ * Interrupts all existed 'ping' request for the given node.
+ *
+ * @param node Node that may be pinged.
+ */
+private void interruptPing(TcpDiscoveryNode node) {
+for (InetSocketAddress addr : spi.getNodeAddresses(node)) {
+GridPingFutureAdapter fut = pingMap.get(addr);
+
+if (fut != null && fut.sock != null)
+// Reference to the socket is not set to null. No need to 
assign it to a local variable.
+U.closeQuiet(fut.sock);
+}
+}
+
 /** {@inheritDoc} */
 @Override public void disconnect() throws IgniteSpiException {
 spiStop0(true);
@@ -3366,6 +3385,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (msg.verified() && !locNodeId.equals(leavingNodeId)) {
 TcpDiscoveryNode leftNode = ring.removeNode(leavingNodeId);
 
+interruptPing(leavingNode);
+
 assert leftNode != null;
 
 if (log.isDebugEnabled())
@@ -3533,6 +3554,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (msg.verified()) {
 node = ring.removeNode(nodeId);
 
+interruptPing(node);
+
 assert node != null;
 
 long topVer;
@@ -5142,4 +5165,30 @@ class ServerImpl extends TcpDiscoveryImpl {
 spi.writeToSocket(sock, msg, bout, timeout);
 }
 }
+
+/**
+ *
+ */
+private static class GridPingFutureAdapter extends GridFutureAdapter 
{
+/** Socket. */
+private volatile Socket sock;
+
+/**
+ * Returns socket associated with this ping future.
+ *
+ * @return Socket or {@code null} if no socket associated.
+ */
+public Socket sock() {
+return sock;
+}
+
+/**
+ * Associates socket with this ping future.
+ *
+ * @param sock Socket.
+ */
+public void sock(Socket sock) {
+this.sock = sock;
+}
+}
 }

http://git-wip-us.apache.org/repos/asf

[04/46] incubator-ignite git commit: ignite-946: improving tests

2015-08-18 Thread akuznetsov
ignite-946: improving tests


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

Branch: refs/heads/ignite-843
Commit: 4b9f4bad4191c357418996abc88748208461f18a
Parents: 325d06d
Author: Denis Magda 
Authored: Fri Jul 31 10:19:46 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:11 2015 +0300

--
 .../cache/query/GridCacheQueryManager.java  |  1 +
 .../CacheVersionedEntryAbstractTest.java| 24 ++-
 .../CacheVersionedEntryLocalAtomicSelfTest.java | 40 -
 ...nedEntryLocalAtomicSwapDisabledSelfTest.java | 45 
 .../testsuites/IgniteCacheTestSuite4.java   |  2 +-
 5 files changed, 60 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b9f4bad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 5d3f6a3..400d997 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -845,6 +845,7 @@ public abstract class GridCacheQueryManager extends 
GridCacheManagerAdapte
 
 try {
 val = prj.localPeek(key, 
CachePeekModes.ONHEAP_ONLY, expiryPlc);
+
 }
 catch (IgniteCheckedException e) {
 if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b9f4bad/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
index 951d05a..4cfacb7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -55,23 +55,25 @@ public abstract class CacheVersionedEntryAbstractTest 
extends GridCacheAbstractS
 public void testInvoke() throws Exception {
 Cache cache = grid(0).cache(null);
 
-final AtomicBoolean invoked = new AtomicBoolean(false);
+final AtomicInteger invoked = new AtomicInteger();
 
-cache.invoke(100, new EntryProcessor() {
-@Override public Object process(MutableEntry 
entry, Object... arguments)
-throws EntryProcessorException {
+for (int i = 0; i < ENTRIES_NUM; i++) {
+cache.invoke(i, new EntryProcessor() {
+@Override public Object process(MutableEntry 
entry, Object... arguments)
+throws EntryProcessorException {
 
-invoked.set(true);
+invoked.incrementAndGet();
 
-VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
+VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
 
-checkVersionedEntry(verEntry);
+checkVersionedEntry(verEntry);
 
-return entry;
-}
-});
+return entry;
+}
+});
+}
 
-assertTrue(invoked.get());
+assert invoked.get() > 0;
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b9f4bad/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicSelfTest.java
deleted file mode 100644
index a340413..000
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryLocalAtomicS

[13/46] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


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

Branch: refs/heads/ignite-843
Commit: 92e81dca00800b1b74f0ade328121aaf0ab1d4df
Parents: 2e7799d d9acbd1
Author: Denis Magda 
Authored: Mon Aug 10 09:57:31 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 09:57:31 2015 +0300

--
 assembly/release-hadoop.xml |   5 +
 .../ClientAbstractMultiNodeSelfTest.java|   4 +-
 .../JettyRestProcessorAbstractSelfTest.java |  14 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java  |  21 +-
 .../apache/ignite/internal/IgniteKernal.java|   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java|  12 +-
 .../processors/cache/GridCacheProxyImpl.java|  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../processors/cache/GridCacheUtils.java|   1 -
 .../GridDhtPartitionsExchangeFuture.java|  20 +-
 .../distributed/near/GridNearGetFuture.java |  20 +-
 .../cache/query/GridCacheSqlQuery.java  |  33 +-
 .../cache/query/GridCacheTwoStepQuery.java  |  34 +-
 .../handlers/query/QueryCommandHandler.java |   6 +-
 .../ignite/internal/util/GridLogThrottle.java   |  63 ++-
 .../ignite/internal/util/IgniteUtils.java   |  16 +
 .../util/nio/GridCommunicationClient.java   |   5 +-
 .../util/nio/GridNioFinishedFuture.java |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java|  15 +
 .../util/nio/GridNioRecoveryDescriptor.java |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  84 +++-
 .../ignite/spi/discovery/tcp/ClientImpl.java|  29 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  50 +-
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |  15 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |   7 +-
 .../TcpDiscoveryMulticastIpFinder.java  |   7 +-
 .../src/test/config/io-manager-benchmark.xml|   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java|  10 +-
 .../IgniteClientReconnectAbstractTest.java  |   5 +-
 .../IgniteClientReconnectCacheTest.java |   5 +-
 .../GridDeploymentMessageCountSelfTest.java |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java  |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java|   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../cache/GridCacheSwapPreloadSelfTest.java |   2 +
 .../IgniteCacheAbstractStopBusySelfTest.java|   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java  | 131 ++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java|   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++
 .../tcp/TcpDiscoveryMultiThreadedTest.java  |   8 +-
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java|   1 +
 .../ignite/util/TestTcpCommunicationSpi.java|   6 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  27 +-
 .../processors/query/h2/sql/GridSqlElement.java |  18 +-
 .../query/h2/sql/GridSqlFunction.java   |  17 +-
 .../processors/query/h2/sql/GridSqlQuery.java   |   4 +-
 .../query/h2/sql/GridSqlQueryParser.java|  94 ++--
 .../query/h2/sql/GridSqlQuerySplitter.java  | 117 +++--
 .../processors/query/h2/sql/GridSqlSelect.java  |  76 +--
 .../processors/query/h2/sql/GridSqlType.java|  24 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |   2 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   7 +-
 ...

[10/46] incubator-ignite git commit: Merge branches 'ignite-946' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-946

2015-08-18 Thread akuznetsov
Merge branches 'ignite-946' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-946


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

Branch: refs/heads/ignite-843
Commit: b2e6734c76f17247a2801e63547e5edcc33f770c
Parents: 2e7799d b056a73
Author: Yakov Zhdanov 
Authored: Tue Aug 4 16:34:17 2015 +0300
Committer: Yakov Zhdanov 
Committed: Tue Aug 4 16:34:17 2015 +0300

--
 .../ClientAbstractMultiNodeSelfTest.java|   4 +-
 .../JettyRestProcessorAbstractSelfTest.java |  14 +-
 .../apache/ignite/IgniteSystemProperties.java   |   2 +-
 .../store/jdbc/CacheAbstractJdbcStore.java  |  21 +-
 .../apache/ignite/internal/IgniteKernal.java|   2 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  43 +-
 .../managers/communication/GridIoManager.java   | 188 +++-
 .../processors/cache/GridCacheMvccManager.java  |  73 +--
 .../processors/cache/GridCacheProcessor.java|   2 +-
 .../processors/cache/GridCacheProxyImpl.java|  42 +-
 .../processors/cache/GridCacheSwapManager.java  |   2 +-
 .../GridDhtPartitionsExchangeFuture.java|  20 +-
 .../distributed/near/GridNearGetFuture.java |  20 +-
 .../handlers/query/QueryCommandHandler.java |   6 +-
 .../ignite/internal/util/IgniteUtils.java   |  16 +
 .../util/nio/GridCommunicationClient.java   |   5 +-
 .../util/nio/GridNioFinishedFuture.java |  12 +
 .../ignite/internal/util/nio/GridNioFuture.java |  14 +
 .../internal/util/nio/GridNioFutureImpl.java|  15 +
 .../util/nio/GridNioRecoveryDescriptor.java |  13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   5 +
 .../util/nio/GridNioSessionMetaKey.java |   5 +-
 .../util/nio/GridShmemCommunicationClient.java  |   7 +-
 .../util/nio/GridTcpNioCommunicationClient.java |  14 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  84 +++-
 .../ignite/spi/discovery/tcp/ClientImpl.java|   2 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|  45 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |   2 +-
 .../src/test/config/io-manager-benchmark.xml|   3 +-
 .../GridJobMasterLeaveAwareSelfTest.java|  10 +-
 .../IgniteClientReconnectAbstractTest.java  |   5 +-
 .../IgniteClientReconnectCacheTest.java |   5 +-
 .../GridDeploymentMessageCountSelfTest.java |   5 +-
 .../cache/CacheStopAndDestroySelfTest.java  |   8 +-
 .../GridCacheAtomicMessageCountSelfTest.java|   6 +-
 .../processors/cache/GridCacheMvccSelfTest.java |   1 -
 ...ridCacheReplicatedSynchronousCommitTest.java |   5 +-
 .../IgniteCacheAbstractStopBusySelfTest.java|   6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |   6 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |   4 +-
 .../cache/IgniteTxReentryAbstractSelfTest.java  |   5 +-
 ...niteCacheClientNodeChangingTopologyTest.java |   6 +-
 ...teCacheClientNodePartitionsExchangeTest.java |   4 +-
 .../IgniteCacheNearOffheapGetSelfTest.java  | 131 ++
 ...xOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |   6 +-
 .../GridCacheDhtPreloadMessageCountTest.java|   5 +-
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |   6 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../near/IgniteCacheNearTxRollbackTest.java |   6 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |   6 +-
 ...CommunicationRecoveryAckClosureSelfTest.java | 464 +++
 .../tcp/TcpDiscoveryMultiThreadedTest.java  |   8 +-
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../IgniteSpiCommunicationSelfTestSuite.java|   1 +
 .../ignite/util/TestTcpCommunicationSpi.java|   6 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  15 +-
 .../http/jetty/GridJettyRestHandler.java|  12 +-
 .../parser/dialect/OracleMetadataDialect.java   |   4 +-
 .../src/test/java/config/ignite-test-config.xml |  43 ++
 .../ignite/internal/GridFactorySelfTest.java|   9 +
 .../visor/commands/kill/VisorKillCommand.scala  |   2 +-
 62 files changed, 1241 insertions(+), 252 deletions(-)
--


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



[11/46] incubator-ignite git commit: review

2015-08-18 Thread akuznetsov
review


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

Branch: refs/heads/ignite-843
Commit: fe2be79c8e4eccf8f823abeb32521f0fca8ddf42
Parents: b2e6734
Author: Yakov Zhdanov 
Authored: Tue Aug 4 17:49:48 2015 +0300
Committer: Yakov Zhdanov 
Committed: Tue Aug 4 17:49:48 2015 +0300

--
 .../ignite/cache/version/package-info.java  |  4 ++--
 .../processors/cache/CacheInvokeEntry.java  |  5 +++--
 .../cache/transactions/IgniteTxEntry.java   |  4 +++-
 .../transactions/IgniteTxLocalAdapter.java  | 20 ++--
 4 files changed, 18 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
index 9aeaba2..50ceb13 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/package-info.java
@@ -16,6 +16,6 @@
  */
 
 /**
- * Contains cache version based implementations.
+ * Contains cache versioned entry interface.
  */
-package org.apache.ignite.cache.version;
\ No newline at end of file
+package org.apache.ignite.cache.version;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/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 2d8f738..515a4c5 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
@@ -49,14 +49,15 @@ public class CacheInvokeEntry extends 
CacheLazyEntry implements Muta
 public CacheInvokeEntry(GridCacheContext cctx,
 KeyCacheObject keyObj,
 @Nullable CacheObject valObj,
-GridCacheVersion ver) {
+GridCacheVersion ver
+) {
 super(cctx, keyObj, valObj);
 
 this.hadVal = valObj != null;
 this.ver = ver;
 }
 
-/** 
+/**
  * @param ctx Cache context.
  * @param keyObj Key cache object.
  * @param key Key value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index ed57bf2..73b9975 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -577,6 +577,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, 
Message {
 ver = entry.version();
 }
 catch (GridCacheEntryRemovedException e) {
+assert tx.optimistic() : tx;
+
 ver = null;
 }
 
@@ -924,7 +926,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, 
Message {
 return false;
 
 reader.incrementState();
-
+
 case 6:
 flags = reader.readByte("flags");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe2be79c/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 7f171c2..e03f34d 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/IgniteTxLo

[45/46] incubator-ignite git commit: Exception handling

2015-08-18 Thread akuznetsov
Exception handling


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

Branch: refs/heads/ignite-843
Commit: 09da9c2a369b52b06fe9312aafd19f1085ba79d2
Parents: fcd9d61
Author: Valentin Kulichenko 
Authored: Mon Aug 17 23:44:59 2015 -0700
Committer: Valentin Kulichenko 
Committed: Mon Aug 17 23:44:59 2015 -0700

--
 .../ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java   | 2 +-
 .../ignite/internal/util/spring/IgniteSpringHelperImpl.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/09da9c2a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
index ac1f4f1..5449433 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
@@ -98,7 +98,7 @@ public class CacheJdbcPojoStoreFactory implements 
Factoryhttp://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/09da9c2a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
--
diff --git 
a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
 
b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 435f522..d65a199 100644
--- 
a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ 
b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -201,11 +201,11 @@ public class IgniteSpringHelperImpl implements 
IgniteSpringHelper {
 }
 catch (NoSuchBeanDefinitionException e) {
 throw new IgniteCheckedException("Spring bean with provided name 
doesn't exist " +
-", beanName=" + beanName + ']');
+", beanName=" + beanName + ']');
 }
 catch (BeansException e) {
 throw new IgniteCheckedException("Failed to load Spring bean with 
provided name " +
-", beanName=" + beanName + ']', e);
+", beanName=" + beanName + ']', e);
 }
 }
 



[24/46] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-946

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'remotes/origin/master' into ignite-946


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

Branch: refs/heads/ignite-843
Commit: 51a9bd85e5cb7cb38fcc60b7adf808fe0545e7df
Parents: 4f8f32a 36f7ba6
Author: Denis Magda 
Authored: Thu Aug 13 09:12:26 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:12:26 2015 +0300

--
 .../processors/cache/GridCacheGateway.java  |  5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java| 91 +---
 2 files changed, 62 insertions(+), 34 deletions(-)
--




[16/46] incubator-ignite git commit: ignite-946: fixed comments and bugs

2015-08-18 Thread akuznetsov
ignite-946: fixed comments and bugs


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

Branch: refs/heads/ignite-843
Commit: c1582fc32884cdf9494df32fb33207d64ed1230f
Parents: 911ffbb
Author: Denis Magda 
Authored: Mon Aug 10 12:44:31 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 12:44:31 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java   | 17 +
 .../cache/version/CacheVersionedEntryImpl.java |  4 ++--
 .../processors/clock/GridClockSyncProcessor.java   |  2 +-
 .../version/CacheVersionedEntryAbstractTest.java   |  2 +-
 4 files changed, 13 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 2c0879b..1aac68a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -73,30 +73,31 @@ public interface VersionedEntry extends 
Cache.Entry {
 };
 
 /**
- * Gets entry's topology version.
+ * Gets the topology version at the time when the entry with a given pair 
of key and value has been created.
  *
  * @return Topology version plus number of seconds from the start time of 
the first grid node.
  */
 public int topologyVersion();
 
 /**
- * Gets entry's order.
+ * Gets versioned entry unique order.
+ * Each time a cache entry for a given key is updated a new {@code 
VersionedEntry} with increased order is created.
  *
- * @return Version order.
+ * @return Versioned entry unique order.
  */
 public long order();
 
 /**
- * Gets entry's node order.
+ * Gets local node order at the time when the entry with a given pair of 
key and value has been created.
  *
- * @return Node order on which this version was assigned.
+ * @return Local node order on which this version has been assigned.
  */
 public int nodeOrder();
 
 /**
- * Gets entry's global time.
+ * Gets the time when the entry with a given pair of key and value has 
been created.
  *
- * @return Adjusted time.
+ * @return Time in milliseconds.
  */
-public long globalTime();
+public long creationTime();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 924eff9..74e4a9a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -74,7 +74,7 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 }
 
 /** {@inheritDoc} */
-@Override public long globalTime() {
+@Override public long creationTime() {
 return ver.globalTime();
 }
 
@@ -95,6 +95,6 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 /** {@inheritDoc} */
 public String toString() {
 return "VersionedEntry [key=" + getKey() + ", val=" + getValue() + ", 
topVer=" + ver.topologyVersion() +
-", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", 
globalTime=" + ver.globalTime() + ']';
+", nodeOrder=" + ver.nodeOrder() + ", order=" + ver.order() + ", 
creationTime=" + ver.globalTime() + ']';
 }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c1582fc3/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java
index 3ac44f2..69b07b3 100644
--- 
a/modules/core/src/main/java/org/

[35/46] incubator-ignite git commit: ignite-534 - IgniteJmsStreamer implemented. Closes #14.

2015-08-18 Thread akuznetsov
ignite-534 - IgniteJmsStreamer implemented. Closes #14.


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

Branch: refs/heads/ignite-843
Commit: 0d701127c8a95a30f4c484247e84ab1f10f95e3a
Parents: d0536dc
Author: Raul Kripalani 
Authored: Fri Aug 14 16:11:19 2015 -0700
Committer: Valentin Kulichenko 
Committed: Fri Aug 14 16:11:19 2015 -0700

--
 .../ignite/internal/util/GridArgumentCheck.java |  17 +
 modules/jms11/pom.xml   |  98 
 .../apache/ignite/stream/jms11/JmsStreamer.java | 524 ++
 .../ignite/stream/jms11/MessageTransformer.java |  43 ++
 .../stream/jms11/IgniteJmsStreamerTest.java | 551 +++
 .../jms11/IgniteJmsStreamerTestSuite.java   |  34 ++
 .../ignite/stream/jms11/TestTransformers.java   | 123 +
 pom.xml |   1 +
 8 files changed, 1391 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0d701127/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
index b94bae6..8289f90 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridArgumentCheck.java
@@ -35,6 +35,9 @@ public class GridArgumentCheck {
 /** Not empty argument error message suffix. */
 private static final String NOT_EMPTY_SUFFIX = " must not be empty.";
 
+/** Not null or empty error message suffix. */
+private static final String NOT_NULL_OR_EMPTY_SUFFIX = " must not be null 
or empty.";
+
 /**
  * Checks if given argument value is not {@code null}. Otherwise - throws 
{@link NullPointerException}.
  *
@@ -145,4 +148,18 @@ public class GridArgumentCheck {
 if (arr.length == 0)
 throw new IllegalArgumentException(INVALID_ARG_MSG_PREFIX + name + 
NOT_EMPTY_SUFFIX);
 }
+
+/**
+ * Checks that a String is not null or empty.
+ *
+ * @param value Value to check.
+ * @param name Argument name.
+ */
+public static void notNullOrEmpty(String value, String name) {
+notNull(value, name);
+
+if (value.trim().length() == 0) {
+throw new IllegalArgumentException(INVALID_ARG_MSG_PREFIX + name + 
NOT_NULL_OR_EMPTY_SUFFIX);
+}
+}
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0d701127/modules/jms11/pom.xml
--
diff --git a/modules/jms11/pom.xml b/modules/jms11/pom.xml
new file mode 100644
index 000..c93ea9a
--- /dev/null
+++ b/modules/jms11/pom.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+4.0.0
+
+
+org.apache.ignite
+ignite-parent
+1
+../../parent
+
+
+ignite-jms11
+1.4.1-SNAPSHOT
+
+
+5.11.1
+
+
+
+
+org.apache.ignite
+ignite-core
+${project.version}
+
+
+
+javax.jms
+jms-api
+1.1-rev-1
+
+
+
+org.apache.activemq
+activemq-client
+${activemq.version}
+test
+
+
+
+org.apache.activemq
+activemq-broker
+${activemq.version}
+test
+
+
+
+org.apache.activemq
+activemq-kahadb-store
+${activemq.version}
+test
+
+
+
+org.apache.ignite
+ignite-log4j
+${project.version}
+test
+
+
+
+org.apache.ignite
+ignite-spring
+${project.version}
+test
+
+
+
+org.apache.ignite
+ignite-core
+${project.version}
+test-jar
+test
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0d701127/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java
--
diff --git 
a/modules/jms11/src/main/java/org/apache/ignite/stream/

[28/46] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-1.3.3-p2' into ignite-1.3.3-p2

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'origin/ignite-1.3.3-p2' into ignite-1.3.3-p2


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

Branch: refs/heads/ignite-843
Commit: 47895da65c84e3c51a0eeb6c526d424ea9fabf41
Parents: a3301b3 9300bbc
Author: sboikov 
Authored: Fri Aug 14 11:39:04 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 11:39:04 2015 +0300

--
 examples/pom.xml   | 2 +-
 modules/aop/pom.xml| 2 +-
 modules/apache-license-gen/pom.xml | 2 +-
 modules/aws/pom.xml| 2 +-
 modules/clients/pom.xml| 2 +-
 modules/cloud/pom.xml  | 2 +-
 modules/codegen/pom.xml| 2 +-
 modules/core/pom.xml   | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/extdata/p2p/pom.xml| 2 +-
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 modules/extdata/uri/pom.xml| 2 +-
 modules/gce/pom.xml| 2 +-
 modules/geospatial/pom.xml | 2 +-
 modules/hadoop/pom.xml | 2 +-
 modules/hibernate/pom.xml  | 2 +-
 modules/indexing/pom.xml   | 2 +-
 modules/jcl/pom.xml| 2 +-
 modules/jta/pom.xml| 2 +-
 modules/kafka/pom.xml  | 2 +-
 modules/log4j/pom.xml  | 2 +-
 modules/mesos/pom.xml  | 2 +-
 modules/rest-http/pom.xml  | 2 +-
 modules/scalar-2.10/pom.xml| 2 +-
 modules/scalar/pom.xml | 2 +-
 modules/schedule/pom.xml   | 2 +-
 modules/schema-import/pom.xml  | 2 +-
 modules/slf4j/pom.xml  | 2 +-
 modules/spark-2.10/pom.xml | 2 +-
 modules/spark/pom.xml  | 2 +-
 modules/spring/pom.xml | 2 +-
 modules/ssh/pom.xml| 2 +-
 modules/tools/pom.xml  | 2 +-
 modules/urideploy/pom.xml  | 2 +-
 modules/visor-console-2.10/pom.xml | 2 +-
 modules/visor-console/pom.xml  | 2 +-
 modules/visor-plugins/pom.xml  | 2 +-
 modules/web/pom.xml| 2 +-
 modules/yardstick/pom.xml  | 2 +-
 modules/yarn/pom.xml   | 2 +-
 pom.xml| 2 +-
 41 files changed, 41 insertions(+), 41 deletions(-)
--




[41/46] incubator-ignite git commit: master - schema drop fix for TL tables

2015-08-18 Thread akuznetsov
master - schema drop fix for TL tables


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

Branch: refs/heads/ignite-843
Commit: 952c7fc99d63b5af0d5a3fe7df4b610f8baf9001
Parents: ad12147
Author: S.Vladykin 
Authored: Mon Aug 17 21:22:50 2015 +0300
Committer: S.Vladykin 
Committed: Mon Aug 17 21:22:50 2015 +0300

--
 .../query/h2/twostep/GridThreadLocalTable.java  | 22 +---
 1 file changed, 15 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/952c7fc9/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
--
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
index c468371..f6735b5 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
@@ -21,6 +21,7 @@ import org.h2.api.*;
 import org.h2.command.ddl.*;
 import org.h2.engine.*;
 import org.h2.index.*;
+import org.h2.message.*;
 import org.h2.result.*;
 import org.h2.schema.*;
 import org.h2.table.*;
@@ -154,7 +155,7 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public String getTableType() {
-return tbl.get().getTableType();
+return EXTERNAL_TABLE_ENGINE;
 }
 
 /** {@inheritDoc} */
@@ -179,7 +180,7 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public long getMaxDataModificationId() {
-return tbl.get().getMaxDataModificationId();
+return 0;
 }
 
 /** {@inheritDoc} */
@@ -194,7 +195,7 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public boolean canDrop() {
-return tbl.get().canDrop();
+return false;
 }
 
 /** {@inheritDoc} */
@@ -204,12 +205,14 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public long getRowCountApproximation() {
-return tbl.get().getRowCountApproximation();
+Table t = tbl.get();
+
+return t == null ? 0 : t.getRowCountApproximation();
 }
 
 /** {@inheritDoc} */
 @Override public long getDiskSpaceUsed() {
-return tbl.get().getDiskSpaceUsed();
+return 0;
 }
 
 /** {@inheritDoc} */
@@ -219,12 +222,17 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public String getDropSQL() {
-return tbl.get().getDropSQL();
+return "";
+}
+
+/** {@inheritDoc} */
+@Override public void addDependencies(HashSet dependencies) {
+// No-op. We should not have any dependencies to add.
 }
 
 /** {@inheritDoc} */
 @Override public void checkRename() {
-tbl.get().checkRename();
+throw DbException.getUnsupportedException("rename");
 }
 
 /**



[23/46] incubator-ignite git commit: ignite-946: renamed VersionedEntry to CacheEntry

2015-08-18 Thread akuznetsov
ignite-946: renamed VersionedEntry to CacheEntry


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

Branch: refs/heads/ignite-843
Commit: 4f8f32af80d2c13df3fd8d3c5b302c0fd04906c5
Parents: 954c459
Author: Denis Magda 
Authored: Thu Aug 13 09:10:45 2015 +0300
Committer: Denis Magda 
Committed: Thu Aug 13 09:10:45 2015 +0300

--
 .../org/apache/ignite/cache/CacheEntry.java | 94 
 .../ignite/cache/version/VersionedEntry.java| 92 ---
 .../ignite/cache/version/package-info.java  | 21 -
 .../processors/cache/CacheEntryImpl.java|  6 +-
 .../processors/cache/CacheEntryImpl0.java   |  6 +-
 .../processors/cache/CacheEntryImplEx.java  | 83 +
 .../processors/cache/CacheInvokeEntry.java  |  6 +-
 .../processors/cache/GridCacheEntryEx.java  |  2 +-
 .../processors/cache/GridCacheMapEntry.java | 12 +--
 .../cache/version/CacheVersionedEntryImpl.java  | 83 -
 .../resources/META-INF/classnames.properties|  3 +-
 .../processors/cache/GridCacheTestEntryEx.java  |  2 +-
 .../CacheVersionedEntryAbstractTest.java| 27 +++---
 13 files changed, 209 insertions(+), 228 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4f8f32af/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
--
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java 
b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
new file mode 100644
index 000..a6a2aa3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheEntry.java
@@ -0,0 +1,94 @@
+/*
+ * 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.cache;
+
+import org.apache.ignite.*;
+
+import javax.cache.*;
+import javax.cache.processor.*;
+import java.util.*;
+
+/**
+ * Cache entry that extends {@link javax.cache.Cache.Entry} by providing 
additional entry related information.
+ *
+ * To get an instance of {@code CacheEntry} use {@link 
javax.cache.Cache.Entry#unwrap(Class)} method by passing
+ * {@code CacheEntry} class to it as the argument.
+ * 
+ * {@code CacheEntry} is supported only for {@link javax.cache.Cache.Entry} 
returned by one of the following methods:
+ * 
+ * {@link javax.cache.Cache#invoke(Object, EntryProcessor, Object...)}
+ * {@link javax.cache.Cache#invokeAll(Set, EntryProcessor, Object...)}
+ * invoke and invokeAll methods of {@link IgniteCache}
+ * {@link IgniteCache#randomEntry()}
+ * 
+ * 
+ * {@code CacheEntry} is not supported for {@link 
javax.cache.Cache#iterator()} because of performance reasons.
+ * {@link javax.cache.Cache#iterator()} loads entries from all the cluster 
nodes and to speed up the load additional
+ * information, like entry's version, is ignored.
+ *
+ * Java Example
+ * 
+ * IgniteCache cache = grid(0).cache(null);
+ *
+ * CacheEntry entry1 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public CacheEntry process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(CacheEntry.class);
+ *  }
+ * });
+ *
+ * // Cache entry for the given key may be updated at some point later.
+ *
+ * CacheEntry entry2 = cache.invoke(100,
+ * new EntryProcessor>() {
+ *  public CacheEntry process(MutableEntry entry,
+ *  Object... arguments) throws EntryProcessorException {
+ *  return entry.unwrap(CacheEntry.class);
+ *  }
+ * });
+ *
+ * // Comparing entries' versions.
+ * if (entry1.version().compareTo(entry2.version()) < 0) {
+ * // the entry has been updated
+ * }
+ * 
+ */
+public interface CacheEntry extends Cache.Entry {
+/**
+ * Returns a comparable obj

[40/46] incubator-ignite git commit: Merge branch 'ignite-1241-dev' of https://github.com/dmagda/incubator-ignite

2015-08-18 Thread akuznetsov
Merge branch 'ignite-1241-dev' of https://github.com/dmagda/incubator-ignite


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

Branch: refs/heads/ignite-843
Commit: ad121478b6f6d0d733e8d651a541f03b4fb849f4
Parents: 45c813a 38070b2
Author: Denis Magda 
Authored: Mon Aug 17 17:11:54 2015 +0300
Committer: Yakov Zhdanov 
Committed: Mon Aug 17 17:11:54 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 26 ++--
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |  4 +--
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  4 ---
 .../tcp/internal/TcpDiscoveryNode.java  | 18 +++---
 .../tcp/internal/TcpDiscoveryNodesRing.java | 23 +
 5 files changed, 53 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad121478/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad121478/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
--



[05/46] incubator-ignite git commit: ignite-946: added documentation

2015-08-18 Thread akuznetsov
ignite-946: added documentation


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

Branch: refs/heads/ignite-843
Commit: 4928d99d80a837843ce733eab546a3ea6aa3c2d3
Parents: 2d200a3
Author: Denis Magda 
Authored: Fri Jul 31 12:14:54 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:12 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java| 31 +++-
 1 file changed, 30 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4928d99d/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index 6f9d8f6..e669f15 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -17,11 +17,40 @@
 
 package org.apache.ignite.cache.version;
 
+import org.apache.ignite.*;
+
 import javax.cache.*;
+import javax.cache.processor.*;
 import java.util.*;
 
 /**
- * Cache entry along with version information.
+ * Cache entry that stores entry's version related information.
+ *
+ * To get a {@code VersionedEntry} of an {@link Cache.Entry} use {@link 
Cache.Entry#unwrap(Class)} by passing
+ * {@code VersionedEntry} class to it as the argument.
+ * 
+ * {@code VersionedEntry} is supported only for {@link Cache.Entry} returned 
by one of the following methods:
+ * 
+ * {@link Cache#invoke(Object, EntryProcessor, Object...)}
+ * {@link Cache#invokeAll(Set, EntryProcessor, Object...)}
+ * invoke and invokeAll methods of {@link IgniteCache}
+ * {@link IgniteCache#randomEntry()}
+ * 
+ * 
+ * {@code VersionedEntry} is not supported for {@link Cache#iterator()} 
because of performance reasons.
+ * {@link Cache#iterator()} loads entries from all the cluster nodes and to 
speed up the load version information
+ * is excluded from responses.
+ * Java Example
+ * 
+ * Cache cache = grid(0).cache(null);
+ *
+ *  cache.invoke(100, new EntryProcessor() {
+ *  public Object process(MutableEntry entry, Object... 
arguments) throws EntryProcessorException {
+ *  VersionedEntry verEntry = 
entry.unwrap(VersionedEntry.class);
+ *  return entry;
+ *   }
+ *   });
+ * 
  */
 public interface VersionedEntry extends Cache.Entry {
 /**



[26/46] incubator-ignite git commit: 1.3.3-p2-SNAPSHOT

2015-08-18 Thread akuznetsov
1.3.3-p2-SNAPSHOT


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

Branch: refs/heads/ignite-843
Commit: 9300bbc776191218fb687339ba72675f3fe45848
Parents: 51dcd51
Author: Ignite Teamcity 
Authored: Fri Aug 14 11:34:47 2015 +0300
Committer: Ignite Teamcity 
Committed: Fri Aug 14 11:34:47 2015 +0300

--
 examples/pom.xml   | 2 +-
 modules/aop/pom.xml| 2 +-
 modules/apache-license-gen/pom.xml | 2 +-
 modules/aws/pom.xml| 2 +-
 modules/clients/pom.xml| 2 +-
 modules/cloud/pom.xml  | 2 +-
 modules/codegen/pom.xml| 2 +-
 modules/core/pom.xml   | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/extdata/p2p/pom.xml| 2 +-
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 modules/extdata/uri/pom.xml| 2 +-
 modules/gce/pom.xml| 2 +-
 modules/geospatial/pom.xml | 2 +-
 modules/hadoop/pom.xml | 2 +-
 modules/hibernate/pom.xml  | 2 +-
 modules/indexing/pom.xml   | 2 +-
 modules/jcl/pom.xml| 2 +-
 modules/jta/pom.xml| 2 +-
 modules/kafka/pom.xml  | 2 +-
 modules/log4j/pom.xml  | 2 +-
 modules/mesos/pom.xml  | 2 +-
 modules/rest-http/pom.xml  | 2 +-
 modules/scalar-2.10/pom.xml| 2 +-
 modules/scalar/pom.xml | 2 +-
 modules/schedule/pom.xml   | 2 +-
 modules/schema-import/pom.xml  | 2 +-
 modules/slf4j/pom.xml  | 2 +-
 modules/spark-2.10/pom.xml | 2 +-
 modules/spark/pom.xml  | 2 +-
 modules/spring/pom.xml | 2 +-
 modules/ssh/pom.xml| 2 +-
 modules/tools/pom.xml  | 2 +-
 modules/urideploy/pom.xml  | 2 +-
 modules/visor-console-2.10/pom.xml | 2 +-
 modules/visor-console/pom.xml  | 2 +-
 modules/visor-plugins/pom.xml  | 2 +-
 modules/web/pom.xml| 2 +-
 modules/yardstick/pom.xml  | 2 +-
 modules/yarn/pom.xml   | 2 +-
 pom.xml| 2 +-
 41 files changed, 41 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/examples/pom.xml
--
diff --git a/examples/pom.xml b/examples/pom.xml
index 014cb0a..043689c 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
 
 
 ignite-examples
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/aop/pom.xml
--
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 1983567..8a271e5 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aop
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/apache-license-gen/pom.xml
--
diff --git a/modules/apache-license-gen/pom.xml 
b/modules/apache-license-gen/pom.xml
index c723729..e1066c1 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,5 +31,5 @@
 
 org.apache.ignite
 ignite-apache-license-gen
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/aws/pom.xml
--
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 1f92999..e5cf518 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aws
-1.3.3-p1-SNAPSHOT
+1.3.3-p2-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9300bbc7/modules/clients/pom.xml
---

[15/46] incubator-ignite git commit: ignite-946: fixed review notes

2015-08-18 Thread akuznetsov
ignite-946: fixed review notes


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

Branch: refs/heads/ignite-843
Commit: 911ffbb5de261d662a915677b99cae4a160407eb
Parents: 9f16eb1
Author: Denis Magda 
Authored: Mon Aug 10 11:39:44 2015 +0300
Committer: Denis Magda 
Committed: Mon Aug 10 11:39:44 2015 +0300

--
 .../ignite/cache/version/VersionedEntry.java|  2 +-
 .../processors/cache/CacheEntryImpl0.java   |  4 +-
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheSwapManager.java  | 88 
 .../cache/transactions/IgniteTxAdapter.java |  2 +
 .../cache/transactions/IgniteTxEntry.java   |  2 +-
 .../transactions/IgniteTxLocalAdapter.java  |  8 ++
 .../cache/version/GridCacheVersionAware.java| 30 +++
 .../cache/version/GridVersionedMapEntry.java| 33 
 .../CacheVersionedEntryAbstractTest.java|  2 +-
 10 files changed, 99 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
index e669f15..2c0879b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/version/VersionedEntry.java
@@ -56,7 +56,7 @@ public interface VersionedEntry extends Cache.Entry {
 /**
  * Versions comparator.
  */
-public static final Comparator VERSIONS_COMPARATOR = new 
Comparator() {
+public static final Comparator VER_COMP = new 
Comparator() {
 @Override public int compare(VersionedEntry o1, VersionedEntry o2) {
 int res = Integer.compare(o1.topologyVersion(), 
o2.topologyVersion());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
index a5e27d6..987fbd3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl0.java
@@ -52,8 +52,8 @@ public class CacheEntryImpl0 implements Cache.Entry {
 @Override public  T unwrap(Class cls) {
 if(cls.isAssignableFrom(getClass()))
 return cls.cast(this);
-else if (cls.isAssignableFrom(VersionedEntry.class) && e instanceof 
GridVersionedMapEntry)
-return (T)new CacheVersionedEntryImpl<>(e.getKey(), e.getValue(), 
((GridVersionedMapEntry)e).version());
+else if (cls.isAssignableFrom(VersionedEntry.class) && e instanceof 
GridCacheVersionAware)
+return (T)new CacheVersionedEntryImpl<>(e.getKey(), e.getValue(), 
((GridCacheVersionAware)e).version());
 
 throw new IllegalArgumentException("Unwrapping to class is not 
supported: " + cls);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/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 43cf2fe..298f7a6 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
@@ -1385,7 +1385,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 assert entryProcessor != null;
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry<>(cctx, key, old, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry<>(cctx, key, old, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/911ffbb5/modules/core/s

[42/46] incubator-ignite git commit: master - index sort fix for merge tables

2015-08-18 Thread akuznetsov
master - index sort fix for merge tables


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

Branch: refs/heads/ignite-843
Commit: 9c939bec1bfa2c3396051c155ffb06775a329aad
Parents: 952c7fc
Author: S.Vladykin 
Authored: Mon Aug 17 21:23:26 2015 +0300
Committer: S.Vladykin 
Committed: Mon Aug 17 21:23:26 2015 +0300

--
 .../internal/processors/query/h2/twostep/GridMergeTable.java  | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9c939bec/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
--
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index 0b335d3..7d2235d 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -35,9 +35,6 @@ public class GridMergeTable extends TableBase {
 private final GridKernalContext ctx;
 
 /** */
-private final ArrayList idxs = new ArrayList<>(1);
-
-/** */
 private final GridMergeIndex idx;
 
 /**
@@ -49,8 +46,6 @@ public class GridMergeTable extends TableBase {
 
 this.ctx = ctx;
 idx = new GridMergeIndexUnsorted(this, "merge_scan");
-
-idxs.add(idx);
 }
 
 /**
@@ -124,7 +119,7 @@ public class GridMergeTable extends TableBase {
 
 /** {@inheritDoc} */
 @Override public ArrayList getIndexes() {
-return idxs;
+return null;
 }
 
 /** {@inheritDoc} */



[44/46] incubator-ignite git commit: Deprecated IgniteConfiguration.setNodeId()

2015-08-18 Thread akuznetsov
Deprecated IgniteConfiguration.setNodeId()


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

Branch: refs/heads/ignite-843
Commit: fcd9d611503592ef3104feee42d82b3956aae42d
Parents: d31c8c6
Author: Valentin Kulichenko 
Authored: Mon Aug 17 21:24:55 2015 -0700
Committer: Valentin Kulichenko 
Committed: Mon Aug 17 21:24:55 2015 -0700

--
 .../org/apache/ignite/configuration/IgniteConfiguration.java| 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcd9d611/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 546c382..b670398 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
@@ -60,8 +60,8 @@ import javax.cache.expiry.*;
 import javax.cache.integration.*;
 import javax.cache.processor.*;
 import javax.management.*;
-import java.io.*;
 import javax.net.ssl.*;
+import java.io.*;
 import java.lang.management.*;
 import java.util.*;
 
@@ -970,6 +970,7 @@ public class IgniteConfiguration {
  *
  * @return Unique identifier for this node within grid.
  */
+@Deprecated
 public UUID getNodeId() {
 return nodeId;
 }
@@ -980,7 +981,9 @@ public class IgniteConfiguration {
  * @param nodeId Unique identifier for local node.
  * @see IgniteConfiguration#getNodeId()
  * @return {@code this} for chaining.
+ * @deprecated Use {@link #setConsistentId(Serializable)} instead.
  */
+@Deprecated
 public IgniteConfiguration setNodeId(UUID nodeId) {
 this.nodeId = nodeId;
 



[08/46] incubator-ignite git commit: ignite-946: formatting fixes

2015-08-18 Thread akuznetsov
ignite-946: formatting fixes


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

Branch: refs/heads/ignite-843
Commit: 26144dc4f845af7533cc645d898202b80c0a29f6
Parents: 4928d99
Author: Denis Magda 
Authored: Fri Jul 31 12:18:58 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:13 2015 +0300

--
 .../processors/cache/GridCacheMapEntry.java | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/26144dc4/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 45ff619..ebcb908 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
@@ -609,16 +609,16 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 @Nullable IgniteCacheExpiryPolicy expirePlc)
 throws IgniteCheckedException, GridCacheEntryRemovedException {
 return innerGet0(tx,
- readSwap,
- readThrough,
- evt,
- unmarshal,
- updateMetrics,
- tmp,
- subjId,
- transformClo,
- taskName,
- expirePlc);
+readSwap,
+readThrough,
+evt,
+unmarshal,
+updateMetrics,
+tmp,
+subjId,
+transformClo,
+taskName,
+expirePlc);
 }
 
 /** {@inheritDoc} */



[36/46] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.3.3-p2'

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'remotes/origin/ignite-1.3.3-p2'

Conflicts:
examples/pom.xml
modules/aop/pom.xml
modules/apache-license-gen/pom.xml
modules/aws/pom.xml
modules/clients/pom.xml
modules/cloud/pom.xml
modules/codegen/pom.xml
modules/core/pom.xml

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
modules/core/src/main/resources/ignite.properties

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
modules/extdata/p2p/pom.xml
modules/extdata/uri/modules/uri-dependency/pom.xml
modules/extdata/uri/pom.xml
modules/gce/pom.xml
modules/geospatial/pom.xml
modules/hadoop/pom.xml
modules/hibernate/pom.xml
modules/indexing/pom.xml
modules/jcl/pom.xml
modules/jta/pom.xml
modules/kafka/pom.xml
modules/log4j/pom.xml
modules/mesos/pom.xml
modules/rest-http/pom.xml
modules/scalar-2.10/pom.xml
modules/scalar/pom.xml
modules/schedule/pom.xml
modules/schema-import/pom.xml
modules/slf4j/pom.xml
modules/spark-2.10/pom.xml
modules/spark/pom.xml
modules/spring/pom.xml
modules/ssh/pom.xml
modules/tools/pom.xml
modules/urideploy/pom.xml
modules/visor-console-2.10/pom.xml
modules/visor-console/pom.xml
modules/visor-plugins/pom.xml
modules/web/pom.xml
modules/yardstick/pom.xml
modules/yarn/pom.xml
pom.xml

Merge remote-tracking branch 'remotes/origin/ignite-1.3.3-p2'

Conflicts:
benchmarks/cache-comparison/pom.xml
benchmarks/filesystem/hadoop1/pom.xml
benchmarks/filesystem/hadoop2/pom.xml
benchmarks/mongo/pom.xml
benchmarks/risk-analytics/pom.xml
benchmarks/serialization/pom.xml

benchmarks/yardstick/src/main/dotnet/gridgain-benchmarks/Properties/AssemblyInfo.cs
examples/clients/cpp/configure.ac

examples/clients/dotnet/GridGainExamples/GridGainExamples/Properties/AssemblyInfo.cs

examples/clients/dotnet/GridGainExamples/GridGainExamplesDll/Properties/AssemblyInfo.cs
examples/pom.xml
modules/clients/common/configure.ac
modules/clients/common/project/vs/Resource.rc
modules/clients/cpp/_old/main/configure.ac
modules/clients/cpp/_old/main/tests/configure.ac
modules/clients/cpp/_old/vsproject/resource.h
modules/clients/cpp/core-test/configure.ac
modules/clients/cpp/core-test/project/vs/Resource.rc
modules/clients/cpp/core/configure.ac
modules/clients/cpp/core/project/vs/Resource.rc
modules/clients/dotnet/gridgain-codegen/Properties/AssemblyInfo.cs
modules/clients/dotnet/gridgain-exe/Properties/AssemblyInfo.cs
modules/clients/dotnet/gridgain/Properties/AssemblyInfo.cs
modules/clients/pom.xml

modules/clients/src/test/dotnet/gridgain-examples-test/Properties/AssemblyInfo.cs

modules/clients/src/test/dotnet/gridgain-test-compatibility/Properties/AssemblyInfo.cs

modules/clients/src/test/dotnet/gridgain-test-dll/Properties/AssemblyInfo.cs

modules/clients/src/test/dotnet/gridgain-test-runner/Properties/AssemblyInfo.cs
modules/clients/src/test/dotnet/gridgain-test/Properties/AssemblyInfo.cs
modules/codegen/pom.xml

modules/compatibility/gg-versions/7.3.3/src/main/java/org/gridgain/grid/compatibility/GridCompatibilityTestsRunner.java
modules/compatibility/pom.xml
modules/core/pom.xml
modules/core/src/main/resources/gridgain.properties
modules/diagnostic/pom.xml
modules/dr-demo/pom.xml
modules/license-gen/pom.xml
modules/mongo-sniffer/pom.xml
modules/mongo-visor/pom.xml
modules/mongo/pom.xml
modules/tools/pom.xml
modules/visor-console/pom.xml
modules/visor-demo/pom.xml
modules/visor-tester-plugin/pom.xml
modules/visor-tester/pom.xml
modules/visor/pom.xml
modules/yardstick/dotnet/Properties/AssemblyInfo.cs
modules/yardstick/pom.xml
parent/pom.xml
pilots/chronotrack/pom.xml
pilots/ctb/pom.xml
pilots/dsi/pom.xml
pilots/ionic/pom.xml
pilots/sb/pom.xml
pilots/sony/pom.xml
pilots/wellsfargo/pom.xml
pilots/worldpay/pom.xml
pom.xml


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/648cbd78
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/648cbd78
Diff: http://git-wip-us.apache.org/repos/asf/incubat

[39/46] incubator-ignite git commit: Squashed commit for ignite-1239

2015-08-18 Thread akuznetsov
Squashed commit for ignite-1239


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

Branch: refs/heads/ignite-843
Commit: 45c813af7eb4a11ec59d3477a6a0b68791f1d7f2
Parents: 7635e58
Author: Denis Magda 
Authored: Mon Aug 17 16:51:41 2015 +0300
Committer: Yakov Zhdanov 
Committed: Mon Aug 17 16:51:41 2015 +0300

--
 .../GridDhtUnreservedPartitionException.java| 66 ++
 .../cache/query/GridCacheQueryAdapter.java  | 56 ++--
 .../cache/query/GridCacheQueryManager.java  | 71 ++-
 ...CacheScanPartitionQueryFallbackSelfTest.java | 96 
 4 files changed, 261 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45c813af/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
new file mode 100644
index 000..d824a47
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
@@ -0,0 +1,66 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.internal.processors.affinity.*;
+
+/**
+ * Exception that is thrown when a partition reservation failed.
+ */
+public class GridDhtUnreservedPartitionException extends 
IgniteCheckedException {
+/** */
+private static final long serialVersionUID = 0L;
+
+/** Partition. */
+private final int part;
+
+/** Topology version. */
+private final AffinityTopologyVersion topVer;
+
+/**
+ * @param part Partition.
+ * @param topVer Affinity topology version.
+ * @param msg Message.
+ */
+public GridDhtUnreservedPartitionException(int part, 
AffinityTopologyVersion topVer, String msg) {
+super(msg);
+
+this.part = part;
+this.topVer = topVer;
+}
+
+/**
+ * @return Partition.
+ */
+public int partition() {
+return part;
+}
+
+/**
+ * @return Affinity topology version.
+ */
+public AffinityTopologyVersion topologyVersion() {
+return topVer;
+}
+
+/** {@inheritDoc} */
+@Override public String toString() {
+return getClass() + " [part=" + part + ", msg=" + getMessage() + ']';
+}
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45c813af/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index 953cb9a..90f9b9e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.future.*;
 import o

[07/46] incubator-ignite git commit: IGNITE-946 Added test to Suite.

2015-08-18 Thread akuznetsov
IGNITE-946 Added test to Suite.


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

Branch: refs/heads/ignite-843
Commit: f0fe0769751b7957a64fc5dd56989e54f1223ab1
Parents: 26144dc
Author: nikolay_tikhonov 
Authored: Fri Jul 31 13:00:09 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:13 2015 +0300

--
 .../java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0fe0769/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 3ac7879..228be92 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -164,7 +164,7 @@ public class IgniteCacheTestSuite4 extends TestSuite {
 suite.addTestSuite(CacheVersionedEntryReplicatedAtomicSelfTest.class);
 
suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalSelfTest.class);
 
suite.addTestSuite(CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.class);
-
suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.class);
+
suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.class);
 
 return suite;
 }



[09/46] incubator-ignite git commit: ignite-946: fixing version retrieval for transactions

2015-08-18 Thread akuznetsov
ignite-946: fixing version retrieval for transactions


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

Branch: refs/heads/ignite-843
Commit: 2e7799d446653bba379cc231628ba2b02c993e5e
Parents: f0fe076
Author: Denis Magda 
Authored: Fri Jul 31 15:32:45 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:14 2015 +0300

--
 .../processors/cache/CacheInvokeEntry.java  |  2 +-
 .../processors/cache/GridCacheMapEntry.java |  4 +-
 .../cache/transactions/IgniteTxAdapter.java | 14 ++-
 .../cache/transactions/IgniteTxEntry.java   | 11 ++-
 .../transactions/IgniteTxLocalAdapter.java  | 90 
 5 files changed, 98 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/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 e6f8d4e..2d8f738 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
@@ -121,7 +121,7 @@ public class CacheInvokeEntry extends 
CacheLazyEntry implements Muta
 /** {@inheritDoc} */
 @SuppressWarnings("unchecked")
 @Override public  T unwrap(Class cls) {
-if (cls.isAssignableFrom(VersionedEntry.class))
+if (cls.isAssignableFrom(VersionedEntry.class) && ver != null)
 return (T)new CacheVersionedEntryImpl<>(getKey(), getValue(), ver);
 
 return super.unwrap(cls);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/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 ebcb908..43cf2fe 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
@@ -1653,7 +1653,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 oldVal = rawGetOrUnmarshalUnlocked(true);
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);
@@ -1878,7 +1878,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 EntryProcessor entryProcessor = 
(EntryProcessor)writeObj;
 
-CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, this.ver);
+CacheInvokeEntry entry = new 
CacheInvokeEntry(cctx, key, oldVal, version());
 
 try {
 Object computed = entryProcessor.process(entry, 
invokeArgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e7799d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 0d14012..797f75e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -1228,9 +1228,21 @@ public abstract class IgniteTxAdapter extends 
GridMetadataAwareAdapter
 
 Object key = null;
 
+GridCacheVersion ver;
+
+try {
+ver = txEntry.cached().version();
+}
+catch (GridCacheEntryRemovedException e) {
+if (log.isDebugEnabled())
+log.

[31/46] incubator-ignite git commit: ignite-1241-dev: fixed endless "failure detection threshold" warnings for the case when there is only one server and client nodes in the topology

2015-08-18 Thread akuznetsov
ignite-1241-dev: fixed endless "failure detection threshold" warnings for the 
case when there is only one server and client nodes in the topology


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

Branch: refs/heads/ignite-843
Commit: 38070b28bdda9e95b125f27706037c9916edeeb6
Parents: 7760847
Author: Denis Magda 
Authored: Fri Aug 14 16:20:18 2015 +0300
Committer: Denis Magda 
Committed: Fri Aug 14 16:20:18 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 26 ++--
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |  4 +--
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  4 ---
 .../tcp/internal/TcpDiscoveryNode.java  | 18 +++---
 .../tcp/internal/TcpDiscoveryNodesRing.java | 23 +
 5 files changed, 53 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38070b28/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 76144e3..c8c4c50 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
@@ -628,9 +628,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /** {@inheritDoc} */
-@Override protected void onDataReceived() {
+@Override protected void onMessageExchanged() {
 if (spi.failureDetectionTimeoutEnabled() && locNode != null)
-locNode.lastDataReceivedTime(U.currentTimeMillis());
+locNode.lastExchangeTime(U.currentTimeMillis());
 }
 
 /**
@@ -1916,9 +1916,13 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (spi.ensured(msg))
 msgHist.add(msg);
 
-if (msg.senderNodeId() != null && 
!msg.senderNodeId().equals(getLocalNodeId()))
-// Reset the flag.
+if (msg.senderNodeId() != null && 
!msg.senderNodeId().equals(getLocalNodeId())) {
+// Received a message from remote node.
+onMessageExchanged();
+
+// Reset the failure flag.
 failureThresholdReached = false;
+}
 
 spi.stats.onMessageProcessingFinished(msg);
 }
@@ -2278,6 +2282,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 int res = spi.readReceipt(sock, 
timeoutHelper.nextTimeoutChunk(ackTimeout0));
 
+onMessageExchanged();
+
 if (log.isDebugEnabled())
 log.debug("Message has been sent to next 
node [msg=" + msg +
 ", next=" + next.id() +
@@ -4104,9 +4110,12 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Check connection aliveness status.
  */
 private void checkConnection() {
+Boolean hasRemoteSrvNodes = null;
+
 if (spi.failureDetectionTimeoutEnabled() && 
!failureThresholdReached &&
-U.currentTimeMillis() - locNode.lastDataReceivedTime() >= 
connCheckThreshold &&
-ring.hasRemoteNodes() && spiStateCopy() == CONNECTED) {
+U.currentTimeMillis() - locNode.lastExchangeTime() >= 
connCheckThreshold &&
+spiStateCopy() == CONNECTED &&
+(hasRemoteSrvNodes = ring.hasRemoteServerNodes())) {
 
 log.info("Local node seems to be disconnected from topology 
(failure detection timeout " +
 "is reached): [failureDetectionTimeout=" + 
spi.failureDetectionTimeout() +
@@ -4123,7 +4132,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (elapsed > 0)
 return;
 
-if (ring.hasRemoteNodes()) {
+if (hasRemoteSrvNodes == null)
+hasRemoteSrvNodes = ring.hasRemoteServerNodes();
+
+if (hasRemoteSrvNodes) {
 sendMessageAcrossRing(new 
TcpDiscoveryConnectionCheckMessage(locNode));
 
 lastTimeConnCheckMsgSent = U.currentTimeMillis();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38070b28/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/T

[20/46] incubator-ignite git commit: 1.3.3-p1-SNAPSHOT

2015-08-18 Thread akuznetsov
1.3.3-p1-SNAPSHOT


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

Branch: refs/heads/ignite-843
Commit: 834b34765fac4cb87d9d8f4bdb39c14a9e61275d
Parents: 7d747d2
Author: Ignite Teamcity 
Authored: Tue Aug 11 10:53:58 2015 +0300
Committer: Ignite Teamcity 
Committed: Tue Aug 11 10:53:58 2015 +0300

--
 examples/pom.xml   | 2 +-
 modules/aop/pom.xml| 2 +-
 modules/apache-license-gen/pom.xml | 2 +-
 modules/aws/pom.xml| 2 +-
 modules/clients/pom.xml| 2 +-
 modules/cloud/pom.xml  | 2 +-
 modules/codegen/pom.xml| 2 +-
 modules/core/pom.xml   | 2 +-
 modules/core/src/main/resources/ignite.properties  | 2 +-
 modules/extdata/p2p/pom.xml| 2 +-
 modules/extdata/uri/modules/uri-dependency/pom.xml | 2 +-
 modules/extdata/uri/pom.xml| 2 +-
 modules/gce/pom.xml| 2 +-
 modules/geospatial/pom.xml | 2 +-
 modules/hadoop/pom.xml | 2 +-
 modules/hibernate/pom.xml  | 2 +-
 modules/indexing/pom.xml   | 2 +-
 modules/jcl/pom.xml| 2 +-
 modules/jta/pom.xml| 2 +-
 modules/kafka/pom.xml  | 2 +-
 modules/log4j/pom.xml  | 2 +-
 modules/mesos/pom.xml  | 2 +-
 modules/rest-http/pom.xml  | 2 +-
 modules/scalar-2.10/pom.xml| 2 +-
 modules/scalar/pom.xml | 2 +-
 modules/schedule/pom.xml   | 2 +-
 modules/schema-import/pom.xml  | 2 +-
 modules/slf4j/pom.xml  | 2 +-
 modules/spark-2.10/pom.xml | 2 +-
 modules/spark/pom.xml  | 2 +-
 modules/spring/pom.xml | 2 +-
 modules/ssh/pom.xml| 2 +-
 modules/tools/pom.xml  | 2 +-
 modules/urideploy/pom.xml  | 2 +-
 modules/visor-console-2.10/pom.xml | 2 +-
 modules/visor-console/pom.xml  | 2 +-
 modules/visor-plugins/pom.xml  | 2 +-
 modules/web/pom.xml| 2 +-
 modules/yardstick/pom.xml  | 2 +-
 modules/yarn/pom.xml   | 2 +-
 pom.xml| 2 +-
 41 files changed, 41 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/examples/pom.xml
--
diff --git a/examples/pom.xml b/examples/pom.xml
index 1338a18..014cb0a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
 
 
 ignite-examples
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/aop/pom.xml
--
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 194ffab..1983567 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aop
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/apache-license-gen/pom.xml
--
diff --git a/modules/apache-license-gen/pom.xml 
b/modules/apache-license-gen/pom.xml
index 11259a5..c723729 100644
--- a/modules/apache-license-gen/pom.xml
+++ b/modules/apache-license-gen/pom.xml
@@ -31,5 +31,5 @@
 
 org.apache.ignite
 ignite-apache-license-gen
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/aws/pom.xml
--
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index 37f6250..1f92999 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
 
 
 ignite-aws
-1.3.3-SNAPSHOT
+1.3.3-p1-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/834b3476/modules/clients/pom.xml
---

[30/46] incubator-ignite git commit: # Wait for next topology version before retry, retries for async tx operations

2015-08-18 Thread akuznetsov
# Wait for next topology version before retry, retries for async tx operations


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

Branch: refs/heads/ignite-843
Commit: 122a9dbf337d5c1128be32d4efee1e0f1dc683f5
Parents: 47895da
Author: sboikov 
Authored: Fri Aug 14 12:50:06 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 13:57:19 2015 +0300

--
 .../processors/cache/GridCacheAdapter.java  | 143 +--
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  25 +++-
 .../IgniteCachePutRetryAbstractSelfTest.java|  94 ++--
 3 files changed, 237 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122a9dbf/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 47ede5b..91af352 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
@@ -2283,8 +2283,7 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache putAsync(K key, V val,
-  @Nullable 
CacheEntryPredicate... filter) {
+public IgniteInternalFuture putAsync(K key, V val, @Nullable 
CacheEntryPredicate... filter) {
 final boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
 final long start = statsEnabled ? System.nanoTime() : 0L;
@@ -3975,8 +3974,15 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache 0 
: tx;
+
+
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1).get();
+
 continue;
+}
 
 throw e;
 }
@@ -4014,18 +4020,36 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache fut = new AsyncOpRetryFuture<>(op, 
skipStore, retries);
+
+fut.execute();
+
+return fut;
+}
+}
+else
+return asyncOp(tx, op);
 }
 
 /**
@@ -4624,6 +4648,97 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache extends GridFutureAdapter {
+/** */
+private AsyncOp op;
+
+/** */
+private boolean skipStore;
+
+/** */
+private int retries;
+
+/** */
+private IgniteTxLocalAdapter tx;
+
+/**
+ * @param op Operation.
+ * @param skipStore Skip store flag.
+ * @param retries Number of retries.
+ */
+public AsyncOpRetryFuture(AsyncOp op,
+boolean skipStore,
+int retries) {
+assert retries > 1 : retries;
+
+this.op = op;
+this.tx = null;
+this.skipStore = skipStore;
+this.retries = retries;
+}
+
+/**
+ * @param tx Transaction.
+ */
+public void execute() {
+tx = ctx.tm().newTx(
+true,
+op.single(),
+ctx.systemTx() ? ctx : null,
+OPTIMISTIC,
+READ_COMMITTED,
+
ctx.kernalContext().config().getTransactionConfiguration().getDefaultTxTimeout(),
+!skipStore,
+0);
+
+IgniteInternalFuture fut = asyncOp(tx, op);
+
+fut.listen(new IgniteInClosure>() {
+@Override public void apply(IgniteInternalFuture fut) {
+try {
+T res = fut.get();
+
+onDone(res);
+}
+catch (IgniteCheckedException e) {
+if (X.hasCause(e, 
ClusterTopologyCheckedException.class) && --retries > 0) {
+IgniteTxLocalAdapter tx = 
AsyncOpRetryFuture.this.tx;
+
+assert tx != null;
+
+AffinityTopologyVersion topVer = 
tx.topologyVersion();
+
+assert topVer != null && topVer.topologyVersion() 
> 0 : tx;
+
+IgniteInternalFuture topFut =
+
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1);
+
+topFut.listen(new 
IgniteInClosure>() {
+

[17/46] incubator-ignite git commit: ignite-946: renamed topologyVersion to topologyOrder for GridCacheVersion

2015-08-18 Thread akuznetsov
ignite-946: renamed topologyVersion to topologyOrder for GridCacheVersion


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

Branch: refs/heads/ignite-843
Commit: dd3cecf6a68deec93c084af2f7d7e1be9de9f877
Parents: c1582fc
Author: Denis Magda 
Authored: Tue Aug 11 09:02:00 2015 +0300
Committer: Denis Magda 
Committed: Tue Aug 11 09:02:00 2015 +0300

--
 .../cache/GridCacheAtomicVersionComparator.java |  4 +--
 .../processors/cache/GridCacheMapEntry.java |  2 +-
 .../processors/cache/GridCacheUtils.java|  2 +-
 .../cache/transactions/IgniteTxManager.java |  2 +-
 .../cache/version/CacheVersionedEntryImpl.java  |  4 +--
 .../version/GridCachePlainVersionedEntry.java   |  2 +-
 .../version/GridCacheRawVersionedEntry.java |  2 +-
 .../cache/version/GridCacheVersion.java | 28 ++--
 .../cache/version/GridCacheVersionManager.java  |  5 ++--
 .../ignite/internal/util/IgniteUtils.java   |  4 +--
 .../cache/GridCacheEntryVersionSelfTest.java|  4 +--
 11 files changed, 29 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
index 3a06100..45288d9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicVersionComparator.java
@@ -32,8 +32,8 @@ public class GridCacheAtomicVersionComparator {
  * @return Comparison value.
  */
 public int compare(GridCacheVersion one, GridCacheVersion other, boolean 
ignoreTime) {
-int topVer = one.topologyVersion();
-int otherTopVer = other.topologyVersion();
+int topVer = one.topologyOrder();
+int otherTopVer = other.topologyOrder();
 
 if (topVer == otherTopVer) {
 long globalTime = one.globalTime();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/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 298f7a6..33c42c4 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
@@ -1927,7 +1927,7 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
 
 // Incorporate conflict version into new version if needed.
 if (conflictVer != null && conflictVer != newVer)
-newVer = new GridCacheVersionEx(newVer.topologyVersion(),
+newVer = new GridCacheVersionEx(newVer.topologyOrder(),
 newVer.globalTime(),
 newVer.order(),
 newVer.nodeOrder(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index a313e3d..75f1dee 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1060,7 +1060,7 @@ public class GridCacheUtils {
 
 byte[] bytes = new byte[28];
 
-U.intToBytes(ver.topologyVersion(), bytes, 0);
+U.intToBytes(ver.topologyOrder(), bytes, 0);
 U.longToBytes(ver.globalTime(), bytes, 4);
 U.longToBytes(ver.order(), bytes, 12);
 U.intToBytes(ver.nodeOrderAndDrIdRaw(), bytes, 20);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dd3cecf6/modules/core/src/main/java/org/apache/i

[32/46] incubator-ignite git commit: # Properly handle ClusterTopologyServerNotFoundException for retries

2015-08-18 Thread akuznetsov
# Properly handle ClusterTopologyServerNotFoundException for retries


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

Branch: refs/heads/ignite-843
Commit: 2903a29e7a50802617872bfd0fcc3497c4c7785e
Parents: 122a9db
Author: sboikov 
Authored: Fri Aug 14 16:22:25 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 16:22:25 2015 +0300

--
 .../CachePartialUpdateCheckedException.java | 29 +++-
 .../processors/cache/GridCacheAdapter.java  | 50 
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 48 +++
 .../near/GridNearOptimisticTxPrepareFuture.java |  2 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  1 -
 5 files changed, 86 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2903a29e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
index 0272b7c..f430d12 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.affinity.*;
 
 import java.util.*;
 
@@ -32,6 +33,9 @@ public class CachePartialUpdateCheckedException extends 
IgniteCheckedException {
 /** Failed keys. */
 private final Collection failedKeys = new ArrayList<>();
 
+/** */
+private AffinityTopologyVersion topVer;
+
 /**
  * @param msg Error message.
  */
@@ -50,13 +54,36 @@ public class CachePartialUpdateCheckedException extends 
IgniteCheckedException {
 /**
  * @param failedKeys Failed keys.
  * @param err Error.
+ * @param topVer Topology version for failed update.
  */
-public void add(Collection failedKeys, Throwable err) {
+public void add(Collection failedKeys, Throwable err, 
AffinityTopologyVersion topVer) {
+if (topVer != null) {
+AffinityTopologyVersion topVer0 = this.topVer;
+
+if (topVer0 == null || topVer.compareTo(topVer0) > 0)
+this.topVer = topVer;
+}
+
 this.failedKeys.addAll(failedKeys);
 
 addSuppressed(err);
 }
 
+/**
+ * @return Topology version.
+ */
+public AffinityTopologyVersion topologyVersion() {
+return topVer;
+}
+
+/**
+ * @param failedKeys Failed keys.
+ * @param err Error.
+ */
+public void add(Collection failedKeys, Throwable err) {
+add(failedKeys, err, null);
+}
+
 /** {@inheritDoc} */
 @Override public String getMessage() {
 return super.getMessage() + ": " + failedKeys;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2903a29e/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 91af352..992edd8 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
@@ -3975,13 +3975,17 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache 0 
: tx;
+if (!(topErr instanceof 
ClusterTopologyServerNotFoundException)) {
+AffinityTopologyVersion topVer = 
tx.topologyVersion();
+
+assert topVer != null && topVer.topologyVersion() 
> 0 : tx;
 
-
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1).get();
+
ctx.affinity().affinityReadyFuture(topVer.topologyVersion() + 1).get();
 
-continue;
+continue;
+}
 }
 
 throw e;
@@ -4702,31 +4706,35 @@ public abstract class GridCacheAdapter implements 
IgniteInt

[27/46] incubator-ignite git commit: # Fix TopologyVersionAwareJob

2015-08-18 Thread akuznetsov
 # Fix TopologyVersionAwareJob


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

Branch: refs/heads/ignite-843
Commit: a3301b3511a742c7c2cc013a4e31a1a838482938
Parents: 51dcd51
Author: sboikov 
Authored: Fri Aug 14 11:27:29 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 11:37:47 2015 +0300

--
 .../processors/cache/GridCacheAdapter.java  |   9 +-
 .../IgniteCacheSizeFailoverTest.java| 115 +++
 .../IgniteCachePutRetryAbstractSelfTest.java|  19 ++-
 ...PutRetryAtomicPrimaryWriteOrderSelfTest.java |  32 ++
 .../tcp/IgniteCacheSslStartStopSelfTest.java|   1 +
 .../IgniteCacheFailoverTestSuite.java   |   3 +
 6 files changed, 175 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3301b35/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 18f4004..47ede5b 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
@@ -5597,9 +5597,12 @@ public abstract class GridCacheAdapter implements 
IgniteInternalCache>() {
-@Override
-public void apply(IgniteInternalFuture t) {
-jobCtx.callcc();
+@Override public void apply(IgniteInternalFuture t) 
{
+
((IgniteKernal)ignite).context().closure().runLocalSafe(new Runnable() {
+@Override public void run() {
+jobCtx.callcc();
+}
+}, false);
 }
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3301b35/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
new file mode 100644
index 000..a76d894
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheSizeFailoverTest.java
@@ -0,0 +1,115 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheSizeFailoverTest extends GridCommonAbstractTest {
+/** */
+private static TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfigu

[33/46] incubator-ignite git commit: # Properly handle ClusterTopologyServerNotFoundException for retries

2015-08-18 Thread akuznetsov
# Properly handle ClusterTopologyServerNotFoundException for retries


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

Branch: refs/heads/ignite-843
Commit: 5faffb98032f54ed1160279de9d52938aef94bd2
Parents: 2903a29
Author: sboikov 
Authored: Fri Aug 14 16:23:19 2015 +0300
Committer: sboikov 
Committed: Fri Aug 14 16:23:19 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5faffb98/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
index f430d12..c2259df 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartialUpdateCheckedException.java
@@ -34,7 +34,7 @@ public class CachePartialUpdateCheckedException extends 
IgniteCheckedException {
 private final Collection failedKeys = new ArrayList<>();
 
 /** */
-private AffinityTopologyVersion topVer;
+private transient AffinityTopologyVersion topVer;
 
 /**
  * @param msg Error message.



[46/46] incubator-ignite git commit: Merge branches 'ignite-843' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843

2015-08-18 Thread akuznetsov
Merge branches 'ignite-843' and 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843

Conflicts:
pom.xml


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

Branch: refs/heads/ignite-843
Commit: 24af0422a9c02abbb35dbae409a4fccbea2d268b
Parents: 627dd46 09da9c2
Author: AKuznetsov 
Authored: Tue Aug 18 23:10:25 2015 +0700
Committer: AKuznetsov 
Committed: Tue Aug 18 23:10:25 2015 +0700

--
 .../org/apache/ignite/cache/CacheEntry.java |  94 
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   |   2 +-
 .../configuration/IgniteConfiguration.java  |   5 +-
 .../processors/cache/CacheEntryImpl.java|  20 +
 .../processors/cache/CacheEntryImpl0.java   |   5 +
 .../processors/cache/CacheEntryImplEx.java  |  83 +++
 .../processors/cache/CacheInvokeEntry.java  |  27 +-
 .../CachePartialUpdateCheckedException.java |  29 +-
 .../cache/CacheVersionedEntryImpl.java  |  80 ---
 .../processors/cache/GridCacheAdapter.java  | 174 +-
 .../processors/cache/GridCacheEntryEx.java  |   2 +-
 .../processors/cache/GridCacheMapEntry.java |  32 +-
 .../processors/cache/GridCacheSwapManager.java  |  82 ++-
 .../distributed/dht/GridDhtTxPrepareFuture.java |   2 +-
 .../GridDhtUnreservedPartitionException.java|  66 +++
 .../dht/atomic/GridDhtAtomicCache.java  |   3 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  63 ++-
 .../near/GridNearOptimisticTxPrepareFuture.java |   2 +-
 .../local/atomic/GridLocalAtomicCache.java  |   3 +-
 .../cache/query/GridCacheQueryAdapter.java  |  56 +-
 .../cache/query/GridCacheQueryManager.java  |  71 ++-
 .../cache/transactions/IgniteTxAdapter.java |  16 +-
 .../cache/transactions/IgniteTxEntry.java   |  16 +-
 .../transactions/IgniteTxLocalAdapter.java  |  83 ++-
 .../cache/version/GridCacheVersion.java |   2 +-
 .../cache/version/GridCacheVersionAware.java|  30 +
 .../cache/version/GridCacheVersionManager.java  |   5 +-
 .../clock/GridClockSyncProcessor.java   |   2 +-
 .../ignite/internal/util/GridArgumentCheck.java |  17 +
 .../ignite/spi/discovery/tcp/ServerImpl.java|  83 ++-
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |   4 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  49 +-
 .../tcp/internal/TcpDiscoveryNode.java  |  18 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java |  23 +
 .../resources/META-INF/classnames.properties|   3 +-
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java |  33 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   1 -
 .../processors/cache/GridCacheTestEntryEx.java  |   2 +-
 .../IgniteCacheSizeFailoverTest.java| 115 
 .../IgniteCachePutRetryAbstractSelfTest.java| 120 +++-
 ...PutRetryAtomicPrimaryWriteOrderSelfTest.java |  32 ++
 .../CacheVersionedEntryAbstractTest.java| 170 ++
 ...nedEntryLocalAtomicSwapDisabledSelfTest.java |  45 ++
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 ++
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 ++
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 ++
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 ++
 ...edEntryPartitionedTransactionalSelfTest.java |  35 ++
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 ++
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 ++
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 ++
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 ++
 .../tcp/IgniteCacheSslStartStopSelfTest.java|   1 +
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 152 -
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |   8 +-
 .../IgniteCacheFailoverTestSuite.java   |   3 +
 .../testsuites/IgniteCacheTestSuite2.java   |   1 +
 .../testsuites/IgniteCacheTestSuite4.java   |  13 +
 .../query/h2/sql/GridSqlQuerySplitter.java  |   3 +
 .../query/h2/twostep/GridMergeTable.java|   7 +-
 .../query/h2/twostep/GridThreadLocalTable.java  |  22 +-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  96 
 .../query/IgniteSqlSplitterSelfTest.java| 152 +
 .../IgniteCacheQuerySelfTestSuite.java  |   2 +
 modules/jms11/pom.xml   |  98 
 .../apache/ignite/stream/jms11/JmsStreamer.java | 524 ++
 .../ignite/stream/jms11/MessageTransformer.java |  43 ++
 .../stream/jms11/IgniteJmsStreamerTest.java | 551 +++
 .../jms11/IgniteJmsStreamerTestSuite.java   |  34 ++
 .../ignite/stream/jms11/TestTransformers.java   | 123 +
 .../apache/ignite/logger/log4j/Log4JLogger.java |   4 +
 .../util/spring/IgniteSpringHelperImpl.java |   4 +-
 pom.xml   

[01/46] incubator-ignite git commit: ignite-946: added tests

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 627dd465e -> 24af0422a


ignite-946: added tests


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

Branch: refs/heads/ignite-843
Commit: 325d06d3127e73554cfcf40a549d2ae9343dca50
Parents: 01c0246
Author: Denis Magda 
Authored: Thu Jul 30 16:03:18 2015 +0300
Committer: nikolay_tikhonov 
Committed: Fri Jul 31 15:49:10 2015 +0300

--
 .../cache/version/CacheVersionedEntryImpl.java  |   2 -
 .../CacheVersionedEntryAbstractTest.java| 184 +++
 .../CacheVersionedEntryLocalAtomicSelfTest.java |  40 
 ...ersionedEntryLocalTransactionalSelfTest.java |  40 
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |  35 
 ...VersionedEntryPartitionedAtomicSelfTest.java |  35 
 ...PartitionedTransactionalOffHeapSelfTest.java |  36 
 ...edEntryPartitionedTransactionalSelfTest.java |  35 
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |  35 
 ...eVersionedEntryReplicatedAtomicSelfTest.java |  35 
 ...yReplicatedTransactionalOffHeapSelfTest.java |  36 
 ...nedEntryReplicatedTransactionalSelfTest.java |  35 
 .../testsuites/IgniteCacheTestSuite4.java   |  13 ++
 13 files changed, 559 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/325d06d3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
index 6d1e0c9..924eff9 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryImpl.java
@@ -48,8 +48,6 @@ public class CacheVersionedEntryImpl extends 
CacheEntryImpl implemen
 public CacheVersionedEntryImpl(K key, V val, GridCacheVersion ver) {
 super(key, val);
 
-assert val == null;
-
 this.ver = ver;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/325d06d3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
new file mode 100644
index 000..951d05a
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryAbstractTest.java
@@ -0,0 +1,184 @@
+/*
+ * 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.version;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.version.*;
+import org.apache.ignite.internal.processors.cache.*;
+
+import javax.cache.*;
+import javax.cache.processor.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ * Versioned entry abstract test.
+ */
+public abstract class CacheVersionedEntryAbstractTest extends 
GridCacheAbstractSelfTest {
+/** Entries number to store in a cache. */
+private static final int ENTRIES_NUM = 1000;
+
+/** {@inheritDoc} */
+@Override protected int gridCount() {
+return 2;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTest() throws Exception {
+super.beforeTest();
+
+Cache cache = grid(0).c

[37/46] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.3.3-p2'

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'remotes/origin/ignite-1.3.3-p2'

Conflicts:
examples/pom.xml
modules/aop/pom.xml
modules/apache-license-gen/pom.xml
modules/aws/pom.xml
modules/clients/pom.xml
modules/cloud/pom.xml
modules/codegen/pom.xml
modules/core/pom.xml

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
modules/core/src/main/resources/ignite.properties

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
modules/extdata/p2p/pom.xml
modules/extdata/uri/modules/uri-dependency/pom.xml
modules/extdata/uri/pom.xml
modules/gce/pom.xml
modules/geospatial/pom.xml
modules/hadoop/pom.xml
modules/hibernate/pom.xml
modules/indexing/pom.xml
modules/jcl/pom.xml
modules/jta/pom.xml
modules/kafka/pom.xml
modules/log4j/pom.xml
modules/mesos/pom.xml
modules/rest-http/pom.xml
modules/scalar-2.10/pom.xml
modules/scalar/pom.xml
modules/schedule/pom.xml
modules/schema-import/pom.xml
modules/slf4j/pom.xml
modules/spark-2.10/pom.xml
modules/spark/pom.xml
modules/spring/pom.xml
modules/ssh/pom.xml
modules/tools/pom.xml
modules/urideploy/pom.xml
modules/visor-console-2.10/pom.xml
modules/visor-console/pom.xml
modules/visor-plugins/pom.xml
modules/web/pom.xml
modules/yardstick/pom.xml
modules/yarn/pom.xml
pom.xml

Merge remote-tracking branch 'remotes/origin/ignite-1.3.3-p2'

Conflicts:
benchmarks/cache-comparison/pom.xml
benchmarks/filesystem/hadoop1/pom.xml
benchmarks/filesystem/hadoop2/pom.xml
benchmarks/mongo/pom.xml
benchmarks/risk-analytics/pom.xml
benchmarks/serialization/pom.xml

benchmarks/yardstick/src/main/dotnet/gridgain-benchmarks/Properties/AssemblyInfo.cs
examples/clients/cpp/configure.ac

examples/clients/dotnet/GridGainExamples/GridGainExamples/Properties/AssemblyInfo.cs

examples/clients/dotnet/GridGainExamples/GridGainExamplesDll/Properties/AssemblyInfo.cs
examples/pom.xml
modules/clients/common/configure.ac
modules/clients/common/project/vs/Resource.rc
modules/clients/cpp/_old/main/configure.ac
modules/clients/cpp/_old/main/tests/configure.ac
modules/clients/cpp/_old/vsproject/resource.h
modules/clients/cpp/core-test/configure.ac
modules/clients/cpp/core-test/project/vs/Resource.rc
modules/clients/cpp/core/configure.ac
modules/clients/cpp/core/project/vs/Resource.rc
modules/clients/dotnet/gridgain-codegen/Properties/AssemblyInfo.cs
modules/clients/dotnet/gridgain-exe/Properties/AssemblyInfo.cs
modules/clients/dotnet/gridgain/Properties/AssemblyInfo.cs
modules/clients/pom.xml

modules/clients/src/test/dotnet/gridgain-examples-test/Properties/AssemblyInfo.cs

modules/clients/src/test/dotnet/gridgain-test-compatibility/Properties/AssemblyInfo.cs

modules/clients/src/test/dotnet/gridgain-test-dll/Properties/AssemblyInfo.cs

modules/clients/src/test/dotnet/gridgain-test-runner/Properties/AssemblyInfo.cs
modules/clients/src/test/dotnet/gridgain-test/Properties/AssemblyInfo.cs
modules/codegen/pom.xml

modules/compatibility/gg-versions/7.3.3/src/main/java/org/gridgain/grid/compatibility/GridCompatibilityTestsRunner.java
modules/compatibility/pom.xml
modules/core/pom.xml
modules/core/src/main/resources/gridgain.properties
modules/diagnostic/pom.xml
modules/dr-demo/pom.xml
modules/license-gen/pom.xml
modules/mongo-sniffer/pom.xml
modules/mongo-visor/pom.xml
modules/mongo/pom.xml
modules/tools/pom.xml
modules/visor-console/pom.xml
modules/visor-demo/pom.xml
modules/visor-tester-plugin/pom.xml
modules/visor-tester/pom.xml
modules/visor/pom.xml
modules/yardstick/dotnet/Properties/AssemblyInfo.cs
modules/yardstick/pom.xml
parent/pom.xml
pilots/chronotrack/pom.xml
pilots/ctb/pom.xml
pilots/dsi/pom.xml
pilots/ionic/pom.xml
pilots/sb/pom.xml
pilots/sony/pom.xml
pilots/wellsfargo/pom.xml
pilots/worldpay/pom.xml
pom.xml


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

[09/11] incubator-ignite git commit: Exception handling

2015-08-18 Thread sboikov
Exception handling


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

Branch: refs/heads/ignite-gg-10606
Commit: 09da9c2a369b52b06fe9312aafd19f1085ba79d2
Parents: fcd9d61
Author: Valentin Kulichenko 
Authored: Mon Aug 17 23:44:59 2015 -0700
Committer: Valentin Kulichenko 
Committed: Mon Aug 17 23:44:59 2015 -0700

--
 .../ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java   | 2 +-
 .../ignite/internal/util/spring/IgniteSpringHelperImpl.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/09da9c2a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
index ac1f4f1..5449433 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java
@@ -98,7 +98,7 @@ public class CacheJdbcPojoStoreFactory implements 
Factoryhttp://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/09da9c2a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
--
diff --git 
a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
 
b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 435f522..d65a199 100644
--- 
a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ 
b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -201,11 +201,11 @@ public class IgniteSpringHelperImpl implements 
IgniteSpringHelper {
 }
 catch (NoSuchBeanDefinitionException e) {
 throw new IgniteCheckedException("Spring bean with provided name 
doesn't exist " +
-", beanName=" + beanName + ']');
+", beanName=" + beanName + ']');
 }
 catch (BeansException e) {
 throw new IgniteCheckedException("Failed to load Spring bean with 
provided name " +
-", beanName=" + beanName + ']', e);
+", beanName=" + beanName + ']', e);
 }
 }
 



[07/11] incubator-ignite git commit: master - OFFSET clause fix IGNITE-1259

2015-08-18 Thread sboikov
master - OFFSET clause fix IGNITE-1259


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

Branch: refs/heads/ignite-gg-10606
Commit: d31c8c6477e03563bf73db3cf216250b9c22b562
Parents: 9c939be
Author: S.Vladykin 
Authored: Mon Aug 17 21:25:25 2015 +0300
Committer: S.Vladykin 
Committed: Mon Aug 17 21:25:25 2015 +0300

--
 .../query/h2/sql/GridSqlQuerySplitter.java  |   3 +
 .../query/IgniteSqlSplitterSelfTest.java| 152 +++
 .../IgniteCacheQuerySelfTestSuite.java  |   2 +
 3 files changed, 157 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d31c8c64/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
--
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index 2f8bcdd..34aef87 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -205,6 +205,9 @@ public class GridSqlQuerySplitter {
 if (mapQry.offset() != null) {
 rdcQry.offset(mapQry.offset());
 
+if (mapQry.limit() != null) // LIMIT off + lim
+mapQry.limit(op(GridSqlOperationType.PLUS, mapQry.offset(), 
mapQry.limit()));
+
 mapQry.offset(null);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d31c8c64/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
new file mode 100644
index 000..6ec6bb3
--- /dev/null
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -0,0 +1,152 @@
+/*
+ * 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.query;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.*;
+
+/**
+ * Tests for correct distributed partitioned queries.
+ */
+@SuppressWarnings("unchecked")
+public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
+/** */
+private static final TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration() throws 
Exception {
+IgniteConfiguration cfg = super.getConfiguration();
+
+cfg.setPeerClassLoadingEnabled(false);
+
+TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+disco.setIpFinder(ipFinder);
+
+cfg.setDiscoverySpi(disco);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTestsStarted() throws Exception {
+startGridsMultiThreaded(3, false);
+}
+
+/** {@inheritDoc} */
+@Override protected void afterTestsStopped() throws Exception {
+stopAllGrids();
+}
+
+/**
+ * @param name Cache name.
+ 

[02/11] incubator-ignite git commit: Squashed commit of the IGNITE-1229

2015-08-18 Thread sboikov
Squashed commit of the IGNITE-1229


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

Branch: refs/heads/ignite-gg-10606
Commit: 7635e5894df6aab477b82253451b729985f632be
Parents: 1f00c70
Author: Denis Magda 
Authored: Mon Aug 17 16:41:03 2015 +0300
Committer: Yakov Zhdanov 
Committed: Mon Aug 17 16:41:03 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java|  57 ++-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  45 --
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 152 ++-
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |   8 +-
 4 files changed, 245 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7635e589/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 76144e3..40e110f 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
@@ -114,7 +114,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 protected TcpDiscoverySpiState spiState = DISCONNECTED;
 
 /** Map with proceeding ping requests. */
-private final ConcurrentMap>> pingMap =
+private final ConcurrentMap>> pingMap =
 new ConcurrentHashMap8<>();
 
 /**
@@ -497,9 +497,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 return F.t(getLocalNodeId(), clientPingRes);
 }
 
-GridFutureAdapter> fut = new 
GridFutureAdapter<>();
+GridPingFutureAdapter> fut = new 
GridPingFutureAdapter<>();
 
-IgniteInternalFuture> oldFut = 
pingMap.putIfAbsent(addr, fut);
+GridPingFutureAdapter> oldFut = 
pingMap.putIfAbsent(addr, fut);
 
 if (oldFut != null)
 return oldFut.get();
@@ -520,7 +520,11 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 long tstamp = U.currentTimeMillis();
 
-sock = spi.openSocket(addr, timeoutHelper);
+sock = spi.createSocket();
+
+fut.sock = sock;
+
+sock = spi.openSocket(sock, addr, timeoutHelper);
 
 openedSock = true;
 
@@ -597,6 +601,21 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 }
 
+/**
+ * Interrupts all existed 'ping' request for the given node.
+ *
+ * @param node Node that may be pinged.
+ */
+private void interruptPing(TcpDiscoveryNode node) {
+for (InetSocketAddress addr : spi.getNodeAddresses(node)) {
+GridPingFutureAdapter fut = pingMap.get(addr);
+
+if (fut != null && fut.sock != null)
+// Reference to the socket is not set to null. No need to 
assign it to a local variable.
+U.closeQuiet(fut.sock);
+}
+}
+
 /** {@inheritDoc} */
 @Override public void disconnect() throws IgniteSpiException {
 spiStop0(true);
@@ -3366,6 +3385,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (msg.verified() && !locNodeId.equals(leavingNodeId)) {
 TcpDiscoveryNode leftNode = ring.removeNode(leavingNodeId);
 
+interruptPing(leavingNode);
+
 assert leftNode != null;
 
 if (log.isDebugEnabled())
@@ -3533,6 +3554,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (msg.verified()) {
 node = ring.removeNode(nodeId);
 
+interruptPing(node);
+
 assert node != null;
 
 long topVer;
@@ -5142,4 +5165,30 @@ class ServerImpl extends TcpDiscoveryImpl {
 spi.writeToSocket(sock, msg, bout, timeout);
 }
 }
+
+/**
+ *
+ */
+private static class GridPingFutureAdapter extends GridFutureAdapter 
{
+/** Socket. */
+private volatile Socket sock;
+
+/**
+ * Returns socket associated with this ping future.
+ *
+ * @return Socket or {@code null} if no socket associated.
+ */
+public Socket sock() {
+return sock;
+}
+
+/**
+ * Associates socket with this ping future.
+ *
+ * @param sock Socket.
+ */
+public void sock(Socket sock) {
+this.sock = sock;
+}
+}
 }

http://git-wip-us.apache.org/repo

[11/11] incubator-ignite git commit: # GG-10606: small correction.

2015-08-18 Thread sboikov
# GG-10606: small correction.


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

Branch: refs/heads/ignite-gg-10606
Commit: 53143f9326f5a3b86846dda4ecf073fc01776d62
Parents: c232395
Author: iveselovskiy 
Authored: Tue Aug 18 19:45:30 2015 +0300
Committer: iveselovskiy 
Committed: Tue Aug 18 19:45:30 2015 +0300

--
 .../test/java/org/apache/ignite/testframework/GridTestUtils.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/53143f93/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 964f680..d840312 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
@@ -1353,7 +1353,7 @@ public final class GridTestUtils {
 
U.resolveIgnitePath(GridTestProperties.getProperty("ssl.keystore.path")).getAbsolutePath());
 
factory.setKeyStorePassword(GridTestProperties.getProperty("ssl.keystore.password").toCharArray());
 
-
factory.setTrustManagers(GridSslBasicContextFactory.getDisabledTrustManager());
+factory.setTrustManagers(SslContextFactory.getDisabledTrustManager());
 
 return factory;
 }



[05/11] incubator-ignite git commit: master - schema drop fix for TL tables

2015-08-18 Thread sboikov
master - schema drop fix for TL tables


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

Branch: refs/heads/ignite-gg-10606
Commit: 952c7fc99d63b5af0d5a3fe7df4b610f8baf9001
Parents: ad12147
Author: S.Vladykin 
Authored: Mon Aug 17 21:22:50 2015 +0300
Committer: S.Vladykin 
Committed: Mon Aug 17 21:22:50 2015 +0300

--
 .../query/h2/twostep/GridThreadLocalTable.java  | 22 +---
 1 file changed, 15 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/952c7fc9/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
--
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
index c468371..f6735b5 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridThreadLocalTable.java
@@ -21,6 +21,7 @@ import org.h2.api.*;
 import org.h2.command.ddl.*;
 import org.h2.engine.*;
 import org.h2.index.*;
+import org.h2.message.*;
 import org.h2.result.*;
 import org.h2.schema.*;
 import org.h2.table.*;
@@ -154,7 +155,7 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public String getTableType() {
-return tbl.get().getTableType();
+return EXTERNAL_TABLE_ENGINE;
 }
 
 /** {@inheritDoc} */
@@ -179,7 +180,7 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public long getMaxDataModificationId() {
-return tbl.get().getMaxDataModificationId();
+return 0;
 }
 
 /** {@inheritDoc} */
@@ -194,7 +195,7 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public boolean canDrop() {
-return tbl.get().canDrop();
+return false;
 }
 
 /** {@inheritDoc} */
@@ -204,12 +205,14 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public long getRowCountApproximation() {
-return tbl.get().getRowCountApproximation();
+Table t = tbl.get();
+
+return t == null ? 0 : t.getRowCountApproximation();
 }
 
 /** {@inheritDoc} */
 @Override public long getDiskSpaceUsed() {
-return tbl.get().getDiskSpaceUsed();
+return 0;
 }
 
 /** {@inheritDoc} */
@@ -219,12 +222,17 @@ public class GridThreadLocalTable extends Table {
 
 /** {@inheritDoc} */
 @Override public String getDropSQL() {
-return tbl.get().getDropSQL();
+return "";
+}
+
+/** {@inheritDoc} */
+@Override public void addDependencies(HashSet dependencies) {
+// No-op. We should not have any dependencies to add.
 }
 
 /** {@inheritDoc} */
 @Override public void checkRename() {
-tbl.get().checkRename();
+throw DbException.getUnsupportedException("rename");
 }
 
 /**



[10/11] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10606

2015-08-18 Thread sboikov
Merge branch 'master' of 
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10606


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

Branch: refs/heads/ignite-gg-10606
Commit: c232395db35d4fe9cf296a384b96ea27998a389b
Parents: ddbbffb 09da9c2
Author: iveselovskiy 
Authored: Tue Aug 18 19:44:53 2015 +0300
Committer: iveselovskiy 
Committed: Tue Aug 18 19:44:53 2015 +0300

--
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   |   2 +-
 .../configuration/IgniteConfiguration.java  |   5 +-
 .../GridDhtUnreservedPartitionException.java|  66 
 .../cache/query/GridCacheQueryAdapter.java  |  56 ++-
 .../cache/query/GridCacheQueryManager.java  |  71 ++---
 .../ignite/spi/discovery/tcp/ServerImpl.java|  83 --
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |   4 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  49 --
 .../tcp/internal/TcpDiscoveryNode.java  |  18 +--
 .../tcp/internal/TcpDiscoveryNodesRing.java |  23 +++
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 152 ++-
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |   8 +-
 .../query/h2/sql/GridSqlQuerySplitter.java  |   3 +
 .../query/h2/twostep/GridMergeTable.java|   7 +-
 .../query/h2/twostep/GridThreadLocalTable.java  |  22 ++-
 ...CacheScanPartitionQueryFallbackSelfTest.java |  96 
 .../query/IgniteSqlSplitterSelfTest.java| 152 +++
 .../IgniteCacheQuerySelfTestSuite.java  |   2 +
 .../util/spring/IgniteSpringHelperImpl.java |   4 +-
 19 files changed, 739 insertions(+), 84 deletions(-)
--




[03/11] incubator-ignite git commit: Squashed commit for ignite-1239

2015-08-18 Thread sboikov
Squashed commit for ignite-1239


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

Branch: refs/heads/ignite-gg-10606
Commit: 45c813af7eb4a11ec59d3477a6a0b68791f1d7f2
Parents: 7635e58
Author: Denis Magda 
Authored: Mon Aug 17 16:51:41 2015 +0300
Committer: Yakov Zhdanov 
Committed: Mon Aug 17 16:51:41 2015 +0300

--
 .../GridDhtUnreservedPartitionException.java| 66 ++
 .../cache/query/GridCacheQueryAdapter.java  | 56 ++--
 .../cache/query/GridCacheQueryManager.java  | 71 ++-
 ...CacheScanPartitionQueryFallbackSelfTest.java | 96 
 4 files changed, 261 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45c813af/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
new file mode 100644
index 000..d824a47
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java
@@ -0,0 +1,66 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.internal.processors.affinity.*;
+
+/**
+ * Exception that is thrown when a partition reservation failed.
+ */
+public class GridDhtUnreservedPartitionException extends 
IgniteCheckedException {
+/** */
+private static final long serialVersionUID = 0L;
+
+/** Partition. */
+private final int part;
+
+/** Topology version. */
+private final AffinityTopologyVersion topVer;
+
+/**
+ * @param part Partition.
+ * @param topVer Affinity topology version.
+ * @param msg Message.
+ */
+public GridDhtUnreservedPartitionException(int part, 
AffinityTopologyVersion topVer, String msg) {
+super(msg);
+
+this.part = part;
+this.topVer = topVer;
+}
+
+/**
+ * @return Partition.
+ */
+public int partition() {
+return part;
+}
+
+/**
+ * @return Affinity topology version.
+ */
+public AffinityTopologyVersion topologyVersion() {
+return topVer;
+}
+
+/** {@inheritDoc} */
+@Override public String toString() {
+return getClass() + " [part=" + part + ", msg=" + getMessage() + ']';
+}
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45c813af/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index 953cb9a..90f9b9e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -25,6 +25,7 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
 import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.future.*;
 imp

[01/11] incubator-ignite git commit: ignite-1241-dev: fixed endless "failure detection threshold" warnings for the case when there is only one server and client nodes in the topology

2015-08-18 Thread sboikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-10606 ddbbffb07 -> 53143f932


ignite-1241-dev: fixed endless "failure detection threshold" warnings for the 
case when there is only one server and client nodes in the topology


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

Branch: refs/heads/ignite-gg-10606
Commit: 38070b28bdda9e95b125f27706037c9916edeeb6
Parents: 7760847
Author: Denis Magda 
Authored: Fri Aug 14 16:20:18 2015 +0300
Committer: Denis Magda 
Committed: Fri Aug 14 16:20:18 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 26 ++--
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |  4 +--
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  4 ---
 .../tcp/internal/TcpDiscoveryNode.java  | 18 +++---
 .../tcp/internal/TcpDiscoveryNodesRing.java | 23 +
 5 files changed, 53 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38070b28/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 76144e3..c8c4c50 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
@@ -628,9 +628,9 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 /** {@inheritDoc} */
-@Override protected void onDataReceived() {
+@Override protected void onMessageExchanged() {
 if (spi.failureDetectionTimeoutEnabled() && locNode != null)
-locNode.lastDataReceivedTime(U.currentTimeMillis());
+locNode.lastExchangeTime(U.currentTimeMillis());
 }
 
 /**
@@ -1916,9 +1916,13 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (spi.ensured(msg))
 msgHist.add(msg);
 
-if (msg.senderNodeId() != null && 
!msg.senderNodeId().equals(getLocalNodeId()))
-// Reset the flag.
+if (msg.senderNodeId() != null && 
!msg.senderNodeId().equals(getLocalNodeId())) {
+// Received a message from remote node.
+onMessageExchanged();
+
+// Reset the failure flag.
 failureThresholdReached = false;
+}
 
 spi.stats.onMessageProcessingFinished(msg);
 }
@@ -2278,6 +2282,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 
 int res = spi.readReceipt(sock, 
timeoutHelper.nextTimeoutChunk(ackTimeout0));
 
+onMessageExchanged();
+
 if (log.isDebugEnabled())
 log.debug("Message has been sent to next 
node [msg=" + msg +
 ", next=" + next.id() +
@@ -4104,9 +4110,12 @@ class ServerImpl extends TcpDiscoveryImpl {
  * Check connection aliveness status.
  */
 private void checkConnection() {
+Boolean hasRemoteSrvNodes = null;
+
 if (spi.failureDetectionTimeoutEnabled() && 
!failureThresholdReached &&
-U.currentTimeMillis() - locNode.lastDataReceivedTime() >= 
connCheckThreshold &&
-ring.hasRemoteNodes() && spiStateCopy() == CONNECTED) {
+U.currentTimeMillis() - locNode.lastExchangeTime() >= 
connCheckThreshold &&
+spiStateCopy() == CONNECTED &&
+(hasRemoteSrvNodes = ring.hasRemoteServerNodes())) {
 
 log.info("Local node seems to be disconnected from topology 
(failure detection timeout " +
 "is reached): [failureDetectionTimeout=" + 
spi.failureDetectionTimeout() +
@@ -4123,7 +4132,10 @@ class ServerImpl extends TcpDiscoveryImpl {
 if (elapsed > 0)
 return;
 
-if (ring.hasRemoteNodes()) {
+if (hasRemoteSrvNodes == null)
+hasRemoteSrvNodes = ring.hasRemoteServerNodes();
+
+if (hasRemoteSrvNodes) {
 sendMessageAcrossRing(new 
TcpDiscoveryConnectionCheckMessage(locNode));
 
 lastTimeConnCheckMsgSent = U.currentTimeMillis();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38070b28/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
---

[06/11] incubator-ignite git commit: master - index sort fix for merge tables

2015-08-18 Thread sboikov
master - index sort fix for merge tables


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

Branch: refs/heads/ignite-gg-10606
Commit: 9c939bec1bfa2c3396051c155ffb06775a329aad
Parents: 952c7fc
Author: S.Vladykin 
Authored: Mon Aug 17 21:23:26 2015 +0300
Committer: S.Vladykin 
Committed: Mon Aug 17 21:23:26 2015 +0300

--
 .../internal/processors/query/h2/twostep/GridMergeTable.java  | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9c939bec/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
--
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index 0b335d3..7d2235d 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -35,9 +35,6 @@ public class GridMergeTable extends TableBase {
 private final GridKernalContext ctx;
 
 /** */
-private final ArrayList idxs = new ArrayList<>(1);
-
-/** */
 private final GridMergeIndex idx;
 
 /**
@@ -49,8 +46,6 @@ public class GridMergeTable extends TableBase {
 
 this.ctx = ctx;
 idx = new GridMergeIndexUnsorted(this, "merge_scan");
-
-idxs.add(idx);
 }
 
 /**
@@ -124,7 +119,7 @@ public class GridMergeTable extends TableBase {
 
 /** {@inheritDoc} */
 @Override public ArrayList getIndexes() {
-return idxs;
+return null;
 }
 
 /** {@inheritDoc} */



[08/11] incubator-ignite git commit: Deprecated IgniteConfiguration.setNodeId()

2015-08-18 Thread sboikov
Deprecated IgniteConfiguration.setNodeId()


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

Branch: refs/heads/ignite-gg-10606
Commit: fcd9d611503592ef3104feee42d82b3956aae42d
Parents: d31c8c6
Author: Valentin Kulichenko 
Authored: Mon Aug 17 21:24:55 2015 -0700
Committer: Valentin Kulichenko 
Committed: Mon Aug 17 21:24:55 2015 -0700

--
 .../org/apache/ignite/configuration/IgniteConfiguration.java| 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fcd9d611/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 546c382..b670398 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
@@ -60,8 +60,8 @@ import javax.cache.expiry.*;
 import javax.cache.integration.*;
 import javax.cache.processor.*;
 import javax.management.*;
-import java.io.*;
 import javax.net.ssl.*;
+import java.io.*;
 import java.lang.management.*;
 import java.util.*;
 
@@ -970,6 +970,7 @@ public class IgniteConfiguration {
  *
  * @return Unique identifier for this node within grid.
  */
+@Deprecated
 public UUID getNodeId() {
 return nodeId;
 }
@@ -980,7 +981,9 @@ public class IgniteConfiguration {
  * @param nodeId Unique identifier for local node.
  * @see IgniteConfiguration#getNodeId()
  * @return {@code this} for chaining.
+ * @deprecated Use {@link #setConsistentId(Serializable)} instead.
  */
+@Deprecated
 public IgniteConfiguration setNodeId(UUID nodeId) {
 this.nodeId = nodeId;
 



[04/11] incubator-ignite git commit: Merge branch 'ignite-1241-dev' of https://github.com/dmagda/incubator-ignite

2015-08-18 Thread sboikov
Merge branch 'ignite-1241-dev' of https://github.com/dmagda/incubator-ignite


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

Branch: refs/heads/ignite-gg-10606
Commit: ad121478b6f6d0d733e8d651a541f03b4fb849f4
Parents: 45c813a 38070b2
Author: Denis Magda 
Authored: Mon Aug 17 17:11:54 2015 +0300
Committer: Yakov Zhdanov 
Committed: Mon Aug 17 17:11:54 2015 +0300

--
 .../ignite/spi/discovery/tcp/ServerImpl.java| 26 ++--
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |  4 +--
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  4 ---
 .../tcp/internal/TcpDiscoveryNode.java  | 18 +++---
 .../tcp/internal/TcpDiscoveryNodesRing.java | 23 +
 5 files changed, 53 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad121478/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
--

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad121478/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
--



incubator-ignite git commit: IGNITE-843: Minor fix for getting agent home folder.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 24af0422a -> bd4499f5b


IGNITE-843: Minor fix for getting agent home folder.


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

Branch: refs/heads/ignite-843
Commit: bd4499f5b2518daf57f421349a3b14e91139b42e
Parents: 24af042
Author: AKuznetsov 
Authored: Wed Aug 19 00:03:23 2015 +0700
Committer: AKuznetsov 
Committed: Wed Aug 19 00:03:23 2015 +0700

--
 .../org/apache/ignite/agent/AgentUtils.java | 22 +++--
 .../handlers/DatabaseMetadataExtractor.java | 26 ++--
 2 files changed, 22 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bd4499f5/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
index 0675e3f..9ab952a 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.agent;
 
 import java.io.*;
-import java.net.*;
+import java.nio.file.*;
 
 /**
  * Utility methods.
@@ -32,25 +32,9 @@ public class AgentUtils {
 }
 
 /**
- * @return Folder where agent.jar is located.
+ * @return App folder.
  */
 public static File getAgentHome() {
-URL jarLogCfgUrl = 
AgentLauncher.class.getResource("/logging.properties");
-
-String path = jarLogCfgUrl.getFile();
-
-int jarSeparatorIdx = path.lastIndexOf("!/");
-
-if (jarSeparatorIdx == -1)
-return null;
-
-path = path.substring(0, jarSeparatorIdx);
-
-if (path.startsWith("file:"))
-path = path.substring("file:".length());
-
-File jarFile = new File(path);
-
-return jarFile.getParentFile();
+return Paths.get("").toAbsolutePath().toFile();
 }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bd4499f5/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
index a4dfc60..b01bdc5 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
@@ -58,7 +58,6 @@ public class DatabaseMetadataExtractor {
  * @param jdbcDriverCls JDBC driver class.
  * @param jdbcUrl JDBC URL.
  * @param jdbcInfo Properties to connect to database.
- *
  * @return Collection of tables.
  */
 @Remote
@@ -98,20 +97,30 @@ public class DatabaseMetadataExtractor {
 }
 
 /**
+ * @param path Path to normalize.
+ * @return Normalized file path.
+ */
+private String normalizePath(String path) {
+return path != null ? path.replace('\\', '/') : null;
+}
+
+/**
  * @return Drivers in drivers folder
  * @see AgentConfiguration#driversFolder
  */
 @Remote
 public List availableDrivers() {
-log.log(Level.INFO, "Collecting JDBC drivers in folder: " + 
driversFolder);
+String drvFolder = normalizePath(driversFolder);
 
-if (driversFolder == null) {
+log.log(Level.INFO, "Collecting JDBC drivers in folder: " + drvFolder);
+
+if (drvFolder == null) {
 log.log(Level.INFO, "JDBC drivers folder not specified, returning 
empty list");
 
 return Collections.emptyList();
 }
 
-String[] list = new File(driversFolder).list();
+String[] list = new File(drvFolder).list();
 
 if (list == null) {
 log.log(Level.INFO, "JDBC drivers folder has no files, returning 
empty list");
@@ -124,17 +133,20 @@ public class DatabaseMetadataExtractor {
 for (String fileName : list) {
 if (fileName.endsWith(".jar")) {
 try {
-String spec = "jar:file:/" + driversFolder + '/' + 
fileName + "!/META-INF/services/java.sql.Driver";
+String spec =

[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

2015-08-18 Thread akuznetsov
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


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

Branch: refs/heads/ignite-843
Commit: 609b8c620bc19f11a8291ccd15cee6a83d172558
Parents: 71e6585 bd4499f
Author: AKuznetsov 
Authored: Wed Aug 19 00:15:44 2015 +0700
Committer: AKuznetsov 
Committed: Wed Aug 19 00:15:44 2015 +0700

--
 .../org/apache/ignite/agent/AgentUtils.java | 22 +++--
 .../handlers/DatabaseMetadataExtractor.java | 26 ++--
 2 files changed, 22 insertions(+), 26 deletions(-)
--




[1/2] incubator-ignite git commit: IGNITE-843 WIP save metadata from db to mongo.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 bd4499f5b -> 609b8c620


IGNITE-843 WIP save metadata from db to mongo.


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

Branch: refs/heads/ignite-843
Commit: 71e6585c9588792332417e4d81b0fe3ef30ac7bf
Parents: 24af042
Author: AKuznetsov 
Authored: Wed Aug 19 00:15:24 2015 +0700
Committer: AKuznetsov 
Committed: Wed Aug 19 00:15:24 2015 +0700

--
 .../src/main/js/controllers/metadata-controller.js  | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/71e6585c/modules/control-center-web/src/main/js/controllers/metadata-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/metadata-controller.js 
b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index b1f32eb..404b03d 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -241,10 +241,22 @@ controlCenterModule.controller('metadataController', [
 });
 };
 
-$scope.saveSelectedMetadata = function (preset) {
+$scope.saveSelectedMetadata = function () {
 loadMetaModal.hide();
 
-$common.showError("Saving selected metadata not ready yet!");
+_.forEach($scope.loadMeta.tables, function (table) {
+var newItem = {
+name: table.tableName,
+databaseSchema: table.schemaName,
+databaseTable: table.tableName,
+keyType: table.tableName + 'Key',
+valueType: table.tableName,
+keyFields: [],
+valueFields: []
+};
+
+save(newItem);
+});
 };
 
 // When landing on the page, get metadatas and show them.



Git Push Summary

2015-08-18 Thread agoncharuk
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1265 [created] 5faffb980


[2/2] incubator-ignite git commit: IGNITE-1265 - Rebuilt messages.

2015-08-18 Thread agoncharuk
IGNITE-1265 - Rebuilt messages.


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

Branch: refs/heads/ignite-1265
Commit: 574c6793adb96caa614b9c0c540f4812cfc52ee5
Parents: 7a43dde
Author: Alexey Goncharuk 
Authored: Tue Aug 18 11:11:43 2015 -0700
Committer: Alexey Goncharuk 
Committed: Tue Aug 18 11:11:43 2015 -0700

--
 .../processors/cache/GridCacheUtils.java| 11 +---
 .../distributed/dht/GridDhtTxPrepareFuture.java |  6 ++--
 .../dht/GridDhtTxPrepareResponse.java   | 29 +++-
 3 files changed, 32 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/574c6793/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 1e3cd67..80e0d69 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1684,15 +1684,18 @@ public class GridCacheUtils {
  * @param partsMap Cache ID to partition IDs collection map.
  * @return Cache ID to partition ID array map.
  */
-public static Map 
convertInvalidPartitions(Map> partsMap) {
-Map res = new HashMap<>(partsMap.size());
+public static Map convertInvalidPartitions(Map> partsMap) {
+Map res = new HashMap<>(partsMap.size());
 
 for (Map.Entry> entry : partsMap.entrySet()) {
 Set parts = entry.getValue();
 
-Integer[] partsArray = new Integer[parts.size()];
+int[] partsArray = new int[parts.size()];
 
-partsArray = parts.toArray(partsArray);
+int idx = 0;
+
+for (Integer part : parts)
+partsArray[idx++] = part;
 
 res.put(entry.getKey(), partsArray);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/574c6793/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 27de8cf..2b7e1bc 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
@@ -1212,14 +1212,14 @@ public final class GridDhtTxPrepareFuture extends 
GridCompoundFuture invalidPartsMap = 
res.invalidPartitionsByCacheId();
+Map invalidPartsMap = 
res.invalidPartitionsByCacheId();
 
 for (Iterator it = 
dhtMapping.entries().iterator(); it.hasNext();) {
 IgniteTxEntry entry  = it.next();
 
-Integer[] invalidParts = 
invalidPartsMap.get(entry.cacheId());
+int[] invalidParts = 
invalidPartsMap.get(entry.cacheId());
 
-if (F.contains(invalidParts, 
entry.cached().partition())) {
+if (invalidParts != null && F.contains(invalidParts, 
entry.cached().partition())) {
 it.remove();
 
 if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/574c6793/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
index cc85628..bcf7f8b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java
@@ -56,7 +56,8 @@ public class GridDhtTxPrepareResponse extends 
GridDistributedTxPrepareResp

[1/2] incubator-ignite git commit: IGNITE-1265 - Properly handle invalid partitions in DHT prepare response.

2015-08-18 Thread agoncharuk
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1265 5faffb980 -> 574c6793a


IGNITE-1265 - Properly handle invalid partitions in DHT prepare response.


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

Branch: refs/heads/ignite-1265
Commit: 7a43dde77b47478e6b02bbab9d81ad70a2299c51
Parents: 5faffb9
Author: Alexey Goncharuk 
Authored: Tue Aug 18 10:35:59 2015 -0700
Committer: Alexey Goncharuk 
Committed: Tue Aug 18 10:35:59 2015 -0700

--
 .../processors/cache/GridCacheIoManager.java|  1 -
 .../processors/cache/GridCacheUtils.java| 20 +
 .../distributed/dht/GridDhtTxPrepareFuture.java | 23 +++-
 .../dht/GridDhtTxPrepareResponse.java   | 17 +++
 .../near/GridNearTxPrepareResponse.java |  3 ---
 .../cache/transactions/IgniteInternalTx.java|  2 +-
 .../cache/transactions/IgniteTxAdapter.java | 19 +++-
 .../cache/transactions/IgniteTxHandler.java |  5 ++---
 .../ignite/internal/util/lang/GridFunc.java | 14 
 9 files changed, 90 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a43dde7/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 29e3551..c128aa6 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
@@ -493,7 +493,6 @@ public class GridCacheIoManager extends 
GridCacheSharedManagerAdapter {
 req.version(),
 null,
 null,
-null,
 null);
 
 res.error(req.classError());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a43dde7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 41e3896..1e3cd67 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1681,6 +1681,26 @@ public class GridCacheUtils {
 }
 
 /**
+ * @param partsMap Cache ID to partition IDs collection map.
+ * @return Cache ID to partition ID array map.
+ */
+public static Map 
convertInvalidPartitions(Map> partsMap) {
+Map res = new HashMap<>(partsMap.size());
+
+for (Map.Entry> entry : partsMap.entrySet()) {
+Set parts = entry.getValue();
+
+Integer[] partsArray = new Integer[parts.size()];
+
+partsArray = parts.toArray(partsArray);
+
+res.put(entry.getKey(), partsArray);
+}
+
+return res;
+}
+
+/**
  * Stops store session listeners.
  *
  * @param ctx Kernal context.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a43dde7/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 af0fbdf..27de8cf 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
@@ -574,13 +574,14 @@ public final class GridDhtTxPrepareFuture extends 
GridCompoundFuture it = 
dhtMapping.entries().iterator(); it.hasNext();) {
 IgniteTxEntry entry  = it.next();
@@ -1206,6 +1208,25 @@ public final class GridDhtTxPrepareFuture extends 
GridCompoundFuturehttp://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a43dde7/modules/core

[2/2] incubator-ignite git commit: IGNITE-1265 - EntryProcessorTest when nodes joining topology.

2015-08-18 Thread agoncharuk
IGNITE-1265 - EntryProcessorTest when nodes joining topology.


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

Branch: refs/heads/ignite-1265
Commit: ccaa2b20dab5438603471796b7155f309261a41f
Parents: 013d707
Author: Alexey Goncharuk 
Authored: Tue Aug 18 18:38:36 2015 -0700
Committer: Alexey Goncharuk 
Committed: Tue Aug 18 18:38:36 2015 -0700

--
 .../IgniteCacheEntryProcessorNodeJoinTest.java  | 216 +++
 .../IgniteCacheEntryProcessorRestartTest.java   | 185 
 2 files changed, 216 insertions(+), 185 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ccaa2b20/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
new file mode 100644
index 000..9c17ebd
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
@@ -0,0 +1,216 @@
+/*
+ * 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.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.communication.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.processor.*;
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheRebalanceMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ * Tests cache in-place modification logic with iterative value increment.
+ */
+public class IgniteCacheEntryProcessorNodeJoinTest extends 
GridCommonAbstractTest {
+/** IP finder. */
+private static final TcpDiscoveryIpFinder IP_FINDER = new 
TcpDiscoveryVmIpFinder(true);
+
+/** Number of nodes to test on. */
+private static final int GRID_CNT = 2;
+
+/** Number of increment iterations. */
+private static final int NUM_SETS = 50;
+
+/** Helper for excluding stopped node from iteration logic. */
+private AtomicReferenceArray grids;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration cache = new CacheConfiguration();
+
+cache.setCacheMode(PARTITIONED);
+cache.setAtomicityMode(TRANSACTIONAL);
+cache.setWriteSynchronizationMode(FULL_SYNC);
+cache.setBackups(1);
+cache.setRebalanceMode(SYNC);
+
+cfg.setCacheConfiguration(cache);
+
+TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+disco.setIpFinder(IP_FINDER);
+
+TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
+
+commSpi.setSharedMemoryPort(-1);
+
+cfg.setCommunicationSpi(commSpi);
+
+cfg.setDiscoverySpi(disco);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTest() throws Exception {
+startGrids(GRID_CNT);
+
+grids = new AtomicReferenceArray<>(GRID_CNT);
+
+for (int i = 0; i

[1/2] incubator-ignite git commit: IGNITE-1265 - EntryProcessorTest when nodes joining topology.

2015-08-18 Thread agoncharuk
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1265 574c6793a -> ccaa2b20d


IGNITE-1265 - EntryProcessorTest when nodes joining topology.


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

Branch: refs/heads/ignite-1265
Commit: 013d7075853d4728739f3dfb2647ce6001d723c8
Parents: 574c679
Author: Alexey Goncharuk 
Authored: Tue Aug 18 18:18:43 2015 -0700
Committer: Alexey Goncharuk 
Committed: Tue Aug 18 18:18:43 2015 -0700

--
 .../IgniteCacheEntryProcessorRestartTest.java   | 185 +++
 1 file changed, 185 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/013d7075/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorRestartTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorRestartTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorRestartTest.java
new file mode 100644
index 000..c027ee4
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorRestartTest.java
@@ -0,0 +1,185 @@
+/*
+ * 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.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.communication.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.processor.*;
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheRebalanceMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ * Tests cache in-place modification logic with iterative value increment.
+ */
+public class IgniteCacheEntryProcessorRestartTest extends 
GridCommonAbstractTest {
+/** IP finder. */
+private static final TcpDiscoveryIpFinder IP_FINDER = new 
TcpDiscoveryVmIpFinder(true);
+
+/** Number of nodes to test on. */
+private static final int GRID_CNT = 2;
+
+/** Number of increment iterations. */
+private static final int NUM_SETS = 50;
+
+/** Helper for excluding stopped node from iteration logic. */
+private AtomicReferenceArray grids;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+CacheConfiguration cache = new CacheConfiguration();
+
+cache.setCacheMode(PARTITIONED);
+cache.setAtomicityMode(TRANSACTIONAL);
+cache.setWriteSynchronizationMode(FULL_SYNC);
+cache.setBackups(1);
+cache.setRebalanceMode(SYNC);
+
+cfg.setCacheConfiguration(cache);
+
+TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+disco.setIpFinder(IP_FINDER);
+
+TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
+
+commSpi.setSharedMemoryPort(-1);
+
+cfg.setCommunicationSpi(commSpi);
+
+cfg.setDiscoverySpi(disco);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTest() throws Exception {
+startGrids(GRID_CNT);
+
+grids = new AtomicReferenceArray<>(GRID_CNT);
+
+for (int i = 0; 

incubator-ignite git commit: IGNITE-1265 - Entry processor must always have the correct cache value.

2015-08-18 Thread agoncharuk
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1265 ccaa2b20d -> 5065a1ecc


IGNITE-1265 - Entry processor must always have the correct cache value.


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

Branch: refs/heads/ignite-1265
Commit: 5065a1eccb3d71b2573d37bb6ff2c78a1bbc107c
Parents: ccaa2b2
Author: Alexey Goncharuk 
Authored: Tue Aug 18 19:35:50 2015 -0700
Committer: Alexey Goncharuk 
Committed: Tue Aug 18 19:35:50 2015 -0700

--
 .../dht/GridClientPartitionTopology.java|  20 +++
 .../dht/GridDhtPartitionTopology.java   |   7 +
 .../dht/GridDhtPartitionTopologyImpl.java   |  20 +++
 .../cache/distributed/dht/GridDhtTxLocal.java   |   4 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java | 136 +--
 .../cache/transactions/IgniteTxEntry.java   |  18 +++
 .../IgniteCacheEntryProcessorNodeJoinTest.java  |  54 
 .../cache/IgniteCacheInvokeReadThroughTest.java |   2 +-
 8 files changed, 223 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5065a1ec/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
index c3f3e7f..531678e 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
@@ -331,6 +331,26 @@ public class GridClientPartitionTopology implements 
GridDhtPartitionTopology {
 }
 
 /** {@inheritDoc} */
+@Override public GridDhtPartitionState partitionState(UUID nodeId, int 
part) {
+lock.readLock().lock();
+
+try {
+GridDhtPartitionMap partMap = node2part.get(nodeId);
+
+if (partMap != null) {
+GridDhtPartitionState state = partMap.get(part);
+
+return state == null ? EVICTED : state;
+}
+
+return EVICTED;
+}
+finally {
+lock.readLock().unlock();
+}
+}
+
+/** {@inheritDoc} */
 @Override public Collection nodes(int p, 
AffinityTopologyVersion topVer) {
 lock.readLock().lock();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5065a1ec/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
index c551fb3..7b08510 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
@@ -129,6 +129,13 @@ public interface GridDhtPartitionTopology {
 public GridDhtPartitionMap localPartitionMap();
 
 /**
+ * @param nodeId Node ID.
+ * @param part Partition.
+ * @return Partition state.
+ */
+public GridDhtPartitionState partitionState(UUID nodeId, int part);
+
+/**
  * @return Current update sequence.
  */
 public long updateSequence();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5065a1ec/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index de7f876..f356138 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -614,6 +614,26 @@ cl

incubator-ignite git commit: IGNITE-843: Validation popover fixes.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 609b8c620 -> 835ea08b8


IGNITE-843: Validation popover fixes.


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

Branch: refs/heads/ignite-843
Commit: 835ea08b83eb80d375971f0ec2ec94077c0d1536
Parents: 609b8c6
Author: AKuznetsov 
Authored: Wed Aug 19 09:55:08 2015 +0700
Committer: AKuznetsov 
Committed: Wed Aug 19 09:55:08 2015 +0700

--
 .../main/js/controllers/caches-controller.js| 31 +--
 .../src/main/js/controllers/common-module.js|  2 +
 .../main/js/controllers/metadata-controller.js  | 42 ++--
 3 files changed, 25 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/835ea08b/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 3229604..5c8fb0f 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -135,11 +135,8 @@ controlCenterModule.controller('cachesController', [
 var idx = _.indexOf(model, fx);
 
 // Found duplicate.
-if (idx >= 0 && idx != index) {
-$common.showError('SQL function with such class name 
already exists!');
-
-return $table.tableFocusInvalidField(index, 'SqlFx');
-}
+if (idx >= 0 && idx != index)
+return $common.showPopoverMessage(null, null, 
$table.tableFieldId(index, 'SqlFx'), 'SQL function with such class name already 
exists!');
 }
 
 return true;
@@ -162,11 +159,8 @@ controlCenterModule.controller('cachesController', [
 });
 
 // Found duplicate.
-if (idx >= 0 && idx != index) {
-$common.showError('Indexed type with such key class 
already exists!');
-
-return $table.tableFocusInvalidField(index, 
'KeyIndexedType');
-}
+if (idx >= 0 && idx != index)
+return $common.showPopoverMessage(null, null, 
$table.tableFieldId(index, 'KeyIndexedType'), 'Indexed type with such key class 
already exists!');
 }
 
 return true;
@@ -309,20 +303,17 @@ controlCenterModule.controller('cachesController', [
 }
 }
 
-if (cacheStoreFactorySelected && !(item.readThrough || 
item.writeThrough)) {
-return showPopoverMessage($scope.panels, 'store-data', 
'readThrough',
-'Store is configured but read/write through are not 
enabled!');
-}
-
-if ((item.readThrough || item.writeThrough) && 
!cacheStoreFactorySelected) {
+if ((item.readThrough || item.writeThrough) && 
!cacheStoreFactorySelected)
 return showPopoverMessage($scope.panels, 'store-data', 
'cacheStoreFactory',
-'Read / write through are enabled but store is not 
configured!');
-}
+(item.readThrough ? 'Read' : 'Write') + ' through are 
enabled but store is not configured!');
 
-if (item.writeBehindEnabled && !cacheStoreFactorySelected) {
+if (item.writeBehindEnabled && !cacheStoreFactorySelected)
 return showPopoverMessage($scope.panels, 'store-data', 
'cacheStoreFactory',
 'Write behind enabled but store is not configured!');
-}
+
+if (cacheStoreFactorySelected && !(item.readThrough || 
item.writeThrough))
+return showPopoverMessage($scope.panels, 'store-data', 
'readThrough',
+'Store is configured but read/write through are not 
enabled!');
 
 return true;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/835ea08b/modules/control-center-web/src/main/js/controllers/common-module.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/common-module.js 
b/modules/control-center-web/src/main/js/controllers/common-module.js
index 6d91134..d30292f 100644
--- a/

incubator-ignite git commit: IGNITE-843: WIP Load metadata from db.

2015-08-18 Thread akuznetsov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 835ea08b8 -> c18cee2ac


IGNITE-843: WIP Load metadata from db.


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

Branch: refs/heads/ignite-843
Commit: c18cee2ac0d6298778d2582bc6b6adbe1fdcedbd
Parents: 835ea08
Author: AKuznetsov 
Authored: Wed Aug 19 10:42:27 2015 +0700
Committer: AKuznetsov 
Committed: Wed Aug 19 10:42:27 2015 +0700

--
 .../main/js/controllers/caches-controller.js|  2 +-
 modules/control-center-web/src/main/js/db.js| 74 ++--
 .../src/main/js/routes/caches.js| 32 +++--
 .../src/main/js/routes/clusters.js  | 28 +++-
 .../js/views/configuration/metadata-load.jade   |  5 +-
 5 files changed, 61 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c18cee2a/modules/control-center-web/src/main/js/controllers/caches-controller.js
--
diff --git 
a/modules/control-center-web/src/main/js/controllers/caches-controller.js 
b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 5c8fb0f..121eed0 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -248,7 +248,7 @@ controlCenterModule.controller('cachesController', [
 if (item)
 sessionStorage.cacheSelectedItem = angular.toJson(item);
 else
-sessionStorage.removeItem(cacheSelectedItem);
+sessionStorage.removeItem('cacheSelectedItem');
 };
 
 // Add new cache.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c18cee2a/modules/control-center-web/src/main/js/db.js
--
diff --git a/modules/control-center-web/src/main/js/db.js 
b/modules/control-center-web/src/main/js/db.js
index b183bdb..6746758 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -28,7 +28,7 @@ var deepPopulate = require('mongoose-deep-populate')( 
mongoose);
 // Connect to mongoDB database.
 mongoose.connect(config.get('mongoDB:url'), {server: {poolSize: 4}});
 
-// Define account model.
+// Define Account schema.
 var AccountSchema = new Schema({
 username: String,
 email: String,
@@ -37,9 +37,11 @@ var AccountSchema = new Schema({
 resetPasswordToken: String
 });
 
+// Install passport plugin.
 AccountSchema.plugin(passportLocalMongoose, {usernameField: 'email', 
limitAttempts: true, lastLoginField: 'lastLogin',
 usernameLowerCase: true});
 
+// Configure transformation to JSON.
 AccountSchema.set('toJSON', {
 transform: function(doc, ret) {
 return {
@@ -52,9 +54,10 @@ AccountSchema.set('toJSON', {
 }
 });
 
+// Define Account model.
 exports.Account = mongoose.model('Account', AccountSchema);
 
-// Define space model.
+// Define Space model.
 exports.Space = mongoose.model('Space', new Schema({
 name: String,
 owner: {type: ObjectId, ref: 'Account'},
@@ -64,7 +67,7 @@ exports.Space = mongoose.model('Space', new Schema({
 }]
 }));
 
-// Define cache type metadata model.
+// Define Cache type metadata schema.
 var CacheTypeMetadataSchema = new Schema({
 space: {type: ObjectId, ref: 'Space'},
 name: String,
@@ -82,9 +85,10 @@ var CacheTypeMetadataSchema = new Schema({
 groups: [{name: String, fields: [{name: String, className: String, 
direction: Boolean}]}]
 });
 
+// Define Cache type metadata model.
 exports.CacheTypeMetadata = mongoose.model('CacheTypeMetadata', 
CacheTypeMetadataSchema);
 
-// Define cache model.
+// Define Cache schema.
 var CacheSchema = new Schema({
 space: {type: ObjectId, ref: 'Space'},
 name: String,
@@ -206,9 +210,10 @@ var CacheSchema = new Schema({
 }
 });
 
+// Define Cache model.
 exports.Cache = mongoose.model('Cache', CacheSchema);
 
-// Define cluster schema.
+// Define Cluster schema.
 var ClusterSchema = new Schema({
 space: {type: ObjectId, ref: 'Space'},
 name: String,
@@ -317,6 +322,7 @@ var ClusterSchema = new Schema({
 waitForSegmentOnStart: Boolean
 });
 
+// Install deep populate plugin.
 ClusterSchema.plugin(deepPopulate, {
 whitelist: [
 'caches',
@@ -325,40 +331,10 @@ ClusterSchema.plugin(deepPopulate, {
 ]
 });
 
-// Define cluster model.
+// Define Cluster model.
 exports.Cluster = mongoose.model('Cluster', ClusterSchema);
 
-// Define pe

[2/2] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

2015-08-18 Thread anovikov
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


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

Branch: refs/heads/ignite-843
Commit: a31c843010b721ddad3e5a36511fad970ae5f2de
Parents: 712729b c18cee2
Author: Andrey 
Authored: Wed Aug 19 10:49:31 2015 +0700
Committer: Andrey 
Committed: Wed Aug 19 10:49:31 2015 +0700

--
 .../main/js/controllers/caches-controller.js| 33 -
 .../src/main/js/controllers/common-module.js|  2 +
 .../main/js/controllers/metadata-controller.js  | 42 ---
 modules/control-center-web/src/main/js/db.js| 74 ++--
 .../src/main/js/routes/caches.js| 32 +++--
 .../src/main/js/routes/clusters.js  | 28 +++-
 .../js/views/configuration/metadata-load.jade   |  5 +-
 7 files changed, 86 insertions(+), 130 deletions(-)
--




[1/2] incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 c18cee2ac -> a31c84301


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: 712729b41dfb7c98a88875b9112b776c62074920
Parents: 609b8c6
Author: Andrey 
Authored: Wed Aug 19 10:49:12 2015 +0700
Committer: Andrey 
Committed: Wed Aug 19 10:49:12 2015 +0700

--
 .../org/apache/ignite/agent/AgentUtils.java | 34 ++--
 .../handlers/DatabaseMetadataExtractor.java |  2 +-
 2 files changed, 33 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/712729b4/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
index 9ab952a..763bb36 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
@@ -18,12 +18,17 @@
 package org.apache.ignite.agent;
 
 import java.io.*;
-import java.nio.file.*;
+import java.net.*;
+import java.security.*;
+import java.util.logging.*;
 
 /**
  * Utility methods.
  */
 public class AgentUtils {
+/** */
+private static final Logger log = 
Logger.getLogger(AgentUtils.class.getName());
+
 /**
  * Default constructor.
  */
@@ -35,6 +40,31 @@ public class AgentUtils {
  * @return App folder.
  */
 public static File getAgentHome() {
-return Paths.get("").toAbsolutePath().toFile();
+try {
+ProtectionDomain domain = 
AgentLauncher.class.getProtectionDomain();
+
+// Should not happen, but to make sure our code is not broken.
+if (domain == null || domain.getCodeSource() == null || 
domain.getCodeSource().getLocation() == null) {
+log.log(Level.WARNING, "Failed to resolve agent jar 
location!");
+
+return null;
+}
+
+// Resolve path to class-file.
+URI classesUri = domain.getCodeSource().getLocation().toURI();
+
+boolean windows = 
System.getProperty("os.name").toLowerCase().contains("win");
+
+// Overcome UNC path problem on Windows 
(http://www.tomergabel.com/JavaMishandlesUNCPathsOnWindows.aspx)
+if (windows && classesUri.getAuthority() != null)
+classesUri = new URI(classesUri.toString().replace("file://", 
"file:/"));
+
+return new File(classesUri);
+}
+catch (URISyntaxException | SecurityException ignored) {
+log.log(Level.WARNING, "Failed to resolve agent jar location!");
+
+return null;
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/712729b4/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
index b01bdc5..ba2de15 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
@@ -47,7 +47,7 @@ public class DatabaseMetadataExtractor {
 File agentHome = AgentUtils.getAgentHome();
 
 if (agentHome != null)
-driversFolder = agentHome + "/jdbc-drivers";
+driversFolder = new File(agentHome, "jdbc-drivers").getPath();
 }
 
 this.driversFolder = driversFolder;



incubator-ignite git commit: # IGNITE-843 Minor fix.

2015-08-18 Thread anovikov
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 a31c84301 -> eaf880bb7


# IGNITE-843 Minor fix.


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

Branch: refs/heads/ignite-843
Commit: eaf880bb7f883f722ac0a543f10d94738931b96e
Parents: a31c843
Author: Andrey 
Authored: Wed Aug 19 13:24:17 2015 +0700
Committer: Andrey 
Committed: Wed Aug 19 13:24:17 2015 +0700

--
 .../src/main/java/org/apache/ignite/agent/AgentUtils.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eaf880bb/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
--
diff --git 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
index 763bb36..be6d3e7 100644
--- 
a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
+++ 
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentUtils.java
@@ -59,7 +59,7 @@ public class AgentUtils {
 if (windows && classesUri.getAuthority() != null)
 classesUri = new URI(classesUri.toString().replace("file://", 
"file:/"));
 
-return new File(classesUri);
+return new File(classesUri).getParentFile();
 }
 catch (URISyntaxException | SecurityException ignored) {
 log.log(Level.WARNING, "Failed to resolve agent jar location!");