You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2017/02/06 10:11:14 UTC
[01/32] ignite git commit: IGNITE-3430 .NET: Run Ignite transactions
via standard TransactionScope API
Repository: ignite
Updated Branches:
refs/heads/ignite-comm-balance-master b5646869b -> 6b3b60d21
IGNITE-3430 .NET: Run Ignite transactions via standard TransactionScope API
This closes #1407
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f5375dee
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f5375dee
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f5375dee
Branch: refs/heads/ignite-comm-balance-master
Commit: f5375deead7fd40787cfb2e7130ee7c2d58820af
Parents: 9d64a28
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Jan 26 17:46:36 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Jan 26 17:46:36 2017 +0300
----------------------------------------------------------------------
.../transactions/PlatformTransactions.java | 9 +
.../Apache.Ignite.Core.Tests.csproj | 1 +
.../Cache/CacheAbstractTest.cs | 21 ++
.../Cache/CacheAbstractTransactionalTest.cs | 324 +++++++++++++++++++
.../Apache.Ignite.Core.csproj | 2 +
.../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 4 +-
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 90 +++++-
.../Transactions/CacheTransactionManager.cs | 160 +++++++++
.../Impl/Transactions/Transaction.cs | 8 +
.../Impl/Transactions/TransactionImpl.cs | 13 +
.../Impl/Transactions/TransactionsImpl.cs | 11 +
11 files changed, 631 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java
index 3cee2b1..21f71fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java
@@ -22,6 +22,7 @@ import org.apache.ignite.IgniteTransactions;
import org.apache.ignite.configuration.TransactionConfiguration;
import org.apache.ignite.internal.binary.BinaryRawReaderEx;
import org.apache.ignite.internal.binary.BinaryRawWriterEx;
+import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl;
import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget;
import org.apache.ignite.internal.processors.platform.PlatformContext;
import org.apache.ignite.internal.util.GridConcurrentFactory;
@@ -75,6 +76,9 @@ public class PlatformTransactions extends PlatformAbstractTarget {
public static final int OP_RESET_METRICS = 11;
/** */
+ public static final int OP_PREPARE = 12;
+
+ /** */
private final IgniteTransactions txs;
/** Map with currently active transactions. */
@@ -155,6 +159,11 @@ public class PlatformTransactions extends PlatformAbstractTarget {
/** {@inheritDoc} */
@Override public long processInLongOutLong(int type, long val) throws IgniteCheckedException {
switch (type) {
+ case OP_PREPARE:
+ ((TransactionProxyImpl)tx(val)).tx().prepare();
+
+ return TRUE;
+
case OP_COMMIT:
tx(val).commit();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index 08352b3..2764848 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -63,6 +63,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Transactions" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
index 1239794..1bc0f02 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
@@ -25,6 +25,7 @@ namespace Apache.Ignite.Core.Tests.Cache
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+ using System.Transactions;
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Expiry;
@@ -2646,6 +2647,26 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(5, cache[1]);
}
+ /// <summary>
+ /// Tests that operations in TransactionScope work correctly in any cache mode (tx or non-tx).
+ /// </summary>
+ [Test]
+ public void TestTransactionScope()
+ {
+ var cache = Cache();
+
+ cache[1] = 1;
+
+ using (var ts = new TransactionScope())
+ {
+ cache[1] = 2;
+
+ ts.Complete();
+ }
+
+ Assert.AreEqual(2, cache[1]);
+ }
+
private void TestKeepBinaryFlag(bool async)
{
var cache0 = async ? Cache().WrapAsync() : Cache();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index 5dcc560..37a22ae 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -18,10 +18,13 @@
namespace Apache.Ignite.Core.Tests.Cache
{
using System;
+ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+ using System.Transactions;
using Apache.Ignite.Core.Cache;
+ using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Transactions;
using NUnit.Framework;
@@ -561,5 +564,326 @@ namespace Apache.Ignite.Core.Tests.Cache
var deadlockEx = aex.InnerExceptions.OfType<TransactionDeadlockException>().First();
Assert.IsTrue(deadlockEx.Message.Trim().StartsWith("Deadlock detected:"), deadlockEx.Message);
}
+
+ /// <summary>
+ /// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/>.
+ /// </summary>
+ [Test]
+ public void TestTransactionScopeSingleCache()
+ {
+ var cache = Cache();
+
+ cache[1] = 1;
+ cache[2] = 2;
+
+ // Commit.
+ using (var ts = new TransactionScope())
+ {
+ cache[1] = 10;
+ cache[2] = 20;
+
+ Assert.IsNotNull(cache.Ignite.GetTransactions().Tx);
+
+ ts.Complete();
+ }
+
+ Assert.AreEqual(10, cache[1]);
+ Assert.AreEqual(20, cache[2]);
+
+ // Rollback.
+ using (new TransactionScope())
+ {
+ cache[1] = 100;
+ cache[2] = 200;
+ }
+
+ Assert.AreEqual(10, cache[1]);
+ Assert.AreEqual(20, cache[2]);
+ }
+
+ /// <summary>
+ /// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/>
+ /// with multiple participating caches.
+ /// </summary>
+ [Test]
+ public void TestTransactionScopeMultiCache()
+ {
+ var cache1 = Cache();
+
+ var cache2 = GetIgnite(0).GetOrCreateCache<int, int>(new CacheConfiguration(cache1.Name + "_")
+ {
+ AtomicityMode = CacheAtomicityMode.Transactional
+ });
+
+ cache1[1] = 1;
+ cache2[1] = 2;
+
+ // Commit.
+ using (var ts = new TransactionScope())
+ {
+ cache1[1] = 10;
+ cache2[1] = 20;
+
+ ts.Complete();
+ }
+
+ Assert.AreEqual(10, cache1[1]);
+ Assert.AreEqual(20, cache2[1]);
+
+ // Rollback.
+ using (new TransactionScope())
+ {
+ cache1[1] = 100;
+ cache2[1] = 200;
+ }
+
+ Assert.AreEqual(10, cache1[1]);
+ Assert.AreEqual(20, cache2[1]);
+ }
+
+ /// <summary>
+ /// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/>
+ /// when Ignite tx is started manually.
+ /// </summary>
+ [Test]
+ public void TestTransactionScopeWithManualIgniteTx()
+ {
+ var cache = Cache();
+ var transactions = cache.Ignite.GetTransactions();
+
+ cache[1] = 1;
+
+ // When Ignite tx is started manually, it won't be enlisted in TransactionScope.
+ using (var tx = transactions.TxStart())
+ {
+ using (new TransactionScope())
+ {
+ cache[1] = 2;
+ } // Revert transaction scope.
+
+ tx.Commit(); // Commit manual tx.
+ }
+
+ Assert.AreEqual(2, cache[1]);
+ }
+
+ /// <summary>
+ /// Test Ignite transaction with <see cref="TransactionScopeOption.Suppress"/> option.
+ /// </summary>
+ [Test]
+ public void TestSuppressedTransactionScope()
+ {
+ var cache = Cache();
+
+ cache[1] = 1;
+
+ using (new TransactionScope(TransactionScopeOption.Suppress))
+ {
+ cache[1] = 2;
+ }
+
+ // Even though transaction is not completed, the value is updated, because tx is suppressed.
+ Assert.AreEqual(2, cache[1]);
+ }
+
+ /// <summary>
+ /// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/> with nested scopes.
+ /// </summary>
+ [Test]
+ public void TestNestedTransactionScope()
+ {
+ var cache = Cache();
+
+ cache[1] = 1;
+
+ foreach (var option in new[] {TransactionScopeOption.Required, TransactionScopeOption.RequiresNew})
+ {
+ // Commit.
+ using (var ts1 = new TransactionScope())
+ {
+ using (var ts2 = new TransactionScope(option))
+ {
+ cache[1] = 2;
+ ts2.Complete();
+ }
+
+ cache[1] = 3;
+ ts1.Complete();
+ }
+
+ Assert.AreEqual(3, cache[1]);
+
+ // Rollback.
+ using (new TransactionScope())
+ {
+ using (new TransactionScope(option))
+ cache[1] = 4;
+
+ cache[1] = 5;
+ }
+
+ // In case with Required option there is a single tx
+ // that gets aborted, second put executes outside the tx.
+ Assert.AreEqual(option == TransactionScopeOption.Required ? 5 : 3, cache[1], option.ToString());
+ }
+ }
+
+ /// <summary>
+ /// Test that ambient <see cref="TransactionScope"/> options propagate to Ignite transaction.
+ /// </summary>
+ [Test]
+ public void TestTransactionScopeOptions()
+ {
+ var cache = Cache();
+ var transactions = cache.Ignite.GetTransactions();
+
+ var modes = new[]
+ {
+ Tuple.Create(IsolationLevel.Serializable, TransactionIsolation.Serializable),
+ Tuple.Create(IsolationLevel.RepeatableRead, TransactionIsolation.RepeatableRead),
+ Tuple.Create(IsolationLevel.ReadCommitted, TransactionIsolation.ReadCommitted),
+ Tuple.Create(IsolationLevel.ReadUncommitted, TransactionIsolation.ReadCommitted),
+ Tuple.Create(IsolationLevel.Snapshot, TransactionIsolation.ReadCommitted),
+ Tuple.Create(IsolationLevel.Chaos, TransactionIsolation.ReadCommitted),
+ };
+
+ foreach (var mode in modes)
+ {
+ using (new TransactionScope(TransactionScopeOption.Required, new TransactionOptions
+ {
+ IsolationLevel = mode.Item1
+ }))
+ {
+ cache[1] = 1;
+
+ var tx = transactions.Tx;
+ Assert.AreEqual(mode.Item2, tx.Isolation);
+ Assert.AreEqual(transactions.DefaultTransactionConcurrency, tx.Concurrency);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Tests all transactional operations with <see cref="TransactionScope"/>.
+ /// </summary>
+ [Test]
+ public void TestTransactionScopeAllOperations()
+ {
+ CheckTxOp((cache, key) => cache.Put(key, -5));
+ CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
+
+ CheckTxOp((cache, key) => cache.PutAll(new Dictionary<int, int> {{key, -7}}));
+ CheckTxOp((cache, key) => cache.PutAllAsync(new Dictionary<int, int> {{key, -7}}).Wait());
+
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.PutIfAbsent(key, -10);
+ });
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.PutIfAbsentAsync(key, -10);
+ });
+
+ CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
+ CheckTxOp((cache, key) => cache.GetAndPutAsync(key, -9).Wait());
+
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.GetAndPutIfAbsent(key, -10);
+ });
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.GetAndPutIfAbsentAsync(key, -10).Wait();
+ });
+
+ CheckTxOp((cache, key) => cache.GetAndRemove(key));
+ CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
+
+ CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
+ CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
+
+ CheckTxOp((cache, key) => cache.Invoke(key, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1));
+
+ CheckTxOp((cache, key) => cache.InvokeAll(new[] {key}, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(), 1));
+
+ CheckTxOp((cache, key) => cache.Remove(key));
+ CheckTxOp((cache, key) => cache.RemoveAsync(key));
+
+ CheckTxOp((cache, key) => cache.RemoveAll(new[] { key }));
+ CheckTxOp((cache, key) => cache.RemoveAllAsync(new[] { key }).Wait());
+
+ CheckTxOp((cache, key) => cache.Replace(key, 100));
+ CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100));
+
+ CheckTxOp((cache, key) => cache.Replace(key, cache[key], 100));
+ CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100));
+ }
+
+ /// <summary>
+ /// Checks that cache operation behaves transactionally.
+ /// </summary>
+ private void CheckTxOp(Action<ICache<int, int>, int> act)
+ {
+ var cache = Cache();
+
+ cache[1] = 1;
+ cache[2] = 2;
+
+ // Rollback.
+ using (new TransactionScope())
+ {
+ act(cache, 1);
+
+ Assert.IsNotNull(cache.Ignite.GetTransactions().Tx, "Transaction has not started.");
+ }
+
+ Assert.AreEqual(1, cache[1]);
+ Assert.AreEqual(2, cache[2]);
+
+ using (new TransactionScope())
+ {
+ act(cache, 1);
+ act(cache, 2);
+ }
+
+ Assert.AreEqual(1, cache[1]);
+ Assert.AreEqual(2, cache[2]);
+
+ // Commit.
+ using (var ts = new TransactionScope())
+ {
+ act(cache, 1);
+ ts.Complete();
+ }
+
+ Assert.IsTrue(!cache.ContainsKey(1) || cache[1] != 1);
+ Assert.AreEqual(2, cache[2]);
+
+ using (var ts = new TransactionScope())
+ {
+ act(cache, 1);
+ act(cache, 2);
+ ts.Complete();
+ }
+
+ Assert.IsTrue(!cache.ContainsKey(1) || cache[1] != 1);
+ Assert.IsTrue(!cache.ContainsKey(2) || cache[2] != 2);
+ }
+
+ [Serializable]
+ private class AddProcessor : ICacheEntryProcessor<int, int, int, int>
+ {
+ public int Process(IMutableCacheEntry<int, int> entry, int arg)
+ {
+ entry.Value += arg;
+ return arg;
+ }
+ }
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index d58c872..673449e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -87,6 +87,7 @@
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
+ <Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
@@ -189,6 +190,7 @@
<Compile Include="Impl\Binary\SerializableSerializer.cs" />
<Compile Include="Impl\Binary\BinaryWriterExtensions.cs" />
<Compile Include="Impl\Cache\Affinity\AffinityFunctionBase.cs" />
+ <Compile Include="Impl\Transactions\CacheTransactionManager.cs" />
<Compile Include="Impl\Cache\Expiry\ExpiryPolicyFactory.cs" />
<Compile Include="Impl\Cache\Expiry\ExpiryPolicySerializer.cs" />
<Compile Include="Impl\Cache\ICacheLockInternal.cs" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
index 2a0ec86..50938e1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
@@ -656,14 +656,14 @@ namespace Apache.Ignite.Core.Cache
/// <summary>
/// Removes all mappings from cache.
/// If write-through is enabled, the value will be removed from store.
- /// This method is transactional and will enlist the entry into ongoing transaction if there is one.
+ /// This method is not transactional.
/// </summary>
void RemoveAll();
/// <summary>
/// Removes all mappings from cache.
/// If write-through is enabled, the value will be removed from store.
- /// This method is transactional and will enlist the entry into ongoing transaction if there is one.
+ /// This method is not transactional.
/// </summary>
Task RemoveAllAsync();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index b8dc6cb..a387e1b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -20,6 +20,7 @@ namespace Apache.Ignite.Core.Impl.Cache
using System;
using System.Collections;
using System.Collections.Generic;
+ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using Apache.Ignite.Core.Binary;
@@ -36,6 +37,7 @@ namespace Apache.Ignite.Core.Impl.Cache
using Apache.Ignite.Core.Impl.Cache.Query.Continuous;
using Apache.Ignite.Core.Impl.Cluster;
using Apache.Ignite.Core.Impl.Common;
+ using Apache.Ignite.Core.Impl.Transactions;
using Apache.Ignite.Core.Impl.Unmanaged;
/// <summary>
@@ -56,6 +58,9 @@ namespace Apache.Ignite.Core.Impl.Cache
/** Flag: no-retries.*/
private readonly bool _flagNoRetries;
+ /** Transaction manager. */
+ private readonly CacheTransactionManager _txManager;
+
/// <summary>
/// Constructor.
/// </summary>
@@ -68,10 +73,16 @@ namespace Apache.Ignite.Core.Impl.Cache
public CacheImpl(Ignite grid, IUnmanagedTarget target, Marshaller marsh,
bool flagSkipStore, bool flagKeepBinary, bool flagNoRetries) : base(target, marsh)
{
+ Debug.Assert(grid != null);
+
_ignite = grid;
_flagSkipStore = flagSkipStore;
_flagKeepBinary = flagKeepBinary;
_flagNoRetries = flagNoRetries;
+
+ _txManager = GetConfiguration().AtomicityMode == CacheAtomicityMode.Transactional
+ ? new CacheTransactionManager(grid.GetTransactions())
+ : null;
}
/** <inheritDoc /> */
@@ -416,9 +427,10 @@ namespace Apache.Ignite.Core.Impl.Cache
public void Put(TK key, TV val)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
DoOutOp(CacheOp.Put, key, val);
}
@@ -428,6 +440,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync(CacheOp.PutAsync, key, val);
}
@@ -437,6 +451,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutInOpNullable(CacheOp.GetAndPut, key, val);
}
@@ -446,6 +462,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync(CacheOp.GetAndPutAsync, w =>
{
w.WriteObject(key);
@@ -457,9 +475,10 @@ namespace Apache.Ignite.Core.Impl.Cache
public CacheResult<TV> GetAndReplace(TK key, TV val)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutInOpNullable(CacheOp.GetAndReplace, key, val);
}
@@ -469,6 +488,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync(CacheOp.GetAndReplaceAsync, w =>
{
w.WriteObject(key);
@@ -481,6 +502,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(key, "key");
+ StartTx();
+
return DoOutInOpNullable(CacheOp.GetAndRemove, key);
}
@@ -489,6 +512,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(key, "key");
+ StartTx();
+
return DoOutOpAsync(CacheOp.GetAndRemoveAsync, w => w.WriteObject(key), r => GetCacheResult(r));
}
@@ -496,9 +521,10 @@ namespace Apache.Ignite.Core.Impl.Cache
public bool PutIfAbsent(TK key, TV val)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOp(CacheOp.PutIfAbsent, key, val);
}
@@ -508,6 +534,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync<TK, TV, bool>(CacheOp.PutIfAbsentAsync, key, val);
}
@@ -515,9 +543,10 @@ namespace Apache.Ignite.Core.Impl.Cache
public CacheResult<TV> GetAndPutIfAbsent(TK key, TV val)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutInOpNullable(CacheOp.GetAndPutIfAbsent, key, val);
}
@@ -527,6 +556,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync(CacheOp.GetAndPutIfAbsentAsync, w =>
{
w.WriteObject(key);
@@ -538,9 +569,10 @@ namespace Apache.Ignite.Core.Impl.Cache
public bool Replace(TK key, TV val)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOp(CacheOp.Replace2, key, val);
}
@@ -550,6 +582,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync<TK, TV, bool>(CacheOp.Replace2Async, key, val);
}
@@ -557,11 +591,11 @@ namespace Apache.Ignite.Core.Impl.Cache
public bool Replace(TK key, TV oldVal, TV newVal)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(oldVal, "oldVal");
-
IgniteArgumentCheck.NotNull(newVal, "newVal");
+ StartTx();
+
return DoOutOp(CacheOp.Replace3, key, oldVal, newVal);
}
@@ -572,6 +606,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(oldVal, "oldVal");
IgniteArgumentCheck.NotNull(newVal, "newVal");
+ StartTx();
+
return DoOutOpAsync<bool>(CacheOp.Replace3Async, w =>
{
w.WriteObject(key);
@@ -585,6 +621,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(vals, "vals");
+ StartTx();
+
DoOutOp(CacheOp.PutAll, writer => WriteDictionary(writer, vals));
}
@@ -593,6 +631,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(vals, "vals");
+ StartTx();
+
return DoOutOpAsync(CacheOp.PutAllAsync, writer => WriteDictionary(writer, vals));
}
@@ -669,6 +709,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(key, "key");
+ StartTx();
+
return DoOutOp(CacheOp.RemoveObj, key);
}
@@ -677,6 +719,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(key, "key");
+ StartTx();
+
return DoOutOpAsync<TK, bool>(CacheOp.RemoveObjAsync, key);
}
@@ -686,6 +730,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOp(CacheOp.RemoveBool, key, val);
}
@@ -695,6 +741,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(val, "val");
+ StartTx();
+
return DoOutOpAsync<TK, TV, bool>(CacheOp.RemoveBoolAsync, key, val);
}
@@ -703,6 +751,8 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(keys, "keys");
+ StartTx();
+
DoOutOp(CacheOp.RemoveAll, writer => WriteEnumerable(writer, keys));
}
@@ -711,18 +761,24 @@ namespace Apache.Ignite.Core.Impl.Cache
{
IgniteArgumentCheck.NotNull(keys, "keys");
+ StartTx();
+
return DoOutOpAsync(CacheOp.RemoveAllAsync, writer => WriteEnumerable(writer, keys));
}
/** <inheritDoc /> */
public void RemoveAll()
{
+ StartTx();
+
DoOutInOp((int) CacheOp.RemoveAll2);
}
/** <inheritDoc /> */
public Task RemoveAllAsync()
{
+ StartTx();
+
return DoOutOpAsync(CacheOp.RemoveAll2Async);
}
@@ -773,9 +829,10 @@ namespace Apache.Ignite.Core.Impl.Cache
public TRes Invoke<TArg, TRes>(TK key, ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
{
IgniteArgumentCheck.NotNull(key, "key");
-
IgniteArgumentCheck.NotNull(processor, "processor");
+ StartTx();
+
var holder = new CacheEntryProcessorHolder(processor, arg,
(e, a) => processor.Process((IMutableCacheEntry<TK, TV>)e, (TArg)a), typeof(TK), typeof(TV));
@@ -795,6 +852,8 @@ namespace Apache.Ignite.Core.Impl.Cache
IgniteArgumentCheck.NotNull(key, "key");
IgniteArgumentCheck.NotNull(processor, "processor");
+ StartTx();
+
var holder = new CacheEntryProcessorHolder(processor, arg,
(e, a) => processor.Process((IMutableCacheEntry<TK, TV>)e, (TArg)a), typeof(TK), typeof(TV));
@@ -822,9 +881,10 @@ namespace Apache.Ignite.Core.Impl.Cache
ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
{
IgniteArgumentCheck.NotNull(keys, "keys");
-
IgniteArgumentCheck.NotNull(processor, "processor");
+ StartTx();
+
var holder = new CacheEntryProcessorHolder(processor, arg,
(e, a) => processor.Process((IMutableCacheEntry<TK, TV>)e, (TArg)a), typeof(TK), typeof(TV));
@@ -842,9 +902,10 @@ namespace Apache.Ignite.Core.Impl.Cache
ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
{
IgniteArgumentCheck.NotNull(keys, "keys");
-
IgniteArgumentCheck.NotNull(processor, "processor");
+ StartTx();
+
var holder = new CacheEntryProcessorHolder(processor, arg,
(e, a) => processor.Process((IMutableCacheEntry<TK, TV>)e, (TArg)a), typeof(TK), typeof(TV));
@@ -1308,5 +1369,14 @@ namespace Apache.Ignite.Core.Impl.Cache
{
DoOutInOp((int) CacheOp.CloseLock, id);
}
+
+ /// <summary>
+ /// Starts a transaction when applicable.
+ /// </summary>
+ private void StartTx()
+ {
+ if (_txManager != null)
+ _txManager.StartTx();
+ }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
new file mode 100644
index 0000000..f5a1617
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Impl.Transactions
+{
+ using System;
+ using System.Diagnostics;
+ using System.Threading;
+ using System.Transactions;
+ using Apache.Ignite.Core.Transactions;
+
+ /// <summary>
+ /// Cache transaction enlistment manager,
+ /// allows using Ignite transactions via standard <see cref="TransactionScope"/>.
+ /// </summary>
+ internal class CacheTransactionManager : IEnlistmentNotification
+ {
+ /** */
+ private readonly ITransactions _transactions;
+
+ /** */
+ private static readonly ThreadLocal<Enlistment> Enlistment = new ThreadLocal<Enlistment>();
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="CacheTransactionManager"/> class.
+ /// </summary>
+ /// <param name="transactions">Transactions.</param>
+ public CacheTransactionManager(ITransactions transactions)
+ {
+ Debug.Assert(transactions != null);
+
+ _transactions = transactions;
+ }
+
+ /// <summary>
+ /// If ambient transaction is present, starts an Ignite transaction and enlists it.
+ /// </summary>
+ public void StartTx()
+ {
+ if (_transactions.Tx != null)
+ {
+ // Ignite transaction is already present.
+ // We have either enlisted it already, or it has been started manually and should not be enlisted.
+ // Java enlists existing Ignite tx in this case (see CacheJtaManager.java), but we do not.
+ return;
+ }
+
+ if (Enlistment.Value != null)
+ {
+ // We are already enlisted.
+ // .NET transaction mechanism allows nested transactions,
+ // and they can be processed differently depending on TransactionScopeOption.
+ // Ignite, however, allows only one active transaction per thread.
+ // Therefore we enlist only once on the first transaction that we encounter.
+ return;
+ }
+
+ var ambientTx = System.Transactions.Transaction.Current;
+
+ if (ambientTx != null && ambientTx.TransactionInformation.Status == TransactionStatus.Active)
+ {
+ _transactions.TxStart(_transactions.DefaultTransactionConcurrency,
+ ConvertTransactionIsolation(ambientTx.IsolationLevel));
+
+ Enlistment.Value = ambientTx.EnlistVolatile(this, EnlistmentOptions.None);
+ }
+ }
+
+ /** <inheritdoc /> */
+ void IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment)
+ {
+ var igniteTx = _transactions.Tx;
+
+ if (igniteTx != null && Enlistment.Value != null)
+ {
+ ((Transaction) igniteTx).Prepare();
+ }
+
+ preparingEnlistment.Prepared();
+ }
+
+ /** <inheritdoc /> */
+ void IEnlistmentNotification.Commit(Enlistment enlistment)
+ {
+ var igniteTx = _transactions.Tx;
+
+ if (igniteTx != null && Enlistment.Value != null)
+ {
+ Debug.Assert(ReferenceEquals(enlistment, Enlistment.Value));
+
+ igniteTx.Commit();
+
+ igniteTx.Dispose();
+
+ Enlistment.Value = null;
+ }
+
+ enlistment.Done();
+ }
+
+ /** <inheritdoc /> */
+ void IEnlistmentNotification.Rollback(Enlistment enlistment)
+ {
+ var igniteTx = _transactions.Tx;
+
+ if (igniteTx != null && Enlistment.Value != null)
+ {
+ igniteTx.Rollback();
+
+ igniteTx.Dispose();
+
+ Enlistment.Value = null;
+ }
+
+ enlistment.Done();
+ }
+
+ /** <inheritdoc /> */
+ void IEnlistmentNotification.InDoubt(Enlistment enlistment)
+ {
+ enlistment.Done();
+ }
+
+ /// <summary>
+ /// Converts the isolation level from .NET-specific to Ignite-specific.
+ /// </summary>
+ private static TransactionIsolation ConvertTransactionIsolation(IsolationLevel isolation)
+ {
+ switch (isolation)
+ {
+ case IsolationLevel.Serializable:
+ return TransactionIsolation.Serializable;
+ case IsolationLevel.RepeatableRead:
+ return TransactionIsolation.RepeatableRead;
+ case IsolationLevel.ReadCommitted:
+ case IsolationLevel.ReadUncommitted:
+ case IsolationLevel.Snapshot:
+ case IsolationLevel.Chaos:
+ return TransactionIsolation.ReadCommitted;
+ default:
+ throw new ArgumentOutOfRangeException("isolation", isolation,
+ "Unsupported transaction isolation level: " + isolation);
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/Transaction.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/Transaction.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/Transaction.cs
index 595300c..f700bfd 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/Transaction.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/Transaction.cs
@@ -142,5 +142,13 @@ namespace Apache.Ignite.Core.Impl.Transactions
{
return _tx.RemoveMeta<TV>(name);
}
+
+ /// <summary>
+ /// Executes prepare step of the two phase commit.
+ /// </summary>
+ public void Prepare()
+ {
+ _tx.Prepare();
+ }
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionImpl.cs
index d32cd3d..0b04a68 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionImpl.cs
@@ -112,6 +112,19 @@ namespace Apache.Ignite.Core.Impl.Transactions
}
/// <summary>
+ /// Executes prepare step of the two phase commit.
+ /// </summary>
+ public void Prepare()
+ {
+ lock (this)
+ {
+ ThrowIfClosed();
+
+ _txs.TxPrepare(this);
+ }
+ }
+
+ /// <summary>
/// Commits this tx and closes it.
/// </summary>
public void Commit()
http://git-wip-us.apache.org/repos/asf/ignite/blob/f5375dee/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
index 5fa5db8..ff5d6a2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
@@ -22,6 +22,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
using System.Threading.Tasks;
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Impl.Binary;
+ using Apache.Ignite.Core.Impl.Binary.IO;
using Apache.Ignite.Core.Impl.Unmanaged;
using Apache.Ignite.Core.Transactions;
@@ -63,6 +64,8 @@ namespace Apache.Ignite.Core.Impl.Transactions
/** */
private const int OpResetMetrics = 11;
+ /** */
+ private const int OpPrepare = 12;
/** */
private readonly TransactionConcurrency _dfltConcurrency;
@@ -177,6 +180,14 @@ namespace Apache.Ignite.Core.Impl.Transactions
}
/// <summary>
+ /// Executes prepare step of the two phase commit.
+ /// </summary>
+ internal void TxPrepare(TransactionImpl tx)
+ {
+ DoOutInOp(OpPrepare, tx.Id);
+ }
+
+ /// <summary>
/// Commit transaction.
/// </summary>
/// <param name="tx">Transaction.</param>
[15/32] ignite git commit: IGNITE-4612 Minor code cleanup
Posted by yz...@apache.org.
IGNITE-4612 Minor code cleanup
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/529a5455
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/529a5455
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/529a5455
Branch: refs/heads/ignite-comm-balance-master
Commit: 529a54555444abdf2477f7c0c56227c30911baa8
Parents: e613c00
Author: Alexander Menshikov <sh...@gmail.com>
Authored: Wed Feb 1 15:31:42 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Wed Feb 1 15:31:44 2017 +0300
----------------------------------------------------------------------
.../stream/camel/IgniteCamelStreamerTest.java | 4 +-
.../cassandra/persistence/PojoKeyField.java | 2 +-
.../ClientAbstractMultiNodeSelfTest.java | 8 +-
...BinaryMarshallerInsertStatementSelfTest.java | 2 -
...cBinaryMarshallerMergeStatementSelfTest.java | 2 -
.../internal/jdbc2/JdbcMetadataSelfTest.java | 2 +-
.../ignite/jdbc/JdbcMetadataSelfTest.java | 4 +-
.../jdbc/suite/IgniteJdbcDriverTestSuite.java | 3 +-
.../ignite/codegen/MessageCodeGenerator.java | 2 +-
.../org/apache/ignite/cache/QueryEntity.java | 1 -
.../store/jdbc/CacheAbstractJdbcStore.java | 3 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 2 +-
.../ignite/internal/MarshallerContextImpl.java | 4 +-
.../internal/binary/BinaryEnumObjectImpl.java | 4 +-
.../internal/binary/BinaryMarshaller.java | 1 -
.../impl/GridRouterCommandLineStartup.java | 4 +-
.../cluster/ClusterNodeLocalMapImpl.java | 1 -
.../internal/jdbc2/JdbcSqlFieldsQuery.java | 1 -
.../ignite/internal/jdbc2/JdbcStatement.java | 2 -
.../discovery/GridDiscoveryManager.java | 2 +-
.../internal/mxbean/IgniteStandardMXBean.java | 12 +-
.../cache/CacheEvictableEntryImpl.java | 4 +-
.../processors/cache/CacheMetricsImpl.java | 10 +-
.../processors/cache/GridCacheAtomicFuture.java | 3 +-
.../cache/GridCacheDeploymentManager.java | 4 +-
.../GridCachePartitionExchangeManager.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 13 +-
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../processors/cache/GridCacheTtlManager.java | 4 +-
.../processors/cache/GridCacheUtils.java | 2 -
.../processors/cache/QueryCursorImpl.java | 6 +-
.../binary/CacheObjectBinaryProcessorImpl.java | 2 +-
.../GridDistributedCacheAdapter.java | 3 +-
.../distributed/GridDistributedCacheEntry.java | 3 -
.../GridDistributedLockResponse.java | 1 -
.../dht/GridClientPartitionTopology.java | 1 -
.../dht/GridDhtAssignmentFetchFuture.java | 3 +-
.../distributed/dht/GridDhtCacheAdapter.java | 6 +-
.../distributed/dht/GridDhtGetSingleFuture.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 7 +-
.../dht/GridDhtPartitionTopology.java | 1 -
.../dht/GridDhtPartitionTopologyImpl.java | 2 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 8 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 1 -
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 13 +-
.../distributed/dht/GridDhtUnlockRequest.java | 3 +-
.../GridDhtAtomicAbstractUpdateFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 8 +-
.../atomic/GridNearAtomicFullUpdateRequest.java | 1 -
.../dht/preloader/GridDhtForceKeysFuture.java | 8 +-
.../dht/preloader/GridDhtPartitionDemander.java | 8 +-
.../dht/preloader/GridDhtPartitionMap2.java | 3 +-
.../GridDhtPartitionsExchangeFuture.java | 13 +-
.../distributed/near/GridNearGetFuture.java | 7 +-
...arOptimisticSerializableTxPrepareFuture.java | 2 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 11 +-
.../near/GridNearTxFinishFuture.java | 13 +-
.../processors/cache/query/CacheQuery.java | 1 -
.../cache/query/GridCacheSqlQuery.java | 2 -
.../continuous/CacheContinuousQueryHandler.java | 2 +-
.../cache/transactions/IgniteTxEntry.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +-
.../cache/transactions/IgniteTxManager.java | 3 +-
.../cache/transactions/IgniteTxStateImpl.java | 1 -
.../cache/transactions/TxEntryValueHolder.java | 6 +-
.../IgniteCacheObjectProcessorImpl.java | 2 +-
.../processors/clock/GridClockServer.java | 4 +-
.../datastreamer/DataStreamProcessor.java | 3 +-
.../datastreamer/DataStreamerImpl.java | 4 +-
.../processors/hadoop/HadoopClasspathUtils.java | 4 +-
.../internal/processors/igfs/IgfsProcessor.java | 3 +-
.../igfs/client/IgfsClientSizeCallable.java | 1 -
.../platform/PlatformAbstractBootstrap.java | 3 +-
.../platform/PlatformConfigurationEx.java | 3 +-
.../platform/cache/PlatformCache.java | 12 +-
.../platform/utils/PlatformUtils.java | 2 +-
.../processors/query/GridQueryProcessor.java | 2 +-
.../resource/GridResourceProcessor.java | 2 +-
.../handlers/cache/GridCacheCommandHandler.java | 2 -
.../string/GridRedisSetCommandHandler.java | 2 +-
.../processors/task/GridTaskWorker.java | 2 +-
.../internal/util/GridStripedSpinBusyLock.java | 2 +-
.../ignite/internal/util/HostAndPortRange.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 3 +-
.../ignite/internal/util/StripedExecutor.java | 2 +-
.../visor/node/VisorIgfsConfiguration.java | 1 -
.../ignite/marshaller/jdk/JdkMarshaller.java | 1 -
.../optimized/OptimizedClassDescriptor.java | 2 +-
.../optimized/OptimizedMarshallerUtils.java | 4 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../tcp/TcpCommunicationSpiMBean.java | 1 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 4 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 7 +-
.../tcp/internal/TcpDiscoveryStatistics.java | 8 +-
.../CacheJdbcPojoStoreAbstractSelfTest.java | 2 -
.../store/jdbc/CacheJdbcPojoStoreTest.java | 3 -
.../internal/ClusterGroupHostsSelfTest.java | 6 +-
.../ComputeJobCancelWithServiceSelfTest.java | 2 +-
.../internal/GridContinuousTaskSelfTest.java | 4 +-
.../GridEventStorageCheckAllEventsSelfTest.java | 2 +-
.../IgniteClientReconnectApiExceptionTest.java | 6 +-
...niteClientReconnectFailoverAbstractTest.java | 4 +-
.../GridDiscoveryManagerAliveCacheSelfTest.java | 3 +-
.../GridDiscoveryManagerAttributesSelfTest.java | 4 +-
.../BinaryObjectOffHeapUnswapTemporaryTest.java | 1 -
.../cache/CacheAffinityCallSelfTest.java | 4 +-
.../cache/CacheGetEntryAbstractTest.java | 2 +-
.../CacheSerializableTransactionsTest.java | 6 +-
.../CacheStartupInDeploymentModesTest.java | 7 +-
.../cache/CacheStopAndDestroySelfTest.java | 6 +-
.../cache/GridCacheMvccPartitionedSelfTest.java | 48 ++---
.../processors/cache/GridCacheMvccSelfTest.java | 208 +++++++++----------
.../processors/cache/GridCacheStopSelfTest.java | 4 +-
.../processors/cache/GridCacheTestEntryEx.java | 3 +-
.../cache/GridCacheUtilsSelfTest.java | 2 +-
...ProjectionForCachesOnDaemonNodeSelfTest.java | 8 +-
.../IgniteCacheConfigVariationsFullApiTest.java | 2 -
.../cache/IgniteCacheStoreCollectionTest.java | 1 -
...gniteTopologyValidatorAbstractCacheTest.java | 6 +-
.../processors/cache/IgniteTxAbstractTest.java | 3 +-
.../cache/IgniteTxConfigCacheSelfTest.java | 2 +-
.../IgniteTxExceptionAbstractSelfTest.java | 3 +-
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
.../CacheKeepBinaryWithInterceptorTest.java | 1 -
...yAtomicEntryProcessorDeploymentSelfTest.java | 4 +-
...IgniteCacheAbstractExecutionContextTest.java | 2 -
...eAbstractDataStructuresFailoverSelfTest.java | 16 +-
.../IgniteLockAbstractSelfTest.java | 24 +--
.../CacheGetFutureHangsSelfTest.java | 6 +-
.../CacheLateAffinityAssignmentTest.java | 2 +-
...ridCachePartitionNotLoadedEventSelfTest.java | 4 +-
...niteCacheClientNodeChangingTopologyTest.java | 12 +-
...teSynchronizationModesMultithreadedTest.java | 8 +-
.../IgniteCacheCrossCacheTxFailoverTest.java | 6 +-
...ePrimaryNodeFailureRecoveryAbstractTest.java | 4 +-
...gniteCachePutRetryTransactionalSelfTest.java | 4 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 4 +-
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 4 +-
.../GridCacheReplicatedNodeRestartSelfTest.java | 3 +-
.../GridCacheReplicatedPreloadSelfTest.java | 1 -
.../IgniteCacheExpiryPolicyAbstractTest.java | 4 +-
...ContinuousQueryFailoverAbstractSelfTest.java | 6 +-
...dCacheContinuousQueryNodesFilteringTest.java | 2 +-
...IgniteCacheContinuousQueryReconnectTest.java | 12 +-
.../TxDeadlockDetectionNoHangsTest.java | 2 +-
.../transactions/TxDeadlockDetectionTest.java | 2 +-
...ComputeJobExecutionErrorToLogManualTest.java | 4 +-
.../datastreamer/DataStreamerImplSelfTest.java | 8 +-
.../datastreamer/DataStreamerTimeoutTest.java | 6 +-
.../processors/igfs/IgfsAbstractSelfTest.java | 32 +--
.../processors/igfs/IgfsFileInfoSelfTest.java | 4 +-
.../igfs/IgfsMetaManagerSelfTest.java | 3 +-
.../igfs/IgfsModeResolverSelfTest.java | 10 +-
.../igfs/benchmark/IgfsBenchmark.java | 4 +-
.../cache/GridCacheCommandHandlerSelfTest.java | 1 -
...rviceDeploymentExceptionPropagationTest.java | 2 +-
.../GridServiceProcessorStopSelfTest.java | 2 +-
.../service/IgniteServiceReassignmentTest.java | 2 +-
.../internal/util/IgniteUtilsSelfTest.java | 5 +-
.../unsafe/GridOffheapSnapTreeSelfTest.java | 7 +-
.../lang/GridMetadataAwareAdapterSelfTest.java | 4 +-
.../p2p/GridP2PSameClassLoaderSelfTest.java | 14 +-
.../platform/PlatformEventsWriteEventTask.java | 9 -
.../local/GridLocalDeploymentSpiSelfTest.java | 6 +-
...lientDiscoverySpiFailureTimeoutSelfTest.java | 4 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 8 +-
.../TcpDiscoverySpiFailureTimeoutSelfTest.java | 14 +-
.../GridSwapSpaceSpiAbstractSelfTest.java | 3 +-
.../testframework/GridSpiTestContext.java | 5 +-
.../ignite/testframework/IgniteTestSuite.java | 2 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 2 -
...essagingConfigVariationFullApiTestSuite.java | 4 +-
.../ignite/util/mbeans/GridMBeanSelfTest.java | 10 +-
.../CacheNoValueClassOnServerTestClient.java | 3 +-
.../CacheConfigurationP2PTestClient.java | 3 +-
.../gce/TcpDiscoveryGoogleStorageIpFinder.java | 4 +-
.../hadoop/igfs/HadoopIgfsEndpoint.java | 4 +-
.../HadoopBasicFileSystemFactoryDelegate.java | 2 +-
.../hadoop/impl/igfs/HadoopIgfsInProc.java | 40 ++--
.../hadoop/impl/v2/HadoopV2Context.java | 3 +-
.../taskexecutor/HadoopExecutorService.java | 6 +-
.../child/HadoopChildProcessRunner.java | 10 +-
.../hadoop/impl/HadoopErrorSimulator.java | 12 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 3 +-
.../IgniteHadoopFileSystemClientSelfTest.java | 6 +-
.../query/h2/GridH2ResultSetIterator.java | 3 +-
.../processors/query/h2/IgniteH2Indexing.java | 4 +-
.../query/h2/opt/GridH2IndexBase.java | 4 +-
.../processors/query/h2/sql/DmlAstUtils.java | 2 +-
.../query/h2/twostep/msg/GridH2Geometry.java | 2 +-
.../cache/BinarySerializationQuerySelfTest.java | 2 -
.../CacheRandomOperationsMultithreadedTest.java | 4 +-
.../ClientReconnectAfterClusterRestartTest.java | 4 +-
.../GridCacheQueryIndexDisabledSelfTest.java | 20 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 3 +-
...eLockPartitionOnAffinityRunAbstractTest.java | 1 -
...PartitionOnAffinityRunAtomicCacheOpTest.java | 11 +-
...niteCacheLockPartitionOnAffinityRunTest.java | 51 ++---
...titionOnAffinityRunWithCollisionSpiTest.java | 10 +-
.../cache/IgniteCacheMergeSqlQuerySelfTest.java | 1 -
.../cache/IgniteCacheOffheapEvictQueryTest.java | 4 +-
...niteCacheP2pUnmarshallingQueryErrorTest.java | 4 +-
.../IgniteCacheUpdateSqlQuerySelfTest.java | 2 +-
...niteCacheDistributedQueryCancelSelfTest.java | 4 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 4 +-
.../query/IgniteSqlSchemaIndexingTest.java | 15 +-
.../query/IgniteSqlSplitterSelfTest.java | 4 +-
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/GridQueryParsingTest.java | 4 -
.../apache/ignite/stream/jms11/JmsStreamer.java | 4 +-
.../ignite/stream/kafka/KafkaStreamer.java | 6 +-
.../ignite/stream/kafka/TestKafkaBroker.java | 2 +-
.../connect/IgniteSourceConnectorTest.java | 2 +-
.../stream/mqtt/IgniteMqttStreamerTest.java | 4 +-
.../BundleDelegatingClassLoader.java | 4 +-
.../classloaders/ContainerSweepClassLoader.java | 4 +-
.../spark/JavaStandaloneIgniteRDDSelfTest.java | 3 +-
.../util/spring/IgniteSpringHelperImpl.java | 8 +-
.../ignite/internal/GridFactorySelfTest.java | 2 +-
.../internal/IgniteDynamicCacheConfigTest.java | 4 +-
.../GridSpringTransactionManagerSelfTest.java | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 2 +-
.../twitter/IgniteTwitterStreamerTest.java | 4 +-
.../GridUriDeploymentFileProcessorSelfTest.java | 3 +-
.../ignite/cache/websession/WebSessionV2.java | 2 +-
.../internal/websession/WebSessionSelfTest.java | 6 +-
.../apache/ignite/yarn/ApplicationMaster.java | 4 +-
.../org/apache/ignite/yarn/IgniteProvider.java | 4 +-
.../tcp/ipfinder/zk/ZookeeperIpFinderTest.java | 2 +-
233 files changed, 604 insertions(+), 777 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
index f921a59..6940ea2 100644
--- a/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
+++ b/modules/camel/src/test/java/org/apache/ignite/stream/camel/IgniteCamelStreamerTest.java
@@ -115,7 +115,7 @@ public class IgniteCamelStreamerTest extends GridCommonAbstractTest {
try {
streamer.stop();
}
- catch (Exception e) {
+ catch (Exception ignored) {
// ignore if already stopped
}
@@ -275,7 +275,7 @@ public class IgniteCamelStreamerTest extends GridCommonAbstractTest {
streamer.start();
fail("Streamer started; should have failed.");
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
assertTrue(streamer.getCamelContext().getStatus() == ServiceStatus.Stopped);
assertTrue(streamer.getCamelContext().getEndpointRegistry().size() == 0);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PojoKeyField.java
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PojoKeyField.java b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PojoKeyField.java
index 6f42db2..ec37411 100644
--- a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PojoKeyField.java
+++ b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PojoKeyField.java
@@ -55,7 +55,7 @@ public class PojoKeyField extends PojoField {
try {
sortOrder = SortOrder.valueOf(el.getAttribute(SORT_ATTR).trim().toUpperCase());
}
- catch (IllegalArgumentException e) {
+ catch (IllegalArgumentException ignored) {
throw new IllegalArgumentException("Incorrect sort order '" + el.getAttribute(SORT_ATTR) + "' specified");
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
index 80e7baa..893732d 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractMultiNodeSelfTest.java
@@ -269,12 +269,6 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
final GridClientNode second = iter.next();
- final GridClientPredicate<GridClientNode> noneFilter = new GridClientPredicate<GridClientNode>() {
- @Override public boolean apply(GridClientNode node) {
- return false;
- }
- };
-
final GridClientPredicate<GridClientNode> targetFilter = new GridClientPredicate<GridClientNode>() {
@Override public boolean apply(GridClientNode node) {
return node.nodeId().equals(second.nodeId());
@@ -527,4 +521,4 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
assertEquals("Invalid tx flags: " + t, FULL_SYNC, t.syncMode());
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java
index 667e9f0..18410a8 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java
@@ -18,8 +18,6 @@
package org.apache.ignite.internal.jdbc2;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.testframework.config.GridTestProperties;
/**
* JDBC test of INSERT statement w/binary marshaller - no nodes know about classes.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java
index 93451e7..c467b82 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java
@@ -18,8 +18,6 @@
package org.apache.ignite.internal.jdbc2;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.testframework.config.GridTestProperties;
/**
* JDBC test of MERGE statement w/binary marshaller - no nodes know about classes.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
index 7184b8d..d750376 100755
--- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcMetadataSelfTest.java
@@ -298,7 +298,7 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
tbls.getObject(i + 1);
}
}
- catch (Exception e) {
+ catch (Exception ignored) {
fail();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
index 72d93c9..d8226be 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
@@ -301,7 +301,7 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
tbls.getObject(i + 1);
}
}
- catch (Exception e) {
+ catch (Exception ignored) {
fail();
}
}
@@ -361,4 +361,4 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
this.name = name;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
index 048643b..c41b754 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
@@ -18,7 +18,6 @@
package org.apache.ignite.jdbc.suite;
import junit.framework.TestSuite;
-import org.apache.ignite.internal.jdbc2.JdbcDistributedJoinsQueryTest;
import org.apache.ignite.jdbc.JdbcComplexQuerySelfTest;
import org.apache.ignite.jdbc.JdbcConnectionSelfTest;
import org.apache.ignite.jdbc.JdbcEmptyCacheSelfTest;
@@ -70,4 +69,4 @@ public class IgniteJdbcDriverTestSuite extends TestSuite {
return suite;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
index 65ebd8d..5a26187 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/MessageCodeGenerator.java
@@ -924,4 +924,4 @@ public class MessageCodeGenerator {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java b/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
index c8abdfa..510c29e 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
@@ -20,7 +20,6 @@ package org.apache.ignite.cache;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index e7ce526..7af238b 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -81,7 +81,6 @@ import static org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.DFLT_
import static org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD;
import static org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.DFLT_WRITE_ATTEMPTS;
import static org.apache.ignite.cache.store.jdbc.JdbcTypesTransformer.NUMERIC_TYPES;
-import static org.apache.ignite.cache.store.jdbc.JdbcTypesTransformer.NUMERIC_TYPES;
/**
* Implementation of {@link CacheStore} backed by JDBC.
@@ -1401,7 +1400,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
}
else if (field.getJavaFieldType().isEnum() && fieldVal instanceof Enum) {
Enum val = (Enum)fieldVal;
-
+
fieldVal = NUMERIC_TYPES.contains(field.getDatabaseFieldType()) ? val.ordinal() : val.name();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
index 6a46619..89988f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStoreFactory.java
@@ -130,7 +130,7 @@ public class CacheJdbcBlobStoreFactory<K, V> implements Factory<CacheJdbcBlobSto
store.setDataSource(data);
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
throw new IgniteException("Failed to load bean in application context [beanName=" + dataSrcBean +
", igniteConfig=" + appCtx + ']');
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index f3e368d..9ca24fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -167,7 +167,7 @@ public class MarshallerContextImpl extends MarshallerContextAdapter {
return true;
}
- catch (CachePartialUpdateCheckedException | GridCacheTryPutFailedException e) {
+ catch (CachePartialUpdateCheckedException | GridCacheTryPutFailedException ignored) {
if (++failedCnt > 10) {
if (log.isQuiet())
U.quiet(false, "Failed to register marshalled class for more than 10 times in a row " +
@@ -214,7 +214,7 @@ public class MarshallerContextImpl extends MarshallerContextAdapter {
clsName = reader.readLine();
}
}
- catch (IOException e) {
+ catch (IOException ignored) {
throw new IgniteCheckedException("Class definition was not found " +
"at marshaller cache and local file. " +
"[id=" + id + ", file=" + file.getAbsolutePath() + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
index 9fd6bc1..3318988 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
@@ -205,7 +205,7 @@ public class BinaryEnumObjectImpl implements BinaryObjectEx, Externalizable, Cac
return new SB().a(val).toString();
}
- catch (Exception e) {
+ catch (Exception ignored) {
// No-op.
}
@@ -215,7 +215,7 @@ public class BinaryEnumObjectImpl implements BinaryObjectEx, Externalizable, Cac
try {
type = rawType();
}
- catch (Exception e) {
+ catch (Exception ignored) {
type = null;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMarshaller.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMarshaller.java
index bd95103..dfc726e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMarshaller.java
@@ -25,7 +25,6 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller;
-import org.apache.ignite.marshaller.MarshallerContext;
import org.jetbrains.annotations.Nullable;
import sun.misc.Unsafe;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
index ac1ca62..6889e73 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
@@ -137,7 +137,7 @@ public class GridRouterCommandLineStartup {
try {
t = U.addLog4jNoOpLogger();
}
- catch (Exception e) {
+ catch (Exception ignored) {
isLog4jUsed = false;
}
}
@@ -168,4 +168,4 @@ public class GridRouterCommandLineStartup {
}
});
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterNodeLocalMapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterNodeLocalMapImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterNodeLocalMapImpl.java
index 3147b12..26a9013 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterNodeLocalMapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterNodeLocalMapImpl.java
@@ -26,7 +26,6 @@ import java.io.ObjectStreamException;
import java.util.concurrent.ConcurrentMap;
import org.apache.ignite.IgniteCluster;
import org.apache.ignite.internal.GridKernalContext;
-import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.IgnitionEx;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcSqlFieldsQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcSqlFieldsQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcSqlFieldsQuery.java
index 1b27296..19dedf6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcSqlFieldsQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcSqlFieldsQuery.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.jdbc2;
import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.jetbrains.annotations.Nullable;
/**
* {@link SqlFieldsQuery} with JDBC flavor - it has additional flag indicating whether JDBC driver expects
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
index 5621058..d7e387f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.jdbc2;
-import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -35,7 +34,6 @@ import java.util.UUID;
import org.apache.ignite.Ignite;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
import static java.sql.ResultSet.CONCUR_READ_ONLY;
import static java.sql.ResultSet.FETCH_FORWARD;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 9aa4db1..71d8ad9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1443,7 +1443,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
try {
return getSpi().pingNode(nodeId);
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
return false;
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java b/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java
index e4ae161..1aad4b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java
@@ -105,7 +105,7 @@ public class IgniteStandardMXBean extends StandardMBean {
}
}
}
- catch (SecurityException e) {
+ catch (SecurityException ignored) {
// No-op. Default value will be returned.
}
@@ -153,7 +153,7 @@ public class IgniteStandardMXBean extends StandardMBean {
assert str.charAt(str.length() - 1) == '.' : str;
}
}
- catch (SecurityException | ClassNotFoundException e) {
+ catch (SecurityException | ClassNotFoundException ignored) {
// No-op. Default value will be returned.
}
@@ -183,7 +183,7 @@ public class IgniteStandardMXBean extends StandardMBean {
assert str.charAt(str.length() - 1) == '.' : str;
}
}
- catch (SecurityException | ClassNotFoundException e) {
+ catch (SecurityException | ClassNotFoundException ignored) {
// No-op. Default value will be returned.
}
@@ -209,7 +209,7 @@ public class IgniteStandardMXBean extends StandardMBean {
assert str.trim().length() > 0;
}
}
- catch (SecurityException | ClassNotFoundException e) {
+ catch (SecurityException | ClassNotFoundException ignored) {
// No-op. Default value will be returned.
}
@@ -265,7 +265,7 @@ public class IgniteStandardMXBean extends StandardMBean {
if (res != null)
return res;
}
- catch (NoSuchMethodException e) {
+ catch (NoSuchMethodException ignored) {
// No-op. Default value will be returned.
}
@@ -281,4 +281,4 @@ public class IgniteStandardMXBean extends StandardMBean {
return res;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictableEntryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictableEntryImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictableEntryImpl.java
index 770daa1..b0a2150 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictableEntryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictableEntryImpl.java
@@ -91,7 +91,7 @@ public class CacheEvictableEntryImpl<K, V> implements EvictableEntry<K, V> {
return val != null ? val.<V>value(cached.context().cacheObjectContext(), false) : null;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
return null;
}
catch (IgniteCheckedException e) {
@@ -121,7 +121,7 @@ public class CacheEvictableEntryImpl<K, V> implements EvictableEntry<K, V> {
return valBytes == null ? keyBytes.length : keyBytes.length + valBytes.length;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
return 0;
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index a60c22b..753cca1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@ -224,7 +224,7 @@ public class CacheMetricsImpl implements CacheMetrics {
try {
return cctx.swap().offheapEntriesCount(true, false, cctx.affinity().affinityTopologyVersion());
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
return 0;
}
}
@@ -234,7 +234,7 @@ public class CacheMetricsImpl implements CacheMetrics {
try {
return cctx.swap().offheapEntriesCount(false, true, cctx.affinity().affinityTopologyVersion());
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
return 0;
}
}
@@ -281,7 +281,7 @@ public class CacheMetricsImpl implements CacheMetrics {
try {
return cctx.cache().swapKeys();
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
return 0;
}
}
@@ -291,7 +291,7 @@ public class CacheMetricsImpl implements CacheMetrics {
try {
return cctx.cache().swapSize();
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
return 0;
}
}
@@ -905,4 +905,4 @@ public class CacheMetricsImpl implements CacheMetrics {
@Override public String toString() {
return S.toString(CacheMetricsImpl.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
index c96d00f..3e11d50 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.processors.cache;
-import java.util.Collection;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -38,4 +37,4 @@ public interface GridCacheAtomicFuture<R> extends GridCacheFuture<R> {
* @return Future or {@code null} if no need to wait.
*/
public IgniteInternalFuture<Void> completeFuture(AffinityTopologyVersion topVer);
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index ad4892b..5c0e407 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -343,8 +343,8 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
catch (GridCacheEntryRemovedException ignore) {
return false;
}
- catch (BinaryInvalidTypeException ignore) {
- log.error("An attempt to undeploy cache with binary objects.", ignore);
+ catch (BinaryInvalidTypeException ex) {
+ log.error("An attempt to undeploy cache with binary objects.", ex);
return false;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index f6dfe95..e44f4a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -1841,7 +1841,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
catch (IgniteInterruptedCheckedException e) {
throw e;
}
- catch (IgniteClientDisconnectedCheckedException e) {
+ catch (IgniteClientDisconnectedCheckedException ignored) {
return;
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 9487589..84126e4 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -210,12 +210,11 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
/**
- * @param internalCache Internal cache flag.
* @param cfg Initializes cache configuration with proper defaults.
* @param cacheObjCtx Cache object context.
* @throws IgniteCheckedException If configuration is not valid.
*/
- private void initialize(boolean internalCache, CacheConfiguration cfg, CacheObjectContext cacheObjCtx)
+ private void initialize(CacheConfiguration cfg, CacheObjectContext cacheObjCtx)
throws IgniteCheckedException {
if (cfg.getCacheMode() == null)
cfg.setCacheMode(DFLT_CACHE_MODE);
@@ -623,7 +622,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(cfg);
// Initialize defaults.
- initialize(internalCaches.contains(maskNull(cfg.getName())), cfg, cacheObjCtx);
+ initialize(cfg, cacheObjCtx);
cfgs[i] = cfg; // Replace original configuration value.
@@ -755,7 +754,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
if (rmtCfg != null) {
CacheConfiguration locCfg = desc.cacheConfiguration();
- checkCache(locCfg, rmtCfg, n, desc);
+ checkCache(locCfg, rmtCfg, n);
// Check plugin cache configurations.
CachePluginManager pluginMgr = desc.pluginManager();
@@ -2836,11 +2835,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
* @param locCfg Local configuration.
* @param rmtCfg Remote configuration.
* @param rmtNode Remote node.
- * @param desc Cache descriptor.
* @throws IgniteCheckedException If check failed.
*/
- private void checkCache(CacheConfiguration locCfg, CacheConfiguration rmtCfg, ClusterNode rmtNode,
- DynamicCacheDescriptor desc) throws IgniteCheckedException {
+ private void checkCache(CacheConfiguration locCfg, CacheConfiguration rmtCfg, ClusterNode rmtNode) throws IgniteCheckedException {
ClusterNode locNode = ctx.discovery().localNode();
UUID rmt = rmtNode.id();
@@ -3697,7 +3694,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(cfg);
- initialize(false, cfg, cacheObjCtx);
+ initialize(cfg, cacheObjCtx);
req.startCacheConfiguration(cfg);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 2509b88..159b3b8 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
@@ -187,7 +187,7 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
}
}
}
- catch (GridDhtInvalidPartitionException e) {
+ catch (GridDhtInvalidPartitionException ignored) {
// Skip entry.
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
index 0f855fe..6b61c91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
@@ -141,7 +141,7 @@ public class GridCacheTtlManager extends GridCacheManagerAdapter {
break;
}
- catch (GridCacheEntryRemovedException e0) {
+ catch (GridCacheEntryRemovedException ignored) {
entry = entry.context().cache().entryEx(entry.key());
touch = true;
@@ -322,4 +322,4 @@ public class GridCacheTtlManager extends GridCacheManagerAdapter {
return e;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 969c41a..72a9a64 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
@@ -74,12 +74,10 @@ import org.apache.ignite.internal.util.typedef.C1;
import org.apache.ignite.internal.util.typedef.CI1;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.internal.util.typedef.P2;
import org.apache.ignite.internal.util.typedef.T2;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiPredicate;
import org.apache.ignite.lang.IgniteClosure;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgnitePredicate;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/QueryCursorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/QueryCursorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/QueryCursorImpl.java
index 852c432..24789fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/QueryCursorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/QueryCursorImpl.java
@@ -17,12 +17,8 @@
package org.apache.ignite.internal.processors.cache;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
import java.sql.ResultSet;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
@@ -199,4 +195,4 @@ public class QueryCursorImpl<T> implements QueryCursorEx<T> {
/** Result ready. */RESULT_READY,
/** Closed. */CLOSED,
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
index 1d60c42..c11f71f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
@@ -398,7 +398,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
try {
res = BinaryUtils.mergeMetadata(oldMeta0, newMeta);
}
- catch (BinaryObjectException e) {
+ catch (BinaryObjectException ignored) {
res = oldMeta0;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index d89a468..7e4deff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -43,7 +43,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheSwapEntry;
import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalEx;
@@ -448,4 +447,4 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
return true;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
index 3d55f31..f518934 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheEntry.java
@@ -38,9 +38,6 @@ import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.jetbrains.annotations.Nullable;
-import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_LOCKED;
-import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_UNLOCKED;
-
/**
* Entry for distributed (replicated/partitioned) cache.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index 61a2388..ceba71d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed;
import java.io.Externalizable;
import java.nio.ByteBuffer;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 816132d..7c1f760 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
@@ -37,7 +37,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
-import org.apache.ignite.internal.util.F0;
import org.apache.ignite.internal.util.GridAtomicLong;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.F;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
index ab8e863..d1e3780 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
@@ -22,7 +22,6 @@ import java.util.Collections;
import java.util.LinkedList;
import java.util.Queue;
import java.util.UUID;
-import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
@@ -220,4 +219,4 @@ public class GridDhtAssignmentFetchFuture extends GridFutureAdapter<GridDhtAffin
@Override public String toString() {
return S.toString(GridDhtAssignmentFetchFuture.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index c9f7c5c..c278812 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -821,7 +821,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
req.addDeploymentInfo());
}
}
- catch (NodeStoppingException e) {
+ catch (NodeStoppingException ignored) {
return;
}
catch (IgniteCheckedException e) {
@@ -887,7 +887,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
res.entries(entries);
}
- catch (NodeStoppingException e) {
+ catch (NodeStoppingException ignored) {
return;
}
catch (IgniteCheckedException e) {
@@ -1214,7 +1214,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
return !aff1.equals(aff2);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
return true;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
index 9394937..5e915a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
@@ -445,7 +445,7 @@ public final class GridDhtGetSingleFuture<K, V> extends GridFutureAdapter<GridCa
try {
onDone(toEntryInfo(fut.get()));
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
assert false; // Should never happen.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 3ce1dd8..d45a86a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -787,7 +787,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
return lastEntry;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
if (log.isDebugEnabled())
log.debug("Got removed entry: " + lastEntry);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 125b4f8..a0270b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -486,7 +486,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
MiniFuture f = (MiniFuture)fut;
if (f.node().id().equals(nodeId)) {
- f.onResult(new ClusterTopologyCheckedException("Remote node left grid (will ignore): " + nodeId));
+ f.onResult();
found = true;
}
@@ -947,7 +947,7 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
catch (IgniteCheckedException e) {
// Fail the whole thing.
if (e instanceof ClusterTopologyCheckedException)
- fut.onResult((ClusterTopologyCheckedException)e);
+ fut.onResult();
else {
if (msgLog.isDebugEnabled()) {
msgLog.debug("DHT lock fut, failed to send request [txId=" + nearLockVer +
@@ -1196,9 +1196,8 @@ public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean>
}
/**
- * @param e Node failure.
*/
- void onResult(ClusterTopologyCheckedException e) {
+ void onResult() {
if (msgLog.isDebugEnabled()) {
msgLog.debug("DHT lock fut, mini future node left [txId=" + nearLockVer +
", dhtTxId=" + lockVer +
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 14ce1f9..bdd84b0 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
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.processors.cache.distributed.dht;
-import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.UUID;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 1b4dcc9..7965482 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
@@ -210,7 +210,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
break;
}
- catch (IgniteFutureTimeoutCheckedException e) {
+ catch (IgniteFutureTimeoutCheckedException ignored) {
if (dumpCnt++ < GridDhtPartitionsExchangeFuture.DUMP_PENDING_OBJECTS_THRESHOLD) {
U.warn(log, "Failed to wait for partition eviction [" +
"topVer=" + topVer +
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index a9e3bc4..dea4072 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -390,7 +390,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
try {
keyFut.get();
}
- catch (NodeStoppingException e) {
+ catch (NodeStoppingException ignored) {
return;
}
catch (IgniteCheckedException e) {
@@ -408,7 +408,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
try {
fut.get();
}
- catch (NodeStoppingException e) {
+ catch (NodeStoppingException ignored) {
return;
}
catch (IgniteCheckedException e) {
@@ -439,11 +439,11 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
try {
ctx.io().send(nodeId, res, ctx.ioPolicy());
}
- catch (ClusterTopologyCheckedException e0) {
+ catch (ClusterTopologyCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to send lock reply to remote node because it left grid: " + nodeId);
}
- catch (IgniteCheckedException e0) {
+ catch (IgniteCheckedException ignored) {
U.error(log, "Failed to send lock reply to node: " + nodeId, e);
}
}
@@ -1142,7 +1142,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
try {
ctx.io().send(nearNode, res, ctx.ioPolicy());
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to send client lock remap response, client node failed " +
"[node=" + nearNode + ", req=" + req + ']');
@@ -1654,7 +1654,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
if (keyBytes != null)
for (KeyCacheObject key : keyBytes)
- req.addNearKey(key, ctx.shared());
+ req.addNearKey(key);
req.completedVersions(committed, rolledback);
@@ -1683,7 +1683,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends GridDhtCach
try {
for (KeyCacheObject key : keyBytes)
- req.addNearKey(key, ctx.shared());
+ req.addNearKey(key);
req.completedVersions(committed, rolledback);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index 147cbea..60e07b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@ -135,7 +135,7 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
MiniFuture f = (MiniFuture)fut;
if (f.node().id().equals(nodeId)) {
- f.onNodeLeft(new ClusterTopologyCheckedException("Remote node left grid: " + nodeId), true);
+ f.onNodeLeft();
return true;
}
@@ -634,14 +634,12 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
* @param e Node failure.
*/
void onNodeLeft(ClusterTopologyCheckedException e) {
- onNodeLeft(e, false);
+ onNodeLeft();
}
/**
- * @param e Node failure.
- * @param discoThread {@code True} if executed from discovery thread.
*/
- void onNodeLeft(ClusterTopologyCheckedException e, boolean discoThread) {
+ void onNodeLeft() {
if (msgLog.isDebugEnabled()) {
msgLog.debug("DHT finish fut, mini future node left [txId=" + tx.nearXidVersion() +
", dhtTxId=" + tx.xidVersion() +
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index 4e39e9b..7199ede 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -57,7 +57,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC
import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isNearEnabled;
import static org.apache.ignite.transactions.TransactionState.PREPARED;
import static org.apache.ignite.transactions.TransactionState.PREPARING;
-import static org.apache.ignite.transactions.TransactionState.UNKNOWN;
/**
* Replicated user transaction.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index 1823cce..67e1993 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -42,7 +42,6 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
import org.apache.ignite.internal.util.F0;
import org.apache.ignite.internal.util.GridLeanMap;
import org.apache.ignite.internal.util.GridLeanSet;
@@ -595,7 +594,7 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
break;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
if (log.isDebugEnabled())
log.debug("Get removed entry: " + key);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 ca2b494..eadb69e 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
@@ -322,7 +322,7 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
MiniFuture f = (MiniFuture)fut;
if (f.node().id().equals(nodeId)) {
- f.onNodeLeft(new ClusterTopologyCheckedException("Remote node left grid: " + nodeId));
+ f.onNodeLeft();
return true;
}
@@ -1313,8 +1313,8 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
", node=" + n.id() + ']');
}
}
- catch (ClusterTopologyCheckedException e) {
- fut.onNodeLeft(e);
+ catch (ClusterTopologyCheckedException ignored) {
+ fut.onNodeLeft();
}
catch (IgniteCheckedException e) {
if (!cctx.kernalContext().isStopping()) {
@@ -1396,8 +1396,8 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
", node=" + nearMapping.node().id() + ']');
}
}
- catch (ClusterTopologyCheckedException e) {
- fut.onNodeLeft(e);
+ catch (ClusterTopologyCheckedException ignored) {
+ fut.onNodeLeft();
}
catch (IgniteCheckedException e) {
if (!cctx.kernalContext().isStopping()) {
@@ -1629,9 +1629,8 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
}
/**
- * @param e Node failure.
*/
- void onNodeLeft(ClusterTopologyCheckedException e) {
+ void onNodeLeft() {
if (msgLog.isDebugEnabled()) {
msgLog.debug("DHT prepare fut, mini future node left [txId=" + tx.nearXidVersion() +
", dhtTxId=" + tx.xidVersion() +
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
index 1d067da..3737295 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnlockRequest.java
@@ -69,10 +69,9 @@ public class GridDhtUnlockRequest extends GridDistributedUnlockRequest {
* Adds a Near key.
*
* @param key Key.
- * @param ctx Context.
* @throws IgniteCheckedException If failed.
*/
- public void addNearKey(KeyCacheObject key, GridCacheSharedContext ctx)
+ public void addNearKey(KeyCacheObject key)
throws IgniteCheckedException {
if (nearKeys == null)
nearKeys = new ArrayList<>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index 361fbe2..1b175d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -370,7 +370,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
registerResponse(req.nodeId());
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
U.error(msgLog, "Failed to send request [futId=" + futVer +
", writeVer=" + writeVer + ", node=" + req.nodeId() + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index acfe141..fdc0578 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -549,7 +549,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
throws IgniteCheckedException {
return getAllAsyncInternal(keys,
!ctx.config().isReadFromBackup(),
- true,
null,
ctx.kernalContext().job().currentTaskName(),
deserializeBinary,
@@ -573,7 +572,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
) {
return getAllAsyncInternal(keys,
forcePrimary,
- skipTx,
subjId,
taskName,
deserializeBinary,
@@ -586,7 +584,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
/**
* @param keys Keys.
* @param forcePrimary Force primary flag.
- * @param skipTx Skip tx flag.
* @param subjId Subject ID.
* @param taskName Task name.
* @param deserializeBinary Deserialize binary flag.
@@ -599,7 +596,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
private IgniteInternalFuture<Map<K, V>> getAllAsyncInternal(
@Nullable final Collection<? extends K> keys,
final boolean forcePrimary,
- boolean skipTx,
@Nullable UUID subjId,
final String taskName,
final boolean deserializeBinary,
@@ -1709,7 +1705,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
if (forceFut != null)
forceFut.get();
}
- catch (NodeStoppingException e) {
+ catch (NodeStoppingException ignored) {
return;
}
catch (IgniteCheckedException e) {
@@ -1726,7 +1722,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
try {
fut.get();
}
- catch (NodeStoppingException e) {
+ catch (NodeStoppingException ignored) {
return;
}
catch (IgniteCheckedException e) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
index 87d9225..08c2474 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
@@ -41,7 +41,6 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteExternaliza
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.GridLongList;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
[22/32] ignite git commit: IGNITE-4046: Added DML support to CPP
platform. This closes #1432.
Posted by yz...@apache.org.
IGNITE-4046: Added DML support to CPP platform. This closes #1432.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b0bc6f0c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b0bc6f0c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b0bc6f0c
Branch: refs/heads/ignite-comm-balance-master
Commit: b0bc6f0cb1bdcc3038f48ec0eb34f9a01044ded0
Parents: 529a545
Author: isapego <ig...@gmail.com>
Authored: Wed Feb 1 18:04:20 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Feb 1 18:04:20 2017 +0300
----------------------------------------------------------------------
modules/platforms/cpp/binary/Makefile.am | 1 +
.../platforms/cpp/binary/include/Makefile.am | 3 +
.../binary/binary_array_identity_resolver.h | 64 +++
.../ignite/binary/binary_identity_resolver.h | 61 +++
.../include/ignite/binary/binary_object.h | 5 +-
.../binary/include/ignite/binary/binary_type.h | 16 -
.../ignite/impl/binary/binary_object_impl.h | 9 +-
.../ignite/impl/binary/binary_type_impl.h | 149 ++++++
.../ignite/impl/binary/binary_type_snapshot.h | 18 +-
.../include/ignite/impl/binary/binary_utils.h | 175 +------
.../ignite/impl/binary/binary_writer_impl.h | 11 +-
.../ignite/impl/interop/interop_output_stream.h | 10 +-
.../cpp/binary/project/vs/binary.vcxproj | 4 +
.../binary/project/vs/binary.vcxproj.filters | 12 +
.../binary/binary_array_identity_resolver.cpp | 42 ++
.../cpp/binary/src/binary/binary_type.cpp | 4 +-
.../src/impl/binary/binary_object_impl.cpp | 10 +-
.../src/impl/binary/binary_type_manager.cpp | 12 +-
.../cpp/binary/src/impl/binary/binary_utils.cpp | 80 +--
.../src/impl/binary/binary_writer_impl.cpp | 2 -
.../src/impl/interop/interop_output_stream.cpp | 5 +
modules/platforms/cpp/common/Makefile.am | 5 +-
.../platforms/cpp/common/include/Makefile.am | 1 +
.../include/ignite/common/platform_utils.h | 79 +++
.../cpp/common/include/ignite/common/utils.h | 251 +++++++--
.../os/linux/src/common/platform_utils.cpp | 81 +++
.../cpp/common/os/linux/src/common/utils.cpp | 148 ------
.../common/os/win/src/common/platform_utils.cpp | 88 ++++
.../cpp/common/os/win/src/common/utils.cpp | 154 ------
.../cpp/common/project/vs/common.vcxproj | 4 +-
.../common/project/vs/common.vcxproj.filters | 12 +-
.../platforms/cpp/common/src/common/utils.cpp | 153 ++++++
modules/platforms/cpp/core-test/Makefile.am | 4 +-
.../cpp/core-test/config/cache-identity.xml | 121 +++++
.../cpp/core-test/config/cache-query.xml | 10 -
.../cpp/core-test/include/ignite/test_utils.h | 63 +++
.../cpp/core-test/project/vs/core-test.vcxproj | 4 +
.../project/vs/core-test.vcxproj.filters | 15 +
.../src/binary_identity_resolver_test.cpp | 522 +++++++++++++++++++
.../cpp/core-test/src/binary_object_test.cpp | 20 +-
.../cpp/core-test/src/binary_session_test.cpp | 4 +-
.../cpp/core-test/src/cache_query_test.cpp | 149 +++---
.../platforms/cpp/core-test/src/cache_test.cpp | 43 +-
.../cpp/core-test/src/continuous_query_test.cpp | 31 +-
.../cpp/core-test/src/ignition_test.cpp | 19 +-
.../cpp/core-test/src/interop_test.cpp | 42 +-
.../platforms/cpp/core-test/src/test_utils.cpp | 79 +++
.../cpp/core-test/src/transactions_test.cpp | 23 +-
.../platforms/cpp/core/src/impl/ignite_impl.cpp | 4 +-
.../cpp/odbc-test/include/test_utils.h | 51 +-
.../cpp/odbc-test/src/api_robustness_test.cpp | 35 +-
.../src/application_data_buffer_test.cpp | 24 +-
.../cpp/odbc-test/src/queries_test.cpp | 71 +--
.../src/sql_aggregate_functions_test.cpp | 1 +
.../src/sql_date_time_functions_test.cpp | 26 +-
.../src/sql_esc_convert_function_test.cpp | 4 +-
.../src/sql_numeric_functions_test.cpp | 1 +
.../cpp/odbc-test/src/sql_outer_join_test.cpp | 1 +
.../odbc-test/src/sql_string_functions_test.cpp | 1 +
.../odbc-test/src/sql_test_suite_fixture.cpp | 40 +-
.../cpp/odbc-test/src/sql_types_test.cpp | 10 +-
.../platforms/cpp/odbc-test/src/test_utils.cpp | 60 ++-
.../odbc/src/app/application_data_buffer.cpp | 8 +-
63 files changed, 2100 insertions(+), 1055 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/Makefile.am b/modules/platforms/cpp/binary/Makefile.am
index cee87cd..c13a1bb 100644
--- a/modules/platforms/cpp/binary/Makefile.am
+++ b/modules/platforms/cpp/binary/Makefile.am
@@ -52,6 +52,7 @@ libignite_binary_la_SOURCES = \
src/binary/binary_reader.cpp \
src/binary/binary_type.cpp \
src/binary/binary_raw_reader.cpp \
+ src/binary/binary_array_identity_resolver.cpp \
src/impl/binary/binary_type_manager.cpp \
src/impl/binary/binary_utils.cpp \
src/impl/binary/binary_reader_impl.cpp \
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/Makefile.am b/modules/platforms/cpp/binary/include/Makefile.am
index 2795cbc..a25a753 100644
--- a/modules/platforms/cpp/binary/include/Makefile.am
+++ b/modules/platforms/cpp/binary/include/Makefile.am
@@ -27,6 +27,8 @@ nobase_include_HEADERS = \
ignite/binary/binary_consts.h \
ignite/binary/binary_type.h \
ignite/binary/binary_object.h \
+ ignite/binary/binary_identity_resolver.h \
+ ignite/binary/binary_array_identity_resolver.h \
ignite/impl/binary/binary_type_handler.h \
ignite/impl/binary/binary_id_resolver.h \
ignite/impl/binary/binary_type_manager.h \
@@ -39,6 +41,7 @@ nobase_include_HEADERS = \
ignite/impl/binary/binary_utils.h \
ignite/impl/binary/binary_object_header.h \
ignite/impl/binary/binary_object_impl.h \
+ ignite/impl/binary/binary_type_impl.h \
ignite/impl/interop/interop_memory.h \
ignite/impl/interop/interop.h \
ignite/impl/interop/interop_stream_position_guard.h \
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/binary/binary_array_identity_resolver.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_array_identity_resolver.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_array_identity_resolver.h
new file mode 100644
index 0000000..70c5ed4
--- /dev/null
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_array_identity_resolver.h
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+/**
+ * @file
+ * Declares ignite::binary::BinaryArrayIdentityResolver class template.
+ */
+
+#ifndef _IGNITE_BINARY_BINARY_ARRAY_IDENTITY_RESOLVER
+#define _IGNITE_BINARY_BINARY_ARRAY_IDENTITY_RESOLVER
+
+#include <stdint.h>
+
+#include <ignite/common/common.h>
+#include <ignite/binary/binary_identity_resolver.h>
+
+namespace ignite
+{
+ namespace binary
+ {
+ class BinaryObject;
+
+ /**
+ * Binary array identity resolver.
+ */
+ class IGNITE_IMPORT_EXPORT BinaryArrayIdentityResolver : public BinaryIdentityResolver
+ {
+ public:
+ /**
+ * Default constructor.
+ */
+ BinaryArrayIdentityResolver();
+
+ /**
+ * Destructor.
+ */
+ virtual ~BinaryArrayIdentityResolver();
+
+ /**
+ * Get binary object hash code.
+ *
+ * @param obj Binary object.
+ * @return Hash code.
+ */
+ virtual int32_t GetHashCode(const BinaryObject& obj);
+ };
+ }
+}
+
+#endif //_IGNITE_BINARY_BINARY_ARRAY_IDENTITY_RESOLVER
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/binary/binary_identity_resolver.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_identity_resolver.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_identity_resolver.h
new file mode 100644
index 0000000..ce10012
--- /dev/null
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_identity_resolver.h
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+/**
+ * @file
+ * Declares ignite::binary::BinaryIdentityResolver class.
+ */
+
+#ifndef _IGNITE_BINARY_BINARY_IDENTITY_RESOLVER
+#define _IGNITE_BINARY_BINARY_IDENTITY_RESOLVER
+
+#include <stdint.h>
+
+#include <ignite/common/common.h>
+
+#include <ignite/binary/binary_object.h>
+
+namespace ignite
+{
+ namespace binary
+ {
+ /**
+ * Binary identity resolver.
+ */
+ class IGNITE_IMPORT_EXPORT BinaryIdentityResolver
+ {
+ public:
+ /**
+ * Destructor.
+ */
+ virtual ~BinaryIdentityResolver()
+ {
+ // No-op.
+ }
+
+ /**
+ * Get binary object hash code.
+ *
+ * @param obj Binary object.
+ * @return Hash code.
+ */
+ virtual int32_t GetHashCode(const BinaryObject& obj) = 0;
+ };
+ }
+}
+
+#endif //_IGNITE_BINARY_BINARY_IDENTITY_RESOLVER
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/binary/binary_object.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_object.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_object.h
index 41907d0..08b503e 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_object.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_object.h
@@ -25,14 +25,14 @@
#include <stdint.h>
-#include <ignite/impl/interop/interop.h>
-#include <ignite/impl/binary/binary_reader_impl.h>
#include <ignite/impl/binary/binary_object_impl.h>
namespace ignite
{
namespace binary
{
+ class BinaryArrayIdentityResolver;
+
/**
* Binary object.
*
@@ -41,6 +41,7 @@ namespace ignite
*/
class IGNITE_IMPORT_EXPORT BinaryObject : private impl::binary::BinaryObjectImpl
{
+ friend class BinaryArrayIdentityResolver;
public:
/// @cond INTERNAL
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/binary/binary_type.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_type.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_type.h
index 978a928..1c37f6d 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_type.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_type.h
@@ -189,17 +189,6 @@ namespace ignite
}
/**
- * Get binary object hash code.
- *
- * @param obj Binary object.
- * @return Hash code.
- */
- int32_t GetHashCode(const T& obj)
- {
- return 0;
- }
-
- /**
* Write binary object.
*
* @param writer Writer.
@@ -275,11 +264,6 @@ namespace ignite
return typ.GetFieldId(name);
}
- int32_t GetHashCode(T* const& obj)
- {
- return typ.GetHashCode(*obj);
- }
-
void Write(BinaryWriter& writer, T* const& obj)
{
typ.Write(writer, *obj);
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_object_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_object_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_object_impl.h
index 288ba26..efe1f49 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_object_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_object_impl.h
@@ -72,7 +72,6 @@ namespace ignite
/**
* Get object data.
- * @throw IgniteError if the object is not in a valid state.
*
* @return Pointer to object data.
*/
@@ -86,6 +85,14 @@ namespace ignite
*/
int32_t GetLength() const;
+ /**
+ * Get object hash code.
+ * @throw IgniteError if the object is not in a valid state.
+ *
+ * @return Object hash code.
+ */
+ int32_t GetHashCode() const;
+
private:
IGNITE_NO_COPY_ASSIGNMENT(BinaryObjectImpl)
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
new file mode 100644
index 0000000..d0cbb86
--- /dev/null
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
@@ -0,0 +1,149 @@
+/*
+ * 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.
+ */
+
+#ifndef _IGNITE_IMPL_BINARY_BINARY_TYPE_IMP
+#define _IGNITE_IMPL_BINARY_BINARY_TYPE_IMP
+
+#include <stdint.h>
+
+#include <ignite/common/utils.h>
+
+#include <ignite/binary/binary_type.h>
+#include <ignite/binary/binary_object.h>
+#include <ignite/binary/binary_array_identity_resolver.h>
+
+#include <ignite/reference.h>
+
+/**
+ * Some SFINAE magic to check existence of the specified method with the
+ * specified signature in the BinaryType<T> class.
+ *
+ * This macro declares checker for the method.
+ */
+#define IGNITE_DECLARE_BINARY_TYPE_METHOD_CHECKER(method, sign) \
+ template<typename T> \
+ class IsDeclaredBinaryType##method \
+ { \
+ typedef char one; \
+ typedef char two[2]; \
+ \
+ template<class U, U> struct test; \
+ \
+ template<typename C> static one& helper(test<sign, &C::method>*); \
+ template<typename C> static two& helper(...); \
+ \
+ public: \
+ const static bool value = \
+ (sizeof(helper< ignite::binary::BinaryType<T> >(0)) == sizeof(one)); \
+ }
+
+namespace ignite
+{
+ namespace impl
+ {
+ namespace binary
+ {
+ IGNITE_DECLARE_BINARY_TYPE_METHOD_CHECKER(GetHashCode, int32_t(ignite::binary::BinaryType<T>::*)(const T&));
+ IGNITE_DECLARE_BINARY_TYPE_METHOD_CHECKER(GetIdentityResolver,
+ ignite::Reference<ignite::binary::BinaryIdentityResolver>(ignite::binary::BinaryType<T>::*)());
+
+ /**
+ * This type is used to get hash code for binary types which have not
+ * GetHashCode nor GetIdentityResolver methods defined.
+ */
+ template<typename T>
+ struct HashCodeGetterDefault
+ {
+ static int32_t Get(const T&, const ignite::binary::BinaryObject& obj)
+ {
+ ignite::binary::BinaryArrayIdentityResolver arrayResolver;
+
+ return arrayResolver.GetHashCode(obj);
+ }
+ };
+
+ /**
+ * This type is used to get hash code for binary types which have not
+ * GetIdentityResolver method defined but have GetHashCode.
+ */
+ template<typename T>
+ struct HashCodeGetterHashCode
+ {
+ static int32_t Get(const T& obj, const ignite::binary::BinaryObject&)
+ {
+ ignite::binary::BinaryType<T> bt;
+
+ return bt.GetHashCode(obj);
+ }
+ };
+
+ /**
+ * This type is used to get hash code for binary types which have
+ * GetIdentityResolver method defined.
+ */
+ template<typename T>
+ struct HashCodeGetterResolver
+ {
+ static int32_t Get(const T&, const ignite::binary::BinaryObject& obj)
+ {
+ ignite::binary::BinaryType<T> bt;
+ ignite::Reference<ignite::binary::BinaryIdentityResolver> resolver = bt.GetIdentityResolver();
+
+ return resolver.Get().GetHashCode(obj);
+ }
+ };
+
+ /**
+ * Get hash code for the specified object.
+ * Determines the best method to use based on user-defined methods.
+ *
+ * @param obj Object reference.
+ * @param binObj Binary representation reference.
+ * @return Hash code for the object.
+ */
+ template<typename T>
+ int32_t GetHashCode(const T& obj, const ignite::binary::BinaryObject& binObj)
+ {
+ using namespace common;
+
+ typedef typename Conditional<
+ // Checking if the BinaryType<T>::GetIdentityResolver declared
+ IsDeclaredBinaryTypeGetIdentityResolver<T>::value,
+
+ // True case. Using user-provided resolver.
+ HashCodeGetterResolver<T>,
+
+ // False case. Adding condition.
+ typename Conditional<
+ // Checking if the BinaryType<T>::GetHashCode declared
+ IsDeclaredBinaryTypeGetHashCode<T>::value,
+
+ // True case - using BinaryType<T>::GetHashCode().
+ HashCodeGetterHashCode<T>,
+
+ // False case. Using default getter.
+ HashCodeGetterDefault<T>
+ >::type
+ >::type HashCodeGetter;
+
+ return HashCodeGetter::Get(obj, binObj);
+ }
+ }
+ }
+}
+
+#endif //_IGNITE_IMPL_BINARY_BINARY_TYPE_IMP
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_snapshot.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_snapshot.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_snapshot.h
index 4a8b41f..f1959fc 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_snapshot.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_snapshot.h
@@ -27,13 +27,13 @@
#include <ignite/common/concurrent.h>
namespace ignite
-{
+{
namespace impl
{
namespace binary
{
/**
- * Type snapshot.
+ * Type snapshot.
*/
class BinaryTypeSnapshot
{
@@ -48,7 +48,7 @@ namespace ignite
*/
BinaryTypeSnapshot(std::string typeName, int32_t typeId, std::set<int32_t>* fieldIds,
std::map<std::string, int32_t>* fields);
-
+
/**
* Destructor.
*/
@@ -65,7 +65,7 @@ namespace ignite
/**
* Get type name.
*
- * @param Type name.
+ * @return Type name.
*/
std::string GetTypeName();
@@ -79,14 +79,14 @@ namespace ignite
/**
* Whether snapshot contains any fields.
*
- * @param True if fields exist.
+ * @return True if fields exist.
*/
bool HasFields();
/**
* Get field IDs.
*
- * @param Field IDs.
+ * @return Field IDs.
*/
std::set<int32_t>* GetFieldIds();
@@ -99,8 +99,8 @@ namespace ignite
private:
/** Type name. */
- std::string typeName;
-
+ std::string typeName;
+
/** Type ID. */
int32_t typeId;
@@ -116,7 +116,7 @@ namespace ignite
typedef BinaryTypeSnapshot Snap;
typedef ignite::common::concurrent::SharedPointer<Snap> SPSnap;
}
- }
+ }
}
#endif //_IGNITE_IMPL_BINARY_BINARY_TYPE_SNAPSHOT
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
index 9599fce..b541483 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
@@ -48,6 +48,15 @@ namespace ignite
{
public:
/**
+ * Get data hash code.
+ *
+ * @param data Data pointer.
+ * @param size Data size in bytes.
+ * @return Hash code.
+ */
+ static int32_t GetDataHashCode(const void* data, size_t size);
+
+ /**
* Utility method to read signed 8-bit integer from stream.
*
* @param stream Stream.
@@ -437,172 +446,6 @@ namespace ignite
static void WriteString(interop::InteropOutputStream* stream, const char* val, const int32_t len);
/**
- * Convert Date type to standard C type time_t.
- *
- * @param date Date type value.
- * @return Corresponding value of time_t.
- */
- static inline time_t DateToCTime(const Date& date)
- {
- return static_cast<time_t>(date.GetSeconds());
- }
-
- /**
- * Convert Timestamp type to standard C type time_t.
- *
- * @param ts Timestamp type value.
- * @return Corresponding value of time_t.
- */
- static inline time_t TimestampToCTime(const Timestamp& ts)
- {
- return static_cast<time_t>(ts.GetSeconds());
- }
-
- /**
- * Convert Date type to standard C type time_t.
- *
- * @param date Date type value.
- * @param ctime Corresponding value of struct tm.
- * @return True on success.
- */
- static inline bool DateToCTm(const Date& date, tm& ctime)
- {
- time_t tmt = DateToCTime(date);
-
- return common::IgniteGmTime(tmt, ctime);
- }
-
- /**
- * Convert Timestamp type to standard C type struct tm.
- *
- * @param ts Timestamp type value.
- * @param ctime Corresponding value of struct tm.
- * @return True on success.
- */
- static inline bool TimestampToCTm(const Timestamp& ts, tm& ctime)
- {
- time_t tmt = TimestampToCTime(ts);
-
- return common::IgniteGmTime(tmt, ctime);
- }
-
- /**
- * Convert standard C type time_t to Date struct tm.
- *
- * @param ctime Standard C type time_t.
- * @return Corresponding value of Date.
- */
- static inline Date CTimeToDate(time_t ctime)
- {
- return Date(ctime * 1000);
- }
-
- /**
- * Convert standard C type time_t to Timestamp type.
- *
- * @param ctime Standard C type time_t.
- * @param ns Nanoseconds second fraction.
- * @return Corresponding value of Timestamp.
- */
- static inline Timestamp CTimeToTimestamp(time_t ctime, int32_t ns)
- {
- return Timestamp(ctime, ns);
- }
-
- /**
- * Convert standard C type struct tm to Date type.
- *
- * @param ctime Standard C type struct tm.
- * @return Corresponding value of Date.
- */
- static inline Date CTmToDate(const tm& ctime)
- {
- time_t time = common::IgniteTimeGm(ctime);
-
- return CTimeToDate(time);
- }
-
- /**
- * Convert standard C type struct tm to Timestamp type.
- *
- * @param ctime Standard C type struct tm.
- * @param ns Nanoseconds second fraction.
- * @return Corresponding value of Timestamp.
- */
- static inline Timestamp CTmToTimestamp(const tm& ctime, int32_t ns)
- {
- time_t time = common::IgniteTimeGm(ctime);
-
- return CTimeToTimestamp(time, ns);
- }
-
- /**
- * Make Date in human understandable way.
- *
- * Created Date uses GMT timezone.
- *
- * @param year Year.
- * @param month Month.
- * @param day Day.
- * @param hour Hour.
- * @param min Min.
- * @param sec Sec.
- * @return Date.
- */
- static Date MakeDateGmt(int year = 1900, int month = 1,
- int day = 1, int hour = 0, int min = 0, int sec = 0);
-
- /**
- * Make Date in human understandable way.
- *
- * Created Date uses local timezone.
- *
- * @param year Year.
- * @param month Month.
- * @param day Day.
- * @param hour Hour.
- * @param min Min.
- * @param sec Sec.
- * @return Date.
- */
- static Date MakeDateLocal(int year = 1900, int month = 1,
- int day = 1, int hour = 0, int min = 0, int sec = 0);
-
- /**
- * Make Date in human understandable way.
- *
- * Created Timestamp uses GMT timezone.
- *
- * @param year Year.
- * @param month Month.
- * @param day Day.
- * @param hour Hour.
- * @param min Minute.
- * @param sec Second.
- * @param ns Nanosecond.
- * @return Timestamp.
- */
- static Timestamp MakeTimestampGmt(int year = 1900, int month = 1,
- int day = 1, int hour = 0, int min = 0, int sec = 0, long ns = 0);
-
- /**
- * Make Date in human understandable way.
- *
- * Created Timestamp uses Local timezone.
- *
- * @param year Year.
- * @param month Month.
- * @param day Day.
- * @param hour Hour.
- * @param min Minute.
- * @param sec Second.
- * @param ns Nanosecond.
- * @return Timestamp.
- */
- static Timestamp MakeTimestampLocal(int year = 1900, int month = 1,
- int day = 1, int hour = 0, int min = 0, int sec = 0, long ns = 0);
-
- /**
* Get default value for the type.
*
* @return Null value for non primitive types and zeroes for primitives.
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
index 6ee088d..fc38837 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
@@ -31,6 +31,7 @@
#include "ignite/impl/binary/binary_type_manager.h"
#include "ignite/impl/binary/binary_utils.h"
#include "ignite/impl/binary/binary_schema.h"
+#include "ignite/impl/binary/binary_type_impl.h"
#include "ignite/binary/binary_consts.h"
#include "ignite/binary/binary_type.h"
#include "ignite/guid.h"
@@ -669,15 +670,21 @@ namespace ignite
stream->WriteInt8(IGNITE_PROTO_VER);
stream->WriteInt16(IGNITE_BINARY_FLAG_USER_TYPE);
stream->WriteInt32(idRslvr.GetTypeId());
- stream->WriteInt32(type.GetHashCode(obj));
- // Reserve space for the Object Lenght, Schema ID and Schema or Raw Offsett.
+ int32_t hashPos = stream->Reserve(4);
+
+ // Reserve space for the Object Lenght, Schema ID and Schema or Raw Offset.
stream->Reserve(12);
type.Write(writer, obj);
writerImpl.PostWrite();
+ stream->Synchronize();
+
+ ignite::binary::BinaryObject binObj(*stream->GetMemory(), pos);
+ stream->WriteInt32(hashPos, impl::binary::GetHashCode<T>(obj, binObj));
+
if (metaMgr)
metaMgr->SubmitHandler(type.GetTypeName(), idRslvr.GetTypeId(), metaHnd.Get());
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/include/ignite/impl/interop/interop_output_stream.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/interop/interop_output_stream.h b/modules/platforms/cpp/binary/include/ignite/impl/interop/interop_output_stream.h
index c5bb884..9df3b1f 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/interop/interop_output_stream.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/interop/interop_output_stream.h
@@ -205,6 +205,14 @@ namespace ignite
* Synchronize data with underlying memory.
*/
void Synchronize();
+
+ /**
+ * Get underlying memory.
+ *
+ * @return Underlying memory.
+ */
+ InteropMemory* GetMemory();
+
private:
/** Memory. */
InteropMemory* mem;
@@ -237,7 +245,7 @@ namespace ignite
/**
* Copy data to the stream shifting it along the way.
*
- * @param ptr Pointer to data.
+ * @param src Pointer to data.
* @param off Offset.
* @param len Length.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/project/vs/binary.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/project/vs/binary.vcxproj b/modules/platforms/cpp/binary/project/vs/binary.vcxproj
index 887eb96..6c1c433 100644
--- a/modules/platforms/cpp/binary/project/vs/binary.vcxproj
+++ b/modules/platforms/cpp/binary/project/vs/binary.vcxproj
@@ -181,6 +181,8 @@
<ClInclude Include="..\..\include\ignite\binary\binary_consts.h" />
<ClInclude Include="..\..\include\ignite\binary\binary_containers.h" />
<ClInclude Include="..\..\include\ignite\binary\binary_object.h" />
+ <ClInclude Include="..\..\include\ignite\binary\binary_identity_resolver.h" />
+ <ClInclude Include="..\..\include\ignite\binary\binary_array_identity_resolver.h" />
<ClInclude Include="..\..\include\ignite\binary\binary_raw_reader.h" />
<ClInclude Include="..\..\include\ignite\binary\binary_raw_writer.h" />
<ClInclude Include="..\..\include\ignite\binary\binary_reader.h" />
@@ -193,6 +195,7 @@
<ClInclude Include="..\..\include\ignite\impl\binary\binary_reader_impl.h" />
<ClInclude Include="..\..\include\ignite\impl\binary\binary_schema.h" />
<ClInclude Include="..\..\include\ignite\impl\binary\binary_type_handler.h" />
+ <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_impl.h" />
<ClInclude Include="..\..\include\ignite\impl\binary\binary_type_manager.h" />
<ClInclude Include="..\..\include\ignite\impl\binary\binary_type_snapshot.h" />
<ClInclude Include="..\..\include\ignite\impl\binary\binary_type_updater.h" />
@@ -205,6 +208,7 @@
<ClInclude Include="..\..\include\ignite\impl\interop\interop_stream_position_guard.h" />
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="..\..\src\binary\binary_array_identity_resolver.cpp" />
<ClCompile Include="..\..\src\binary\binary_containers.cpp" />
<ClCompile Include="..\..\src\binary\binary_raw_reader.cpp" />
<ClCompile Include="..\..\src\binary\binary_raw_writer.cpp" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/project/vs/binary.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/project/vs/binary.vcxproj.filters b/modules/platforms/cpp/binary/project/vs/binary.vcxproj.filters
index a1a83ef..c649c4d 100644
--- a/modules/platforms/cpp/binary/project/vs/binary.vcxproj.filters
+++ b/modules/platforms/cpp/binary/project/vs/binary.vcxproj.filters
@@ -97,6 +97,15 @@
<ClInclude Include="..\..\include\ignite\impl\binary\binary_object_impl.h">
<Filter>Code\impl\binary</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\ignite\binary\binary_array_identity_resolver.h">
+ <Filter>Code\binary</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ignite\binary\binary_identity_resolver.h">
+ <Filter>Code\binary</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ignite\impl\binary\binary_type_impl.h">
+ <Filter>Code\impl\binary</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\binary\binary_containers.cpp">
@@ -156,5 +165,8 @@
<ClCompile Include="..\..\src\impl\binary\binary_object_impl.cpp">
<Filter>Code\impl\binary</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\binary\binary_array_identity_resolver.cpp">
+ <Filter>Code\binary</Filter>
+ </ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/binary/binary_array_identity_resolver.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/binary/binary_array_identity_resolver.cpp b/modules/platforms/cpp/binary/src/binary/binary_array_identity_resolver.cpp
new file mode 100644
index 0000000..1d4e384
--- /dev/null
+++ b/modules/platforms/cpp/binary/src/binary/binary_array_identity_resolver.cpp
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+#include <ignite/binary/binary_object.h>
+#include <ignite/impl/binary/binary_utils.h>
+
+#include <ignite/binary/binary_array_identity_resolver.h>
+
+namespace ignite
+{
+ namespace binary
+ {
+ BinaryArrayIdentityResolver::BinaryArrayIdentityResolver()
+ {
+ // No-op.
+ }
+
+ BinaryArrayIdentityResolver::~BinaryArrayIdentityResolver()
+ {
+ // No-op.
+ }
+
+ int32_t BinaryArrayIdentityResolver::GetHashCode(const BinaryObject& obj)
+ {
+ return impl::binary::BinaryUtils::GetDataHashCode(obj.GetData(), obj.GetLength());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/binary/binary_type.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/binary/binary_type.cpp b/modules/platforms/cpp/binary/src/binary/binary_type.cpp
index 19d906d..0ea5a92 100644
--- a/modules/platforms/cpp/binary/src/binary/binary_type.cpp
+++ b/modules/platforms/cpp/binary/src/binary/binary_type.cpp
@@ -44,8 +44,8 @@ namespace ignite
return hash;
}
- else
- return 0;
+
+ return 0;
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/impl/binary/binary_object_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_object_impl.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_object_impl.cpp
index 652d54d..8167f8b 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_object_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_object_impl.cpp
@@ -35,9 +35,6 @@ namespace ignite
const int8_t* BinaryObjectImpl::GetData() const
{
- // Creating header here to validate object header layout.
- BinaryObjectHeader header = BinaryObjectHeader::FromMemory(mem, start);
-
return mem.Data() + start + BinaryObjectHeader::SIZE;
}
@@ -47,6 +44,13 @@ namespace ignite
return header.GetDataLength();
}
+
+ int32_t BinaryObjectImpl::GetHashCode() const
+ {
+ BinaryObjectHeader header = BinaryObjectHeader::FromMemory(mem, start);
+
+ return header.GetHashCode();
+ }
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/impl/binary/binary_type_manager.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_type_manager.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_type_manager.cpp
index 8b5dfc1..a6692d1 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_type_manager.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_type_manager.cpp
@@ -46,9 +46,7 @@ namespace ignite
SharedPointer<BinaryTypeHandler> BinaryTypeManager::GetHandler(int32_t typeId)
{
- SharedPointer<std::map<int32_t, SPSnap> > snapshots0 = snapshots;
-
- SPSnap snapshot = (*snapshots0.Get())[typeId];
+ SPSnap snapshot = (*snapshots.Get())[typeId];
return SharedPointer<BinaryTypeHandler>(new BinaryTypeHandler(snapshot));
}
@@ -108,12 +106,12 @@ namespace ignite
bool BinaryTypeManager::ProcessPendingUpdates(BinaryTypeUpdater* updater, IgniteError* err)
{
bool success = true; // Optimistically assume that all will be fine.
-
- cs->Enter();
+
+ CsLockGuard guard(*cs);
for (std::vector<SPSnap>::iterator it = pending->begin(); it != pending->end(); ++it)
{
- Snap* pendingSnap = (*it).Get();
+ Snap* pendingSnap = it->Get();
if (updater->Update(pendingSnap, err))
{
@@ -174,8 +172,6 @@ namespace ignite
ver = pendingVer;
}
- cs->Leave();
-
return success;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/impl/binary/binary_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_utils.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_utils.cpp
index bffd038..5fe8d83 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_utils.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_utils.cpp
@@ -82,6 +82,22 @@ namespace ignite
{
namespace binary
{
+ int32_t BinaryUtils::GetDataHashCode(const void * data, size_t size)
+ {
+ if (data)
+ {
+ int32_t hash = 1;
+ const int8_t* bytes = static_cast<const int8_t*>(data);
+
+ for (int i = 0; i < size; ++i)
+ hash = 31 * hash + bytes[i];
+
+ return hash;
+ }
+
+ return 0;
+ }
+
int8_t BinaryUtils::ReadInt8(InteropInputStream* stream)
{
return stream->ReadInt8();
@@ -317,70 +333,6 @@ namespace ignite
stream->WriteInt32(len);
stream->WriteInt8Array(reinterpret_cast<const int8_t*>(val), len);
}
-
- Date BinaryUtils::MakeDateGmt(int year, int month, int day, int hour,
- int min, int sec)
- {
- tm date = { 0 };
-
- date.tm_year = year - 1900;
- date.tm_mon = month - 1;
- date.tm_mday = day;
- date.tm_hour = hour;
- date.tm_min = min;
- date.tm_sec = sec;
-
- return CTmToDate(date);
- }
-
- Date BinaryUtils::MakeDateLocal(int year, int month, int day, int hour,
- int min, int sec)
- {
- tm date = { 0 };
-
- date.tm_year = year - 1900;
- date.tm_mon = month - 1;
- date.tm_mday = day;
- date.tm_hour = hour;
- date.tm_min = min;
- date.tm_sec = sec;
-
- time_t localTime = common::IgniteTimeLocal(date);
-
- return CTimeToDate(localTime);
- }
-
- Timestamp BinaryUtils::MakeTimestampGmt(int year, int month, int day,
- int hour, int min, int sec, long ns)
- {
- tm date = { 0 };
-
- date.tm_year = year - 1900;
- date.tm_mon = month - 1;
- date.tm_mday = day;
- date.tm_hour = hour;
- date.tm_min = min;
- date.tm_sec = sec;
-
- return CTmToTimestamp(date, ns);
- }
-
- Timestamp BinaryUtils::MakeTimestampLocal(int year, int month, int day,
- int hour, int min, int sec, long ns)
- {
- tm date = { 0 };
-
- date.tm_year = year - 1900;
- date.tm_mon = month - 1;
- date.tm_mday = day;
- date.tm_hour = hour;
- date.tm_min = min;
- date.tm_sec = sec;
-
- time_t localTime = common::IgniteTimeLocal(date);
-
- return CTimeToTimestamp(localTime, ns);
- }
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp b/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
index 20fb74d..b8f95b3 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
@@ -709,8 +709,6 @@ namespace ignite
{
int32_t lenWithoutSchema = stream->Position() - start;
- int32_t nonRawLen = rawPos == -1 ? lenWithoutSchema : rawPos - start;
-
uint16_t flags = IGNITE_BINARY_FLAG_USER_TYPE;
if (rawPos > 0)
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/binary/src/impl/interop/interop_output_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/src/impl/interop/interop_output_stream.cpp b/modules/platforms/cpp/binary/src/impl/interop/interop_output_stream.cpp
index 374f634..ab58f1e 100644
--- a/modules/platforms/cpp/binary/src/impl/interop/interop_output_stream.cpp
+++ b/modules/platforms/cpp/binary/src/impl/interop/interop_output_stream.cpp
@@ -204,6 +204,11 @@ namespace ignite
mem->Length(pos);
}
+ InteropMemory* InteropOutputStream::GetMemory()
+ {
+ return mem;
+ }
+
void InteropOutputStream::EnsureCapacity(int32_t reqCap) {
if (reqCap > cap) {
int newCap = cap << 1;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/Makefile.am b/modules/platforms/cpp/common/Makefile.am
index 9c27a57..8c79c3e 100644
--- a/modules/platforms/cpp/common/Makefile.am
+++ b/modules/platforms/cpp/common/Makefile.am
@@ -43,16 +43,17 @@ libignite_common_la_LDFLAGS = \
libignite_common_la_SOURCES = \
os/linux/src/common/concurrent_os.cpp \
- os/linux/src/common/utils.cpp \
+ os/linux/src/common/platform_utils.cpp \
src/common/big_integer.cpp \
src/common/concurrent.cpp \
src/common/decimal.cpp \
src/common/bits.cpp \
+ src/common/utils.cpp \
src/date.cpp \
src/ignite_error.cpp \
src/guid.cpp \
src/timestamp.cpp
-
+
clean-local:
$(RM) *.gcno *.gcda
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/Makefile.am b/modules/platforms/cpp/common/include/Makefile.am
index a5073f6..7f7ab83 100644
--- a/modules/platforms/cpp/common/include/Makefile.am
+++ b/modules/platforms/cpp/common/include/Makefile.am
@@ -27,6 +27,7 @@ nobase_include_HEADERS = \
ignite/common/dynamic_size_array.h \
ignite/common/fixed_size_array.h \
ignite/common/utils.h \
+ ignite/common/platform_utils.h \
ignite/date.h \
ignite/guid.h \
ignite/ignite_error.h \
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/include/ignite/common/platform_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/ignite/common/platform_utils.h b/modules/platforms/cpp/common/include/ignite/common/platform_utils.h
new file mode 100644
index 0000000..273a5e0
--- /dev/null
+++ b/modules/platforms/cpp/common/include/ignite/common/platform_utils.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+#ifndef _IGNITE_COMMON_PLATFORM_UTILS
+#define _IGNITE_COMMON_PLATFORM_UTILS
+
+#include <ignite/common/common.h>
+
+namespace ignite
+{
+ namespace common
+ {
+ /**
+ * Convert struct tm to time_t (UTC).
+ *
+ * @param time Standard C type struct tm value.
+ * @return Standard C type time_t value.
+ */
+ IGNITE_IMPORT_EXPORT time_t IgniteTimeGm(const tm& time);
+
+ /**
+ * Convert struct tm to time_t (Local time).
+ *
+ * @param time Standard C type struct tm value.
+ * @return Standard C type time_t value.
+ */
+ IGNITE_IMPORT_EXPORT time_t IgniteTimeLocal(const tm& time);
+
+ /**
+ * Convert time_t to struct tm (UTC).
+ *
+ * @param in Standard C type time_t value.
+ * @param out Standard C type struct tm value.
+ * @return True on success.
+ */
+ IGNITE_IMPORT_EXPORT bool IgniteGmTime(time_t in, tm& out);
+
+ /**
+ * Convert time_t to struct tm (Local time).
+ *
+ * @param in Standard C type time_t value.
+ * @param out Standard C type struct tm value.
+ * @return True on success.
+ */
+ IGNITE_IMPORT_EXPORT bool IgniteLocalTime(time_t in, tm& out);
+
+ /**
+ * Read system environment variable taking thread-safety in count.
+ *
+ * @param name Environment variable name.
+ * @param found Whether environment variable with such name was found.
+ * @return Environment variable value.
+ */
+ IGNITE_IMPORT_EXPORT std::string GetEnv(const std::string& name, bool& found);
+
+ /**
+ * Ensure that file on the given path exists in the system.
+ *
+ * @param path Path.
+ * @return True if file exists, false otherwise.
+ */
+ IGNITE_IMPORT_EXPORT bool FileExists(const std::string& path);
+ }
+}
+
+#endif //_IGNITE_COMMON_PLATFORM_UTILS
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/include/ignite/common/utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/ignite/common/utils.h b/modules/platforms/cpp/common/include/ignite/common/utils.h
index 6ac3c17..bf1f39b 100644
--- a/modules/platforms/cpp/common/include/ignite/common/utils.h
+++ b/modules/platforms/cpp/common/include/ignite/common/utils.h
@@ -25,6 +25,10 @@
#include <algorithm>
#include <ignite/common/common.h>
+#include <ignite/common/platform_utils.h>
+
+#include <ignite/date.h>
+#include <ignite/timestamp.h>
#ifdef IGNITE_FRIEND
# define IGNITE_FRIEND_EXPORT IGNITE_EXPORT
@@ -91,40 +95,6 @@ namespace ignite
}
/**
- * Convert struct tm to time_t (UTC).
- *
- * @param time Standard C type struct tm value.
- * @return Standard C type time_t value.
- */
- IGNITE_IMPORT_EXPORT time_t IgniteTimeGm(const tm& time);
-
- /**
- * Convert struct tm to time_t (Local time).
- *
- * @param time Standard C type struct tm value.
- * @return Standard C type time_t value.
- */
- IGNITE_IMPORT_EXPORT time_t IgniteTimeLocal(const tm& time);
-
- /**
- * Convert time_t to struct tm (UTC).
- *
- * @param in Standard C type time_t value.
- * @param out Standard C type struct tm value.
- * @return True on success.
- */
- IGNITE_IMPORT_EXPORT bool IgniteGmTime(time_t in, tm& out);
-
- /**
- * Convert time_t to struct tm (Local time).
- *
- * @param in Standard C type time_t value.
- * @param out Standard C type struct tm value.
- * @return True on success.
- */
- IGNITE_IMPORT_EXPORT bool IgniteLocalTime(time_t in, tm& out);
-
- /**
* Copy characters.
*
* @param val Value.
@@ -140,23 +110,6 @@ namespace ignite
IGNITE_IMPORT_EXPORT void ReleaseChars(char* val);
/**
- * Read system environment variable taking thread-safety in count.
- *
- * @param name Environment variable name.
- * @param found Whether environment variable with such name was found.
- * @return Environment variable value.
- */
- IGNITE_IMPORT_EXPORT std::string GetEnv(const std::string& name, bool& found);
-
- /**
- * Ensure that file on the given path exists in the system.
- *
- * @param path Path.
- * @return True if file exists, false otherwise.
- */
- IGNITE_IMPORT_EXPORT bool FileExists(const std::string& path);
-
- /**
* Casts value of one type to another type, using stringstream.
*
* @param val Input value.
@@ -206,12 +159,198 @@ namespace ignite
}
/**
- * Converts 32-bit integer to big endian format
- *
- * @param value Input value
- * @return Resulting value
- */
+ * Converts 32-bit integer to big endian format
+ *
+ * @param value Input value
+ * @return Resulting value
+ */
IGNITE_IMPORT_EXPORT uint32_t ToBigEndian(uint32_t value);
+
+ /**
+ * Convert Date type to standard C type time_t.
+ *
+ * @param date Date type value.
+ * @return Corresponding value of time_t.
+ */
+ inline time_t DateToCTime(const Date& date)
+ {
+ return static_cast<time_t>(date.GetSeconds());
+ }
+
+ /**
+ * Convert Timestamp type to standard C type time_t.
+ *
+ * @param ts Timestamp type value.
+ * @return Corresponding value of time_t.
+ */
+ inline time_t TimestampToCTime(const Timestamp& ts)
+ {
+ return static_cast<time_t>(ts.GetSeconds());
+ }
+
+ /**
+ * Convert Date type to standard C type time_t.
+ *
+ * @param date Date type value.
+ * @param ctime Corresponding value of struct tm.
+ * @return True on success.
+ */
+ inline bool DateToCTm(const Date& date, tm& ctime)
+ {
+ time_t tmt = DateToCTime(date);
+
+ return common::IgniteGmTime(tmt, ctime);
+ }
+
+ /**
+ * Convert Timestamp type to standard C type struct tm.
+ *
+ * @param ts Timestamp type value.
+ * @param ctime Corresponding value of struct tm.
+ * @return True on success.
+ */
+ inline bool TimestampToCTm(const Timestamp& ts, tm& ctime)
+ {
+ time_t tmt = TimestampToCTime(ts);
+
+ return common::IgniteGmTime(tmt, ctime);
+ }
+
+ /**
+ * Convert standard C type time_t to Date struct tm.
+ *
+ * @param ctime Standard C type time_t.
+ * @return Corresponding value of Date.
+ */
+ inline Date CTimeToDate(time_t ctime)
+ {
+ return Date(ctime * 1000);
+ }
+
+ /**
+ * Convert standard C type time_t to Timestamp type.
+ *
+ * @param ctime Standard C type time_t.
+ * @param ns Nanoseconds second fraction.
+ * @return Corresponding value of Timestamp.
+ */
+ inline Timestamp CTimeToTimestamp(time_t ctime, int32_t ns)
+ {
+ return Timestamp(ctime, ns);
+ }
+
+ /**
+ * Convert standard C type struct tm to Date type.
+ *
+ * @param ctime Standard C type struct tm.
+ * @return Corresponding value of Date.
+ */
+ inline Date CTmToDate(const tm& ctime)
+ {
+ time_t time = common::IgniteTimeGm(ctime);
+
+ return CTimeToDate(time);
+ }
+
+ /**
+ * Convert standard C type struct tm to Timestamp type.
+ *
+ * @param ctime Standard C type struct tm.
+ * @param ns Nanoseconds second fraction.
+ * @return Corresponding value of Timestamp.
+ */
+ inline Timestamp CTmToTimestamp(const tm& ctime, int32_t ns)
+ {
+ time_t time = common::IgniteTimeGm(ctime);
+
+ return CTimeToTimestamp(time, ns);
+ }
+
+ /**
+ * Make Date in human understandable way.
+ *
+ * Created Date uses GMT timezone.
+ *
+ * @param year Year.
+ * @param month Month.
+ * @param day Day.
+ * @param hour Hour.
+ * @param min Min.
+ * @param sec Sec.
+ * @return Date.
+ */
+ Date MakeDateGmt(int year = 1900, int month = 1,
+ int day = 1, int hour = 0, int min = 0, int sec = 0);
+
+ /**
+ * Make Date in human understandable way.
+ *
+ * Created Date uses local timezone.
+ *
+ * @param year Year.
+ * @param month Month.
+ * @param day Day.
+ * @param hour Hour.
+ * @param min Min.
+ * @param sec Sec.
+ * @return Date.
+ */
+ Date MakeDateLocal(int year = 1900, int month = 1,
+ int day = 1, int hour = 0, int min = 0, int sec = 0);
+
+ /**
+ * Make Date in human understandable way.
+ *
+ * Created Timestamp uses GMT timezone.
+ *
+ * @param year Year.
+ * @param month Month.
+ * @param day Day.
+ * @param hour Hour.
+ * @param min Minute.
+ * @param sec Second.
+ * @param ns Nanosecond.
+ * @return Timestamp.
+ */
+ Timestamp MakeTimestampGmt(int year = 1900, int month = 1,
+ int day = 1, int hour = 0, int min = 0, int sec = 0, long ns = 0);
+
+ /**
+ * Make Date in human understandable way.
+ *
+ * Created Timestamp uses Local timezone.
+ *
+ * @param year Year.
+ * @param month Month.
+ * @param day Day.
+ * @param hour Hour.
+ * @param min Minute.
+ * @param sec Second.
+ * @param ns Nanosecond.
+ * @return Timestamp.
+ */
+ Timestamp MakeTimestampLocal(int year = 1900, int month = 1,
+ int day = 1, int hour = 0, int min = 0, int sec = 0, long ns = 0);
+
+ /**
+ * Meta-programming class.
+ * Defines T1 as ::type if the condition is true, otherwise
+ * defines T2 as ::type.
+ */
+ template<bool, typename T1, typename T2>
+ struct Conditional
+ {
+ typedef T1 type;
+ };
+
+ /**
+ * Specialization for the false case.
+ */
+ template<typename T1, typename T2>
+ struct Conditional<false, T1, T2>
+ {
+ typedef T2 type;
+ };
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/os/linux/src/common/platform_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/linux/src/common/platform_utils.cpp b/modules/platforms/cpp/common/os/linux/src/common/platform_utils.cpp
new file mode 100644
index 0000000..a3e1d17
--- /dev/null
+++ b/modules/platforms/cpp/common/os/linux/src/common/platform_utils.cpp
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+#include <time.h>
+
+#include <sys/stat.h>
+#include <dirent.h>
+#include <dlfcn.h>
+
+#include <ignite/common/utils.h>
+
+namespace ignite
+{
+ namespace common
+ {
+ time_t IgniteTimeGm(const tm& time)
+ {
+ tm tmc = time;
+
+ return timegm(&tmc);
+ }
+
+ time_t IgniteTimeLocal(const tm& time)
+ {
+ tm tmc = time;
+
+ return mktime(&tmc);
+ }
+
+ bool IgniteGmTime(time_t in, tm& out)
+ {
+ return gmtime_r(&in, &out) != NULL;
+ }
+
+ bool IgniteLocalTime(time_t in, tm& out)
+ {
+ return localtime_r(&in, &out) == 0;
+ }
+
+ std::string GetEnv(const std::string& name, bool& found)
+ {
+ char* val = std::getenv(name.c_str());
+
+ if (val)
+ {
+ found = true;
+
+ return std::string(val);
+ }
+ else
+ {
+ found = false;
+
+ return std::string();
+ }
+ }
+
+ bool FileExists(const std::string& path)
+ {
+ struct stat s;
+
+ int res = stat(path.c_str(), &s);
+
+ return res != -1;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/os/linux/src/common/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/linux/src/common/utils.cpp b/modules/platforms/cpp/common/os/linux/src/common/utils.cpp
deleted file mode 100644
index 0fa9231..0000000
--- a/modules/platforms/cpp/common/os/linux/src/common/utils.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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.
- */
-
-#include <time.h>
-
-#include <sys/stat.h>
-#include <dirent.h>
-#include <dlfcn.h>
-
-#include <ignite/common/utils.h>
-
-namespace ignite
-{
- namespace common
- {
- /**
- * Check if string ends with the given ending.
- *
- * @param str String to check.
- * @param ending Ending.
- * @return Result.
- */
- inline bool StringEndsWith(const std::string& str, const std::string& ending)
- {
- if (str.length() > ending.length())
- return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
-
- return false;
- }
-
- time_t IgniteTimeGm(const tm& time)
- {
- tm tmc = time;
-
- return timegm(&tmc);
- }
-
- time_t IgniteTimeLocal(const tm& time)
- {
- tm tmc = time;
-
- return mktime(&tmc);
- }
-
- bool IgniteGmTime(time_t in, tm& out)
- {
- return gmtime_r(&in, &out) != NULL;
- }
-
- bool IgniteLocalTime(time_t in, tm& out)
- {
- return localtime_r(&in, &out) == 0;
- }
-
- int LeadingZeroesForOctet(int8_t octet) {
- if (octet == 0)
- return 8;
-
- int zeroes = 1;
-
- if (octet >> 4 == 0) {
- zeroes += 4;
- octet <<= 4;
- }
-
- if (octet >> 6 == 0) {
- zeroes += 2;
- octet <<= 2;
- }
-
- zeroes -= octet >> 7;
-
- return zeroes;
- }
-
- char* CopyChars(const char* val)
- {
- if (val) {
- size_t len = strlen(val);
- char* dest = new char[len + 1];
- strcpy(dest, val);
- *(dest + len) = 0;
- return dest;
- }
- else
- return NULL;
- }
-
- void ReleaseChars(char* val)
- {
- if (val)
- delete[] val;
- }
-
- std::string GetEnv(const std::string& name, bool& found)
- {
- char* val = std::getenv(name.c_str());
-
- if (val)
- {
- found = true;
-
- return std::string(val);
- }
- else
- {
- found = false;
-
- return std::string();
- }
- }
-
- bool FileExists(const std::string& path)
- {
- struct stat s;
-
- int res = stat(path.c_str(), &s);
-
- return res != -1;
- }
-
- uint32_t ToBigEndian(uint32_t value)
- {
- // The answer is 42
- static const int num = 42;
- static const bool isLittleEndian = (*reinterpret_cast<const char*>(&num) == num);
-
- if (isLittleEndian)
- return ((value & 0xFF) << 24) | (((value >> 8) & 0xFF) << 16) | (((value >> 16) & 0xFF) << 8) | ((value >> 24) & 0xFF);
-
- return value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/os/win/src/common/platform_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/common/platform_utils.cpp b/modules/platforms/cpp/common/os/win/src/common/platform_utils.cpp
new file mode 100644
index 0000000..16fd6ec
--- /dev/null
+++ b/modules/platforms/cpp/common/os/win/src/common/platform_utils.cpp
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+#include <time.h>
+
+#include <windows.h>
+
+#include <ignite/common/platform_utils.h>
+
+namespace ignite
+{
+ namespace common
+ {
+ time_t IgniteTimeGm(const tm& time)
+ {
+ tm tmc = time;
+
+ return _mkgmtime(&tmc);
+ }
+
+ time_t IgniteTimeLocal(const tm& time)
+ {
+ tm tmc = time;
+
+ return mktime(&tmc);
+ }
+
+ bool IgniteGmTime(time_t in, tm& out)
+ {
+ return gmtime_s(&out, &in) == 0;
+ }
+
+ bool IgniteLocalTime(time_t in, tm& out)
+ {
+ return localtime_s(&out, &in) == 0;
+ }
+
+ std::string GetEnv(const std::string& name, bool& found)
+ {
+ char res0[32767];
+
+ DWORD envRes = GetEnvironmentVariableA(name.c_str(), res0, 32767);
+
+ if (envRes != 0)
+ {
+ found = true;
+
+ return std::string(res0);
+ }
+ else
+ {
+ found = false;
+
+ return std::string();
+ }
+ }
+
+ bool FileExists(const std::string& path)
+ {
+ WIN32_FIND_DATAA findres;
+
+ HANDLE hnd = FindFirstFileA(path.c_str(), &findres);
+
+ if (hnd == INVALID_HANDLE_VALUE)
+ return false;
+ else
+ {
+ FindClose(hnd);
+
+ return true;
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/os/win/src/common/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/common/utils.cpp b/modules/platforms/cpp/common/os/win/src/common/utils.cpp
deleted file mode 100644
index c6afce2..0000000
--- a/modules/platforms/cpp/common/os/win/src/common/utils.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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.
- */
-
-#include <time.h>
-
-#include <windows.h>
-
-#include <ignite/common/utils.h>
-
-namespace ignite
-{
- namespace common
- {
- /**
- * Check if string ends with the given ending.
- *
- * @param str String to check.
- * @param ending Ending.
- * @return Result.
- */
- inline bool StringEndsWith(const std::string& str, const std::string& ending)
- {
- if (str.length() > ending.length())
- return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
-
- return false;
- }
-
- void StripSurroundingWhitespaces(std::string& str)
- {
- std::string::size_type newBegin = 0;
- while (newBegin < str.size() && ::isspace(str[newBegin]))
- ++newBegin;
-
- if (newBegin == str.size())
- {
- str.clear();
-
- return;
- }
-
- std::string::size_type newEnd = str.size() - 1;
- while (::isspace(str[newEnd]))
- --newEnd;
-
- str.assign(str, newBegin, (newEnd - newBegin) + 1);
- }
-
- time_t IgniteTimeGm(const tm& time)
- {
- tm tmc = time;
-
- return _mkgmtime(&tmc);
- }
-
- time_t IgniteTimeLocal(const tm& time)
- {
- tm tmc = time;
-
- return mktime(&tmc);
- }
-
- bool IgniteGmTime(time_t in, tm& out)
- {
- return gmtime_s(&out, &in) == 0;
- }
-
- bool IgniteLocalTime(time_t in, tm& out)
- {
- return localtime_s(&out, &in) == 0;
- }
-
- char* CopyChars(const char* val)
- {
- if (val) {
- size_t len = strlen(val);
- char* dest = new char[len + 1];
- strcpy(dest, val);
- *(dest + len) = 0;
- return dest;
- }
- else
- return NULL;
- }
-
- void ReleaseChars(char* val)
- {
- if (val)
- delete[] val;
- }
-
- std::string GetEnv(const std::string& name, bool& found)
- {
- char res0[32767];
-
- DWORD envRes = GetEnvironmentVariableA(name.c_str(), res0, 32767);
-
- if (envRes != 0)
- {
- found = true;
-
- return std::string(res0);
- }
- else
- {
- found = false;
-
- return std::string();
- }
- }
-
- bool FileExists(const std::string& path)
- {
- WIN32_FIND_DATAA findres;
-
- HANDLE hnd = FindFirstFileA(path.c_str(), &findres);
-
- if (hnd == INVALID_HANDLE_VALUE)
- return false;
- else
- {
- FindClose(hnd);
-
- return true;
- }
- }
-
- uint32_t ToBigEndian(uint32_t value)
- {
- // The answer is 42
- static const int num = 42;
- static const bool isLittleEndian = (*reinterpret_cast<const char*>(&num) == num);
-
- if (isLittleEndian)
- return ((value & 0xFF) << 24) | (((value >> 8) & 0xFF) << 16) | (((value >> 16) & 0xFF) << 8) | ((value >> 24) & 0xFF);
-
- return value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/project/vs/common.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/project/vs/common.vcxproj b/modules/platforms/cpp/common/project/vs/common.vcxproj
index b4431f8..7a57ac0 100644
--- a/modules/platforms/cpp/common/project/vs/common.vcxproj
+++ b/modules/platforms/cpp/common/project/vs/common.vcxproj
@@ -172,6 +172,7 @@
<ClInclude Include="..\..\include\ignite\common\dynamic_size_array.h" />
<ClInclude Include="..\..\include\ignite\common\fixed_size_array.h" />
<ClInclude Include="..\..\include\ignite\common\bits.h" />
+ <ClInclude Include="..\..\include\ignite\common\platform_utils.h" />
<ClInclude Include="..\..\include\ignite\common\reference_impl.h" />
<ClInclude Include="..\..\include\ignite\common\utils.h" />
<ClInclude Include="..\..\include\ignite\date.h" />
@@ -185,11 +186,12 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\os\win\src\common\concurrent_os.cpp" />
- <ClCompile Include="..\..\os\win\src\common\utils.cpp" />
+ <ClCompile Include="..\..\os\win\src\common\platform_utils.cpp" />
<ClCompile Include="..\..\src\common\big_integer.cpp" />
<ClCompile Include="..\..\src\common\bits.cpp" />
<ClCompile Include="..\..\src\common\concurrent.cpp" />
<ClCompile Include="..\..\src\common\decimal.cpp" />
+ <ClCompile Include="..\..\src\common\utils.cpp" />
<ClCompile Include="..\..\src\date.cpp" />
<ClCompile Include="..\..\src\guid.cpp" />
<ClCompile Include="..\..\src\ignite_error.cpp" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/project/vs/common.vcxproj.filters b/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
index d99722b..f08471e 100644
--- a/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
+++ b/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
@@ -64,6 +64,9 @@
<ClInclude Include="..\..\include\ignite\reference.h">
<Filter>Code</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\ignite\common\platform_utils.h">
+ <Filter>Code\common</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\date.cpp">
@@ -78,9 +81,6 @@
<ClCompile Include="..\..\os\win\src\common\concurrent_os.cpp">
<Filter>Code\common</Filter>
</ClCompile>
- <ClCompile Include="..\..\os\win\src\common\utils.cpp">
- <Filter>Code\common</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\common\concurrent.cpp">
<Filter>Code\common</Filter>
</ClCompile>
@@ -96,5 +96,11 @@
<ClCompile Include="..\..\src\common\bits.cpp">
<Filter>Code\common</Filter>
</ClCompile>
+ <ClCompile Include="..\..\os\win\src\common\platform_utils.cpp">
+ <Filter>Code\common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\common\utils.cpp">
+ <Filter>Code\common</Filter>
+ </ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/common/src/common/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/src/common/utils.cpp b/modules/platforms/cpp/common/src/common/utils.cpp
new file mode 100644
index 0000000..27d2473
--- /dev/null
+++ b/modules/platforms/cpp/common/src/common/utils.cpp
@@ -0,0 +1,153 @@
+/*
+ * 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.
+ */
+
+#include <ignite/common/utils.h>
+
+namespace ignite
+{
+ namespace common
+ {
+ /**
+ * Check if string ends with the given ending.
+ *
+ * @param str String to check.
+ * @param ending Ending.
+ * @return Result.
+ */
+ inline bool StringEndsWith(const std::string& str, const std::string& ending)
+ {
+ if (str.length() > ending.length())
+ return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
+
+ return false;
+ }
+
+ void StripSurroundingWhitespaces(std::string& str)
+ {
+ std::string::size_type newBegin = 0;
+ while (newBegin < str.size() && ::isspace(str[newBegin]))
+ ++newBegin;
+
+ if (newBegin == str.size())
+ {
+ str.clear();
+
+ return;
+ }
+
+ std::string::size_type newEnd = str.size() - 1;
+ while (::isspace(str[newEnd]))
+ --newEnd;
+
+ str.assign(str, newBegin, (newEnd - newBegin) + 1);
+ }
+
+ char* CopyChars(const char* val)
+ {
+ if (val) {
+ size_t len = strlen(val);
+ char* dest = new char[len + 1];
+ strcpy(dest, val);
+ *(dest + len) = 0;
+ return dest;
+ }
+
+ return NULL;
+ }
+
+ void ReleaseChars(char* val)
+ {
+ delete[] val;
+ }
+
+ uint32_t ToBigEndian(uint32_t value)
+ {
+ // The answer is 42
+ static const int num = 42;
+ static const bool isLittleEndian = (*reinterpret_cast<const char*>(&num) == num);
+
+ if (isLittleEndian)
+ return ((value & 0xFF) << 24) | (((value >> 8) & 0xFF) << 16) | (((value >> 16) & 0xFF) << 8) | ((value >> 24) & 0xFF);
+
+ return value;
+ }
+
+ Date MakeDateGmt(int year, int month, int day, int hour,
+ int min, int sec)
+ {
+ tm date = { 0 };
+
+ date.tm_year = year - 1900;
+ date.tm_mon = month - 1;
+ date.tm_mday = day;
+ date.tm_hour = hour;
+ date.tm_min = min;
+ date.tm_sec = sec;
+
+ return CTmToDate(date);
+ }
+
+ Date MakeDateLocal(int year, int month, int day, int hour,
+ int min, int sec)
+ {
+ tm date = { 0 };
+
+ date.tm_year = year - 1900;
+ date.tm_mon = month - 1;
+ date.tm_mday = day;
+ date.tm_hour = hour;
+ date.tm_min = min;
+ date.tm_sec = sec;
+
+ time_t localTime = common::IgniteTimeLocal(date);
+
+ return CTimeToDate(localTime);
+ }
+
+ Timestamp MakeTimestampGmt(int year, int month, int day,
+ int hour, int min, int sec, long ns)
+ {
+ tm date = { 0 };
+
+ date.tm_year = year - 1900;
+ date.tm_mon = month - 1;
+ date.tm_mday = day;
+ date.tm_hour = hour;
+ date.tm_min = min;
+ date.tm_sec = sec;
+
+ return CTmToTimestamp(date, ns);
+ }
+
+ Timestamp MakeTimestampLocal(int year, int month, int day,
+ int hour, int min, int sec, long ns)
+ {
+ tm date = { 0 };
+
+ date.tm_year = year - 1900;
+ date.tm_mon = month - 1;
+ date.tm_mday = day;
+ date.tm_hour = hour;
+ date.tm_min = min;
+ date.tm_sec = sec;
+
+ time_t localTime = common::IgniteTimeLocal(date);
+
+ return CTimeToTimestamp(localTime, ns);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/Makefile.am b/modules/platforms/cpp/core-test/Makefile.am
index 4af2850..566a827 100644
--- a/modules/platforms/cpp/core-test/Makefile.am
+++ b/modules/platforms/cpp/core-test/Makefile.am
@@ -54,6 +54,7 @@ ignite_tests_LDFLAGS = \
ignite_tests_SOURCES = \
src/reference_test.cpp \
src/bits_test.cpp \
+ src/binary_identity_resolver_test.cpp \
src/cache_test.cpp \
src/cache_query_test.cpp \
src/continuous_query_test.cpp \
@@ -73,7 +74,8 @@ ignite_tests_SOURCES = \
src/fixed_size_array_test.cpp \
src/transactions_test.cpp \
src/teamcity_messages.cpp \
- src/teamcity_boost.cpp
+ src/teamcity_boost.cpp \
+ src/test_utils.cpp
run-check: check
./ignite-tests -p
[32/32] ignite git commit: merge from master
Posted by yz...@apache.org.
merge from master
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6b3b60d2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6b3b60d2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6b3b60d2
Branch: refs/heads/ignite-comm-balance-master
Commit: 6b3b60d21ae19e8ab7cfd3d71367c1bab91352c1
Parents: 6abc0f4 d20b7f1
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Feb 6 17:10:18 2017 +0700
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Feb 6 17:10:18 2017 +0700
----------------------------------------------------------------------
assembly/LICENSE_FABRIC | 35 +-
assembly/LICENSE_HADOOP | 17 +-
examples/schema-import/bin/h2-server.bat | 2 +-
examples/schema-import/bin/h2-server.sh | 4 +-
.../schema-import/bin/schema-import.properties | 2 +-
.../src/main/resources/META-INF/licenses.txt.vm | 7 +-
.../stream/camel/IgniteCamelStreamerTest.java | 4 +-
.../cassandra/persistence/PojoKeyField.java | 2 +-
.../ClientAbstractMultiNodeSelfTest.java | 8 +-
...BinaryMarshallerInsertStatementSelfTest.java | 2 -
...cBinaryMarshallerMergeStatementSelfTest.java | 2 -
.../internal/jdbc2/JdbcMetadataSelfTest.java | 2 +-
.../ignite/jdbc/JdbcMetadataSelfTest.java | 4 +-
.../jdbc/suite/IgniteJdbcDriverTestSuite.java | 3 +-
.../apache/ignite/IgniteSystemProperties.java | 8 +
.../org/apache/ignite/cache/QueryEntity.java | 1 -
.../store/jdbc/CacheAbstractJdbcStore.java | 3 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 2 +-
.../ignite/internal/MarshallerContextImpl.java | 4 +-
.../internal/binary/BinaryEnumObjectImpl.java | 4 +-
.../internal/binary/BinaryMarshaller.java | 1 -
.../impl/GridRouterCommandLineStartup.java | 4 +-
.../cluster/ClusterNodeLocalMapImpl.java | 1 -
.../internal/jdbc2/JdbcSqlFieldsQuery.java | 1 -
.../ignite/internal/jdbc2/JdbcStatement.java | 2 -
.../discovery/GridDiscoveryManager.java | 2 +-
.../internal/mxbean/IgniteStandardMXBean.java | 12 +-
.../cache/CacheEvictableEntryImpl.java | 4 +-
.../processors/cache/CacheMetricsImpl.java | 10 +-
.../processors/cache/GridCacheAdapter.java | 10 +-
.../cache/GridCacheAffinityManager.java | 60 +--
.../processors/cache/GridCacheAtomicFuture.java | 3 +-
.../processors/cache/GridCacheContext.java | 17 -
.../cache/GridCacheDeploymentManager.java | 4 +-
.../cache/GridCacheEvictionManager.java | 6 +-
.../GridCachePartitionExchangeManager.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 13 +-
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../processors/cache/GridCacheTtlManager.java | 4 +-
.../processors/cache/GridCacheUtils.java | 22 -
.../processors/cache/QueryCursorImpl.java | 6 +-
.../cache/affinity/GridCacheAffinityImpl.java | 16 +-
.../binary/CacheObjectBinaryProcessorImpl.java | 2 +-
.../CacheDataStructuresManager.java | 2 +-
.../GridDistributedCacheAdapter.java | 3 +-
.../distributed/GridDistributedCacheEntry.java | 3 -
.../GridDistributedLockResponse.java | 1 -
.../dht/GridClientPartitionTopology.java | 1 -
.../dht/GridDhtAssignmentFetchFuture.java | 1 -
.../distributed/dht/GridDhtCacheAdapter.java | 8 +-
.../distributed/dht/GridDhtCacheEntry.java | 2 +-
.../distributed/dht/GridDhtGetSingleFuture.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 6 +-
.../distributed/dht/GridDhtLockFuture.java | 7 +-
.../dht/GridDhtPartitionTopology.java | 1 -
.../dht/GridDhtPartitionTopologyImpl.java | 6 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 8 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 1 -
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 13 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 2 +-
.../distributed/dht/GridDhtUnlockRequest.java | 3 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../dht/GridPartitionedSingleGetFuture.java | 2 +-
.../GridDhtAtomicAbstractUpdateFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 21 +-
.../GridNearAtomicSingleUpdateFuture.java | 2 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 4 +-
.../dht/colocated/GridDhtColocatedCache.java | 6 +-
.../colocated/GridDhtColocatedLockFuture.java | 4 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 8 +-
.../dht/preloader/GridDhtPartitionDemander.java | 16 +-
.../dht/preloader/GridDhtPartitionMap2.java | 3 +-
.../dht/preloader/GridDhtPartitionSupplier.java | 12 +-
.../GridDhtPartitionsExchangeFuture.java | 13 +-
.../dht/preloader/GridDhtPreloader.java | 4 +-
.../distributed/near/GridNearAtomicCache.java | 2 +-
.../distributed/near/GridNearCacheEntry.java | 6 +-
.../distributed/near/GridNearGetFuture.java | 11 +-
.../distributed/near/GridNearLockFuture.java | 2 +-
...arOptimisticSerializableTxPrepareFuture.java | 4 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 13 +-
.../GridNearPessimisticTxPrepareFuture.java | 2 +-
.../near/GridNearTransactionalCache.java | 6 +-
.../near/GridNearTxFinishFuture.java | 15 +-
.../processors/cache/query/CacheQuery.java | 1 -
.../cache/query/GridCacheQueryManager.java | 9 +-
.../cache/query/GridCacheSqlQuery.java | 2 -
.../continuous/CacheContinuousQueryHandler.java | 4 +-
.../continuous/CacheContinuousQueryManager.java | 2 +-
.../cache/transactions/IgniteTxAdapter.java | 4 +-
.../cache/transactions/IgniteTxEntry.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 6 +-
.../cache/transactions/IgniteTxManager.java | 3 +-
.../cache/transactions/IgniteTxStateImpl.java | 1 -
.../cache/transactions/TxDeadlockDetection.java | 2 +-
.../cache/transactions/TxEntryValueHolder.java | 6 +-
.../IgniteCacheObjectProcessorImpl.java | 2 +-
.../processors/clock/GridClockServer.java | 4 +-
.../datastreamer/DataStreamProcessor.java | 3 +-
.../datastreamer/DataStreamerImpl.java | 6 +-
.../datastructures/GridCacheSetImpl.java | 2 +-
.../datastructures/GridSetQueryPredicate.java | 2 +-
.../processors/hadoop/HadoopClasspathUtils.java | 4 +-
.../internal/processors/igfs/IgfsProcessor.java | 3 +-
.../igfs/client/IgfsClientSizeCallable.java | 1 -
.../processors/job/GridJobProcessor.java | 2 +-
.../platform/PlatformAbstractBootstrap.java | 3 +-
.../platform/PlatformConfigurationEx.java | 3 +-
.../platform/cache/PlatformCache.java | 12 +-
.../platform/utils/PlatformUtils.java | 2 +-
.../processors/query/GridQueryProcessor.java | 2 +-
.../resource/GridResourceProcessor.java | 2 +-
.../handlers/cache/GridCacheCommandHandler.java | 2 -
.../string/GridRedisSetCommandHandler.java | 2 +-
.../processors/task/GridTaskWorker.java | 2 +-
.../internal/util/GridStripedSpinBusyLock.java | 2 +-
.../ignite/internal/util/HostAndPortRange.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 3 +-
.../ignite/internal/util/StripedExecutor.java | 2 +-
.../visor/node/VisorIgfsConfiguration.java | 1 -
.../ignite/lang/IgniteProductVersion.java | 2 +-
.../ignite/marshaller/jdk/JdkMarshaller.java | 1 -
.../optimized/OptimizedClassDescriptor.java | 2 +-
.../optimized/OptimizedMarshallerUtils.java | 4 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../tcp/TcpCommunicationSpiMBean.java | 1 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 4 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 7 +-
.../tcp/internal/TcpDiscoveryStatistics.java | 8 +-
.../CacheJdbcPojoStoreAbstractSelfTest.java | 2 -
.../store/jdbc/CacheJdbcPojoStoreTest.java | 3 -
.../internal/ClusterGroupHostsSelfTest.java | 6 +-
.../ComputeJobCancelWithServiceSelfTest.java | 2 +-
.../internal/GridContinuousTaskSelfTest.java | 4 +-
.../GridEventStorageCheckAllEventsSelfTest.java | 2 +-
.../IgniteClientReconnectApiExceptionTest.java | 6 +-
...niteClientReconnectFailoverAbstractTest.java | 4 +-
.../GridDiscoveryManagerAttributesSelfTest.java | 4 +-
.../BinaryObjectOffHeapUnswapTemporaryTest.java | 1 -
.../cache/CacheAffinityCallSelfTest.java | 8 +-
.../cache/CacheGetEntryAbstractTest.java | 2 +-
.../CacheSerializableTransactionsTest.java | 6 +-
.../CacheStartupInDeploymentModesTest.java | 7 +-
.../cache/CacheStopAndDestroySelfTest.java | 6 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 6 +-
.../cache/GridCacheMvccPartitionedSelfTest.java | 48 +-
.../processors/cache/GridCacheMvccSelfTest.java | 208 ++++----
.../processors/cache/GridCacheStopSelfTest.java | 4 +-
.../processors/cache/GridCacheTestEntryEx.java | 3 +-
.../cache/GridCacheUtilsSelfTest.java | 2 +-
...ProjectionForCachesOnDaemonNodeSelfTest.java | 8 +-
.../IgniteCacheConfigVariationsFullApiTest.java | 8 +-
.../cache/IgniteCachePeekModesAbstractTest.java | 8 +-
.../cache/IgniteCacheStoreCollectionTest.java | 1 -
...gniteTopologyValidatorAbstractCacheTest.java | 6 +-
.../processors/cache/IgniteTxAbstractTest.java | 3 +-
.../cache/IgniteTxConfigCacheSelfTest.java | 2 +-
.../IgniteTxExceptionAbstractSelfTest.java | 3 +-
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
.../CacheKeepBinaryWithInterceptorTest.java | 1 -
...yAtomicEntryProcessorDeploymentSelfTest.java | 4 +-
...IgniteCacheAbstractExecutionContextTest.java | 2 -
...eAbstractDataStructuresFailoverSelfTest.java | 16 +-
...actQueueFailoverDataConsistencySelfTest.java | 2 +-
.../IgniteLockAbstractSelfTest.java | 24 +-
.../CacheGetFutureHangsSelfTest.java | 6 +-
.../CacheLateAffinityAssignmentTest.java | 2 +-
...ridCachePartitionNotLoadedEventSelfTest.java | 4 +-
...niteCacheClientNodeChangingTopologyTest.java | 20 +-
...teSynchronizationModesMultithreadedTest.java | 8 +-
.../IgniteCacheCrossCacheTxFailoverTest.java | 6 +-
...ePrimaryNodeFailureRecoveryAbstractTest.java | 4 +-
...gniteCachePutRetryTransactionalSelfTest.java | 4 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 4 +-
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 4 +-
.../GridCacheReplicatedNodeRestartSelfTest.java | 3 +-
.../GridCacheReplicatedPreloadSelfTest.java | 1 -
.../IgniteCacheExpiryPolicyAbstractTest.java | 4 +-
...ContinuousQueryFailoverAbstractSelfTest.java | 6 +-
...dCacheContinuousQueryNodesFilteringTest.java | 2 +-
...IgniteCacheContinuousQueryReconnectTest.java | 12 +-
.../TxDeadlockDetectionNoHangsTest.java | 2 +-
.../transactions/TxDeadlockDetectionTest.java | 2 +-
.../TxOptimisticDeadlockDetectionTest.java | 2 +-
.../TxPessimisticDeadlockDetectionTest.java | 2 +-
...ComputeJobExecutionErrorToLogManualTest.java | 4 +-
.../datastreamer/DataStreamerImplSelfTest.java | 8 +-
.../datastreamer/DataStreamerTimeoutTest.java | 6 +-
.../processors/igfs/IgfsAbstractSelfTest.java | 32 +-
.../processors/igfs/IgfsFileInfoSelfTest.java | 4 +-
.../igfs/IgfsMetaManagerSelfTest.java | 3 +-
.../igfs/IgfsModeResolverSelfTest.java | 10 +-
.../igfs/benchmark/IgfsBenchmark.java | 4 +-
.../cache/GridCacheCommandHandlerSelfTest.java | 1 -
...rviceDeploymentExceptionPropagationTest.java | 2 +-
.../GridServiceProcessorStopSelfTest.java | 2 +-
.../service/IgniteServiceReassignmentTest.java | 2 +-
.../internal/util/IgniteUtilsSelfTest.java | 5 +-
.../unsafe/GridOffheapSnapTreeSelfTest.java | 7 +-
.../lang/GridMetadataAwareAdapterSelfTest.java | 4 +-
.../p2p/GridP2PSameClassLoaderSelfTest.java | 14 +-
.../platform/PlatformEventsWriteEventTask.java | 9 -
.../local/GridLocalDeploymentSpiSelfTest.java | 6 +-
...lientDiscoverySpiFailureTimeoutSelfTest.java | 4 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 8 +-
.../TcpDiscoverySpiFailureTimeoutSelfTest.java | 14 +-
.../GridSwapSpaceSpiAbstractSelfTest.java | 3 +-
.../testframework/GridSpiTestContext.java | 5 +-
.../ignite/testframework/IgniteTestSuite.java | 2 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 2 -
...essagingConfigVariationFullApiTestSuite.java | 4 +-
.../ignite/util/mbeans/GridMBeanSelfTest.java | 10 +-
.../CacheNoValueClassOnServerTestClient.java | 3 +-
.../CacheConfigurationP2PTestClient.java | 3 +-
.../gce/TcpDiscoveryGoogleStorageIpFinder.java | 4 +-
.../hadoop/igfs/HadoopIgfsEndpoint.java | 4 +-
.../HadoopBasicFileSystemFactoryDelegate.java | 2 +-
.../hadoop/impl/igfs/HadoopIgfsInProc.java | 40 +-
.../hadoop/impl/v2/HadoopV2Context.java | 3 +-
.../taskexecutor/HadoopExecutorService.java | 6 +-
.../child/HadoopChildProcessRunner.java | 10 +-
.../hadoop/impl/HadoopErrorSimulator.java | 12 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 3 +-
.../IgniteHadoopFileSystemClientSelfTest.java | 6 +-
.../query/h2/GridH2ResultSetIterator.java | 3 +-
.../processors/query/h2/IgniteH2Indexing.java | 14 +-
.../query/h2/opt/GridH2IndexBase.java | 6 +-
.../processors/query/h2/sql/DmlAstUtils.java | 2 +-
.../h2/twostep/GridReduceQueryExecutor.java | 2 +-
.../query/h2/twostep/msg/GridH2Geometry.java | 2 +-
.../cache/BinarySerializationQuerySelfTest.java | 2 -
.../CacheRandomOperationsMultithreadedTest.java | 4 +-
.../ClientReconnectAfterClusterRestartTest.java | 4 +-
.../GridCacheQueryIndexDisabledSelfTest.java | 20 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 3 +-
...eLockPartitionOnAffinityRunAbstractTest.java | 1 -
...PartitionOnAffinityRunAtomicCacheOpTest.java | 11 +-
...niteCacheLockPartitionOnAffinityRunTest.java | 51 +-
...titionOnAffinityRunWithCollisionSpiTest.java | 10 +-
.../cache/IgniteCacheMergeSqlQuerySelfTest.java | 1 -
.../cache/IgniteCacheOffheapEvictQueryTest.java | 4 +-
...niteCacheP2pUnmarshallingQueryErrorTest.java | 4 +-
.../IgniteCacheUpdateSqlQuerySelfTest.java | 2 +-
...niteCacheDistributedQueryCancelSelfTest.java | 4 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 4 +-
.../IgniteSqlEntryCacheModeAgnosticTest.java | 140 +++++
.../query/IgniteSqlSchemaIndexingTest.java | 15 +-
.../query/IgniteSqlSplitterSelfTest.java | 4 +-
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/GridQueryParsingTest.java | 4 -
.../IgniteCacheQuerySelfTestSuite.java | 2 +
.../apache/ignite/stream/jms11/JmsStreamer.java | 4 +-
.../ignite/stream/kafka/KafkaStreamer.java | 6 +-
.../ignite/stream/kafka/TestKafkaBroker.java | 2 +-
.../connect/IgniteSourceConnectorTest.java | 2 +-
.../stream/mqtt/IgniteMqttStreamerTest.java | 4 +-
.../BundleDelegatingClassLoader.java | 4 +-
.../classloaders/ContainerSweepClassLoader.java | 4 +-
modules/platforms/cpp/binary/Makefile.am | 1 +
.../platforms/cpp/binary/include/Makefile.am | 3 +
.../binary/binary_array_identity_resolver.h | 64 +++
.../ignite/binary/binary_identity_resolver.h | 61 +++
.../include/ignite/binary/binary_object.h | 5 +-
.../binary/include/ignite/binary/binary_type.h | 16 -
.../ignite/impl/binary/binary_object_impl.h | 9 +-
.../ignite/impl/binary/binary_type_impl.h | 149 ++++++
.../ignite/impl/binary/binary_type_snapshot.h | 18 +-
.../include/ignite/impl/binary/binary_utils.h | 175 +------
.../ignite/impl/binary/binary_writer_impl.h | 11 +-
.../ignite/impl/interop/interop_output_stream.h | 10 +-
.../cpp/binary/project/vs/binary.vcxproj | 4 +
.../binary/project/vs/binary.vcxproj.filters | 12 +
.../binary/binary_array_identity_resolver.cpp | 42 ++
.../cpp/binary/src/binary/binary_type.cpp | 4 +-
.../src/impl/binary/binary_object_impl.cpp | 10 +-
.../src/impl/binary/binary_type_manager.cpp | 12 +-
.../cpp/binary/src/impl/binary/binary_utils.cpp | 80 +--
.../src/impl/binary/binary_writer_impl.cpp | 2 -
.../src/impl/interop/interop_output_stream.cpp | 5 +
modules/platforms/cpp/common/Makefile.am | 5 +-
.../platforms/cpp/common/include/Makefile.am | 1 +
.../include/ignite/common/platform_utils.h | 79 +++
.../cpp/common/include/ignite/common/utils.h | 251 +++++++--
.../os/linux/src/common/platform_utils.cpp | 81 +++
.../cpp/common/os/linux/src/common/utils.cpp | 148 ------
.../common/os/win/src/common/platform_utils.cpp | 88 ++++
.../cpp/common/os/win/src/common/utils.cpp | 154 ------
.../cpp/common/project/vs/common.vcxproj | 4 +-
.../common/project/vs/common.vcxproj.filters | 12 +-
.../platforms/cpp/common/src/common/utils.cpp | 153 ++++++
modules/platforms/cpp/core-test/Makefile.am | 4 +-
.../cpp/core-test/config/cache-identity.xml | 121 +++++
.../cpp/core-test/config/cache-query.xml | 10 -
.../cpp/core-test/include/ignite/test_utils.h | 63 +++
.../cpp/core-test/project/vs/core-test.vcxproj | 4 +
.../project/vs/core-test.vcxproj.filters | 15 +
.../src/binary_identity_resolver_test.cpp | 522 +++++++++++++++++++
.../cpp/core-test/src/binary_object_test.cpp | 20 +-
.../cpp/core-test/src/binary_session_test.cpp | 4 +-
.../cpp/core-test/src/cache_query_test.cpp | 149 +++---
.../platforms/cpp/core-test/src/cache_test.cpp | 43 +-
.../cpp/core-test/src/continuous_query_test.cpp | 31 +-
.../cpp/core-test/src/ignition_test.cpp | 19 +-
.../cpp/core-test/src/interop_test.cpp | 42 +-
.../platforms/cpp/core-test/src/test_utils.cpp | 79 +++
.../cpp/core-test/src/transactions_test.cpp | 23 +-
.../platforms/cpp/core/src/impl/ignite_impl.cpp | 4 +-
.../cpp/odbc-test/include/test_utils.h | 51 +-
.../cpp/odbc-test/src/api_robustness_test.cpp | 35 +-
.../src/application_data_buffer_test.cpp | 24 +-
.../cpp/odbc-test/src/queries_test.cpp | 71 +--
.../src/sql_aggregate_functions_test.cpp | 1 +
.../src/sql_date_time_functions_test.cpp | 26 +-
.../src/sql_esc_convert_function_test.cpp | 4 +-
.../src/sql_numeric_functions_test.cpp | 1 +
.../cpp/odbc-test/src/sql_outer_join_test.cpp | 1 +
.../odbc-test/src/sql_string_functions_test.cpp | 1 +
.../odbc-test/src/sql_test_suite_fixture.cpp | 40 +-
.../cpp/odbc-test/src/sql_types_test.cpp | 10 +-
.../platforms/cpp/odbc-test/src/test_utils.cpp | 60 ++-
.../odbc/src/app/application_data_buffer.cpp | 8 +-
.../Cache/CacheAbstractTransactionalTest.cs | 168 +++---
.../Transactions/CacheTransactionManager.cs | 1 +
.../spark/JavaStandaloneIgniteRDDSelfTest.java | 3 +-
.../util/spring/IgniteSpringHelperImpl.java | 8 +-
.../ignite/internal/GridFactorySelfTest.java | 2 +-
.../internal/IgniteDynamicCacheConfigTest.java | 4 +-
.../GridSpringTransactionManagerSelfTest.java | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 2 +-
.../twitter/IgniteTwitterStreamerTest.java | 4 +-
.../GridUriDeploymentFileProcessorSelfTest.java | 3 +-
.../views/templates/agent-download.jade | 2 +-
modules/web-console/web-agent/README.txt | 2 +-
.../ignite/cache/websession/WebSessionV2.java | 2 +-
.../internal/websession/WebSessionSelfTest.java | 6 +-
.../apache/ignite/yarn/ApplicationMaster.java | 4 +-
.../org/apache/ignite/yarn/IgniteProvider.java | 4 +-
.../tcp/ipfinder/zk/ZookeeperIpFinderTest.java | 2 +-
341 files changed, 3113 insertions(+), 2120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 6fb8557,f8722d6..9284143
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@@ -836,10 -808,10 +836,10 @@@ public class GridCacheEvictionManager e
return;
// Don't track non-primary entries if evicts are synchronized.
- if (!cctx.isNear() && evictSync && !cctx.affinity().primary(cctx.localNode(), e.partition(), topVer))
+ if (!cctx.isNear() && evictSync && !cctx.affinity().primaryByPartition(cctx.localNode(), e.partition(), topVer))
return;
- if (!busyLock.enterBusy())
+ if (!enterBusy())
return;
try {
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6b3b60d2/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
----------------------------------------------------------------------
[06/32] ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/ignite
Posted by yz...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2caa0c64
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2caa0c64
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2caa0c64
Branch: refs/heads/ignite-comm-balance-master
Commit: 2caa0c64b04f48bd4e7ee527efddc2925b7b80f6
Parents: 00dc964 c1466d8
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jan 27 15:14:29 2017 -0800
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jan 27 15:14:29 2017 -0800
----------------------------------------------------------------------
.../cache/distributed/near/GridNearTxLocal.java | 2 +-
.../transactions/PlatformTransactions.java | 9 +
.../processors/igfs/IgfsTaskSelfTest.java | 87 ++---
modules/platforms/cpp/binary/Makefile.am | 2 +
.../platforms/cpp/binary/include/Makefile.am | 3 +
.../cpp/binary/include/ignite/binary/binary.h | 15 +-
.../include/ignite/binary/binary_object.h | 77 +++++
.../ignite/impl/binary/binary_object_header.h | 250 ++++++++++++++
.../ignite/impl/binary/binary_object_impl.h | 102 ++++++
.../include/ignite/impl/binary/binary_schema.h | 2 +-
.../include/ignite/impl/binary/binary_utils.h | 61 ++++
.../cpp/binary/project/vs/binary.vcxproj | 5 +
.../binary/project/vs/binary.vcxproj.filters | 15 +
.../src/impl/binary/binary_object_header.cpp | 51 +++
.../src/impl/binary/binary_object_impl.cpp | 52 +++
.../cpp/binary/src/impl/binary/binary_utils.cpp | 83 +++++
.../src/impl/binary/binary_writer_impl.cpp | 2 +-
modules/platforms/cpp/core-test/Makefile.am | 1 +
.../core-test/include/ignite/binary_test_defs.h | 25 ++
.../cpp/core-test/include/ignite/complex_type.h | 135 ++++++++
.../cpp/core-test/include/ignite/test_type.h | 186 +++++++++++
.../cpp/core-test/project/vs/core-test.vcxproj | 3 +
.../project/vs/core-test.vcxproj.filters | 16 +-
.../cpp/core-test/src/binary_object_test.cpp | 282 ++++++++++++++++
.../Apache.Ignite.Core.Tests.csproj | 1 +
.../Cache/CacheAbstractTest.cs | 21 ++
.../Cache/CacheAbstractTransactionalTest.cs | 324 +++++++++++++++++++
.../Apache.Ignite.Core.csproj | 2 +
.../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 4 +-
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 90 +++++-
.../Transactions/CacheTransactionManager.cs | 160 +++++++++
.../Impl/Transactions/Transaction.cs | 8 +
.../Impl/Transactions/TransactionImpl.cs | 13 +
.../Impl/Transactions/TransactionsImpl.cs | 10 +
.../generator/ConfigurationGenerator.js | 9 +-
35 files changed, 2014 insertions(+), 94 deletions(-)
----------------------------------------------------------------------
[13/32] ignite git commit: IGNITE-4612 Minor code cleanup
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
index 11a91b5..9da6ea6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
@@ -98,7 +98,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver1 = version(1);
GridCacheVersion ver2 = version(2);
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
GridCacheMvccCandidate c2 = entry.addNearLocal(node1, 1, ver2, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
@@ -133,7 +133,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(2);
GridCacheMvccCandidate c1 = entry.addNearLocal(node1, 1, ver1, true);
- GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, false, true);
+ GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -166,7 +166,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(2);
GridCacheMvccCandidate c1 = entry.addNearLocal(node1, 1, ver1, true);
- GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, false, true);
+ GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -228,7 +228,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver1 = version(1);
GridCacheVersion ver2 = version(2);
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
GridCacheMvccCandidate c2 = entry.addNearLocal(node1, 1, ver2, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
@@ -271,7 +271,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
entry.readyNearLocal(ver1, ver1, empty(), empty(), Collections.singletonList(ver0));
- entry.addRemote(node1, 1, ver0, false, true);
+ entry.addRemote(node1, 1, ver0, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -305,9 +305,9 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
entry.readyNearLocal(ver3, ver3, empty(), empty(), Arrays.asList(ver0, ver1, ver2));
- GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, false, true);
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
- GridCacheMvccCandidate c0 = entry.addRemote(node1, 1, ver0, false, true);
+ GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
+ GridCacheMvccCandidate c0 = entry.addRemote(node1, 1, ver0, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
@@ -349,8 +349,8 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
entry.readyNearLocal(ver3, ver3, empty(), empty(), Arrays.asList(ver0, ver1, ver2));
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
- GridCacheMvccCandidate c0 = entry.addRemote(node1, 1, ver0, false, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
+ GridCacheMvccCandidate c0 = entry.addRemote(node1, 1, ver0, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
@@ -390,12 +390,12 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver5 = version(5);
GridCacheVersion ver6 = version(6);
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node1, 1, ver2, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node1, 1, ver2, true);
GridCacheMvccCandidate c3 = entry.addNearLocal(node1, 1, ver3, true);
- GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, false, true);
- entry.addRemote(node1, 1, ver5, false, true);
- entry.addRemote(node1, 1, ver6, false, true);
+ GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, true);
+ entry.addRemote(node1, 1, ver5, true);
+ entry.addRemote(node1, 1, ver6, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
@@ -446,9 +446,9 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(20);
GridCacheVersion ver3 = version(30);
- entry.addRemote(node1, 1, ver1, false, true);
+ entry.addRemote(node1, 1, ver1, true);
entry.addNearLocal(node1, 1, nearVer2, true);
- entry.addRemote(node1, 1, ver3, false, true);
+ entry.addRemote(node1, 1, ver3, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -484,9 +484,9 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(20);
GridCacheVersion ver3 = version(30);
- entry.addRemote(node1, 1, ver1, false, true);
+ entry.addRemote(node1, 1, ver1, true);
entry.addNearLocal(node1, 1, nearVer2, true);
- entry.addRemote(node1, 1, ver3, false, true);
+ entry.addRemote(node1, 1, ver3, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -529,9 +529,9 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(20);
GridCacheVersion ver3 = version(30);
- entry.addRemote(node1, 1, ver1, false, true);
+ entry.addRemote(node1, 1, ver1, true);
entry.addNearLocal(node1, 1, nearVer2, true);
- entry.addRemote(node1, 1, ver3, false, true);
+ entry.addRemote(node1, 1, ver3, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -574,9 +574,9 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(20);
GridCacheVersion ver3 = version(30);
- entry.addRemote(node1, 1, ver1, false, true);
+ entry.addRemote(node1, 1, ver1, true);
entry.addNearLocal(node1, 1, nearVer2, true);
- entry.addRemote(node1, 1, ver3, false, true);
+ entry.addRemote(node1, 1, ver3, true);
Collection<GridCacheMvccCandidate> rmtCands = entry.remoteMvccSnapshot();
Collection<GridCacheMvccCandidate> nearLocCands = entry.localCandidates();
@@ -1075,4 +1075,4 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
assert cand.local();
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
index f46b290..d352e26 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java
@@ -129,14 +129,14 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver4 = version(4);
GridCacheVersion ver5 = version(5);
- entry.addRemote(node1, 1, ver1, false, true);
+ entry.addRemote(node1, 1, ver1, true);
Collection<GridCacheMvccCandidate> cands = entry.remoteMvccSnapshot();
assert cands.size() == 1;
assert cands.iterator().next().version().equals(ver1);
- entry.addRemote(node2, 5, ver5, false, true);
+ entry.addRemote(node2, 5, ver5, true);
cands = entry.remoteMvccSnapshot();
@@ -147,7 +147,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
// Check order.
checkOrder(cands, ver1, ver5);
- entry.addRemote(node1, 3, ver3, false, true);
+ entry.addRemote(node1, 3, ver3, true);
cands = entry.remoteMvccSnapshot();
@@ -162,7 +162,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
checkDone(entry.candidate(ver3));
- entry.addRemote(node1, 2, ver2, false, true);
+ entry.addRemote(node1, 2, ver2, true);
cands = entry.remoteMvccSnapshot();
@@ -197,7 +197,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
checkDone(entry.candidate(ver5));
- entry.addRemote(node1, 4, ver4, false, true);
+ entry.addRemote(node1, 4, ver4, true);
cands = entry.remoteMvccSnapshot();
@@ -278,10 +278,10 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver3 = version(3);
GridCacheVersion ver4 = version(4);
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
- GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, false, true);
- GridCacheMvccCandidate c3 = entry.addRemote(node1, 1, ver3, false, true);
- GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, false, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
+ GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, true);
+ GridCacheMvccCandidate c3 = entry.addRemote(node1, 1, ver3, true);
+ GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, true);
GridCacheMvccCandidate[] candArr = new GridCacheMvccCandidate[] {c1, c2, c3, c4};
@@ -322,12 +322,12 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver5 = version(5);
GridCacheVersion ver6 = version(6);
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
- GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, false, true);
- GridCacheMvccCandidate c3 = entry.addRemote(node1, 1, ver3, false, true);
- GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, false, true);
- GridCacheMvccCandidate c5 = entry.addRemote(node1, 1, ver5, false, true);
- GridCacheMvccCandidate c6 = entry.addRemote(node1, 1, ver6, false, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
+ GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, true);
+ GridCacheMvccCandidate c3 = entry.addRemote(node1, 1, ver3, true);
+ GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, true);
+ GridCacheMvccCandidate c5 = entry.addRemote(node1, 1, ver5, true);
+ GridCacheMvccCandidate c6 = entry.addRemote(node1, 1, ver6, true);
GridCacheMvccCandidate[] candArr = new GridCacheMvccCandidate[] {c1, c2, c3, c4, c5, c6};
@@ -369,13 +369,13 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver5 = version(5);
GridCacheVersion ver6 = version(6);
- GridCacheMvccCandidate c0 = entry.addRemote(node1, 1, ver0, false, true);
- GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, false, true);
- GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, false, true);
- GridCacheMvccCandidate c3 = entry.addRemote(node1, 1, ver3, false, true);
- GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, false, true);
- GridCacheMvccCandidate c5 = entry.addRemote(node1, 1, ver5, false, true);
- GridCacheMvccCandidate c6 = entry.addRemote(node1, 1, ver6, false, true);
+ GridCacheMvccCandidate c0 = entry.addRemote(node1, 1, ver0, true);
+ GridCacheMvccCandidate c1 = entry.addRemote(node1, 1, ver1, true);
+ GridCacheMvccCandidate c2 = entry.addRemote(node1, 1, ver2, true);
+ GridCacheMvccCandidate c3 = entry.addRemote(node1, 1, ver3, true);
+ GridCacheMvccCandidate c4 = entry.addRemote(node1, 1, ver4, true);
+ GridCacheMvccCandidate c5 = entry.addRemote(node1, 1, ver5, true);
+ GridCacheMvccCandidate c6 = entry.addRemote(node1, 1, ver6, true);
GridCacheMvccCandidate[] candArr = new GridCacheMvccCandidate[] {c0, c1, c2, c3, c4, c5, c6};
@@ -486,7 +486,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver2 = version(2);
GridCacheVersion ver3 = version(3);
- entry.addRemote(nodeId, 1, ver2, false, true);
+ entry.addRemote(nodeId, 1, ver2, true);
entry.addLocal(3, ver3, 0, false, true);
@@ -529,15 +529,15 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver7 = version(7);
GridCacheVersion ver8 = version(8);
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node2, 2, ver2, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
- entry.addRemote(node1, 5, ver5, false, true);
- entry.addRemote(node2, 7, ver7, false, true);
- entry.addRemote(node2, 8, ver8, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node2, 2, ver2, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
+ entry.addRemote(node1, 5, ver5, true);
+ entry.addRemote(node2, 7, ver7, true);
+ entry.addRemote(node2, 8, ver8, true);
- GridCacheMvccCandidate doomed = entry.addRemote(node2, 6, ver6, false, true);
+ GridCacheMvccCandidate doomed = entry.addRemote(node2, 6, ver6, true);
// No reordering happens.
checkOrder(entry.remoteMvccSnapshot(), ver1, ver2, ver3, ver4, ver5, ver7, ver8, ver6);
@@ -581,13 +581,13 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver6 = version(6);
GridCacheVersion ver7 = version(7);
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node2, 2, ver2, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
- entry.addRemote(node1, 5, ver5, false, true);
- entry.addRemote(node2, 6, ver6, false, true);
- entry.addRemote(node2, 7, ver7, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node2, 2, ver2, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
+ entry.addRemote(node1, 5, ver5, true);
+ entry.addRemote(node2, 6, ver6, true);
+ entry.addRemote(node2, 7, ver7, true);
List<GridCacheVersion> committed = Arrays.asList(ver4, ver6, ver2);
@@ -623,13 +623,13 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver6 = version(6);
GridCacheVersion ver7 = version(7);
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node2, 2, ver2, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
- entry.addRemote(node1, 5, ver5, false, true);
- entry.addRemote(node2, 6, ver6, false, true);
- entry.addRemote(node2, 7, ver7, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node2, 2, ver2, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
+ entry.addRemote(node1, 5, ver5, true);
+ entry.addRemote(node2, 6, ver6, true);
+ entry.addRemote(node2, 7, ver7, true);
List<GridCacheVersion> completed = Arrays.asList(ver4, ver6);
@@ -669,11 +669,11 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver6 = version(6);
GridCacheVersion ver7 = version(7);
- entry.addRemote(node1, 1, ver1, false, false);
- entry.addRemote(node2, 2, ver2, false, false);
- entry.addRemote(node1, 3, ver3, false, false);
- entry.addRemote(node2, 4, ver4, false, false);
- entry.addRemote(node1, 5, ver5, false, false);
+ entry.addRemote(node1, 1, ver1, false);
+ entry.addRemote(node2, 2, ver2, false);
+ entry.addRemote(node1, 3, ver3, false);
+ entry.addRemote(node2, 4, ver4, false);
+ entry.addRemote(node1, 5, ver5, false);
List<GridCacheVersion> committed = Arrays.asList(ver6, ver7);
@@ -708,13 +708,13 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver6 = version(6);
GridCacheVersion ver7 = version(7);
- entry.addRemote(node1, 1, ver1, false, false);
- entry.addRemote(node2, 2, ver2, false, false);
- entry.addRemote(node1, 3, ver3, false, false);
- entry.addRemote(node2, 4, ver4, false, false);
- entry.addRemote(node1, 5, ver5, false, false);
- entry.addRemote(node2, 6, ver6, false, false);
- entry.addRemote(node2, 7, ver7, false, false);
+ entry.addRemote(node1, 1, ver1, false);
+ entry.addRemote(node2, 2, ver2, false);
+ entry.addRemote(node1, 3, ver3, false);
+ entry.addRemote(node2, 4, ver4, false);
+ entry.addRemote(node1, 5, ver5, false);
+ entry.addRemote(node2, 6, ver6, false);
+ entry.addRemote(node2, 7, ver7, false);
List<GridCacheVersion> committed = Arrays.asList(ver4, ver6, ver3);
@@ -750,11 +750,11 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver6 = version(6);
GridCacheVersion ver7 = version(7);
- entry.addRemote(node1, 1, ver1, false, false);
- entry.addRemote(node2, 2, ver2, false, false);
- entry.addRemote(node1, 3, ver3, false, false);
- entry.addRemote(node2, 4, ver4, false, false);
- entry.addRemote(node1, 5, ver5, false, false);
+ entry.addRemote(node1, 1, ver1, false);
+ entry.addRemote(node2, 2, ver2, false);
+ entry.addRemote(node1, 3, ver3, false);
+ entry.addRemote(node2, 4, ver4, false);
+ entry.addRemote(node1, 5, ver5, false);
List<GridCacheVersion> committed = Arrays.asList(ver6, ver7);
@@ -789,11 +789,11 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver6 = version(6);
GridCacheVersion ver7 = version(7);
- entry.addRemote(node1, 1, ver1, false, false);
- entry.addRemote(node2, 2, ver2, false, false);
- entry.addRemote(node1, 3, ver3, false, false);
- entry.addRemote(node2, 4, ver4, false, false);
- entry.addRemote(node1, 5, ver5, false, false);
+ entry.addRemote(node1, 1, ver1, false);
+ entry.addRemote(node2, 2, ver2, false);
+ entry.addRemote(node1, 3, ver3, false);
+ entry.addRemote(node2, 4, ver4, false);
+ entry.addRemote(node1, 5, ver5, false);
List<GridCacheVersion> committed = Arrays.asList(ver6, ver7);
@@ -829,12 +829,12 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver7 = version(7);
// Don't add version 2.
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
- entry.addRemote(node1, 5, ver5, false, true);
- entry.addRemote(node2, 6, ver6, false, true);
- entry.addRemote(node2, 7, ver7, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
+ entry.addRemote(node1, 5, ver5, true);
+ entry.addRemote(node2, 6, ver6, true);
+ entry.addRemote(node2, 7, ver7, true);
List<GridCacheVersion> committed = Arrays.asList(ver6, ver4);
@@ -870,9 +870,9 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver7 = version(7);
// Don't add versions 2, 5, 6, 7.
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
List<GridCacheVersion> committed = Arrays.asList(ver6, ver5, ver7);
@@ -905,12 +905,12 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver7 = version(7);
// Don't add version 1.
- entry.addRemote(node1, 2, ver2, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
- entry.addRemote(node1, 5, ver5, false, true);
- entry.addRemote(node2, 6, ver6, false, true);
- entry.addRemote(node2, 7, ver7, false, true);
+ entry.addRemote(node1, 2, ver2, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
+ entry.addRemote(node1, 5, ver5, true);
+ entry.addRemote(node2, 6, ver6, true);
+ entry.addRemote(node2, 7, ver7, true);
List<GridCacheVersion> committed = Arrays.asList(ver4, ver6, ver3);
@@ -946,12 +946,12 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver7 = version(7);
// Don't add version 6, 7
- entry.addRemote(node1, 2, ver2, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
- entry.addRemote(node1, 5, ver5, false, true);
- entry.addRemote(node1, 6, ver6, false, true);
- entry.addRemote(node1, 7, ver7, false, true);
+ entry.addRemote(node1, 2, ver2, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
+ entry.addRemote(node1, 5, ver5, true);
+ entry.addRemote(node1, 6, ver6, true);
+ entry.addRemote(node1, 7, ver7, true);
List<GridCacheVersion> committed = Arrays.asList(ver2, ver3);
@@ -987,10 +987,10 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver7 = version(7);
// Don't add version 5, 6, 7
- entry.addRemote(node1, 1, ver1, false, true);
- entry.addRemote(node1, 2, ver2, false, true);
- entry.addRemote(node1, 3, ver3, false, true);
- entry.addRemote(node2, 4, ver4, false, true);
+ entry.addRemote(node1, 1, ver1, true);
+ entry.addRemote(node1, 2, ver2, true);
+ entry.addRemote(node1, 3, ver3, true);
+ entry.addRemote(node2, 4, ver4, true);
List<GridCacheVersion> committed = Arrays.asList(ver6, ver7);
@@ -1021,7 +1021,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
GridCacheVersion ver4 = version(4);
GridCacheVersion ver5 = version(5);
- entry.addRemote(node1, 1, ver1, false, false);
+ entry.addRemote(node1, 1, ver1, false);
entry.addLocal(2, ver2, 0, true, true);
Collection<GridCacheMvccCandidate> cands = entry.remoteMvccSnapshot();
@@ -1029,7 +1029,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
assert cands.size() == 1;
assert cands.iterator().next().version().equals(ver1);
- entry.addRemote(node2, 5, ver5, false, false);
+ entry.addRemote(node2, 5, ver5, false);
cands = entry.remoteMvccSnapshot();
@@ -1040,7 +1040,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
checkOrder(cands, ver1, ver5);
checkOrder(entry.localCandidates(true), ver2);
- entry.addRemote(node1, 3, ver3, false, true);
+ entry.addRemote(node1, 3, ver3, true);
entry.addLocal(4, ver4, 0, /*reenter*/true, false);
cands = entry.remoteMvccSnapshot();
@@ -1174,11 +1174,11 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
linkCandidates(ctx, c13, c33);
- entry2.addRemote(nodeId, 3, ver2, false, true);
+ entry2.addRemote(nodeId, 3, ver2, true);
checkLocal(entry2.candidate(ver1), ver1, true, false, false);
- entry3.addRemote(nodeId, 3, ver2, false, false);
+ entry3.addRemote(nodeId, 3, ver2, false);
entry3.readyLocal(ver3);
@@ -1245,11 +1245,11 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
linkCandidates(ctx, c13, c33);
- entry2.addRemote(UUID.randomUUID(), 3, ver1, false, true);
+ entry2.addRemote(UUID.randomUUID(), 3, ver1, true);
checkLocal(entry2.candidate(ver2), ver2, true, false, false);
- entry3.addRemote(UUID.randomUUID(), 3, ver1, false, true);
+ entry3.addRemote(UUID.randomUUID(), 3, ver1, true);
entry3.readyLocal(ver3);
@@ -1421,7 +1421,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
checkLocal(c1k1, ver2, true, true, false);
- GridCacheMvccCandidate c2k1 = entry1.addRemote(id, 2, ver1, false, true);
+ GridCacheMvccCandidate c2k1 = entry1.addRemote(id, 2, ver1, true);
// Force recheck of assignments.
entry1.recheckLock();
@@ -1437,7 +1437,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
assert c1k2.previous() == c1k1;
- GridCacheMvccCandidate c2k2 = entry2.addRemote(id, 3, ver1, false, true);
+ GridCacheMvccCandidate c2k2 = entry2.addRemote(id, 3, ver1, true);
entry2.readyLocal(c1k2);
@@ -1479,8 +1479,8 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
checkLocal(v3k2, ver3, false, false, false);
// Remote locks.
- GridCacheMvccCandidate v2k1 = entry1.addRemote(id, 3, ver2, false, false);
- GridCacheMvccCandidate v2k2 = entry2.addRemote(id, 3, ver2, false, false);
+ GridCacheMvccCandidate v2k1 = entry1.addRemote(id, 3, ver2, false);
+ GridCacheMvccCandidate v2k2 = entry2.addRemote(id, 3, ver2, false);
checkRemote(v2k1, ver2, false, false);
checkRemote(v2k2, ver2, false, false);
@@ -1602,7 +1602,7 @@ public class GridCacheMvccSelfTest extends GridCommonAbstractTest {
checkLocal(v1k1, ver1, true, false, false);
checkLocal(v1k2, ver1, true, false, false);
- GridCacheMvccCandidate v2k2 = entry2.addRemote(id, 5, ver2, false, false);
+ GridCacheMvccCandidate v2k2 = entry2.addRemote(id, 5, ver2, false);
checkRemote(v2k2, ver2, false, false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
index e70c97b..176751f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
@@ -161,7 +161,7 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
try {
cacheOperations(node, cache);
}
- catch (Exception e) {
+ catch (Exception ignored) {
if (node.isStopping())
break;
}
@@ -322,4 +322,4 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index e3b4e9b..9fdadf3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -158,12 +158,11 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
* @param nodeId Node ID.
* @param threadId Thread ID.
* @param ver Lock version.
- * @param ec Not used.
* @param tx Transaction flag.
* @return Remote candidate.
*/
GridCacheMvccCandidate addRemote(UUID nodeId, long threadId, GridCacheVersion ver,
- boolean ec, boolean tx) {
+ boolean tx) {
return mvcc.addRemote(this, nodeId, null, threadId, ver, tx, true, false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
index 5f2c004..d30aad5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheUtilsSelfTest.java
@@ -75,7 +75,7 @@ public class GridCacheUtilsSelfTest extends GridCommonAbstractTest {
* @return {@code False}.
*/
@SuppressWarnings("CovariantEquals")
- public boolean equals(String obj) {
+ @Override public boolean equals(Object obj) {
return false;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
index e1d1650..c6e4394 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
@@ -102,7 +102,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
try {
daemon.cluster().forDataNodes(null);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
return;
}
@@ -120,7 +120,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
try {
daemon.cluster().forClientNodes(null);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
return;
}
@@ -138,10 +138,10 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
try {
daemon.cluster().forCacheNodes(null);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
return;
}
fail();
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
index 6b0e193..e77c677 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
@@ -4143,8 +4143,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
cache.put("key1", 1);
cache.put("key2", 2);
- Map map = new HashMap<>();
-
for (int i = 0; i < gridCount(); i++) {
for (Cache.Entry entry : jcache(i))
storeStgy.putToStore(entry.getKey(), entry.getValue());
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
index 48acdfc..a8e9403 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreCollectionTest.java
@@ -22,7 +22,6 @@ import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.util.typedef.F;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
index 7ac68db..1f923f1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
@@ -107,7 +107,7 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
assert grid(0).cache(cacheName).get(KEY_VAL).equals(KEY_VAL);
}
- catch (CacheException ex) {
+ catch (CacheException ignored) {
assert false : "topology validation broken";
}
}
@@ -121,7 +121,7 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
try {
assert grid(0).cache(cacheName).get(KEY_VAL).equals(KEY_VAL);
}
- catch (CacheException ex) {
+ catch (CacheException ignored) {
assert false : "topology validation broken";
}
}
@@ -212,4 +212,4 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
putValid(CACHE_NAME_2);
remove(CACHE_NAME_2);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
index dff0344..9eacb13 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
@@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
@@ -456,4 +455,4 @@ abstract class IgniteTxAbstractTest extends GridCommonAbstractTest {
/** Cache remove. */
REMOVE
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java
index 2b524e8..c016954 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java
@@ -168,7 +168,7 @@ public class IgniteTxConfigCacheSelfTest extends GridCommonAbstractTest {
fail("Timeout exception must be thrown");
}
- catch (CacheException e) {
+ catch (CacheException ignored) {
// No-op.
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
index 95161c3..41d5c9a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
@@ -28,7 +28,6 @@ import javax.cache.processor.EntryProcessor;
import javax.cache.processor.MutableEntry;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.Ignition;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
@@ -710,4 +709,4 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
// No-op.
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
index f13ba8c..07e30e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
@@ -250,7 +250,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract
break;
}
- catch (TransactionOptimisticException e) {
+ catch (TransactionOptimisticException ignored) {
// Retry.
}
}
@@ -313,4 +313,4 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract
assertEquals(total, grid(i).cache(null).get(key));
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
index 74b8659..f64216b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java
@@ -21,7 +21,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheInterceptor;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.lang.IgniteBiTuple;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
index 2c55381..c542bd6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest.java
@@ -108,7 +108,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest
fail("Exception did not happened.");
}
- catch (BinaryInvalidTypeException e) {
+ catch (BinaryInvalidTypeException ignored) {
// No-op.
}
}
@@ -118,7 +118,7 @@ public class GridCacheBinaryAtomicEntryProcessorDeploymentSelfTest
fail("Exception did not happened.");
}
- catch (BinaryInvalidTypeException e) {
+ catch (BinaryInvalidTypeException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
index d068cad..fa17e58 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/context/IgniteCacheAbstractExecutionContextTest.java
@@ -23,8 +23,6 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.testframework.GridTestExternalClassLoader;
import org.apache.ignite.testframework.config.GridTestProperties;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
index 6ba65ab..ab787a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
@@ -444,7 +444,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
try {
sem.acquire(1);
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
// Expected exception.
return;
}
@@ -472,7 +472,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
try {
sem2.acquire();
}
- catch (Exception e){
+ catch (Exception ignored){
failed = false;
}
finally {
@@ -487,7 +487,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
while(!sem1.hasQueuedThreads()){
try {
Thread.sleep(1);
- } catch (InterruptedException e) {
+ } catch (InterruptedException ignored) {
fail();
}
}
@@ -641,10 +641,10 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
fail("Exception must be thrown.");
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
fail("Interrupted exception not expected here.");
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
isExceptionThrown = true;
}
finally {
@@ -734,7 +734,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
final AtomicBoolean done = new AtomicBoolean(false);
- IgniteInternalFuture<?> fut = GridTestUtils.runAsync(new Callable<Void>() {
+ GridTestUtils.runAsync(new Callable<Void>() {
@Override public Void call() throws Exception {
try{
l.lock();
@@ -1344,8 +1344,8 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
try {
barrier.await();
}
- catch (BrokenBarrierException e) {
- // Ignore.
+ catch (BrokenBarrierException ignored) {
+ // No-op.
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
index 8fb9049..388f167 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteLockAbstractSelfTest.java
@@ -500,7 +500,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
fail("Condition not associated with this lock passed as argument.");
}
- catch (IllegalArgumentException e) {
+ catch (IllegalArgumentException ignored) {
info("IllegalArgumentException thrown as it should be.");
}
@@ -511,7 +511,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
fail("This method should throw exception when lock is not held.");
}
- catch (IllegalMonitorStateException e) {
+ catch (IllegalMonitorStateException ignored) {
info("IllegalMonitorStateException thrown as it should be.");
}
@@ -529,7 +529,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
fail("Condition not associated with this lock passed as argument.");
}
- catch (IllegalArgumentException e) {
+ catch (IllegalArgumentException ignored) {
info("IllegalArgumentException thrown as it should be.");
}
@@ -540,7 +540,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
fail("This method should throw exception when lock is not held.");
}
- catch (IllegalMonitorStateException e) {
+ catch (IllegalMonitorStateException ignored) {
info("IllegalMonitorStateException thrown as it should be.");
}
@@ -604,7 +604,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
fail("This method should throw exception when lock is not held.");
}
- catch (IllegalMonitorStateException e) {
+ catch (IllegalMonitorStateException ignored) {
info("IllegalMonitorStateException thrown as it should be.");
}
@@ -746,7 +746,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
try {
lock0.lockInterruptibly();
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
assertFalse(Thread.currentThread().isInterrupted());
isInterrupted = true;
@@ -842,7 +842,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
l.lockInterruptibly();
}
- catch(IgniteInterruptedException e){
+ catch(IgniteInterruptedException ignored){
exceptionThrown.set(true);
}
finally {
@@ -946,7 +946,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
try {
lock0.lock();
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
isInterrupted = true;
fail("Lock() method is uninterruptible.");
@@ -1031,7 +1031,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
try {
locked = lock0.tryLock();
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
isInterrupted = true;
fail("tryLock() method is uninterruptible.");
@@ -1114,7 +1114,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
try {
locked = lock0.tryLock(100, TimeUnit.MILLISECONDS);
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
isInterrupted = true;
}
finally {
@@ -1190,7 +1190,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
try {
cond.awaitUninterruptibly();
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
isInterrupted = true;
}
finally {
@@ -1279,7 +1279,7 @@ public abstract class IgniteLockAbstractSelfTest extends IgniteAtomicsAbstractTe
try {
cond.await();
}
- catch (IgniteInterruptedException e) {
+ catch (IgniteInterruptedException ignored) {
isInterrupted = true;
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
index c005945..38e2979 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java
@@ -152,7 +152,7 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest {
try {
Thread.sleep(ThreadLocalRandom.current().nextLong(50));
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
Thread.currentThread().interrupt();
}
}
@@ -174,7 +174,7 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest {
try {
Thread.sleep(ThreadLocalRandom.current().nextLong(50));
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
Thread.currentThread().interrupt();
}
}
@@ -228,4 +228,4 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest {
return null;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
index 7e37450..70a6723 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
@@ -2207,7 +2207,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
if (partNodes.isEmpty()) {
try {
- ClusterNode primary = cacheAff.mapKeyToNode(i);
+ cacheAff.mapKeyToNode(i);
fail();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
index 6a42752..e4b3e80 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java
@@ -237,7 +237,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract
try {
fut.get(1, TimeUnit.SECONDS);
}
- catch (IgniteFutureTimeoutCheckedException e) {
+ catch (IgniteFutureTimeoutCheckedException ignored) {
timeout = true;
}
@@ -268,4 +268,4 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract
return true;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
index b4ef11a..37e10b3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
@@ -538,7 +538,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
client = false;
- IgniteEx ignite3 = startGrid(3);
+ startGrid(3);
log.info("Stop block.");
@@ -671,7 +671,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
}
});
- ignite3 = startGrid(3);
+ startGrid(3);
log.info("Stop block2.");
@@ -1098,7 +1098,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
}
});
- ignite3 = startGrid(3);
+ startGrid(3);
awaitPartitionMapExchange();
@@ -1208,7 +1208,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
client = false;
- IgniteEx ignite3 = startGrid(3);
+ startGrid(3);
log.info("Stop block.");
@@ -1895,7 +1895,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
try {
updateBarrier.await(30_000, TimeUnit.MILLISECONDS);
}
- catch (TimeoutException e) {
+ catch (TimeoutException ignored) {
log.error("Failed to wait for update.");
for (Ignite ignite : G.allGrids())
@@ -1935,7 +1935,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
try {
updateBarrier.await(30_000, TimeUnit.MILLISECONDS);
}
- catch (TimeoutException e) {
+ catch (TimeoutException ignored) {
log.error("Failed to wait for update.");
for (Ignite ignite : G.allGrids())
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
index 08396da..c6e7ac7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxCacheWriteSynchronizationModesMultithreadedTest.java
@@ -262,8 +262,8 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri
tx.commit();
}
}
- catch (CacheException | IgniteException e) {
- // Ignore.
+ catch (CacheException | IgniteException ignored) {
+ // No-op.
}
}
});
@@ -289,10 +289,10 @@ public class IgniteTxCacheWriteSynchronizationModesMultithreadedTest extends Gri
break;
}
- catch (TransactionOptimisticException e) {
+ catch (TransactionOptimisticException ignored) {
// Retry.
}
- catch (CacheException | IgniteException e) {
+ catch (CacheException | IgniteException ignored) {
break;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
index 0294dea..3dfc4e4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
@@ -348,7 +348,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
if (affFut != null)
affFut.get(30_000);
}
- catch (IgniteFutureTimeoutCheckedException e) {
+ catch (IgniteFutureTimeoutCheckedException ignored) {
log.error("Failed to wait for affinity future after start: " + topVer);
failed = true;
@@ -371,7 +371,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
if (affFut != null)
affFut.get(30_000);
}
- catch (IgniteFutureTimeoutCheckedException e) {
+ catch (IgniteFutureTimeoutCheckedException ignored) {
log.error("Failed to wait for affinity future after stop: " + topVer);
failed = true;
@@ -497,4 +497,4 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
return old;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
index b518a21..c3c6f8b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java
@@ -441,7 +441,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends
found = true;
- IgniteCache<Integer, Integer> cache = ignite.cache(null);
+ ignite.cache(null);
assertEquals("Unexpected value for: " + ignite.name(), key, key);
}
@@ -546,4 +546,4 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
index 9bfde27..cc5f548 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
@@ -249,7 +249,7 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
for (int i = 0; i < keysCnt; i++)
cache.invoke(i, new SetEntryProcessor(val));
}
- catch (Exception e) {
+ catch (Exception ignored) {
// No-op.
}
}
@@ -339,4 +339,4 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
return null;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 644e310..3fd4dd8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -392,7 +392,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
entry.unswap();
}
- catch (GridDhtInvalidPartitionException e) {
+ catch (GridDhtInvalidPartitionException ignored) {
// Skip key.
}
}
@@ -481,4 +481,4 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
((origMsg instanceof GridNearAtomicAbstractUpdateRequest) || (origMsg instanceof GridDhtAtomicAbstractUpdateRequest));
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index 5fab800..73a5015 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -386,7 +386,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
else
return true;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
// If e0.valueBytes() thrown this exception then entry has been removed.
return true;
}
@@ -605,4 +605,4 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
assert !cache.isLocalLocked(key, false);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
index 7e3e7e5..f0e7ba5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java
@@ -18,7 +18,6 @@
package org.apache.ignite.internal.processors.cache.distributed.replicated;
import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractNodeRestartSelfTest;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -131,4 +130,4 @@ public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNod
@Override public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable {
super.testRestartWithTxPutAllFourNodesTwoBackups();
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
index c6cd5af..a976ca0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java
@@ -60,7 +60,6 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
-import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index f22ca6d..01c0d72 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -1190,7 +1190,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
throws IgniteInterruptedCheckedException {
GridTestUtils.waitForCondition(new PAX() {
@Override public boolean applyx() throws IgniteCheckedException {
- GridCacheEntryEx entry = null;
+ GridCacheEntryEx entry;
while (true) {
try {
@@ -1270,4 +1270,4 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
return S.toString(TestPolicy.class, this);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
index d2cb710..ca0fbb8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
@@ -998,7 +998,7 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
tx.commit();
}
- catch (CacheException | ClusterTopologyException e) {
+ catch (CacheException | ClusterTopologyException ignored) {
log.warning("Failed put. [Key=" + key + ", val=" + key + "]");
continue;
@@ -1014,7 +1014,7 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
tx.commit();
}
- catch (CacheException | ClusterTopologyException e) {
+ catch (CacheException | ClusterTopologyException ignored) {
log.warning("Failed put. [Key=" + key + ", val=" + key + "]");
continue;
@@ -2408,7 +2408,7 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
U.sleep(sleepTime);
}
- catch (IgniteInterruptedCheckedException e) {
+ catch (IgniteInterruptedCheckedException ignored) {
Thread.interrupted();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java
index dccde65..5a066fa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryNodesFilteringTest.java
@@ -72,7 +72,7 @@ public class GridCacheContinuousQueryNodesFilteringTest extends GridCommonAbstra
try (Ignite node2 = startGrid("node2", getConfiguration("node2", true, log))) {
fail();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
assertTrue(log.toString().contains("Class not found for continuous query remote filter " +
"[name=org.apache.ignite.tests.p2p.CacheDeploymentEntryEventFilter]"));
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java
index b1d8a49..89c374c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryReconnectTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.query.continuous;
import java.io.Serializable;
import java.util.concurrent.atomic.AtomicInteger;
-import javax.cache.Cache;
import javax.cache.CacheException;
import javax.cache.event.CacheEntryEvent;
import javax.cache.event.CacheEntryListenerException;
@@ -30,7 +29,6 @@ import org.apache.ignite.IgniteClientDisconnectedException;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.cache.query.ContinuousQuery;
-import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -141,11 +139,11 @@ public class IgniteCacheContinuousQueryReconnectTest extends GridCommonAbstractT
putAndCheck(clCache, 0); // 0 remote listeners.
- QueryCursor<Cache.Entry<Object, Object>> cur = (clientQuery ? clCache : cache1).query(qry);
+ (clientQuery ? clCache : cache1).query(qry);
putAndCheck(clCache, 1); // 1 remote listener.
- final Ignite srv2 = startGrid(2);
+ startGrid(2);
putAndCheck(clCache, 2); // 2 remote listeners.
@@ -169,7 +167,7 @@ public class IgniteCacheContinuousQueryReconnectTest extends GridCommonAbstractT
putAndCheck(clCache, 1); // 1 remote listener.
- Ignite srv3 = startGrid(3);
+ startGrid(3);
putAndCheck(clCache, 2); // 2 remote listeners.
@@ -185,8 +183,8 @@ public class IgniteCacheContinuousQueryReconnectTest extends GridCommonAbstractT
putAndCheck(clCache, 2); // 2 remote listeners.
- Ignite srv4 = startGrid(5);
+ startGrid(5);
putAndCheck(clCache, 3); // 3 remote listeners.
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
index e9d74ff..6da9834 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
@@ -170,7 +170,7 @@ public class TxDeadlockDetectionNoHangsTest extends GridCommonAbstractTest {
stopGrid(NODES_CNT);
}
- catch (Exception e) {
+ catch (Exception ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
index 87bc70f..c060368 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionTest.java
@@ -129,7 +129,7 @@ public class TxDeadlockDetectionTest extends GridCommonAbstractTest {
stopGrid(NODES_CNT);
}
- catch (Exception e) {
+ catch (Exception ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java
index 691bc9f..4b3a0ee 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/GridComputeJobExecutionErrorToLogManualTest.java
@@ -73,7 +73,7 @@ public class GridComputeJobExecutionErrorToLogManualTest extends GridCommonAbstr
try {
Thread.sleep(500);
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
// No-op.
}
}
@@ -85,4 +85,4 @@ public class GridComputeJobExecutionErrorToLogManualTest extends GridCommonAbstr
}
});
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
index a6a9f54..9e4b28f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
@@ -179,7 +179,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest {
try (IgniteDataStreamer<Integer, String> streamer = ignite.dataStreamer(null)) {
streamer.addData(1, "1");
}
- catch (CacheException ex) {
+ catch (CacheException ignored) {
failed = true;
}
}
@@ -212,13 +212,13 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest {
streamer.flush();
}
- catch (IllegalStateException ex) {
+ catch (IllegalStateException ignored) {
try {
fut.get();
fail("DataStreamer ignores failed streaming.");
}
- catch (CacheServerNotFoundException ignored) {
+ catch (CacheServerNotFoundException ignored2) {
// No-op.
}
@@ -284,4 +284,4 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest {
return obj instanceof TestObject && ((TestObject)obj).val == val;
}
}
-}
\ No newline at end of file
+}
[14/32] ignite git commit: IGNITE-4612 Minor code cleanup
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
index 7cbd77c..4872314 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
@@ -183,8 +183,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
if (type == EVT_NODE_LEFT || type == EVT_NODE_FAILED) {
if (mini.node().id().equals(evt.eventNode().id())) {
- mini.onResult(new ClusterTopologyCheckedException("Node left grid (will retry): " +
- evt.eventNode().id()));
+ mini.onResult();
break;
}
@@ -288,7 +287,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
catch (IgniteCheckedException e) {
// Fail the whole thing.
if (e instanceof ClusterTopologyCheckedException)
- fut.onResult((ClusterTopologyCheckedException)e);
+ fut.onResult();
else if (!cctx.kernalContext().isStopping())
fut.onResult(e);
}
@@ -488,9 +487,8 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
}
/**
- * @param e Node failure.
*/
- void onResult(ClusterTopologyCheckedException e) {
+ void onResult() {
if (log.isDebugEnabled())
log.debug("Remote node left grid while sending or waiting for reply (will retry): " + this);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 02c31da..3c05b78 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -180,7 +180,7 @@ public class GridDhtPartitionDemander {
try {
rebalanceFut.cancel();
}
- catch (Exception ex) {
+ catch (Exception ignored) {
rebalanceFut.onDone(false);
}
@@ -375,9 +375,9 @@ public class GridDhtPartitionDemander {
if (f.get()) // Not cancelled.
next.run(); // Starts next cache rebalancing (according to the order).
}
- catch (IgniteCheckedException ignored) {
+ catch (IgniteCheckedException e) {
if (log.isDebugEnabled())
- log.debug(ignored.getMessage());
+ log.debug(e.getMessage());
}
}
});
@@ -1012,7 +1012,7 @@ public class GridDhtPartitionDemander {
d, cctx.ioPolicy(), cctx.config().getRebalanceTimeout());
}
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to send failover context cleanup request to node");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap2.java
index ce36a11..7d6f272 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap2.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap2.java
@@ -21,7 +21,6 @@ import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
@@ -327,4 +326,4 @@ public class GridDhtPartitionMap2 implements Comparable<GridDhtPartitionMap2>, E
@Override public String toString() {
return S.toString(GridDhtPartitionMap2.class, this, "size", size());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 2cfc0d0..a334fd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -749,7 +749,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
if (crd.isLocal()) {
if (remaining.isEmpty())
- onAllReceived(false);
+ onAllReceived();
}
else
sendPartitions(crd);
@@ -959,7 +959,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
try {
cctx.io().send(node, m, SYSTEM_POOL);
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Node left during partition exchange [nodeId=" + node.id() + ", exchId=" + exchId + ']');
}
@@ -1213,7 +1213,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
if (allReceived) {
awaitSingleMapUpdates();
- onAllReceived(false);
+ onAllReceived();
}
}
@@ -1256,9 +1256,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
}
/**
- * @param discoThread If {@code true} completes future from another thread (to do not block discovery thread).
*/
- private void onAllReceived(boolean discoThread) {
+ private void onAllReceived() {
try {
assert crd.isLocal();
@@ -1617,7 +1616,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
if (allReceived) {
awaitSingleMapUpdates();
- onAllReceived(true);
+ onAllReceived();
return;
}
@@ -1630,7 +1629,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
// It is possible that some nodes finished exchange with previous coordinator.
cctx.io().send(nodeId, req, SYSTEM_POOL);
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Node left during partition exchange [nodeId=" + nodeId +
", exchId=" + exchId + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 6ac55f8..7f3d147 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -191,7 +191,7 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
if (f.node().id().equals(nodeId)) {
found = true;
- f.onNodeLeft(new ClusterTopologyCheckedException("Remote node left grid (will retry): " + nodeId));
+ f.onNodeLeft();
}
}
@@ -387,7 +387,7 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
catch (IgniteCheckedException e) {
// Fail the whole thing.
if (e instanceof ClusterTopologyCheckedException)
- fut.onNodeLeft((ClusterTopologyCheckedException) e);
+ fut.onNodeLeft();
else
fut.onResult(e);
}
@@ -903,9 +903,8 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
}
/**
- * @param e Topology exception.
*/
- synchronized void onNodeLeft(ClusterTopologyCheckedException e) {
+ synchronized void onNodeLeft() {
if (remapped)
return;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index c464b36..6ff761e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -125,7 +125,7 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
break;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
entry = ctx.cache().entryEx(entry.key(), tx.topologyVersion());
txEntry.cached(entry);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index b314b81..a8b6550 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -143,7 +143,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
if (tx.onePhaseCommit()) {
tx.markForBackupCheck();
- onComplete(discoThread);
+ onComplete();
return;
}
@@ -163,7 +163,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
}
}
- onComplete(discoThread);
+ onComplete();
}
}
@@ -265,7 +265,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
ERR_UPD.compareAndSet(this, null, err);
- return onComplete(false);
+ return onComplete();
}
/**
@@ -279,10 +279,9 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
/**
* Completeness callback.
*
- * @param discoThread {@code True} if executed from discovery thread.
* @return {@code True} if future was finished by this call.
*/
- private boolean onComplete(boolean discoThread) {
+ private boolean onComplete() {
Throwable err0 = err;
if (err0 == null || tx.needCheckBackup())
@@ -732,7 +731,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
ERR_UPD.compareAndSet(this, null, new IgniteTxTimeoutCheckedException("Failed to acquire lock " +
"within provided timeout for transaction [timeout=" + tx.timeout() + ", tx=" + tx + ']'));
- onComplete(false);
+ onComplete();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index 9acab56..c5ee6fe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -595,7 +595,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
", ver=" + backup.version() + ']'));
}
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
mini.onNodeLeft(backupId, false);
}
catch (IgniteCheckedException e) {
@@ -766,7 +766,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
if (!wait)
fut.onDone();
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
// Remove previous mapping.
mappings.remove(m.node().id());
@@ -963,7 +963,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
try {
cctx.io().send(backup, req, tx.ioPolicy());
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
mini.onNodeLeft(backupId, discoThread);
}
catch (IgniteCheckedException e) {
@@ -1092,7 +1092,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
/** {@inheritDoc} */
@Override boolean onNodeLeft(UUID nodeId, boolean discoThread) {
- return onResponse(nodeId, discoThread);
+ return onResponse(nodeId);
}
/**
@@ -1100,15 +1100,14 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
* @param discoThread {@code True} if executed from discovery thread.
*/
void onDhtFinishResponse(UUID nodeId, boolean discoThread) {
- onResponse(nodeId, discoThread);
+ onResponse(nodeId);
}
/**
* @param nodeId Node ID.
- * @param discoThread {@code True} if executed from discovery thread.
* @return {@code True} if processed node response.
*/
- private boolean onResponse(UUID nodeId, boolean discoThread) {
+ private boolean onResponse(UUID nodeId) {
boolean done;
boolean ret;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
index a7dbe2a..0cd01fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
@@ -26,7 +26,6 @@ import org.apache.ignite.cache.query.annotations.QuerySqlFunction;
import org.apache.ignite.cache.query.annotations.QueryTextField;
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.internal.util.lang.GridCloseableIterator;
-import org.apache.ignite.lang.IgniteClosure;
import org.apache.ignite.lang.IgniteReducer;
import org.jetbrains.annotations.Nullable;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index 8256270..ff1ac7f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -21,11 +21,9 @@ import java.nio.ByteBuffer;
import java.util.LinkedHashMap;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.IgniteException;
import org.apache.ignite.internal.GridDirectTransient;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.A;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 10784fc..8927fb3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -1253,7 +1253,7 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
try {
cctx.io().send(node, msg, GridIoPolicy.SYSTEM_POOL);
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
IgniteLogger log = ctx.log(getClass());
if (log.isDebugEnabled())
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 fde1f52..1691fd7 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
@@ -886,7 +886,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
key.prepareMarshal(context().cacheObjectContext());
- val.marshal(ctx, context());
+ val.marshal(context());
if (transferExpiryPlc) {
if (expiryPlcBytes == null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index eaf1c87..7b7d56f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -527,7 +527,7 @@ public class IgniteTxHandler {
if (!aff1.equals(aff2))
return true;
}
- catch (IllegalStateException err) {
+ catch (IllegalStateException ignored) {
return true;
}
}
@@ -1318,7 +1318,7 @@ public class IgniteTxHandler {
else
assert !ctx.discovery().alive(nodeId) : nodeId;
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
if (txFinishMsgLog.isDebugEnabled()) {
txFinishMsgLog.debug("Failed to gain entry processor return value. [txId=" + nearTxId +
", dhtTxId=" + req.version() +
@@ -1498,7 +1498,7 @@ public class IgniteTxHandler {
break;
}
- catch (GridCacheEntryRemovedException e) {
+ catch (GridCacheEntryRemovedException ignored) {
if (log.isDebugEnabled())
log.debug("Got entry removed exception, will retry: " + entry.txKey());
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 3043ecc..4bdf94a 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
@@ -1185,7 +1185,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
break;
}
- catch (GridCacheEntryRemovedException rmvdErr) {
+ catch (GridCacheEntryRemovedException ignored) {
txEntry.cached(entryEx(cacheCtx, txEntry.txKey(), topVer));
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index 24f8ea9..a1a18fe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -31,7 +31,6 @@ import java.util.UUID;
import java.util.concurrent.ConcurrentMap;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteClientDisconnectedException;
-import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.cluster.ClusterNode;
@@ -282,7 +281,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
try {
cctx.io().send(nodeId, ackReq, GridIoPolicy.SYSTEM_POOL);
}
- catch (ClusterTopologyCheckedException e) {
+ catch (ClusterTopologyCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to send one phase commit ack to backup node because it left grid: " + nodeId);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
index 09b580b..76751de 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
@@ -40,7 +40,6 @@ import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.jetbrains.annotations.Nullable;
-import org.jsr166.ConcurrentLinkedHashMap;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
index 8e2d6bd..916e4af 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java
@@ -24,7 +24,6 @@ import org.apache.ignite.internal.IgniteCodeGeneratingFail;
import org.apache.ignite.internal.processors.cache.CacheObject;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.GridCacheOperation;
-import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
@@ -133,11 +132,10 @@ public class TxEntryValueHolder implements Message {
}
/**
- * @param sharedCtx Shared cache context.
* @param ctx Cache context.
* @throws org.apache.ignite.IgniteCheckedException If marshaling failed.
*/
- public void marshal(GridCacheSharedContext<?, ?> sharedCtx, GridCacheContext<?, ?> ctx)
+ public void marshal(GridCacheContext<?, ?> ctx)
throws IgniteCheckedException {
if (hasWriteVal && val != null)
val.prepareMarshal(ctx.cacheObjectContext());
@@ -248,4 +246,4 @@ public class TxEntryValueHolder implements Message {
@Override public byte fieldsCount() {
return 3;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 614c612..9f37f6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -231,7 +231,7 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
cctx.affinity().partition(obj, false) :
ctx.kernalContext().affinity().partition0(ctx.cacheName(), obj, null);
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
U.error(log, "Failed to get partition");
return -1;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
index a1900c8..8daef31 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockServer.java
@@ -73,7 +73,7 @@ public class GridClockServer {
try {
locHost = U.getLocalHost();
}
- catch (IOException e) {
+ catch (IOException ignored) {
locHost = InetAddress.getLoopbackAddress();
U.warn(log, "Failed to get local host address, will use loopback address: " + locHost);
@@ -219,4 +219,4 @@ public class GridClockServer {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
index fee4dd6..81ed662 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessor.java
@@ -21,7 +21,6 @@ import java.util.Collection;
import java.util.UUID;
import java.util.concurrent.DelayQueue;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteException;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
@@ -437,4 +436,4 @@ public class DataStreamProcessor<K, V> extends GridProcessorAdapter {
X.println(">>> Data streamer processor memory stats [grid=" + ctx.gridName() + ']');
X.println(">>> ldrsSize: " + ldrs.size());
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index bb9ffdd..cf7fa41 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -1651,9 +1651,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
}
GridDeployment dep = null;
- GridPeerDeployAware jobPda0 = null;
-
- jobPda0 = jobPda;
+ GridPeerDeployAware jobPda0 = jobPda;
if (ctx.deploy().enabled() && jobPda0 != null) {
try {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
index 7579ddb..8f7f7a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopClasspathUtils.java
@@ -69,7 +69,7 @@ public class HadoopClasspathUtils {
try {
res.add(file.toURI().toURL());
}
- catch (MalformedURLException e) {
+ catch (MalformedURLException ignored) {
throw new IOException("Failed to convert file path to URL: " + file.getPath());
}
}
@@ -421,4 +421,4 @@ public class HadoopClasspathUtils {
return normalize(name).equals(this.name);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
index c72140d..57bf70f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsProcessor.java
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.processors.igfs;
-import java.util.Set;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.cache.affinity.AffinityKeyMapper;
@@ -481,4 +480,4 @@ public class IgfsProcessor extends IgfsProcessorAdapter {
", loc" + propName + "=" + locVal +
", ggfName=" + igfsName + ']');
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientSizeCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientSizeCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientSizeCallable.java
index 474a940..928d65d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientSizeCallable.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientSizeCallable.java
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.processors.igfs.client;
-import org.apache.ignite.igfs.IgfsFile;
import org.apache.ignite.igfs.IgfsPath;
import org.apache.ignite.internal.processors.igfs.IgfsContext;
import org.apache.ignite.internal.util.typedef.internal.S;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
index 8b4eb75..38cf36b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java
@@ -22,7 +22,6 @@ import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgnitionEx;
-import org.apache.ignite.internal.logger.platform.PlatformLogger;
import org.apache.ignite.internal.processors.platform.memory.PlatformExternalMemory;
import org.apache.ignite.internal.processors.platform.memory.PlatformInputStream;
import org.apache.ignite.internal.processors.resource.GridSpringResourceContext;
@@ -77,4 +76,4 @@ public abstract class PlatformAbstractBootstrap implements PlatformBootstrap {
protected void processInput(PlatformInputStream input, IgniteConfiguration cfg) {
// No-op.
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformConfigurationEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformConfigurationEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformConfigurationEx.java
index 8f7c93b..1c791f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformConfigurationEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformConfigurationEx.java
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.processors.platform;
-import org.apache.ignite.internal.logger.platform.PlatformLogger;
import org.apache.ignite.internal.processors.platform.cache.PlatformCacheExtension;
import org.apache.ignite.internal.logger.platform.PlatformLogger;
import org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway;
@@ -59,4 +58,4 @@ public interface PlatformConfigurationEx {
* @return Available cache extensions.
*/
@Nullable public Collection<PlatformCacheExtension> cacheExtensions();
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index cc09f5e..2abcc0d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -838,16 +838,16 @@ public class PlatformCache extends PlatformAbstractTarget {
throws IgniteCheckedException {
switch (type) {
case OP_QRY_SQL:
- return runQuery(reader, readSqlQuery(reader));
+ return runQuery(readSqlQuery(reader));
case OP_QRY_SQL_FIELDS:
- return runFieldsQuery(reader, readFieldsQuery(reader));
+ return runFieldsQuery(readFieldsQuery(reader));
case OP_QRY_TXT:
- return runQuery(reader, readTextQuery(reader));
+ return runQuery(readTextQuery(reader));
case OP_QRY_SCAN:
- return runQuery(reader, readScanQuery(reader));
+ return runQuery(readScanQuery(reader));
case OP_QRY_CONTINUOUS: {
long ptr = reader.readLong();
@@ -1180,7 +1180,7 @@ public class PlatformCache extends PlatformAbstractTarget {
/**
* Runs specified query.
*/
- private PlatformQueryCursor runQuery(BinaryRawReaderEx reader, Query qry) throws IgniteCheckedException {
+ private PlatformQueryCursor runQuery(Query qry) throws IgniteCheckedException {
try {
QueryCursorEx cursor = (QueryCursorEx) cache.query(qry);
@@ -1196,7 +1196,7 @@ public class PlatformCache extends PlatformAbstractTarget {
/**
* Runs specified fields query.
*/
- private PlatformFieldsQueryCursor runFieldsQuery(BinaryRawReaderEx reader, Query qry)
+ private PlatformFieldsQueryCursor runFieldsQuery(Query qry)
throws IgniteCheckedException {
try {
QueryCursorEx cursor = (QueryCursorEx) cache.query(qry);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
index 526e222..5971b6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
@@ -674,7 +674,7 @@ public class PlatformUtils {
try {
innerMsg = e.getMessage();
}
- catch (Exception innerErr) {
+ catch (Exception ignored) {
innerMsg = "Exception message is not available.";
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 3286bac..a239ee2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -490,7 +490,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
return;
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
U.warn(log, "Interrupted while waiting for active queries cancellation.");
Thread.currentThread().interrupt();
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
index 84d07b6..6ebff42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceProcessor.java
@@ -20,7 +20,7 @@ package org.apache.ignite.internal.processors.resource;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.Collection;
+
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cache.store.CacheStoreSession;
import org.apache.ignite.compute.ComputeJob;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index a8062ca..31dac12 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -57,10 +57,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
import org.apache.ignite.internal.processors.cache.query.GridCacheSqlMetadata;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.rest.GridRestCommand;
import org.apache.ignite.internal.processors.rest.GridRestResponse;
-import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandler;
import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandlerAdapter;
import org.apache.ignite.internal.processors.rest.request.GridRestCacheRequest;
import org.apache.ignite.internal.processors.rest.request.GridRestRequest;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
index 8a7adf4..7caadb8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
@@ -88,7 +88,7 @@ public class GridRedisSetCommandHandler extends GridRedisRestCommandHandler {
try {
l.close();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
U.warn(log, "Failed to remove atomic long for key [" + msg.key() + "]");
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
index d89e80b..d18ea5f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
@@ -1293,7 +1293,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject {
nodeId + ", taskName=" + ses.getTaskName() +
", taskSesId=" + ses.getId() + ", jobSesId=" + res.getJobContext().getJobId() + ']', e);
}
- catch (IgniteClientDisconnectedCheckedException e0) {
+ catch (IgniteClientDisconnectedCheckedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to send cancel request to node, client disconnected [nodeId=" +
nodeId + ", taskName=" + ses.getTaskName() + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
index a11b0b1..b8b9017 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
@@ -106,7 +106,7 @@ public class GridStripedSpinBusyLock {
try {
Thread.sleep(10);
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
interrupt = true;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java b/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
index 60ace9c..3c63246 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/HostAndPortRange.java
@@ -113,7 +113,7 @@ public class HostAndPortRange {
return port;
}
- catch (NumberFormatException e) {
+ catch (NumberFormatException ignored) {
throw createParseError(addrStr, errMsgPrefix, "port range contains invalid port " + portStr);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 3dfb3c6..653302c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -235,7 +235,6 @@ import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
import sun.misc.SharedSecrets;
import sun.misc.URLClassPath;
-import sun.misc.Unsafe;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISABLE_HOSTNAME_VERIFIER;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_HOME;
@@ -9475,7 +9474,7 @@ public abstract class IgniteUtils {
return fld;
}
- catch (NoSuchFieldException e) {
+ catch (NoSuchFieldException ignored) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java b/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
index e9ec74b..201cb34 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
@@ -433,7 +433,7 @@ public class StripedExecutor implements ExecutorService {
}
}
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
stopping = true;
Thread.currentThread().interrupt();
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
index 9f7652b..cb10c1c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
@@ -25,7 +25,6 @@ import java.util.Map;
import org.apache.ignite.configuration.FileSystemConfiguration;
import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration;
import org.apache.ignite.igfs.IgfsMode;
-import org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem;
import org.apache.ignite.internal.LessNamingBean;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.jetbrains.annotations.Nullable;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
index 06b7109..2ecdc8e 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/JdkMarshaller.java
@@ -17,7 +17,6 @@
package org.apache.ignite.marshaller.jdk;
-import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
index 160f2c1..fd885f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedClassDescriptor.java
@@ -882,7 +882,7 @@ class OptimizedClassDescriptor {
return new Fields(fields);
}
- catch (Exception e) {
+ catch (Exception ignored) {
return fields;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
index 923f385..849afa5 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshallerUtils.java
@@ -159,7 +159,7 @@ class OptimizedMarshallerUtils {
try {
mapOff = GridUnsafe.objectFieldOffset(HashSet.class.getDeclaredField("map"));
}
- catch (NoSuchFieldException e) {
+ catch (NoSuchFieldException ignored) {
try {
// Workaround for legacy IBM JRE.
mapOff = GridUnsafe.objectFieldOffset(HashSet.class.getDeclaredField("backingMap"));
@@ -307,7 +307,7 @@ class OptimizedMarshallerUtils {
}
}
}
- catch (NoSuchFieldException e) {
+ catch (NoSuchFieldException ignored) {
// No-op.
}
catch (IllegalAccessException e) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index ae0e6f0..ddc7687 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -3771,7 +3771,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
e);
}
}
- catch (IgniteClientDisconnectedException e0) {
+ catch (IgniteClientDisconnectedException ignored) {
if (log.isDebugEnabled())
log.debug("Failed to ping node, client disconnected.");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
index c56e18c..9271314 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
@@ -17,7 +17,6 @@
package org.apache.ignite.spi.communication.tcp;
-import org.apache.ignite.internal.util.nio.GridNioServer;
import org.apache.ignite.mxbean.MXBeanDescription;
import org.apache.ignite.spi.IgniteSpiManagementMBean;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index 8928f28..6fff07f 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -632,7 +632,7 @@ class ClientImpl extends TcpDiscoveryImpl {
spi.writeToSocket(sock, msg, timeoutHelper.nextTimeoutChunk(spi.getSocketTimeout()));
- spi.stats.onMessageSent(msg, U.currentTimeMillis() - tstamp, 0);
+ spi.stats.onMessageSent(msg, U.currentTimeMillis() - tstamp);
if (log.isDebugEnabled())
log.debug("Message has been sent to address [msg=" + msg + ", addr=" + addr +
@@ -1119,7 +1119,7 @@ class ClientImpl extends TcpDiscoveryImpl {
}
}
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Client socket writer interrupted.");
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 7cc35e4..f491201 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
@@ -18,7 +18,6 @@
package org.apache.ignite.spi.discovery.tcp;
import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectStreamException;
@@ -1190,7 +1189,7 @@ class ServerImpl extends TcpDiscoveryImpl {
int receipt = spi.readReceipt(sock, timeoutHelper.nextTimeoutChunk(ackTimeout0));
- spi.stats.onMessageSent(msg, tstamp0 - tstamp, U.currentTimeMillis() - tstamp0);
+ spi.stats.onMessageSent(msg, tstamp0 - tstamp);
return receipt;
}
@@ -2939,7 +2938,7 @@ class ServerImpl extends TcpDiscoveryImpl {
int res = spi.readReceipt(sock, timeoutHelper.nextTimeoutChunk(ackTimeout0));
- spi.stats.onMessageSent(pendingMsg, tstamp0 - tstamp, U.currentTimeMillis() - tstamp0);
+ spi.stats.onMessageSent(pendingMsg, tstamp0 - tstamp);
if (log.isDebugEnabled())
log.debug("Pending message has been sent to next node [msgId=" + msg.id() +
@@ -2988,7 +2987,7 @@ class ServerImpl extends TcpDiscoveryImpl {
int res = spi.readReceipt(sock, timeoutHelper.nextTimeoutChunk(ackTimeout0));
- spi.stats.onMessageSent(msg, tstamp0 - tstamp, U.currentTimeMillis() - tstamp0);
+ spi.stats.onMessageSent(msg, tstamp0 - tstamp);
onMessageExchanged();
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
index c790644..485e7a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
@@ -309,12 +309,10 @@ public class TcpDiscoveryStatistics {
/**
* Called by coordinator when ring message is sent.
- *
- * @param msg Sent message.
+ * @param msg Sent message.
* @param time Time taken to serialize message.
- * @param ackTime Time taken to receive message acknowledge.
*/
- public synchronized void onMessageSent(TcpDiscoveryAbstractMessage msg, long time, long ackTime) {
+ public synchronized void onMessageSent(TcpDiscoveryAbstractMessage msg, long time) {
assert msg != null;
assert time >= 0 : time;
@@ -693,4 +691,4 @@ public class TcpDiscoveryStatistics {
@Override public synchronized String toString() {
return S.toString(TcpDiscoveryStatistics.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
index 1de44f7..e890109 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java
@@ -401,8 +401,6 @@ public abstract class CacheJdbcPojoStoreAbstractSelfTest extends GridCommonAbstr
Connection conn = getConnection();
try {
- Random rnd = new Random();
-
PreparedStatement stmt = conn.prepareStatement("SELECT ID, ORG_ID, BIRTHDAY, NAME, GENDER FROM PERSON WHERE ID = ?");
stmt.setInt(1, -1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
index 849cab7..4a0b1da 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreTest.java
@@ -25,7 +25,6 @@ import java.sql.Timestamp;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Random;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import javax.cache.integration.CacheWriterException;
@@ -234,8 +233,6 @@ public class CacheJdbcPojoStoreTest extends GridAbstractCacheStoreSelfTest<Cache
public void testLoadCache() throws Exception {
Connection conn = store.openConnection(false);
- Random rnd = new Random();
-
PreparedStatement orgStmt = conn.prepareStatement("INSERT INTO Organization(id, name, city) VALUES (?, ?, ?)");
for (int i = 0; i < ORGANIZATION_CNT; i++) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
index bba83b9..d025192 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java
@@ -75,7 +75,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
try {
assertEquals(0, ignite.cluster().forHost(null, null, null).nodes().size());
}
- catch (NullPointerException e) {
+ catch (NullPointerException ignored) {
gotNpe = true;
}
finally {
@@ -99,7 +99,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
try {
clusterHosts.add("valueShouldNotToBeAdded");
}
- catch (UnsupportedOperationException e) {
+ catch (UnsupportedOperationException ignored) {
gotNpe = true;
}
finally {
@@ -140,4 +140,4 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java
index 2718ed9..7d9e69d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java
@@ -132,7 +132,7 @@ public class ComputeJobCancelWithServiceSelfTest extends GridCommonAbstractTest
svc.hello();
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java
index 98e3c5a..88667d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java
@@ -223,7 +223,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest {
try {
jobCtx.holdcc();
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
success = true;
log.info("Second holdcc() threw IllegalStateException as expected.");
}
@@ -483,4 +483,4 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest {
return results == null ? 0 : results.size();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
index 0619391..cb04f55 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java
@@ -163,7 +163,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe
List<Event> evts = pullEvents(tstamp, 10);
return evts.get(evts.size() - 1).type() == EVT_JOB_FINISHED;
}
- catch (Exception e) {
+ catch (Exception ignored) {
return false;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java
index a5f617d..47f7d2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectApiExceptionTest.java
@@ -706,7 +706,7 @@ public class IgniteClientReconnectApiExceptionTest extends IgniteClientReconnect
try {
assertTrue(recvLatch.await(2, SECONDS));
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
fail("Message wasn't received.");
}
@@ -751,7 +751,7 @@ public class IgniteClientReconnectApiExceptionTest extends IgniteClientReconnect
try {
assertEquals(42, (int)fut.get());
}
- catch (Exception e) {
+ catch (Exception ignored) {
fail("Failed submit task.");
}
@@ -864,4 +864,4 @@ public class IgniteClientReconnectApiExceptionTest extends IgniteClientReconnect
stopAllGrids();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
index 7e217b7..79ba739 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectFailoverAbstractTest.java
@@ -201,7 +201,7 @@ public abstract class IgniteClientReconnectFailoverAbstractTest extends IgniteCl
try {
barrier.await(10, SECONDS);
}
- catch (TimeoutException e) {
+ catch (TimeoutException ignored) {
err = "Operations hang or fail with unexpected error.";
break;
@@ -235,4 +235,4 @@ public abstract class IgniteClientReconnectFailoverAbstractTest extends IgniteCl
stop.set(true);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
index 31b4bc7..031fad9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java
@@ -32,7 +32,6 @@ import org.apache.ignite.events.EventType;
import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
-import org.apache.ignite.internal.processors.cache.GridCacheUtils;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.lang.IgnitePredicate;
@@ -293,4 +292,4 @@ public class GridDiscoveryManagerAliveCacheSelfTest extends GridCommonAbstractTe
G.stop(g.name(), false);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java
index ba8fa5b..33adb59 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java
@@ -160,7 +160,7 @@ public abstract class GridDiscoveryManagerAttributesSelfTest extends GridCommonA
if (fail)
fail("Node should not join");
}
- catch (Exception e) {
+ catch (Exception ignored) {
if (!fail)
fail("Node should join");
}
@@ -215,7 +215,7 @@ public abstract class GridDiscoveryManagerAttributesSelfTest extends GridCommonA
if (fail)
fail("Node should not join");
}
- catch (Exception e) {
+ catch (Exception ignored) {
if (!fail)
fail("Node should join");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
index 824481b..3ebf2da 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
@@ -43,7 +43,6 @@ import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
index 92e2b9b..6fa893c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
@@ -175,8 +175,8 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest {
while (!fut.isDone())
client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key, null));
}
- catch (ClusterTopologyException ignore) {
- log.info("Expected error: " + ignore);
+ catch (ClusterTopologyException e) {
+ log.info("Expected error: " + e);
}
finally {
stopAllGrids();
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
index 2eab6d9..86bf70e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
@@ -283,7 +283,7 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes
tx.commit();
}
- catch (TransactionOptimisticException e) {
+ catch (TransactionOptimisticException ignored) {
assertTrue("Should not throw optimistic exception in only read TX. Tx isolation: "
+ txIsolation, false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
index e9be108..ac61091 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
@@ -969,7 +969,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
fail();
}
- catch (TransactionOptimisticException e) {
+ catch (TransactionOptimisticException ignored) {
// Expected exception.
}
@@ -2921,7 +2921,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
tx.commit();
}
- catch (TransactionOptimisticException e) {
+ catch (TransactionOptimisticException ignored) {
continue;
}
@@ -2982,7 +2982,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
tx.commit();
}
- catch (TransactionOptimisticException e) {
+ catch (TransactionOptimisticException ignored) {
continue;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java
index c7cd5ea..53cd621 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java
@@ -77,7 +77,7 @@ public class CacheStartupInDeploymentModesTest extends GridCommonAbstractTest {
deploymentMode = DeploymentMode.ISOLATED;
marshaller = new OptimizedMarshaller();
- doCheckFailed(deploymentMode);
+ doCheckFailed();
}
/**
@@ -87,7 +87,7 @@ public class CacheStartupInDeploymentModesTest extends GridCommonAbstractTest {
deploymentMode = DeploymentMode.PRIVATE;
marshaller = new OptimizedMarshaller();
- doCheckFailed(deploymentMode);
+ doCheckFailed();
}
/**
@@ -133,10 +133,9 @@ public class CacheStartupInDeploymentModesTest extends GridCommonAbstractTest {
}
/**
- * @param mode Deployment mode.
* @throws Exception If failed.
*/
- private void doCheckFailed(DeploymentMode mode) throws Exception {
+ private void doCheckFailed() throws Exception {
try {
startGridsMultiThreaded(2);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
index 515ae87..83dd244 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -743,7 +743,7 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
fail();
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
// No-op;
}
}
@@ -773,8 +773,8 @@ public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
fail();
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
// No-op.
}
}
-}
\ No newline at end of file
+}
[07/32] ignite git commit: JavaDoc for eager TTL
Posted by yz...@apache.org.
JavaDoc for eager TTL
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6015603c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6015603c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6015603c
Branch: refs/heads/ignite-comm-balance-master
Commit: 6015603c4b7a209169ead31b13d9daab2476eda6
Parents: c1466d8
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Fri Jan 27 16:43:01 2017 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Fri Jan 27 16:43:01 2017 -0800
----------------------------------------------------------------------
.../java/org/apache/ignite/configuration/CacheConfiguration.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6015603c/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 56fc5b4..0656dda 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -794,7 +794,9 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
- * Gets flag indicating whether expired cache entries will be eagerly removed from cache. When
+ * Gets flag indicating whether expired cache entries will be eagerly removed from cache.
+ * If there is at least one cache configured with this flag set to {@code true}, Ignite
+ * will create a single thread to clean up expired entries in background. When flag is
* set to {@code false}, expired entries will be removed on next entry access.
* <p>
* When not set, default value is {@link #DFLT_EAGER_TTL}.
[03/32] ignite git commit: IGNITE-4622 Fixed generation in domain
model for cache store.
Posted by yz...@apache.org.
IGNITE-4622 Fixed generation in domain model for cache store.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/43007d54
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/43007d54
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/43007d54
Branch: refs/heads/ignite-comm-balance-master
Commit: 43007d5473729ef6bc99043fdbd943381c74bc38
Parents: 23c4918
Author: Andrey Novikov <an...@gridgain.com>
Authored: Fri Jan 27 11:30:49 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Fri Jan 27 11:30:49 2017 +0700
----------------------------------------------------------------------
.../configuration/generator/ConfigurationGenerator.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/43007d54/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
index de2b750..670b828 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -48,6 +48,10 @@ export default class IgniteConfigurationGenerator {
return new Bean('org.apache.ignite.cache.QueryEntity', 'qryEntity', domain, cacheDflts);
}
+ static domainJdbcTypeBean(domain) {
+ return new Bean('org.apache.ignite.cache.store.jdbc.JdbcType', 'type', domain);
+ }
+
static discoveryConfigurationBean(discovery) {
return new Bean('org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi', 'discovery', discovery, clusterDflts.discovery);
}
@@ -1383,7 +1387,7 @@ export default class IgniteConfigurationGenerator {
}
// Generate domain model for store group.
- static domainStore(domain, cfg = this.domainConfigurationBean(domain)) {
+ static domainStore(domain, cfg = this.domainJdbcTypeBean(domain)) {
cfg.stringProperty('databaseSchema')
.stringProperty('databaseTable');
@@ -1562,8 +1566,7 @@ export default class IgniteConfigurationGenerator {
if (_.isNil(domain.databaseTable))
return acc;
- const typeBean = new Bean('org.apache.ignite.cache.store.jdbc.JdbcType', 'type',
- _.merge({}, domain, {cacheName: cache.name}))
+ const typeBean = this.domainJdbcTypeBean(_.merge({}, domain, {cacheName: cache.name}))
.stringProperty('cacheName');
setType(typeBean, 'keyType');
[21/32] ignite git commit: IGNITE-4046: Added DML support to CPP
platform. This closes #1432.
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/config/cache-identity.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-identity.xml b/modules/platforms/cpp/core-test/config/cache-identity.xml
new file mode 100644
index 0000000..ace9f6a
--- /dev/null
+++ b/modules/platforms/cpp/core-test/config/cache-identity.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ Ignite Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="localHost" value="127.0.0.1"/>
+ <property name="connectorConfiguration"><null/></property>
+
+ <property name="cacheConfiguration">
+ <list>
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="name" value="cache1"/>
+ <property name="cacheMode" value="PARTITIONED"/>
+ <property name="atomicityMode" value="TRANSACTIONAL"/>
+ <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+
+ <!-- Configure type metadata to enable queries. -->
+ <property name="queryEntities">
+ <list>
+ <bean class="org.apache.ignite.cache.QueryEntity">
+ <property name="keyType" value="CompositeKey"/>
+ <property name="valueType" value="java.lang.Integer"/>
+
+ <property name="fields">
+ <map>
+ <entry key="str" value="java.lang.String"/>
+ <entry key="ts" value="java.sql.Timestamp"/>
+ <entry key="guid" value="java.util.UUID"/>
+ </map>
+ </property>
+
+ <property name="keyFields">
+ <list>
+ <value>str</value>
+ <value>ts</value>
+ <value>guid</value>
+ </list>
+ </property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="name" value="cache2"/>
+ <property name="cacheMode" value="PARTITIONED"/>
+ <property name="atomicityMode" value="TRANSACTIONAL"/>
+ <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+
+ <!-- Configure type metadata to enable queries. -->
+ <property name="queryEntities">
+ <list>
+ <bean class="org.apache.ignite.cache.QueryEntity">
+ <property name="keyType" value="CompositeKeySimple"/>
+ <property name="valueType" value="java.lang.Integer"/>
+
+ <property name="fields">
+ <map>
+ <entry key="str" value="java.lang.String"/>
+ <entry key="ts" value="java.sql.Timestamp"/>
+ <entry key="i64" value="java.lang.Long"/>
+ </map>
+ </property>
+
+ <property name="keyFields">
+ <list>
+ <value>str</value>
+ <value>ts</value>
+ <value>i64</value>
+ </list>
+ </property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+ </list>
+ </property>
+
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+ <property name="addresses">
+ <list>
+ <!-- In distributed environment, replace with actual host IP address. -->
+ <value>127.0.0.1:47500</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ <property name="socketTimeout" value="300" />
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/config/cache-query.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-query.xml b/modules/platforms/cpp/core-test/config/cache-query.xml
index dead2b1..bb18f7c 100644
--- a/modules/platforms/cpp/core-test/config/cache-query.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query.xml
@@ -69,16 +69,6 @@
</list>
</property>
</bean>
-
- <bean class="org.apache.ignite.cache.CacheTypeMetadata">
- <property name="valueType" value="QueryRelation"/>
- <property name="queryFields">
- <map>
- <entry key="personId" value="java.lang.Integer"/>
- <entry key="someVal" value="java.lang.Integer"/>
- </map>
- </property>
- </bean>
</list>
</property>
</bean>
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/include/ignite/test_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/ignite/test_utils.h b/modules/platforms/cpp/core-test/include/ignite/test_utils.h
new file mode 100644
index 0000000..2336626
--- /dev/null
+++ b/modules/platforms/cpp/core-test/include/ignite/test_utils.h
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+#ifndef _IGNITE_CORE_TEST_TEST_UTILS
+#define _IGNITE_CORE_TEST_TEST_UTILS
+
+#include "ignite/ignition.h"
+
+namespace ignite_test
+{
+ /**
+ * Initialize configuration for a node.
+ *
+ * Inits Ignite node configuration from specified config file.
+ * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_CONFIG_PATH
+ * environmental variable.
+ *
+ * @param cfg Ignite config.
+ * @param cfgFile Ignite node config file name without path.
+ */
+ void InitConfig(ignite::IgniteConfiguration& cfg, const char* cfgFile);
+
+ /**
+ * Start Ignite node.
+ *
+ * Starts new Ignite node from specified config file.
+ * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_CONFIG_PATH
+ * environmental variable.
+ *
+ * @param cfgFile Ignite node config file name without path.
+ * @return New node.
+ */
+ ignite::Ignite StartNode(const char* cfgFile);
+
+ /**
+ * Start Ignite node.
+ *
+ * Starts new Ignite node with the specified name and from specified config file.
+ * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_CONFIG_PATH
+ * environmental variable.
+ *
+ * @param cfgFile Ignite node config file name without path.
+ * @param name Node name.
+ * @return New node.
+ */
+ ignite::Ignite StartNode(const char* cfgFile, const char* name);
+}
+
+#endif // _IGNITE_CORE_TEST_TEST_UTILS
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
index 634ede2..d39746e 100644
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
@@ -33,12 +33,14 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <None Include="..\..\config\cache-identity.xml" />
<None Include="..\..\config\cache-query.xml" />
<None Include="..\..\config\cache-test.xml" />
<None Include="..\..\config\invalid.xml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\binary_object_test.cpp" />
+ <ClCompile Include="..\..\src\binary_identity_resolver_test.cpp" />
<ClCompile Include="..\..\src\cache_test.cpp" />
<ClCompile Include="..\..\src\concurrent_test.cpp" />
<ClCompile Include="..\..\src\decimal_test.cpp" />
@@ -59,6 +61,7 @@
<ClCompile Include="..\..\src\reference_test.cpp" />
<ClCompile Include="..\..\src\teamcity_boost.cpp" />
<ClCompile Include="..\..\src\teamcity_messages.cpp" />
+ <ClCompile Include="..\..\src\test_utils.cpp" />
<ClCompile Include="..\..\src\transactions_test.cpp" />
</ItemGroup>
<ItemGroup>
@@ -66,6 +69,7 @@
<ClInclude Include="..\..\include\ignite\binary_test_utils.h" />
<ClInclude Include="..\..\include\ignite\complex_type.h" />
<ClInclude Include="..\..\include\ignite\test_type.h" />
+ <ClInclude Include="..\..\include\ignite\test_utils.h" />
<ClInclude Include="..\..\include\teamcity_messages.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
index 906a9d4..22048b1 100644
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
@@ -67,6 +67,12 @@
<ClCompile Include="..\..\src\binary_object_test.cpp">
<Filter>Code</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\binary_identity_resolver_test.cpp">
+ <Filter>Code</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\test_utils.cpp">
+ <Filter>Code</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\teamcity_messages.h">
@@ -84,6 +90,9 @@
<ClInclude Include="..\..\include\ignite\binary_test_defs.h">
<Filter>Code</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\ignite\test_utils.h">
+ <Filter>Code</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Code">
@@ -98,6 +107,9 @@
<Filter Include="Code\Types">
<UniqueIdentifier>{fb43524e-3694-44ee-b153-770cd9cf6c7a}</UniqueIdentifier>
</Filter>
+ <Filter Include="Code\Types">
+ <UniqueIdentifier>{fb43524e-3694-44ee-b153-770cd9cf6c7a}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<None Include="..\..\config\cache-test.xml">
@@ -109,5 +121,8 @@
<None Include="..\..\config\invalid.xml">
<Filter>Configs</Filter>
</None>
+ <None Include="..\..\config\cache-identity.xml">
+ <Filter>Configs</Filter>
+ </None>
</ItemGroup>
</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp b/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
new file mode 100644
index 0000000..6cede4e
--- /dev/null
+++ b/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
@@ -0,0 +1,522 @@
+/*
+ * 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.
+ */
+
+#ifndef _MSC_VER
+ #define BOOST_TEST_DYN_LINK
+#endif
+
+#include <sstream>
+
+#include <boost/test/unit_test.hpp>
+
+#include <ignite/common/utils.h>
+
+#include "ignite/cache/cache.h"
+#include "ignite/cache/query/query_cursor.h"
+#include "ignite/cache/query/query_sql_fields.h"
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+#include "ignite/binary/binary_array_identity_resolver.h"
+
+#include "ignite/test_utils.h"
+
+
+using namespace boost::unit_test;
+
+using namespace ignite;
+using namespace ignite::cache;
+using namespace ignite::cache::query;
+using namespace ignite::common;
+using namespace ignite::binary;
+using namespace ignite::impl::interop;
+using namespace ignite::impl::binary;
+
+/**
+ * Composite key class.
+ */
+struct CompositeKey
+{
+ /**
+ * Default constructor.
+ */
+ CompositeKey() :
+ str(),
+ ts(),
+ guid()
+ {
+ // No-op.
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param str String part.
+ * @param ts Timestamp part.
+ * @param guid Guid part.
+ */
+ CompositeKey(const std::string& str, const Timestamp& ts, const Guid& guid) :
+ str(str),
+ ts(ts),
+ guid(guid)
+ {
+ // No-op.
+ }
+
+ /** String part. */
+ std::string str;
+
+ /** Timestamp. */
+ Timestamp ts;
+
+ /** Guid. */
+ Guid guid;
+};
+
+/**
+ * Simple composite key class.
+ */
+struct CompositeKeySimple
+{
+ /**
+ * Default constructor.
+ */
+ CompositeKeySimple() :
+ str(),
+ ts(),
+ i64(0)
+ {
+ // No-op.
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param str String part.
+ * @param ts Timestamp part.
+ * @param i64 Integer part.
+ */
+ CompositeKeySimple(const std::string& str, const Timestamp& ts, int64_t i64) :
+ str(str),
+ ts(ts),
+ i64(i64)
+ {
+ // No-op.
+ }
+
+ /** String part. */
+ std::string str;
+
+ /** Timestamp. */
+ Timestamp ts;
+
+ /** Integer 64-bit. */
+ int64_t i64;
+};
+
+struct TestUserClassBase
+{
+ int32_t field;
+};
+
+struct DefaultHashing : TestUserClassBase {};
+struct GetHashDefined : TestUserClassBase {};
+struct ResolverDefined : TestUserClassBase {};
+struct BothDefined : TestUserClassBase {};
+
+struct CustomIdResolver : binary::BinaryIdentityResolver
+{
+ int32_t GetHashCode(const BinaryObject& obj)
+ {
+ int32_t field;
+ try
+ {
+ ResolverDefined res = obj.Deserialize<ResolverDefined>();
+
+ field = res.field;
+ }
+ catch (const IgniteError&)
+ {
+ BothDefined res = obj.Deserialize<BothDefined>();
+
+ field = res.field;
+ }
+
+ return field * 42;
+ }
+};
+
+namespace ignite
+{
+ namespace binary
+ {
+ template<>
+ struct BinaryType<DefaultHashing>
+ {
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(DefaultHashing)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(DefaultHashing)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+ IGNITE_BINARY_IS_NULL_FALSE(DefaultHashing)
+ IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(DefaultHashing)
+
+ void Write(BinaryWriter& writer, const DefaultHashing& obj)
+ {
+ writer.WriteInt32("field", obj.field);
+ }
+
+ DefaultHashing Read(BinaryReader& reader)
+ {
+ DefaultHashing val;
+
+ val.field = reader.ReadInt32("field");
+
+ return val;
+ }
+ };
+
+ template<>
+ struct BinaryType<GetHashDefined>
+ {
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(GetHashDefined)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(GetHashDefined)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+ IGNITE_BINARY_IS_NULL_FALSE(GetHashDefined)
+ IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(GetHashDefined)
+
+ int32_t GetHashCode(const GetHashDefined& obj)
+ {
+ return obj.field * 10;
+ }
+
+ void Write(BinaryWriter& writer, const GetHashDefined& obj)
+ {
+ writer.WriteInt32("field", obj.field);
+ }
+
+ GetHashDefined Read(BinaryReader& reader)
+ {
+ GetHashDefined val;
+
+ val.field = reader.ReadInt32("field");
+
+ return val;
+ }
+ };
+
+ template<>
+ struct BinaryType<ResolverDefined>
+ {
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(ResolverDefined)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(ResolverDefined)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+ IGNITE_BINARY_IS_NULL_FALSE(ResolverDefined)
+ IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(ResolverDefined)
+
+ ignite::Reference<ignite::binary::BinaryIdentityResolver> GetIdentityResolver()
+ {
+ return ignite::MakeReferenceFromCopy(CustomIdResolver());
+ }
+
+ void Write(BinaryWriter& writer, const ResolverDefined& obj)
+ {
+ writer.WriteInt32("field", obj.field);
+ }
+
+ ResolverDefined Read(BinaryReader& reader)
+ {
+ ResolverDefined val;
+
+ val.field = reader.ReadInt32("field");
+
+ return val;
+ }
+ };
+
+ template<>
+ struct BinaryType<BothDefined>
+ {
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(BothDefined)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(BothDefined)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+ IGNITE_BINARY_IS_NULL_FALSE(BothDefined)
+ IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(BothDefined)
+
+ int32_t GetHashCode(const GetHashDefined& obj)
+ {
+ return obj.field * 10;
+ }
+
+ ignite::Reference<ignite::binary::BinaryIdentityResolver> GetIdentityResolver()
+ {
+ return ignite::MakeReferenceFromCopy(CustomIdResolver());
+ }
+
+ void Write(BinaryWriter& writer, const BothDefined& obj)
+ {
+ writer.WriteInt32("field", obj.field);
+ }
+
+ BothDefined Read(BinaryReader& reader)
+ {
+ BothDefined val;
+
+ val.field = reader.ReadInt32("field");
+
+ return val;
+ }
+ };
+
+
+ /**
+ * Binary type definition for CompositeKey.
+ */
+ template<>
+ struct BinaryType<CompositeKey>
+ {
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(CompositeKey)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(CompositeKey)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+ IGNITE_BINARY_IS_NULL_FALSE(CompositeKey)
+ IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(CompositeKey)
+
+ void Write(BinaryWriter& writer, const CompositeKey& obj)
+ {
+ writer.WriteString("str", obj.str);
+ writer.WriteTimestamp("ts", obj.ts);
+ writer.WriteGuid("guid", obj.guid);
+ }
+
+ CompositeKey Read(BinaryReader& reader)
+ {
+ CompositeKey val;
+
+ val.str = reader.ReadString("str");
+ val.ts = reader.ReadTimestamp("ts");
+ val.guid = reader.ReadGuid("guid");
+
+ return val;
+ }
+ };
+
+ /**
+ * Binary type definition for CompositeKey.
+ */
+ template<>
+ struct BinaryType<CompositeKeySimple>
+ {
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(CompositeKeySimple)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(CompositeKeySimple)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+ IGNITE_BINARY_IS_NULL_FALSE(CompositeKeySimple)
+ IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(CompositeKeySimple)
+
+ void Write(BinaryWriter& writer, const CompositeKeySimple& obj)
+ {
+ writer.WriteString("str", obj.str);
+ writer.WriteTimestamp("ts", obj.ts);
+ writer.WriteInt64("i64", obj.i64);
+ }
+
+ CompositeKeySimple Read(BinaryReader& reader)
+ {
+ CompositeKeySimple val;
+
+ val.str = reader.ReadString("str");
+ val.ts = reader.ReadTimestamp("ts");
+ val.i64 = reader.ReadInt64("i64");
+
+ return val;
+ }
+ };
+ }
+}
+
+/**
+ * Test setup fixture.
+ */
+struct BinaryIdentityResolverTestSuiteFixture
+{
+ /**
+ * Constructor.
+ */
+ BinaryIdentityResolverTestSuiteFixture()
+ {
+ // No-op.
+ }
+
+ /**
+ * Destructor.
+ */
+ ~BinaryIdentityResolverTestSuiteFixture()
+ {
+ Ignition::StopAll(true);
+ }
+};
+
+template<typename T>
+void FillMem(InteropMemory& mem, const T& value)
+{
+ InteropOutputStream stream(&mem);
+ BinaryWriterImpl writer(&stream, 0);
+
+ writer.WriteObject<T>(value);
+
+ stream.Synchronize();
+}
+
+template<typename R, typename T>
+int32_t CalculateHashCode(const T& value)
+{
+ InteropUnpooledMemory mem(1024);
+
+ FillMem<T>(mem, value);
+
+ BinaryObject obj(mem, 0);
+
+ R resolver;
+
+ return resolver.GetHashCode(obj);
+}
+
+template<typename T>
+int32_t RetrieveHashCode(const T& value)
+{
+ InteropUnpooledMemory mem(1024);
+
+ FillMem<T>(mem, value);
+
+ BinaryObjectImpl obj(mem, 0);
+
+ return obj.GetHashCode();
+}
+
+BOOST_FIXTURE_TEST_SUITE(BinaryIdentityResolverTestSuite, BinaryIdentityResolverTestSuiteFixture)
+
+BOOST_AUTO_TEST_CASE(GetDataHashCode)
+{
+ int8_t data1[] = { 0 };
+ int8_t data2[] = { 0, 0, 0, 0 };
+ int8_t data3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ int8_t data4[] = { 1 };
+ int8_t data5[] = { -1 };
+ int8_t data6[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ int8_t data7[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
+ uint8_t data8[] = { 0xFF };
+ uint8_t data9[] = { 0xFF, 0xFF, 0xFF, 0xFF };
+
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data1, sizeof(data1)), 0x0000001F);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data2, sizeof(data2)), 0x000e1781);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data3, sizeof(data3)), 0x94E4B2C1);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data4, sizeof(data4)), 0x00000020);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data5, sizeof(data5)), 0x0000001E);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data6, sizeof(data6)), 0x9EBADAC6);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data7, sizeof(data7)), 0xC5D38B5C);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data8, sizeof(data8)), 0x0000001E);
+ BOOST_CHECK_EQUAL(BinaryUtils::GetDataHashCode(data9, sizeof(data9)), 0x000D9F41);
+}
+
+BOOST_AUTO_TEST_CASE(ArrayIdentityResolver)
+{
+ using namespace binary;
+
+ CompositeKey key1("Some test garbage, one-two-three...",
+ Timestamp(109917, 130347199), Guid(0xACC064DF54EE9670, 0x065CF938F56E5E3B));
+
+ CompositeKeySimple key2("!!!!!!!!!!!!!!!!", Timestamp(324140, 334685375), 89563963);
+
+ BOOST_CHECK_EQUAL(CalculateHashCode<BinaryArrayIdentityResolver>(key1), 0xC298792B);
+ BOOST_CHECK_EQUAL(CalculateHashCode<BinaryArrayIdentityResolver>(key2), 0x53207175);
+}
+
+BOOST_AUTO_TEST_CASE(IdentityEquilityWithGuid)
+{
+ Ignite grid = ignite_test::StartNode("cache-identity.xml");
+
+ CompositeKey key("Key String", Timestamp(123851, 562304134), Guid(0x4A950C6206FE4502, 0xAC06145097E56F02));
+ int32_t value = 12321;
+
+ Cache<CompositeKey, int32_t> cache = grid.GetOrCreateCache<CompositeKey, int32_t>("cache1");
+
+ SqlFieldsQuery qry("INSERT INTO Integer (str, ts, guid, _val) VALUES (?, ?, ?, ?)");
+
+ qry.AddArgument(key.str);
+ qry.AddArgument(key.ts);
+ qry.AddArgument(key.guid);
+ qry.AddArgument(value);
+
+ cache.Query(qry);
+
+ int32_t realValue = cache.Get(key);
+
+ BOOST_CHECK_EQUAL(value, realValue);
+}
+
+BOOST_AUTO_TEST_CASE(IdentityEquilityWithoutGuid)
+{
+ Ignite grid = ignite_test::StartNode("cache-identity.xml");
+
+ CompositeKeySimple key("Lorem ipsum", Timestamp(112460, 163002155), 1337);
+ int32_t value = 42;
+
+ Cache<CompositeKeySimple, int32_t> cache = grid.GetOrCreateCache<CompositeKeySimple, int32_t>("cache2");
+
+ SqlFieldsQuery qry("INSERT INTO Integer (str, ts, i64, _val) VALUES (?, ?, ?, ?)");
+
+ qry.AddArgument(key.str);
+ qry.AddArgument(key.ts);
+ qry.AddArgument(key.i64);
+ qry.AddArgument(value);
+
+ cache.Query(qry);
+
+ int32_t realValue = cache.Get(key);
+
+ BOOST_CHECK_EQUAL(value, realValue);
+}
+
+BOOST_AUTO_TEST_CASE(TestDefaultHashing)
+{
+ DefaultHashing val;
+ val.field = 1337;
+
+ BOOST_CHECK_EQUAL(RetrieveHashCode(val), 0x01F91B0E);
+}
+
+BOOST_AUTO_TEST_CASE(TestGetHashDefined)
+{
+ GetHashDefined val;
+ val.field = 1337;
+
+ BOOST_CHECK_EQUAL(RetrieveHashCode(val), val.field * 10);
+}
+
+BOOST_AUTO_TEST_CASE(TestResolverDefined)
+{
+ ResolverDefined val;
+ val.field = 1337;
+
+ BOOST_CHECK_EQUAL(RetrieveHashCode(val), val.field * 42);
+}
+
+BOOST_AUTO_TEST_CASE(TestBothDefined)
+{
+ BothDefined val;
+ val.field = 1337;
+
+ BOOST_CHECK_EQUAL(RetrieveHashCode(val), val.field * 42);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/binary_object_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_object_test.cpp b/modules/platforms/cpp/core-test/src/binary_object_test.cpp
index 0ae7136..0a8f948 100644
--- a/modules/platforms/cpp/core-test/src/binary_object_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_object_test.cpp
@@ -205,17 +205,17 @@ BOOST_AUTO_TEST_CASE(PrimitiveGuid)
BOOST_AUTO_TEST_CASE(PrimitiveDate)
{
CheckSimpleNP<Date>(Date(0));
- CheckSimpleNP<Date>(BinaryUtils::MakeDateGmt(1998, 12, 3, 18, 32, 01));
- CheckSimpleNP<Date>(BinaryUtils::MakeDateGmt(2017, 1, 18, 20, 50, 41));
- CheckSimpleNP<Date>(BinaryUtils::MakeDateLocal(1998, 12, 3, 18, 32, 01));
+ CheckSimpleNP<Date>(common::MakeDateGmt(1998, 12, 3, 18, 32, 01));
+ CheckSimpleNP<Date>(common::MakeDateGmt(2017, 1, 18, 20, 50, 41));
+ CheckSimpleNP<Date>(common::MakeDateLocal(1998, 12, 3, 18, 32, 01));
}
BOOST_AUTO_TEST_CASE(PrimitiveTimestamp)
{
CheckSimpleNP<Timestamp>(Timestamp(0));
- CheckSimpleNP<Timestamp>(BinaryUtils::MakeTimestampGmt(1998, 12, 3, 18, 32, 01, 593846589));
- CheckSimpleNP<Timestamp>(BinaryUtils::MakeTimestampGmt(2017, 1, 18, 20, 50, 41, 920700532));
- CheckSimpleNP<Timestamp>(BinaryUtils::MakeTimestampLocal(1998, 12, 3, 18, 32, 01, 2385));
+ CheckSimpleNP<Timestamp>(common::MakeTimestampGmt(1998, 12, 3, 18, 32, 01, 593846589));
+ CheckSimpleNP<Timestamp>(common::MakeTimestampGmt(2017, 1, 18, 20, 50, 41, 920700532));
+ CheckSimpleNP<Timestamp>(common::MakeTimestampLocal(1998, 12, 3, 18, 32, 01, 2385));
}
#endif //CHECK_BINARY_OBJECT_WITH_PRIMITIVES
@@ -224,8 +224,8 @@ BOOST_AUTO_TEST_CASE(UserTestType)
{
CheckSimpleNP(TestType());
CheckSimpleNP(TestType(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9),
- BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456)));
+ common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456)));
}
BOOST_AUTO_TEST_CASE(UserComplexType)
@@ -269,8 +269,8 @@ BOOST_AUTO_TEST_CASE(UserTestTypeGetData)
{
CheckData(TestType());
CheckData(TestType(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9),
- BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456)));
+ common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456)));
}
BOOST_AUTO_TEST_CASE(UserBinaryFieldsGetData)
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/binary_session_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_session_test.cpp b/modules/platforms/cpp/core-test/src/binary_session_test.cpp
index 19bfaac..d178921 100644
--- a/modules/platforms/cpp/core-test/src/binary_session_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_session_test.cpp
@@ -170,7 +170,9 @@ BOOST_AUTO_TEST_CASE(TestTimestamp)
BinaryReaderImpl reader(&in);
Timestamp readVal = reader.ReadTopObject<Timestamp>();
- BOOST_REQUIRE(readVal == writeVal);
+ BOOST_CHECK(readVal == writeVal);
+ BOOST_CHECK_EQUAL(readVal.GetMilliseconds(), writeVal.GetMilliseconds());
+ BOOST_CHECK_EQUAL(readVal.GetSecondFraction(), writeVal.GetSecondFraction());
}
BOOST_AUTO_TEST_CASE(TestString)
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_query_test.cpp b/modules/platforms/cpp/core-test/src/cache_query_test.cpp
index b5bb170..b61e289 100644
--- a/modules/platforms/cpp/core-test/src/cache_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_query_test.cpp
@@ -32,6 +32,7 @@
#include "ignite/cache/query/query_sql_fields.h"
#include "ignite/ignite.h"
#include "ignite/ignition.h"
+#include "ignite/test_utils.h"
using namespace boost::unit_test;
@@ -194,8 +195,8 @@ public:
/**
* Constructor.
*
- * @param name Name.
- * @param age Age.
+ * @param personId Id.
+ * @param someVal Int value.
*/
QueryRelation(int32_t personId, int32_t someVal) :
personId(personId),
@@ -294,7 +295,6 @@ namespace ignite
}
}
-
/**
* Count number of records returned by cursor.
*
@@ -591,36 +591,7 @@ struct CacheQueryTestSuiteFixture
{
Ignite StartNode(const char* name)
{
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- const char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
-
- BOOST_CHECK(cfgPath != 0);
-
- cfg.springCfgPath.assign(cfgPath).append("/cache-query.xml");
-
- IgniteError err;
-
- Ignite grid0 = Ignition::Start(cfg, name, &err);
-
- if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
- BOOST_ERROR(err.GetText());
-
- return grid0;
+ return ignite_test::StartNode("cache-query.xml", name);
}
void CheckFieldsQueryPages(int32_t pageSize, int32_t pagesNum, int32_t additionalNum)
@@ -644,8 +615,8 @@ struct CacheQueryTestSuiteFixture
stream << "A" << i;
- cache.Put(i, QueryPerson(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1970 + i),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60)));
+ cache.Put(i, QueryPerson(stream.str(), i * 10, MakeDateGmt(1970 + i),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60)));
}
cursor = cache.Query(qry);
@@ -738,11 +709,11 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
CheckEmptyGetAll(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
- cache.Put(2, QueryPerson("A2", 20, BinaryUtils::MakeDateLocal(1989, 10, 26),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 35, 678403201)));
+ cache.Put(2, QueryPerson("A2", 20, MakeDateGmt(1989, 10, 26),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 35, 678403201)));
cursor = cache.Query(qry);
CheckSingle(cursor, 1, "A1", 10);
@@ -815,8 +786,8 @@ BOOST_AUTO_TEST_CASE(TestSqlQueryDistributedJoins)
stream << "A" << i;
- cache1.Put(i, QueryPerson(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1970 + i),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60)));
+ cache1.Put(i, QueryPerson(stream.str(), i * 10, MakeDateGmt(1970 + i),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60)));
cache2.Put(i + 1, QueryRelation(i, i * 10));
}
@@ -861,11 +832,11 @@ BOOST_AUTO_TEST_CASE(TestTextQuery)
CheckEmptyGetAll(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
- cache.Put(2, QueryPerson("A2", 20, BinaryUtils::MakeDateLocal(1989, 10, 26),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 35, 678403201)));
+ cache.Put(2, QueryPerson("A2", 20, MakeDateGmt(1989, 10, 26),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 35, 678403201)));
cursor = cache.Query(qry);
CheckSingle(cursor, 1, "A1", 10);
@@ -910,8 +881,8 @@ BOOST_AUTO_TEST_CASE(TestScanQuery)
CheckEmptyGetAll(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
cursor = cache.Query(qry);
CheckSingle(cursor, 1, "A1", 10);
@@ -920,8 +891,8 @@ BOOST_AUTO_TEST_CASE(TestScanQuery)
CheckSingleGetAll(cursor, 1, "A1", 10);
// Test query returning multiple entries.
- cache.Put(2, QueryPerson("A2", 20, BinaryUtils::MakeDateLocal(1989, 10, 26),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 35, 678403201)));
+ cache.Put(2, QueryPerson("A2", 20, MakeDateGmt(1989, 10, 26),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 35, 678403201)));
cursor = cache.Query(qry);
CheckMultiple(cursor, 1, "A1", 10, 2, "A2", 20);
@@ -947,8 +918,8 @@ BOOST_AUTO_TEST_CASE(TestScanQueryPartitioned)
stream << "A" << i;
- cache.Put(i, QueryPerson(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1970 + i),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60)));
+ cache.Put(i, QueryPerson(stream.str(), i * 10, MakeDateGmt(1970 + i),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60)));
}
// Iterate over all partitions and collect data.
@@ -994,11 +965,11 @@ BOOST_AUTO_TEST_CASE(TestSqlFieldsQueryBasic)
CheckEmpty(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
- cache.Put(2, QueryPerson("A2", 20, BinaryUtils::MakeDateLocal(1989, 10, 26),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 35, 678403201)));
+ cache.Put(2, QueryPerson("A2", 20, MakeDateGmt(1989, 10, 26),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 35, 678403201)));
cursor = cache.Query(qry);
CheckSingle(cursor, 1, "A1", 10);
@@ -1062,8 +1033,8 @@ BOOST_AUTO_TEST_CASE(TestSqlFieldsQueryDistributedJoins)
stream << "A" << i;
- cache1.Put(i, QueryPerson(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1970 + i),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60)));
+ cache1.Put(i, QueryPerson(stream.str(), i * 10, MakeDateGmt(1970 + i),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60)));
cache2.Put(i + 1, QueryRelation(i, i * 10));
}
@@ -1108,8 +1079,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQuerySingle)
CheckEmpty(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
cursor = cache.Query(qry);
@@ -1154,8 +1125,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryExceptions)
CheckEmpty(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
cursor = cache.Query(qry);
@@ -1200,11 +1171,11 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTwo)
CheckEmpty(cursor);
// Test simple query.
- cache.Put(1, QueryPerson("A1", 10, BinaryUtils::MakeDateLocal(1990, 03, 18),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 34, 579304685)));
+ cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
- cache.Put(2, QueryPerson("A2", 20, BinaryUtils::MakeDateLocal(1989, 10, 26),
- BinaryUtils::MakeTimestampLocal(2016, 02, 10, 17, 39, 35, 678403201)));
+ cache.Put(2, QueryPerson("A2", 20, MakeDateGmt(1989, 10, 26),
+ MakeTimestampGmt(2016, 02, 10, 17, 39, 35, 678403201)));
cursor = cache.Query(qry);
@@ -1273,8 +1244,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQuerySeveral)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1339,8 +1310,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryDateLess)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1364,9 +1335,9 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryDateLess)
Date birthday = row.GetNext<Date>(error);
BOOST_REQUIRE(error.GetCode() == IgniteError::IGNITE_SUCCESS);
- BOOST_CHECK(birthday == BinaryUtils::MakeDateLocal(1980 + resultSetSize, 1, 1));
+ BOOST_CHECK(birthday == MakeDateGmt(1980 + resultSetSize, 1, 1));
- BOOST_CHECK(birthday < BinaryUtils::MakeDateLocal(1990, 1, 1));
+ BOOST_CHECK(birthday < MakeDateGmt(1990, 1, 1));
BOOST_REQUIRE(!row.HasNext());
@@ -1400,8 +1371,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryDateMore)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1425,9 +1396,9 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryDateMore)
Date birthday = row.GetNext<Date>(error);
BOOST_REQUIRE(error.GetCode() == IgniteError::IGNITE_SUCCESS);
- BOOST_CHECK(birthday == BinaryUtils::MakeDateLocal(2071 + resultSetSize, 1, 1));
+ BOOST_CHECK(birthday == MakeDateGmt(2071 + resultSetSize, 1, 1));
- BOOST_CHECK(birthday > BinaryUtils::MakeDateLocal(2070, 1, 1));
+ BOOST_CHECK(birthday > MakeDateGmt(2070, 1, 1));
BOOST_REQUIRE(!row.HasNext());
@@ -1461,8 +1432,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryDateEqual)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1484,7 +1455,7 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryDateEqual)
Date birthday = row.GetNext<Date>(error);
BOOST_REQUIRE(error.GetCode() == IgniteError::IGNITE_SUCCESS);
- BOOST_CHECK(birthday == BinaryUtils::MakeDateLocal(2032, 1, 1));
+ BOOST_CHECK(birthday == MakeDateGmt(2032, 1, 1));
BOOST_REQUIRE(!row.HasNext());
@@ -1513,8 +1484,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTimestampLess)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1538,9 +1509,9 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTimestampLess)
Timestamp recordCreated = row.GetNext<Timestamp>(error);
BOOST_REQUIRE(error.GetCode() == IgniteError::IGNITE_SUCCESS);
- BOOST_CHECK(recordCreated == BinaryUtils::MakeTimestampLocal(2016, 1, 1, 0, resultSetSize % 60, 0));
+ BOOST_CHECK(recordCreated == MakeTimestampGmt(2016, 1, 1, 0, resultSetSize % 60, 0));
- BOOST_CHECK(recordCreated < BinaryUtils::MakeTimestampLocal(2016, 1, 1, 1, 0, 0));
+ BOOST_CHECK(recordCreated < MakeTimestampGmt(2016, 1, 1, 1, 0, 0));
BOOST_REQUIRE(!row.HasNext());
@@ -1574,8 +1545,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTimestampMore)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1601,9 +1572,9 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTimestampMore)
int32_t minutes = resultSetSize + 31;
- BOOST_CHECK(recordCreated == BinaryUtils::MakeTimestampLocal(2016, 1, 1, 15 + minutes / 60, minutes % 60, 0));
+ BOOST_CHECK(recordCreated == MakeTimestampGmt(2016, 1, 1, 15 + minutes / 60, minutes % 60, 0));
- BOOST_CHECK(recordCreated > BinaryUtils::MakeTimestampLocal(2016, 1, 1, 15, 30, 0));
+ BOOST_CHECK(recordCreated > MakeTimestampGmt(2016, 1, 1, 15, 30, 0));
BOOST_REQUIRE(!row.HasNext());
@@ -1637,8 +1608,8 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTimestampEqual)
stream << "A" << i;
- QueryPerson val(stream.str(), i * 10, BinaryUtils::MakeDateLocal(1980 + i, 1, 1),
- BinaryUtils::MakeTimestampLocal(2016, 1, 1, i / 60, i % 60));
+ QueryPerson val(stream.str(), i * 10, MakeDateGmt(1980 + i, 1, 1),
+ MakeTimestampGmt(2016, 1, 1, i / 60, i % 60));
cache.Put(i, val);
}
@@ -1660,7 +1631,7 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryTimestampEqual)
Timestamp recordCreated = row.GetNext<Timestamp>(error);
BOOST_REQUIRE(error.GetCode() == IgniteError::IGNITE_SUCCESS);
- BOOST_CHECK(recordCreated == BinaryUtils::MakeTimestampLocal(2016, 1, 1, 9, 18, 0));
+ BOOST_CHECK(recordCreated == MakeTimestampGmt(2016, 1, 1, 9, 18, 0));
BOOST_REQUIRE(!row.HasNext());
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_test.cpp b/modules/platforms/cpp/core-test/src/cache_test.cpp
index 1df70df..1aa7277 100644
--- a/modules/platforms/cpp/core-test/src/cache_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_test.cpp
@@ -24,6 +24,7 @@
#include "ignite/cache/cache_peek_mode.h"
#include "ignite/ignite.h"
#include "ignite/ignition.h"
+#include "ignite/test_utils.h"
using namespace ignite;
using namespace boost::unit_test;
@@ -65,7 +66,7 @@ namespace ignite
IGNITE_BINARY_GET_HASH_CODE_ZERO(Person)
IGNITE_BINARY_IS_NULL_FALSE(Person)
IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(Person)
-
+
void Write(BinaryWriter& writer, Person obj)
{
writer.WriteString("name", obj.name);
@@ -93,44 +94,8 @@ struct CacheTestSuiteFixture {
*/
CacheTestSuiteFixture()
{
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
-
- cfg.springCfgPath = std::string(cfgPath).append("/").append("cache-test.xml");
-
- for (int i = 0; i < 2; i++)
- {
- std::stringstream stream;
-
- stream << "grid-" << i;
-
- IgniteError err;
-
- Ignite grid = Ignition::Start(cfg, stream.str().c_str(), &err);
-
- if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
- BOOST_FAIL(err.GetText());
-
- if (i == 0)
- grid0 = grid;
- else
- grid1 = grid;
- }
+ grid0 = ignite_test::StartNode("cache-test.xml", "grid-0");
+ grid1 = ignite_test::StartNode("cache-test.xml", "grid-1");
}
/*
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
index e9d7e8a..6ce38de 100644
--- a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
@@ -28,6 +28,7 @@
#include "ignite/ignition.h"
#include "ignite/cache/cache.h"
+#include "ignite/test_utils.h"
using namespace ignite;
using namespace ignite::cache;
@@ -241,38 +242,10 @@ struct ContinuousQueryTestSuiteFixture
Cache<int, TestEntry> cache;
/*
- * Get configuration for nodes.
- */
- IgniteConfiguration GetConfiguration()
- {
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
-
- cfg.springCfgPath = std::string(cfgPath).append("/").append("cache-query-continuous.xml");
-
- return cfg;
- }
-
- /*
* Constructor.
*/
ContinuousQueryTestSuiteFixture() :
- grid(Ignition::Start(GetConfiguration(), "node-01")),
+ grid(ignite_test::StartNode("cache-query-continuous.xml", "node-01")),
cache(grid.GetCache<int, TestEntry>("transactional_no_backup"))
{
// No-op.
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/ignition_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/ignition_test.cpp b/modules/platforms/cpp/core-test/src/ignition_test.cpp
index 7d1284a..17f78ae 100644
--- a/modules/platforms/cpp/core-test/src/ignition_test.cpp
+++ b/modules/platforms/cpp/core-test/src/ignition_test.cpp
@@ -23,6 +23,7 @@
#include "ignite/ignite.h"
#include "ignite/ignition.h"
+#include "ignite/test_utils.h"
using namespace ignite;
using namespace boost::unit_test;
@@ -33,23 +34,7 @@ BOOST_AUTO_TEST_CASE(TestIgnition)
{
IgniteConfiguration cfg;
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
-
- cfg.springCfgPath = std::string(cfgPath).append("/").append("cache-test.xml");
+ ignite_test::InitConfig(cfg, "cache-test.xml");
IgniteError err;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/interop_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/interop_test.cpp b/modules/platforms/cpp/core-test/src/interop_test.cpp
index f29ecc8..b76d030 100644
--- a/modules/platforms/cpp/core-test/src/interop_test.cpp
+++ b/modules/platforms/cpp/core-test/src/interop_test.cpp
@@ -22,43 +22,19 @@
#include <boost/test/unit_test.hpp>
#include "ignite/ignition.h"
+#include "ignite/test_utils.h"
using namespace ignite;
using namespace cache;
using namespace boost::unit_test;
-void InitConfig(IgniteConfiguration& cfg, const char* config)
-{
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
-
- cfg.springCfgPath = std::string(cfgPath).append("/").append(config);
-}
-
BOOST_AUTO_TEST_SUITE(InteropTestSuite)
#ifdef ENABLE_STRING_SERIALIZATION_VER_2_TESTS
BOOST_AUTO_TEST_CASE(StringUtfInvalidSequence)
{
- IgniteConfiguration cfg;
-
- InitConfig(cfg);
-
- Ignite ignite = Ignition::Start(cfg);
+ Ignite ignite = ignite_test::StartNode("cache-test.xml");
Cache<std::string, std::string> cache = ignite.CreateCache<std::string, std::string>("Test");
@@ -85,13 +61,9 @@ BOOST_AUTO_TEST_CASE(StringUtfInvalidSequence)
BOOST_AUTO_TEST_CASE(StringUtfInvalidCodePoint)
{
- IgniteConfiguration cfg;
-
- InitConfig(cfg);
-
putenv("IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2=true");
- Ignite ignite = Ignition::Start(cfg);
+ Ignite ignite = ignite_test::StartNode("cache-test.xml");
Cache<std::string, std::string> cache = ignite.CreateCache<std::string, std::string>("Test");
@@ -117,11 +89,7 @@ BOOST_AUTO_TEST_CASE(StringUtfInvalidCodePoint)
BOOST_AUTO_TEST_CASE(StringUtfValid4ByteCodePoint)
{
- IgniteConfiguration cfg;
-
- InitConfig(cfg, "cache-test.xml");
-
- Ignite ignite = Ignition::Start(cfg);
+ Ignite ignite = ignite_test::StartNode("cache-test.xml");
Cache<std::string, std::string> cache = ignite.CreateCache<std::string, std::string>("Test");
@@ -149,7 +117,7 @@ BOOST_AUTO_TEST_CASE(GracefulDeathOnInvalidConfig)
{
IgniteConfiguration cfg;
- InitConfig(cfg, "invalid.xml");
+ ignite_test::InitConfig(cfg, "invalid.xml");
BOOST_CHECK_THROW(Ignition::Start(cfg), IgniteError);
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/test_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/test_utils.cpp b/modules/platforms/cpp/core-test/src/test_utils.cpp
new file mode 100644
index 0000000..1378487
--- /dev/null
+++ b/modules/platforms/cpp/core-test/src/test_utils.cpp
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#include <cassert>
+
+#include "ignite/test_utils.h"
+
+namespace ignite_test
+{
+ void InitConfig(ignite::IgniteConfiguration& cfg, const char* cfgFile)
+ {
+ using namespace ignite;
+
+ assert(cfgFile != 0);
+
+ cfg.jvmOpts.push_back("-Xdebug");
+ cfg.jvmOpts.push_back("-Xnoagent");
+ cfg.jvmOpts.push_back("-Djava.compiler=NONE");
+ cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
+ cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
+ cfg.jvmOpts.push_back("-Duser.timezone=GMT");
+ cfg.jvmOpts.push_back("-DIGNITE_QUIET=false");
+ cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
+ cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
+
+#ifdef IGNITE_TESTS_32
+ cfg.jvmInitMem = 256;
+ cfg.jvmMaxMem = 768;
+#else
+ cfg.jvmInitMem = 1024;
+ cfg.jvmMaxMem = 4096;
+#endif
+
+ char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
+
+ assert(cfgPath != 0);
+
+ cfg.springCfgPath = std::string(cfgPath).append("/").append(cfgFile);
+ }
+
+ ignite::Ignite StartNode(const char* cfgFile)
+ {
+ using namespace ignite;
+
+ IgniteConfiguration cfg;
+
+ InitConfig(cfg, cfgFile);
+
+ return Ignition::Start(cfg);
+ }
+
+ ignite::Ignite StartNode(const char* cfgFile, const char* name)
+ {
+ using namespace ignite;
+
+ assert(name != 0);
+
+ IgniteConfiguration cfg;
+
+ InitConfig(cfg, cfgFile);
+
+ return Ignition::Start(cfg, name);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core-test/src/transactions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/transactions_test.cpp b/modules/platforms/cpp/core-test/src/transactions_test.cpp
index c194423..98856d6 100644
--- a/modules/platforms/cpp/core-test/src/transactions_test.cpp
+++ b/modules/platforms/cpp/core-test/src/transactions_test.cpp
@@ -22,6 +22,7 @@
#include <boost/test/unit_test.hpp>
#include "ignite/ignition.h"
+#include "ignite/test_utils.h"
using namespace ignite;
using namespace ignite::transactions;
@@ -39,27 +40,7 @@ struct TransactionsTestSuiteFixture {
*/
TransactionsTestSuiteFixture()
{
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_CPP_CONFIG_PATH");
-
- cfg.springCfgPath = std::string(cfgPath).append("/").append("cache-test.xml");
-
- grid = Ignition::Start(cfg, "txTest");
+ grid = ignite_test::StartNode("cache-test.xml", "txTest");
}
/*
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/ignite_impl.cpp b/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
index 0a10791..fdc1008 100644
--- a/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
@@ -52,9 +52,9 @@ namespace ignite
IgniteImpl::SP_TransactionsImpl IgniteImpl::InternalGetTransactions(IgniteError &err)
{
- IgniteImpl::SP_TransactionsImpl res;
+ SP_TransactionsImpl res;
- ignite::jni::java::JniErrorInfo jniErr;
+ JniErrorInfo jniErr;
jobject txJavaRef = env.Get()->Context()->ProcessorTransactions(javaRef, &jniErr);
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/include/test_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/include/test_utils.h b/modules/platforms/cpp/odbc-test/include/test_utils.h
index e239f45..6a58e54 100644
--- a/modules/platforms/cpp/odbc-test/include/test_utils.h
+++ b/modules/platforms/cpp/odbc-test/include/test_utils.h
@@ -27,15 +27,17 @@
#include <string>
-#define ODBC_FAIL_ON_ERROR(ret, type, handle) \
- if (!SQL_SUCCEEDED(ret)) \
- { \
- Ignition::StopAll(true); \
- BOOST_FAIL(GetOdbcErrorMessage(type, handle)); \
+#include "ignite/ignition.h"
+
+#define ODBC_FAIL_ON_ERROR(ret, type, handle) \
+ if (!SQL_SUCCEEDED(ret)) \
+ { \
+ Ignition::StopAll(true); \
+ BOOST_FAIL(ignite_test::GetOdbcErrorMessage(type, handle)); \
}
-namespace ignite
+namespace ignite_test
{
/** Read buffer size. */
enum { ODBC_BUFFER_SIZE = 1024 };
@@ -48,6 +50,43 @@ namespace ignite
* @return Error message.
*/
std::string GetOdbcErrorMessage(SQLSMALLINT handleType, SQLHANDLE handle);
+
+ /**
+ * Initialize configuration for a node.
+ *
+ * Inits Ignite node configuration from specified config file.
+ * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_CONFIG_PATH
+ * environmental variable.
+ *
+ * @param cfg Ignite config.
+ * @param cfgFile Ignite node config file name without path.
+ */
+ void InitConfig(ignite::IgniteConfiguration& cfg, const char* cfgFile);
+
+ /**
+ * Start Ignite node.
+ *
+ * Starts new Ignite node from specified config file.
+ * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_CONFIG_PATH
+ * environmental variable.
+ *
+ * @param cfgFile Ignite node config file name without path.
+ * @return New node.
+ */
+ ignite::Ignite StartNode(const char* cfgFile);
+
+ /**
+ * Start Ignite node.
+ *
+ * Starts new Ignite node with the specified name and from specified config file.
+ * Config file is searched in path specified by IGNITE_NATIVE_TEST_CPP_CONFIG_PATH
+ * environmental variable.
+ *
+ * @param cfgFile Ignite node config file name without path.
+ * @param name Node name.
+ * @return New node.
+ */
+ ignite::Ignite StartNode(const char* cfgFile, const char* name);
}
#endif // _IGNITE_ODBC_TEST_TEST_UTILS
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp b/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
index 5247129..343cdc6 100644
--- a/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/api_robustness_test.cpp
@@ -42,6 +42,7 @@ using namespace ignite;
using namespace ignite::cache;
using namespace ignite::cache::query;
using namespace ignite::common;
+using namespace ignite_test;
using namespace boost::unit_test;
@@ -111,39 +112,9 @@ struct ApiRobustnessTestSuiteFixture
SQLFreeHandle(SQL_HANDLE_ENV, env);
}
- static Ignite StartNode(const char* name, const char* config)
- {
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
- cfg.jvmOpts.push_back("-Duser.timezone=GMT");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_ODBC_CONFIG_PATH");
-
- BOOST_REQUIRE(cfgPath != 0);
-
- cfg.springCfgPath.assign(cfgPath).append("/").append(config);
-
- IgniteError err;
-
- return Ignition::Start(cfg, name);
- }
-
static Ignite StartAdditionalNode(const char* name)
{
- return StartNode(name, "queries-test-noodbc.xml");
+ return StartNode("queries-test-noodbc.xml", name);
}
/**
@@ -155,7 +126,7 @@ struct ApiRobustnessTestSuiteFixture
dbc(NULL),
stmt(NULL)
{
- grid = StartNode("NodeMain", "queries-test.xml");
+ grid = StartNode("queries-test.xml", "NodeMain");
testCache = grid.GetCache<int64_t, TestType>("cache");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
index fe50295..82521be 100644
--- a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
@@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE(TestPutDateToString)
ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
- Date date = BinaryUtils::MakeDateGmt(1999, 2, 22);
+ Date date = common::MakeDateGmt(1999, 2, 22);
appBuf.PutDate(date);
@@ -420,7 +420,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToString)
ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
- Timestamp date = BinaryUtils::MakeTimestampGmt(2018, 11, 1, 17, 45, 59);
+ Timestamp date = common::MakeTimestampGmt(2018, 11, 1, 17, 45, 59);
appBuf.PutTimestamp(date);
@@ -437,7 +437,7 @@ BOOST_AUTO_TEST_CASE(TestPutDateToDate)
ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
- Date date = BinaryUtils::MakeDateGmt(1984, 5, 27);
+ Date date = common::MakeDateGmt(1984, 5, 27);
appBuf.PutDate(date);
@@ -456,7 +456,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToDate)
ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
- Timestamp ts = BinaryUtils::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
+ Timestamp ts = common::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
appBuf.PutTimestamp(ts);
@@ -475,7 +475,7 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToTimestamp)
ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
- Timestamp ts = BinaryUtils::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
+ Timestamp ts = common::MakeTimestampGmt(2004, 8, 14, 6, 34, 51, 573948623);
appBuf.PutTimestamp(ts);
@@ -499,7 +499,7 @@ BOOST_AUTO_TEST_CASE(TestPutDateToTimestamp)
ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
- Date date = BinaryUtils::MakeDateGmt(1984, 5, 27);
+ Date date = common::MakeDateGmt(1984, 5, 27);
appBuf.PutDate(date);
@@ -823,7 +823,7 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromString)
tm tmDate;
- bool success = BinaryUtils::DateToCTm(date, tmDate);
+ bool success = common::DateToCTm(date, tmDate);
BOOST_REQUIRE(success);
@@ -849,7 +849,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromString)
tm tmDate;
- bool success = BinaryUtils::TimestampToCTm(date, tmDate);
+ bool success = common::TimestampToCTm(date, tmDate);
BOOST_REQUIRE(success);
@@ -880,7 +880,7 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromDate)
tm tmDate;
- bool success = BinaryUtils::DateToCTm(date, tmDate);
+ bool success = common::DateToCTm(date, tmDate);
BOOST_REQUIRE(success);
@@ -911,7 +911,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromDate)
tm tmDate;
- bool success = BinaryUtils::TimestampToCTm(ts, tmDate);
+ bool success = common::TimestampToCTm(ts, tmDate);
BOOST_REQUIRE(success);
@@ -946,7 +946,7 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromTimestamp)
tm tmDate;
- bool success = BinaryUtils::TimestampToCTm(ts, tmDate);
+ bool success = common::TimestampToCTm(ts, tmDate);
BOOST_REQUIRE(success);
@@ -982,7 +982,7 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromTimestamp)
tm tmDate;
- bool success = BinaryUtils::DateToCTm(date, tmDate);
+ bool success = common::DateToCTm(date, tmDate);
BOOST_REQUIRE(success);
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/queries_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/queries_test.cpp b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
index a304229..422648e 100644
--- a/modules/platforms/cpp/odbc-test/src/queries_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
@@ -44,6 +44,7 @@ using namespace ignite;
using namespace ignite::cache;
using namespace ignite::cache::query;
using namespace ignite::common;
+using namespace ignite_test;
using namespace boost::unit_test;
@@ -113,39 +114,9 @@ struct QueriesTestSuiteFixture
SQLFreeHandle(SQL_HANDLE_ENV, env);
}
- static Ignite StartNode(const char* name, const char* config)
- {
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
- cfg.jvmOpts.push_back("-Duser.timezone=GMT");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_ODBC_CONFIG_PATH");
-
- BOOST_REQUIRE(cfgPath != 0);
-
- cfg.springCfgPath.assign(cfgPath).append("/").append(config);
-
- IgniteError err;
-
- return Ignition::Start(cfg, name);
- }
-
static Ignite StartAdditionalNode(const char* name)
{
- return StartNode(name, "queries-test-noodbc.xml");
+ return StartNode("queries-test-noodbc.xml", name);
}
/**
@@ -158,7 +129,7 @@ struct QueriesTestSuiteFixture
dbc(NULL),
stmt(NULL)
{
- grid = StartNode("NodeMain", "queries-test.xml");
+ grid = StartNode("queries-test.xml", "NodeMain");
cache1 = grid.GetCache<int64_t, TestType>("cache");
cache2 = grid.GetCache<int64_t, ComplexType>("cache2");
@@ -181,11 +152,11 @@ struct QueriesTestSuiteFixture
SQLRETURN ret;
- TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
- TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12),
- BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 456));
+ TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), common::MakeDateGmt(1976, 1, 12),
+ common::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 456));
cache1.Put(1, in1);
cache1.Put(2, in2);
@@ -448,11 +419,11 @@ BOOST_AUTO_TEST_CASE(TestTwoRowsString)
SQLRETURN ret;
- TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
- TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12),
- BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
+ TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), common::MakeDateGmt(1976, 1, 12),
+ common::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
cache1.Put(1, in1);
cache1.Put(2, in2);
@@ -548,8 +519,8 @@ BOOST_AUTO_TEST_CASE(TestOneRowString)
SQLRETURN ret;
- TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
cache1.Put(1, in);
@@ -614,8 +585,8 @@ BOOST_AUTO_TEST_CASE(TestOneRowStringLen)
SQLRETURN ret;
- TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
cache1.Put(1, in);
@@ -722,11 +693,11 @@ BOOST_AUTO_TEST_CASE(TestDataAtExecution)
SQLRETURN ret;
- TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
- TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12),
- BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
+ TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), common::MakeDateGmt(1976, 1, 12),
+ common::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
cache1.Put(1, in1);
cache1.Put(2, in2);
@@ -845,8 +816,8 @@ BOOST_AUTO_TEST_CASE(TestNullFields)
SQLRETURN ret;
- TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
- BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+ TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), common::MakeDateGmt(1987, 6, 5),
+ common::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
TestType inNull;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
index de1f5f8..fd55d99 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
@@ -47,6 +47,7 @@ using namespace ignite;
using namespace ignite::cache;
using namespace ignite::cache::query;
using namespace ignite::common;
+using namespace ignite_test;
using namespace boost::unit_test;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
index f89cc3d..157a011 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
@@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE(TestDayname)
{
TestType in;
- in.dateField = impl::binary::BinaryUtils::MakeDateGmt(2016, 8, 29);
+ in.dateField = common::MakeDateGmt(2016, 8, 29);
testCache.Put(1, in);
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(TestDayofmonth)
{
TestType in;
- in.dateField = impl::binary::BinaryUtils::MakeDateGmt(2016, 8, 29);
+ in.dateField = common::MakeDateGmt(2016, 8, 29);
testCache.Put(1, in);
@@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(TestDayofweek)
{
TestType in;
- in.dateField = impl::binary::BinaryUtils::MakeDateGmt(2016, 8, 29);
+ in.dateField = common::MakeDateGmt(2016, 8, 29);
testCache.Put(1, in);
@@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE(TestDayofyear)
{
TestType in;
- in.dateField = impl::binary::BinaryUtils::MakeDateGmt(2016, 8, 29);
+ in.dateField = common::MakeDateGmt(2016, 8, 29);
testCache.Put(1, in);
@@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE(TestExtract)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(TestHour)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(TestMinute)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE(TestMonth)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(TestMonthname)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -170,7 +170,7 @@ BOOST_AUTO_TEST_CASE(TestQuarter)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE(TestSecond)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE(TestWeek)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
@@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(TestYear)
{
TestType in;
- in.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
+ in.timestampField = common::MakeTimestampGmt(2016, 2, 24, 13, 45, 23, 580695103);
testCache.Put(1, in);
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
index d9a14a9..5dc2b58 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
@@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE(TestEscConvertFunctionGuid)
BOOST_AUTO_TEST_CASE(TestEscConvertFunctionDate)
{
using ignite::impl::binary::BinaryUtils;
- Date date = BinaryUtils::MakeDateGmt(1983, 3, 14);
+ Date date = common::MakeDateGmt(1983, 3, 14);
CheckSingleResult<Date>("SELECT {fn CONVERT('1983-03-14', SQL_DATE)}", date);
}
@@ -153,7 +153,7 @@ BOOST_AUTO_TEST_CASE(TestEscConvertFunctionTime)
BOOST_AUTO_TEST_CASE(TestEscConvertFunctionTimestamp)
{
using ignite::impl::binary::BinaryUtils;
- Timestamp ts = BinaryUtils::MakeTimestampGmt(1983, 3, 14, 13, 20, 15, 999999999);
+ Timestamp ts = common::MakeTimestampGmt(1983, 3, 14, 13, 20, 15, 999999999);
CheckSingleResult<Timestamp>("SELECT {fn CONVERT('1983-03-14 13:20:15.999999999', SQL_TIMESTAMP)}", ts);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
index e16d8c1..723f784 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
@@ -47,6 +47,7 @@ using namespace ignite;
using namespace ignite::cache;
using namespace ignite::cache::query;
using namespace ignite::common;
+using namespace ignite_test;
using namespace boost::unit_test;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
index 56f5219..21fc568 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
@@ -25,6 +25,7 @@
#include "test_utils.h"
using namespace ignite;
+using namespace ignite_test;
using namespace boost::unit_test;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
index c85f80c..389f2f4 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
@@ -43,6 +43,7 @@ using namespace ignite;
using namespace ignite::cache;
using namespace ignite::cache::query;
using namespace ignite::common;
+using namespace ignite_test;
using namespace boost::unit_test;
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp b/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
index 1ecd26a..400e9a9 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
@@ -19,6 +19,8 @@
#include "test_utils.h"
+using namespace ignite_test;
+
namespace ignite
{
SqlTestSuiteFixture::SqlTestSuiteFixture():
@@ -27,35 +29,7 @@ namespace ignite
dbc(NULL),
stmt(NULL)
{
- IgniteConfiguration cfg;
-
- cfg.jvmOpts.push_back("-Xdebug");
- cfg.jvmOpts.push_back("-Xnoagent");
- cfg.jvmOpts.push_back("-Djava.compiler=NONE");
- cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
- cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
- cfg.jvmOpts.push_back("-Duser.timezone=GMT");
-
-#ifdef IGNITE_TESTS_32
- cfg.jvmInitMem = 256;
- cfg.jvmMaxMem = 768;
-#else
- cfg.jvmInitMem = 1024;
- cfg.jvmMaxMem = 4096;
-#endif
-
- char* cfgPath = getenv("IGNITE_NATIVE_TEST_ODBC_CONFIG_PATH");
-
- BOOST_REQUIRE(cfgPath != 0);
-
- cfg.springCfgPath.assign(cfgPath).append("/queries-test.xml");
-
- IgniteError err;
-
- grid = Ignition::Start(cfg, &err);
-
- if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
- BOOST_FAIL(err.GetText()) ;
+ grid = StartNode("queries-test.xml");
testCache = grid.GetCache<int64_t, TestType>("cache");
@@ -84,7 +58,7 @@ namespace ignite
if (!SQL_SUCCEEDED(ret))
{
- Ignition::Stop(grid.GetName(), true);
+ Ignition::StopAll(true);
BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_DBC, dbc));
}
@@ -107,7 +81,7 @@ namespace ignite
SQLFreeHandle(SQL_HANDLE_DBC, dbc);
SQLFreeHandle(SQL_HANDLE_ENV, env);
- ignite::Ignition::Stop(grid.GetName(), true);
+ ignite::Ignition::StopAll(true);
}
void SqlTestSuiteFixture::CheckSingleResult0(const char* request,
@@ -321,7 +295,7 @@ namespace ignite
CheckSingleResult0(request, SQL_C_DATE, &res, 0, 0);
using ignite::impl::binary::BinaryUtils;
- Date actual = BinaryUtils::MakeDateGmt(res.year, res.month, res.day);
+ Date actual = common::MakeDateGmt(res.year, res.month, res.day);
BOOST_REQUIRE_EQUAL(actual.GetSeconds(), expected.GetSeconds());
}
@@ -345,7 +319,7 @@ namespace ignite
CheckSingleResult0(request, SQL_C_TIMESTAMP, &res, 0, 0);
using ignite::impl::binary::BinaryUtils;
- Timestamp actual = BinaryUtils::MakeTimestampGmt(res.year, res.month, res.day, res.hour, res.minute, res.second, res.fraction);
+ Timestamp actual = common::MakeTimestampGmt(res.year, res.month, res.day, res.hour, res.minute, res.second, res.fraction);
BOOST_REQUIRE_EQUAL(actual.GetSeconds(), expected.GetSeconds());
BOOST_REQUIRE_EQUAL(actual.GetSecondFraction(), expected.GetSecondFraction());
[27/32] ignite git commit: IGNITE-4196: Added means to specify port
for H2 debug console. This closes #1486.
Posted by yz...@apache.org.
IGNITE-4196: Added means to specify port for H2 debug console. This closes #1486.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b2462607
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b2462607
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b2462607
Branch: refs/heads/ignite-comm-balance-master
Commit: b2462607d726608a39033e9b7c7327c59cb28c73
Parents: 9ff2a8f
Author: Sergey Kalashnikov <sk...@gridgain.com>
Authored: Fri Feb 3 11:41:14 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Feb 3 11:41:14 2017 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/IgniteSystemProperties.java | 8 ++++++++
.../internal/processors/query/h2/IgniteH2Indexing.java | 8 +++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b2462607/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 083bb72..c479076 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -318,6 +318,14 @@ public final class IgniteSystemProperties {
public static final String IGNITE_H2_DEBUG_CONSOLE = "IGNITE_H2_DEBUG_CONSOLE";
/**
+ * This property allows to specify user defined port which H2 indexing SPI will use
+ * to start H2 debug console on. If this property is not set or set to 0, H2 debug
+ * console will use system-provided dynamic port.
+ * This property is only relevant when {@link #IGNITE_H2_DEBUG_CONSOLE} property is set.
+ */
+ public static final String IGNITE_H2_DEBUG_CONSOLE_PORT = "IGNITE_H2_DEBUG_CONSOLE_PORT";
+
+ /**
* If this property is set to {@code true} then shared memory space native debug will be enabled.
*/
public static final String IGNITE_IPC_SHMEM_SPACE_DEBUG = "IGNITE_IPC_SHMEM_SPACE_DEBUG";
http://git-wip-us.apache.org/repos/asf/ignite/blob/b2462607/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 505a3af..69a65fe 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -174,8 +174,10 @@ import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_DEBUG_CONSOLE;
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_DEBUG_CONSOLE_PORT;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_INDEXING_CACHE_CLEANUP_PERIOD;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT;
+import static org.apache.ignite.IgniteSystemProperties.getInteger;
import static org.apache.ignite.IgniteSystemProperties.getString;
import static org.apache.ignite.internal.processors.query.GridQueryIndexType.FULLTEXT;
import static org.apache.ignite.internal.processors.query.GridQueryIndexType.GEO_SPATIAL;
@@ -1754,11 +1756,15 @@ public class IgniteH2Indexing implements GridQueryIndexing {
if (getString(IGNITE_H2_DEBUG_CONSOLE) != null) {
Connection c = DriverManager.getConnection(dbUrl);
+ int port = getInteger(IGNITE_H2_DEBUG_CONSOLE_PORT, 0);
+
WebServer webSrv = new WebServer();
- Server web = new Server(webSrv, "-webPort", "0");
+ Server web = new Server(webSrv, "-webPort", Integer.toString(port));
web.start();
String url = webSrv.addSession(c);
+ U.quietAndInfo(log, "H2 debug console URL: " + url);
+
try {
Server.openBrowser(url);
}
[31/32] ignite git commit: all cheats rolled back,
including version manager
Posted by yz...@apache.org.
all cheats rolled back, including version manager
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6abc0f43
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6abc0f43
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6abc0f43
Branch: refs/heads/ignite-comm-balance-master
Commit: 6abc0f43af3ac4c9a8feb36028234c1e7899de7e
Parents: d1c01d0
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Feb 6 17:00:40 2017 +0700
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Feb 6 17:00:40 2017 +0700
----------------------------------------------------------------------
.../managers/communication/GridIoManager.java | 37 -----------
.../discovery/GridDiscoveryManager.java | 2 +-
.../GridDhtAtomicAbstractUpdateFuture.java | 11 +---
.../GridDhtAtomicAbstractUpdateRequest.java | 8 ---
.../dht/atomic/GridDhtAtomicCache.java | 20 ++----
.../GridDhtAtomicSingleUpdateRequest.java | 61 +++++-------------
.../dht/atomic/GridDhtAtomicUpdateRequest.java | 66 +++++++-------------
.../GridNearAtomicAbstractUpdateFuture.java | 22 -------
.../GridNearAtomicSingleUpdateFuture.java | 2 +-
.../internal/util/future/GridFutureAdapter.java | 22 -------
10 files changed, 46 insertions(+), 205 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index d38b8f8..3f9650c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -54,8 +54,6 @@ import org.apache.ignite.internal.managers.GridManagerAdapter;
import org.apache.ignite.internal.managers.deployment.GridDeployment;
import org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager;
import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
-import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture;
-import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateResponse;
import org.apache.ignite.internal.processors.platform.message.PlatformMessageFilter;
import org.apache.ignite.internal.processors.pool.PoolProcessor;
import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
@@ -67,7 +65,6 @@ import org.apache.ignite.internal.util.lang.GridTuple3;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteBiPredicate;
@@ -315,8 +312,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
if (log.isDebugEnabled())
log.debug(startInfo());
- U.debug(log, "COMPLETE_IN_USER_THREAD for cache ID: " + COMPLETE_IN_USER_THREAD_ID);
-
addMessageListener(GridTopic.TOPIC_IO_TEST, new GridMessageListener() {
@Override public void onMessage(UUID nodeId, Object msg) {
ClusterNode node = ctx.discovery().node(nodeId);
@@ -771,21 +766,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
}
}
- private static final int COMPLETE_IN_USER_THREAD_ID;
-
- static {
- String cacheName = System.getProperty("COMPLETE_IN_USER_THREAD");
-
- if (cacheName == null)
- COMPLETE_IN_USER_THREAD_ID = 0;
- else {
- COMPLETE_IN_USER_THREAD_ID = CU.cacheId(cacheName);
-
- if (COMPLETE_IN_USER_THREAD_ID == 0)
- throw new RuntimeException();
- }
- }
-
/**
* @param nodeId Node ID.
* @param msg Message.
@@ -829,23 +809,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
return;
}
- if (COMPLETE_IN_USER_THREAD_ID != 0 &&
- msg.message().directType() == 41 // instanceof GridNearAtomicUpdateResponse
- ) {
- GridNearAtomicUpdateResponse res = (GridNearAtomicUpdateResponse)msg.message();
-
- if (res.cacheId() == COMPLETE_IN_USER_THREAD_ID) {
- GridNearAtomicAbstractUpdateFuture f =
- (GridNearAtomicAbstractUpdateFuture)ctx.cache().context().mvcc().atomicFuture(res.futureVersion());
-
- f.completer(c);
-
- f.unblockAllThreads();
-
- return;
- }
- }
-
if (ctx.config().getStripedPoolSize() > 0 &&
plc == GridIoPolicy.SYSTEM_POOL &&
msg.partition() != Integer.MIN_VALUE
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index a436d4e..24debc3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1615,7 +1615,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
* @return Collection of cache nodes.
*/
public Collection<ClusterNode> cacheNodes(int cacheId, AffinityTopologyVersion topVer) {
- return resolveDiscoCache(cacheId, topVer).cacheNodes(cacheId, topVer.topologyVersion()); // TODO
+ return resolveDiscoCache(cacheId, topVer).cacheNodes(cacheId, topVer.topologyVersion());
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index 3ee45ea..1d2c83c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -43,7 +43,6 @@ import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.CI1;
import org.apache.ignite.internal.util.typedef.CI2;
import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteUuid;
import org.jetbrains.annotations.NotNull;
@@ -100,8 +99,6 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
/** Response count. */
private volatile int resCnt;
- public UUID nearNodeId;
-
/**
* @param cctx Cache context.
* @param completionCb Callback to invoke when future is completed.
@@ -118,9 +115,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
) {
this.cctx = cctx;
- this.futVer = CU.cheatCache(cctx.cacheId()) ? updateReq.futureVersion() :
- cctx.versions().next(updateReq.topologyVersion());
-
+ this.futVer = updateReq.futureVersion();
this.updateReq = updateReq;
this.completionCb = completionCb;
this.updateRes = updateRes;
@@ -205,8 +200,6 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
conflictExpireTime,
conflictVer);
- updateReq.nearNodeId(nearNodeId);
-
mappings.put(nodeId, updateReq);
}
@@ -458,7 +451,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
clsr.apply(suc);
}
- if (updateReq.writeSynchronizationMode() == FULL_SYNC && !CU.cheatCache(cctx.cacheId()))
+ if (updateReq.writeSynchronizationMode() == FULL_SYNC)
completionCb.apply(updateReq, updateRes);
return true;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
index 21d5c87..deb9ce4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateRequest.java
@@ -76,14 +76,6 @@ public abstract class GridDhtAtomicAbstractUpdateRequest extends GridCacheMessag
return nodeId;
}
- public UUID nearNodeId() {
- return null;
- }
-
- public void nearNodeId(UUID nearNodeId) {
-
- }
-
/**
* @return Keep binary flag.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 9a9ab57..5fbc733 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -680,9 +680,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
true,
false).get();
- assert res != null || CU.cheatCache(ctx.cacheId());
+ assert res != null;
- return CU.cheatCache(ctx.cacheId()) ? true : res;
+ return res;
}
/** {@inheritDoc} */
@@ -1905,7 +1905,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
if (req.writeSynchronizationMode() != FULL_ASYNC)
req.cleanup(!node.isLocal());
- if (dhtFut != null && !CU.cheatCache(ctx.cacheId()))
+ if (dhtFut != null)
ctx.mvcc().addAtomicFuture(dhtFut.version(), dhtFut);
}
else
@@ -2516,8 +2516,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
if (dhtFut != null) {
if (updRes.sendToDht()) { // Send to backups even in case of remove-remove scenarios.
- dhtFut.nearNodeId = node.id(); //TODO
-
GridCacheVersionConflictContext<?, ?> conflictCtx = updRes.conflictResolveResult();
if (conflictCtx == null)
@@ -3315,17 +3313,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
try {
if (res.failedKeys() != null || res.nearEvicted() != null || req.writeSynchronizationMode() == FULL_SYNC) {
- if (CU.cheatCache(ctx.cacheId())) {
- ctx.io().send(
- req.nearNodeId(),
- new GridNearAtomicUpdateResponse(ctx.cacheId(),
- req.nearNodeId(),
- req.futureVersion(),
- false),
- ctx.ioPolicy());
- }
- else
- ctx.io().send(nodeId, res, ctx.ioPolicy());
+ ctx.io().send(nodeId, res, ctx.ioPolicy());
if (msgLog.isDebugEnabled()) {
msgLog.debug("Sent DHT atomic update response [futId=" + req.futureVersion() +
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
index 53c3079..a7e6c24 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicSingleUpdateRequest.java
@@ -52,7 +52,6 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
private static final int NEAR_FLAG_MASK = 0x80;
/** Future version. */
- @GridToStringInclude
protected GridCacheVersion futVer;
/** Write version. */
@@ -89,12 +88,8 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
protected long updateCntr;
/** */
- @GridToStringInclude
protected int partId;
- @GridToStringInclude
- protected UUID nearNodeId;
-
/**
* Empty constructor required by {@link Externalizable}.
*/
@@ -206,14 +201,6 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
this.val = val;
}
- public UUID nearNodeId() {
- return nearNodeId;
- }
-
- public void nearNodeId(UUID nearNodeId) {
- this.nearNodeId = nearNodeId;
- }
-
/** {@inheritDoc} */
@Override public boolean forceTransformBackups() {
return false;
@@ -454,60 +441,54 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
writer.incrementState();
case 6:
- if (!writer.writeUuid("nearNodeId", nearNodeId))
- return false;
-
- writer.incrementState();
-
- case 7:
if (!writer.writeInt("partId", partId))
return false;
writer.incrementState();
- case 8:
+ case 7:
if (!writer.writeMessage("prevVal", prevVal))
return false;
writer.incrementState();
- case 9:
+ case 8:
if (!writer.writeUuid("subjId", subjId))
return false;
writer.incrementState();
- case 10:
+ case 9:
if (!writer.writeByte("syncMode", syncMode != null ? (byte)syncMode.ordinal() : -1))
return false;
writer.incrementState();
- case 11:
+ case 10:
if (!writer.writeInt("taskNameHash", taskNameHash))
return false;
writer.incrementState();
- case 12:
+ case 11:
if (!writer.writeMessage("topVer", topVer))
return false;
writer.incrementState();
- case 13:
+ case 12:
if (!writer.writeLong("updateCntr", updateCntr))
return false;
writer.incrementState();
- case 14:
+ case 13:
if (!writer.writeMessage("val", val))
return false;
writer.incrementState();
- case 15:
+ case 14:
if (!writer.writeMessage("writeVer", writeVer))
return false;
@@ -554,14 +535,6 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
case 6:
- nearNodeId = reader.readUuid("nearNodeId");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 7:
partId = reader.readInt("partId");
if (!reader.isLastRead())
@@ -569,7 +542,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 8:
+ case 7:
prevVal = reader.readMessage("prevVal");
if (!reader.isLastRead())
@@ -577,7 +550,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 9:
+ case 8:
subjId = reader.readUuid("subjId");
if (!reader.isLastRead())
@@ -585,7 +558,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 10:
+ case 9:
byte syncModeOrd;
syncModeOrd = reader.readByte("syncMode");
@@ -597,7 +570,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 11:
+ case 10:
taskNameHash = reader.readInt("taskNameHash");
if (!reader.isLastRead())
@@ -605,7 +578,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 12:
+ case 11:
topVer = reader.readMessage("topVer");
if (!reader.isLastRead())
@@ -613,7 +586,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 13:
+ case 12:
updateCntr = reader.readLong("updateCntr");
if (!reader.isLastRead())
@@ -621,7 +594,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 14:
+ case 13:
val = reader.readMessage("val");
if (!reader.isLastRead())
@@ -629,7 +602,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
reader.incrementState();
- case 15:
+ case 14:
writeVer = reader.readMessage("writeVer");
if (!reader.isLastRead())
@@ -679,7 +652,7 @@ public class GridDhtAtomicSingleUpdateRequest extends GridDhtAtomicAbstractUpdat
/** {@inheritDoc} */
@Override public byte fieldsCount() {
- return 16;
+ return 15;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
index c911a99..7144963 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
@@ -151,8 +151,6 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
/** Additional flags. */
private byte flags;
- protected UUID nearNodeId;
-
/**
* Empty constructor required by {@link Externalizable}.
*/
@@ -294,14 +292,6 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
conflictExpireTimes.add(conflictExpireTime);
}
- public UUID nearNodeId() {
- return nearNodeId;
- }
-
- public void nearNodeId(UUID nearNodeId) {
- this.nearNodeId = nearNodeId;
- }
-
/** {@inheritDoc} */
@Override public void addNearWriteValue(KeyCacheObject key,
@Nullable CacheObject val,
@@ -691,72 +681,66 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
writer.incrementState();
case 15:
- if (!writer.writeUuid("nearNodeId", nearNodeId))
- return false;
-
- writer.incrementState();
-
- case 16:
if (!writer.writeMessage("nearTtls", nearTtls))
return false;
writer.incrementState();
- case 17:
+ case 16:
if (!writer.writeCollection("nearVals", nearVals, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 18:
+ case 17:
if (!writer.writeCollection("prevVals", prevVals, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 19:
+ case 18:
if (!writer.writeUuid("subjId", subjId))
return false;
writer.incrementState();
- case 20:
+ case 19:
if (!writer.writeByte("syncMode", syncMode != null ? (byte)syncMode.ordinal() : -1))
return false;
writer.incrementState();
- case 21:
+ case 20:
if (!writer.writeInt("taskNameHash", taskNameHash))
return false;
writer.incrementState();
- case 22:
+ case 21:
if (!writer.writeMessage("topVer", topVer))
return false;
writer.incrementState();
- case 23:
+ case 22:
if (!writer.writeMessage("ttls", ttls))
return false;
writer.incrementState();
- case 24:
+ case 23:
if (!writer.writeMessage("updateCntrs", updateCntrs))
return false;
writer.incrementState();
- case 25:
+ case 24:
if (!writer.writeCollection("vals", vals, MessageCollectionItemType.MSG))
return false;
writer.incrementState();
- case 26:
+ case 25:
if (!writer.writeMessage("writeVer", writeVer))
return false;
@@ -875,14 +859,6 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
case 15:
- nearNodeId = reader.readUuid("nearNodeId");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 16:
nearTtls = reader.readMessage("nearTtls");
if (!reader.isLastRead())
@@ -890,7 +866,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 17:
+ case 16:
nearVals = reader.readCollection("nearVals", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -898,7 +874,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 18:
+ case 17:
prevVals = reader.readCollection("prevVals", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -906,7 +882,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 19:
+ case 18:
subjId = reader.readUuid("subjId");
if (!reader.isLastRead())
@@ -914,7 +890,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 20:
+ case 19:
byte syncModeOrd;
syncModeOrd = reader.readByte("syncMode");
@@ -926,7 +902,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 21:
+ case 20:
taskNameHash = reader.readInt("taskNameHash");
if (!reader.isLastRead())
@@ -934,7 +910,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 22:
+ case 21:
topVer = reader.readMessage("topVer");
if (!reader.isLastRead())
@@ -942,7 +918,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 23:
+ case 22:
ttls = reader.readMessage("ttls");
if (!reader.isLastRead())
@@ -950,7 +926,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 24:
+ case 23:
updateCntrs = reader.readMessage("updateCntrs");
if (!reader.isLastRead())
@@ -958,7 +934,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 25:
+ case 24:
vals = reader.readCollection("vals", MessageCollectionItemType.MSG);
if (!reader.isLastRead())
@@ -966,7 +942,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
reader.incrementState();
- case 26:
+ case 25:
writeVer = reader.readMessage("writeVer");
if (!reader.isLastRead())
@@ -992,7 +968,7 @@ public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateReque
/** {@inheritDoc} */
@Override public byte fieldsCount() {
- return 27;
+ return 26;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
index 862e920..c92e0f5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
@@ -33,7 +33,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheOperation;
import org.apache.ignite.internal.processors.cache.GridCacheReturn;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.CI2;
import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -135,10 +134,6 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
/** Operation result. */
protected GridCacheReturn opRes;
- /** */
- @GridToStringInclude
- protected volatile Runnable completer;
-
/**
* Constructor.
*
@@ -225,23 +220,6 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
}
/**
- * @param completer
- */
- public void completer(Runnable completer) {
- this.completer = completer;
- }
-
- /** {@inheritDoc} */
- protected Runnable clearCompleter() {
- Runnable r = completer;
-
- if (r != null)
- completer = null;
-
- return r;
- }
-
- /**
* @param topVer Topology version.
* @param futVer Future version
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index 133e42e..8759018 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -210,7 +210,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
if (!res.futureVersion().equals(futVer))
return;
- if (!this.req.nodeId().equals(nodeId) && !CU.cheatCache(cctx.cacheId()))
+ if (!this.req.nodeId().equals(nodeId))
return;
req = this.req;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6abc0f43/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
index dc2afd9..bd11301 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
@@ -167,20 +167,6 @@ public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
}
/**
- * @return Completer.
- */
- protected Runnable completer() {
- return null;
- }
-
- /**
- * @return Completer and clears it.
- */
- protected Runnable clearCompleter() {
- return null;
- }
-
- /**
* Internal get routine.
*
* @param ignoreInterrupts Whether to ignore interrupts.
@@ -201,14 +187,6 @@ public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
for (; ; ) {
LockSupport.park();
- Runnable r = clearCompleter();
-
- if (r != null) {
- r.run();
-
- assert isDone();
- }
-
if (isDone())
return resolve(state);
[19/32] ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4908210a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4908210a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4908210a
Branch: refs/heads/ignite-comm-balance-master
Commit: 4908210aaa998e952d5acfe8b47d39a36e978a1e
Parents: 6d5adcb e126e55
Author: sboikov <sb...@gridgain.com>
Authored: Wed Feb 1 17:22:56 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Feb 1 17:22:56 2017 +0300
----------------------------------------------------------------------
.../stream/camel/IgniteCamelStreamerTest.java | 4 +-
.../cassandra/persistence/PojoKeyField.java | 2 +-
.../ClientAbstractMultiNodeSelfTest.java | 8 +-
...BinaryMarshallerInsertStatementSelfTest.java | 2 -
...cBinaryMarshallerMergeStatementSelfTest.java | 2 -
.../internal/jdbc2/JdbcMetadataSelfTest.java | 2 +-
.../ignite/jdbc/JdbcMetadataSelfTest.java | 4 +-
.../jdbc/suite/IgniteJdbcDriverTestSuite.java | 3 +-
.../ignite/codegen/MessageCodeGenerator.java | 2 +-
.../org/apache/ignite/cache/QueryEntity.java | 1 -
.../store/jdbc/CacheAbstractJdbcStore.java | 3 +-
.../store/jdbc/CacheJdbcBlobStoreFactory.java | 2 +-
.../ignite/internal/MarshallerContextImpl.java | 4 +-
.../internal/binary/BinaryEnumObjectImpl.java | 4 +-
.../internal/binary/BinaryMarshaller.java | 1 -
.../impl/GridRouterCommandLineStartup.java | 4 +-
.../cluster/ClusterNodeLocalMapImpl.java | 1 -
.../internal/jdbc2/JdbcSqlFieldsQuery.java | 1 -
.../ignite/internal/jdbc2/JdbcStatement.java | 2 -
.../discovery/GridDiscoveryManager.java | 2 +-
.../internal/mxbean/IgniteStandardMXBean.java | 12 +-
.../cache/CacheEvictableEntryImpl.java | 4 +-
.../processors/cache/CacheMetricsImpl.java | 10 +-
.../processors/cache/GridCacheAtomicFuture.java | 3 +-
.../cache/GridCacheDeploymentManager.java | 4 +-
.../GridCachePartitionExchangeManager.java | 2 +-
.../processors/cache/GridCacheProcessor.java | 13 +-
.../processors/cache/GridCacheSwapManager.java | 2 +-
.../processors/cache/GridCacheTtlManager.java | 4 +-
.../processors/cache/GridCacheUtils.java | 2 -
.../processors/cache/QueryCursorImpl.java | 6 +-
.../binary/CacheObjectBinaryProcessorImpl.java | 2 +-
.../GridDistributedCacheAdapter.java | 3 +-
.../distributed/GridDistributedCacheEntry.java | 3 -
.../GridDistributedLockResponse.java | 1 -
.../dht/GridClientPartitionTopology.java | 1 -
.../dht/GridDhtAssignmentFetchFuture.java | 3 +-
.../distributed/dht/GridDhtCacheAdapter.java | 6 +-
.../distributed/dht/GridDhtGetSingleFuture.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 2 +-
.../distributed/dht/GridDhtLockFuture.java | 7 +-
.../dht/GridDhtPartitionTopology.java | 1 -
.../dht/GridDhtPartitionTopologyImpl.java | 2 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 14 +-
.../distributed/dht/GridDhtTxFinishFuture.java | 8 +-
.../cache/distributed/dht/GridDhtTxLocal.java | 1 -
.../distributed/dht/GridDhtTxLocalAdapter.java | 3 +-
.../distributed/dht/GridDhtTxPrepareFuture.java | 13 +-
.../distributed/dht/GridDhtUnlockRequest.java | 3 +-
.../GridDhtAtomicAbstractUpdateFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 8 +-
.../atomic/GridNearAtomicFullUpdateRequest.java | 1 -
.../dht/preloader/GridDhtForceKeysFuture.java | 8 +-
.../dht/preloader/GridDhtPartitionDemander.java | 8 +-
.../dht/preloader/GridDhtPartitionMap2.java | 3 +-
.../GridDhtPartitionsExchangeFuture.java | 13 +-
.../distributed/near/GridNearGetFuture.java | 7 +-
...arOptimisticSerializableTxPrepareFuture.java | 2 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 11 +-
.../near/GridNearTxFinishFuture.java | 13 +-
.../processors/cache/query/CacheQuery.java | 1 -
.../cache/query/GridCacheSqlQuery.java | 2 -
.../continuous/CacheContinuousQueryHandler.java | 2 +-
.../cache/transactions/IgniteTxEntry.java | 2 +-
.../cache/transactions/IgniteTxHandler.java | 6 +-
.../transactions/IgniteTxLocalAdapter.java | 2 +-
.../cache/transactions/IgniteTxManager.java | 3 +-
.../cache/transactions/IgniteTxStateImpl.java | 1 -
.../cache/transactions/TxEntryValueHolder.java | 6 +-
.../IgniteCacheObjectProcessorImpl.java | 2 +-
.../processors/clock/GridClockServer.java | 4 +-
.../datastreamer/DataStreamProcessor.java | 3 +-
.../datastreamer/DataStreamerImpl.java | 4 +-
.../processors/hadoop/HadoopClasspathUtils.java | 4 +-
.../internal/processors/igfs/IgfsProcessor.java | 3 +-
.../igfs/client/IgfsClientSizeCallable.java | 1 -
.../platform/PlatformAbstractBootstrap.java | 3 +-
.../platform/PlatformConfigurationEx.java | 3 +-
.../platform/cache/PlatformCache.java | 12 +-
.../platform/utils/PlatformUtils.java | 2 +-
.../processors/query/GridQueryProcessor.java | 2 +-
.../resource/GridResourceProcessor.java | 2 +-
.../handlers/cache/GridCacheCommandHandler.java | 2 -
.../string/GridRedisSetCommandHandler.java | 2 +-
.../processors/task/GridTaskWorker.java | 2 +-
.../internal/util/GridStripedSpinBusyLock.java | 2 +-
.../ignite/internal/util/HostAndPortRange.java | 2 +-
.../ignite/internal/util/IgniteUtils.java | 3 +-
.../ignite/internal/util/StripedExecutor.java | 2 +-
.../visor/node/VisorIgfsConfiguration.java | 1 -
.../ignite/marshaller/jdk/JdkMarshaller.java | 1 -
.../optimized/OptimizedClassDescriptor.java | 2 +-
.../optimized/OptimizedMarshallerUtils.java | 4 +-
.../communication/tcp/TcpCommunicationSpi.java | 2 +-
.../tcp/TcpCommunicationSpiMBean.java | 1 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 4 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 7 +-
.../tcp/internal/TcpDiscoveryStatistics.java | 8 +-
.../CacheJdbcPojoStoreAbstractSelfTest.java | 2 -
.../store/jdbc/CacheJdbcPojoStoreTest.java | 3 -
.../internal/ClusterGroupHostsSelfTest.java | 6 +-
.../ComputeJobCancelWithServiceSelfTest.java | 2 +-
.../internal/GridContinuousTaskSelfTest.java | 4 +-
.../GridEventStorageCheckAllEventsSelfTest.java | 2 +-
.../IgniteClientReconnectApiExceptionTest.java | 6 +-
...niteClientReconnectFailoverAbstractTest.java | 4 +-
.../GridDiscoveryManagerAliveCacheSelfTest.java | 3 +-
.../GridDiscoveryManagerAttributesSelfTest.java | 4 +-
.../BinaryObjectOffHeapUnswapTemporaryTest.java | 1 -
.../cache/CacheAffinityCallSelfTest.java | 4 +-
.../cache/CacheGetEntryAbstractTest.java | 2 +-
.../CacheSerializableTransactionsTest.java | 6 +-
.../CacheStartupInDeploymentModesTest.java | 7 +-
.../cache/CacheStopAndDestroySelfTest.java | 6 +-
.../cache/GridCacheMvccPartitionedSelfTest.java | 48 ++---
.../processors/cache/GridCacheMvccSelfTest.java | 208 +++++++++----------
.../processors/cache/GridCacheStopSelfTest.java | 4 +-
.../processors/cache/GridCacheTestEntryEx.java | 3 +-
.../cache/GridCacheUtilsSelfTest.java | 2 +-
...ProjectionForCachesOnDaemonNodeSelfTest.java | 8 +-
.../IgniteCacheConfigVariationsFullApiTest.java | 2 -
.../cache/IgniteCacheStoreCollectionTest.java | 1 -
...gniteTopologyValidatorAbstractCacheTest.java | 6 +-
.../processors/cache/IgniteTxAbstractTest.java | 3 +-
.../cache/IgniteTxConfigCacheSelfTest.java | 2 +-
.../IgniteTxExceptionAbstractSelfTest.java | 3 +-
.../IgniteTxMultiThreadedAbstractTest.java | 4 +-
.../CacheKeepBinaryWithInterceptorTest.java | 1 -
...yAtomicEntryProcessorDeploymentSelfTest.java | 4 +-
...IgniteCacheAbstractExecutionContextTest.java | 2 -
...eAbstractDataStructuresFailoverSelfTest.java | 16 +-
.../IgniteLockAbstractSelfTest.java | 24 +--
.../CacheGetFutureHangsSelfTest.java | 6 +-
.../CacheLateAffinityAssignmentTest.java | 2 +-
...ridCachePartitionNotLoadedEventSelfTest.java | 4 +-
...niteCacheClientNodeChangingTopologyTest.java | 12 +-
...teSynchronizationModesMultithreadedTest.java | 8 +-
.../IgniteCacheCrossCacheTxFailoverTest.java | 6 +-
...ePrimaryNodeFailureRecoveryAbstractTest.java | 4 +-
...gniteCachePutRetryTransactionalSelfTest.java | 4 +-
...eAtomicInvalidPartitionHandlingSelfTest.java | 4 +-
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 4 +-
.../GridCacheReplicatedNodeRestartSelfTest.java | 3 +-
.../GridCacheReplicatedPreloadSelfTest.java | 1 -
.../IgniteCacheExpiryPolicyAbstractTest.java | 4 +-
...ContinuousQueryFailoverAbstractSelfTest.java | 6 +-
...dCacheContinuousQueryNodesFilteringTest.java | 2 +-
...IgniteCacheContinuousQueryReconnectTest.java | 12 +-
.../TxDeadlockDetectionNoHangsTest.java | 2 +-
.../transactions/TxDeadlockDetectionTest.java | 2 +-
...ComputeJobExecutionErrorToLogManualTest.java | 4 +-
.../datastreamer/DataStreamerImplSelfTest.java | 8 +-
.../datastreamer/DataStreamerTimeoutTest.java | 6 +-
.../processors/igfs/IgfsAbstractSelfTest.java | 32 +--
.../processors/igfs/IgfsFileInfoSelfTest.java | 4 +-
.../igfs/IgfsMetaManagerSelfTest.java | 3 +-
.../igfs/IgfsModeResolverSelfTest.java | 10 +-
.../igfs/benchmark/IgfsBenchmark.java | 4 +-
.../cache/GridCacheCommandHandlerSelfTest.java | 1 -
...rviceDeploymentExceptionPropagationTest.java | 2 +-
.../GridServiceProcessorStopSelfTest.java | 2 +-
.../service/IgniteServiceReassignmentTest.java | 2 +-
.../internal/util/IgniteUtilsSelfTest.java | 5 +-
.../unsafe/GridOffheapSnapTreeSelfTest.java | 7 +-
.../lang/GridMetadataAwareAdapterSelfTest.java | 4 +-
.../p2p/GridP2PSameClassLoaderSelfTest.java | 14 +-
.../platform/PlatformEventsWriteEventTask.java | 9 -
.../local/GridLocalDeploymentSpiSelfTest.java | 6 +-
...lientDiscoverySpiFailureTimeoutSelfTest.java | 4 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 8 +-
.../TcpDiscoverySpiFailureTimeoutSelfTest.java | 14 +-
.../GridSwapSpaceSpiAbstractSelfTest.java | 3 +-
.../testframework/GridSpiTestContext.java | 5 +-
.../ignite/testframework/IgniteTestSuite.java | 2 +-
.../IgniteCacheDataStructuresSelfTestSuite.java | 2 -
...essagingConfigVariationFullApiTestSuite.java | 4 +-
.../ignite/util/mbeans/GridMBeanSelfTest.java | 10 +-
.../CacheNoValueClassOnServerTestClient.java | 3 +-
.../CacheConfigurationP2PTestClient.java | 3 +-
.../gce/TcpDiscoveryGoogleStorageIpFinder.java | 4 +-
.../hadoop/igfs/HadoopIgfsEndpoint.java | 4 +-
.../HadoopBasicFileSystemFactoryDelegate.java | 2 +-
.../hadoop/impl/igfs/HadoopIgfsInProc.java | 40 ++--
.../hadoop/impl/v2/HadoopV2Context.java | 3 +-
.../taskexecutor/HadoopExecutorService.java | 6 +-
.../child/HadoopChildProcessRunner.java | 10 +-
.../hadoop/impl/HadoopErrorSimulator.java | 12 +-
.../HadoopIgfs20FileSystemAbstractSelfTest.java | 3 +-
.../IgniteHadoopFileSystemClientSelfTest.java | 6 +-
.../query/h2/GridH2ResultSetIterator.java | 3 +-
.../processors/query/h2/IgniteH2Indexing.java | 4 +-
.../query/h2/opt/GridH2IndexBase.java | 4 +-
.../processors/query/h2/sql/DmlAstUtils.java | 2 +-
.../query/h2/twostep/msg/GridH2Geometry.java | 2 +-
.../cache/BinarySerializationQuerySelfTest.java | 2 -
.../CacheRandomOperationsMultithreadedTest.java | 4 +-
.../ClientReconnectAfterClusterRestartTest.java | 4 +-
.../GridCacheQueryIndexDisabledSelfTest.java | 20 +-
.../cache/IgniteCacheAbstractQuerySelfTest.java | 3 +-
...eLockPartitionOnAffinityRunAbstractTest.java | 1 -
...PartitionOnAffinityRunAtomicCacheOpTest.java | 11 +-
...niteCacheLockPartitionOnAffinityRunTest.java | 51 ++---
...titionOnAffinityRunWithCollisionSpiTest.java | 10 +-
.../cache/IgniteCacheMergeSqlQuerySelfTest.java | 1 -
.../cache/IgniteCacheOffheapEvictQueryTest.java | 4 +-
...niteCacheP2pUnmarshallingQueryErrorTest.java | 4 +-
.../IgniteCacheUpdateSqlQuerySelfTest.java | 2 +-
...niteCacheDistributedQueryCancelSelfTest.java | 4 +-
.../IgniteCacheQueryNodeRestartSelfTest2.java | 4 +-
.../query/IgniteSqlSchemaIndexingTest.java | 15 +-
.../query/IgniteSqlSplitterSelfTest.java | 4 +-
.../h2/GridIndexingSpiAbstractSelfTest.java | 4 +-
.../query/h2/sql/GridQueryParsingTest.java | 4 -
.../apache/ignite/stream/jms11/JmsStreamer.java | 4 +-
.../ignite/stream/kafka/KafkaStreamer.java | 6 +-
.../ignite/stream/kafka/TestKafkaBroker.java | 2 +-
.../connect/IgniteSourceConnectorTest.java | 2 +-
.../stream/mqtt/IgniteMqttStreamerTest.java | 4 +-
.../BundleDelegatingClassLoader.java | 4 +-
.../classloaders/ContainerSweepClassLoader.java | 4 +-
.../Cache/CacheAbstractTransactionalTest.cs | 8 +-
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 9 +-
.../spark/JavaStandaloneIgniteRDDSelfTest.java | 3 +-
.../util/spring/IgniteSpringHelperImpl.java | 8 +-
.../ignite/internal/GridFactorySelfTest.java | 2 +-
.../internal/IgniteDynamicCacheConfigTest.java | 4 +-
.../GridSpringTransactionManagerSelfTest.java | 2 +-
.../ignite/tools/classgen/ClassesGenerator.java | 2 +-
.../twitter/IgniteTwitterStreamerTest.java | 4 +-
.../GridUriDeploymentFileProcessorSelfTest.java | 3 +-
.../ignite/cache/websession/WebSessionV2.java | 2 +-
.../internal/websession/WebSessionSelfTest.java | 6 +-
.../apache/ignite/yarn/ApplicationMaster.java | 4 +-
.../org/apache/ignite/yarn/IgniteProvider.java | 4 +-
.../tcp/ipfinder/zk/ZookeeperIpFinderTest.java | 2 +-
235 files changed, 617 insertions(+), 781 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4908210a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
[05/32] ignite git commit: Removed 'disable peer class loading'
suggestion.
Posted by yz...@apache.org.
Removed 'disable peer class loading' suggestion.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/00dc9643
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/00dc9643
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/00dc9643
Branch: refs/heads/ignite-comm-balance-master
Commit: 00dc964362031522a99b8140bec889c56a756fcf
Parents: e8067a6
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jan 27 15:13:13 2017 -0800
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jan 27 15:13:13 2017 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/IgniteKernal.java | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/00dc9643/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 4972d1f..9f1c746 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1292,9 +1292,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
if (ctx.checkpoint().enabled())
perf.add("Disable checkpoints (remove 'checkpointSpi' from configuration)");
- if (cfg.isPeerClassLoadingEnabled())
- perf.add("Disable peer class loading (set 'peerClassLoadingEnabled' to false)");
-
if (cfg.isMarshalLocalJobs())
perf.add("Disable local jobs marshalling (set 'marshalLocalJobs' to false)");
[28/32] ignite git commit: IGNITE-4252: Fixed exception with local
cache query started on partitioned cache. This closes #1489.
Posted by yz...@apache.org.
IGNITE-4252: Fixed exception with local cache query started on partitioned cache. This closes #1489.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/26562d35
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/26562d35
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/26562d35
Branch: refs/heads/ignite-comm-balance-master
Commit: 26562d3575c54a359df06c72202ec91e078fde05
Parents: b246260
Author: Sergey Kalashnikov <sk...@gridgain.com>
Authored: Fri Feb 3 11:58:35 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Feb 3 11:58:35 2017 +0300
----------------------------------------------------------------------
.../h2/twostep/GridReduceQueryExecutor.java | 2 +-
.../IgniteSqlEntryCacheModeAgnosticTest.java | 140 +++++++++++++++++++
.../IgniteCacheQuerySelfTestSuite.java | 2 +
3 files changed, 143 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/26562d35/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 1f00ed2..cbe1599 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -384,7 +384,7 @@ public class GridReduceQueryExecutor {
* @return {@code True} If cache has partitions in {@link GridDhtPartitionState#MOVING} state.
*/
private boolean hasMovingPartitions(GridCacheContext<?, ?> cctx) {
- return cctx.topology().hasMovingPartitions();
+ return !cctx.isLocal() && cctx.topology().hasMovingPartitions();
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/26562d35/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java
new file mode 100644
index 0000000..db7ca39
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlEntryCacheModeAgnosticTest.java
@@ -0,0 +1,140 @@
+/*
+ * 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.Ignite;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import java.util.List;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.LOCAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheMode.REPLICATED;
+
+/**
+ * Test different cache modes for query entry
+ */
+public class IgniteSqlEntryCacheModeAgnosticTest extends GridCommonAbstractTest {
+ /** IP finder. */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** Host. */
+ public static final String HOST = "127.0.0.1";
+
+ /** Partitioned cache name. */
+ private static final String PARTITIONED_CACHE_NAME = "PART_CACHE";
+
+ /** Replicated cache name. */
+ private static final String REPLICATED_CACHE_NAME = "REPL_CACHE";
+
+ /** Local cache name. */
+ private static final String LOCAL_CACHE_NAME = "LOCAL_CACHE";
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration c = super.getConfiguration(gridName);
+
+ c.setLocalHost(HOST);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(IP_FINDER);
+
+ c.setDiscoverySpi(disco);
+
+ c.setCacheConfiguration(cacheConfiguration(LOCAL_CACHE_NAME),
+ cacheConfiguration(REPLICATED_CACHE_NAME), cacheConfiguration(PARTITIONED_CACHE_NAME));
+
+ return c;
+ }
+
+ /**
+ * Provides configuration for cache given its name
+ * @param cacheName Cache name.
+ * @return Cache configuration.
+ * @throws Exception In case of error.
+ */
+ @SuppressWarnings("unchecked")
+ private CacheConfiguration cacheConfiguration(String cacheName) throws Exception {
+ CacheConfiguration cfg = defaultCacheConfiguration();
+
+ cfg.setAffinity(new RendezvousAffinityFunction());
+
+ cfg.setAtomicityMode(TRANSACTIONAL);
+
+ switch (cacheName) {
+ case LOCAL_CACHE_NAME:
+ cfg.setCacheMode(LOCAL);
+ break;
+ case REPLICATED_CACHE_NAME:
+ cfg.setCacheMode(REPLICATED);
+ break;
+ case PARTITIONED_CACHE_NAME:
+ cfg.setCacheMode(PARTITIONED);
+ cfg.setBackups(0);
+ break;
+ default:
+ throw new Exception("Invalid cache name " + cacheName);
+ }
+
+ cfg.setName(cacheName);
+
+ cfg.setIndexedTypes(Integer.class, String.class);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllGrids();
+ }
+
+ /**
+ * It should not matter what cache mode does entry cache use, if there is no join
+ */
+ public void testCrossCacheModeQuery() throws Exception {
+ Ignite ignite = startGrid();
+
+ ignite.cache(LOCAL_CACHE_NAME).put(1, LOCAL_CACHE_NAME);
+ ignite.cache(REPLICATED_CACHE_NAME).put(1, REPLICATED_CACHE_NAME);
+ ignite.cache(PARTITIONED_CACHE_NAME).put(1, PARTITIONED_CACHE_NAME);
+
+ final List<String> cacheNamesList = F.asList(LOCAL_CACHE_NAME, REPLICATED_CACHE_NAME, PARTITIONED_CACHE_NAME);
+
+ for(String entryCacheName: cacheNamesList) {
+ for(String qryCacheName: cacheNamesList) {
+ if (entryCacheName.equals(qryCacheName))
+ continue;
+
+ QueryCursor<List<?>> cursor = ignite.cache(entryCacheName).query(
+ new SqlFieldsQuery("SELECT _VAL FROM \"" + qryCacheName + "\".String"));
+
+ assertEquals(qryCacheName, (String)cursor.getAll().get(0).get(0));
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/26562d35/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index b5e4078..d85e111 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -95,6 +95,7 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheSwapScanQueryS
import org.apache.ignite.internal.processors.cache.query.IgniteCacheQueryCacheDestroySelfTest;
import org.apache.ignite.internal.processors.cache.query.IndexingSpiQuerySelfTest;
import org.apache.ignite.internal.processors.cache.query.IndexingSpiQueryTxSelfTest;
+import org.apache.ignite.internal.processors.query.IgniteSqlEntryCacheModeAgnosticTest;
import org.apache.ignite.internal.processors.query.IgniteSqlSchemaIndexingTest;
import org.apache.ignite.internal.processors.query.IgniteSqlSplitterSelfTest;
import org.apache.ignite.internal.processors.query.h2.GridH2IndexRebuildTest;
@@ -240,6 +241,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
suite.addTestSuite(CacheOffheapBatchIndexingSingleTypeTest.class);
suite.addTestSuite(CacheSqlQueryValueCopySelfTest.class);
suite.addTestSuite(IgniteCacheQueryCacheDestroySelfTest.class);
+ suite.addTestSuite(IgniteSqlEntryCacheModeAgnosticTest.class);
return suite;
}
[12/32] ignite git commit: IGNITE-4612 Minor code cleanup
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java
index 766aa84..410f196 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java
@@ -94,7 +94,7 @@ public class DataStreamerTimeoutTest extends GridCommonAbstractTest {
for (int i = 0; i < ENTRY_AMOUNT; i++)
ldr.addData(i, i);
}
- catch (CacheException | IgniteDataStreamerTimeoutException e) {
+ catch (CacheException | IgniteDataStreamerTimeoutException ignored) {
thrown = true;
}
finally {
@@ -153,11 +153,11 @@ public class DataStreamerTimeoutTest extends GridCommonAbstractTest {
processed++;
}
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
// No-op.
}
}
- catch (CacheException | IgniteDataStreamerTimeoutException e) {
+ catch (CacheException | IgniteDataStreamerTimeoutException ignored) {
thrown = true;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
index 128239d..c2d76df 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
@@ -487,10 +487,10 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
catch (IgfsParentNotDirectoryException ignore) {
// No-op.
}
- catch (IgfsException ignore) {
+ catch (IgfsException e) {
// Currently Ok for Hadoop fs:
if (!getClass().getSimpleName().startsWith("Hadoop"))
- throw ignore;
+ throw e;
}
try {
@@ -501,10 +501,10 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
catch (IgfsParentNotDirectoryException ignore) {
// No-op.
}
- catch (IgfsException ignore) {
+ catch (IgfsException e) {
// Currently Ok for Hadoop fs:
if (!getClass().getSimpleName().startsWith("Hadoop"))
- throw ignore;
+ throw e;
}
create(igfs, paths(DIR, SUBDIR), null);
@@ -942,8 +942,8 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
try (IgfsOutputStream os = igfs.create(new IgfsPath("/k/l"), false)) {}
fail("Exception expected");
- } catch (IgniteException e) {
- // okay
+ } catch (IgniteException ignored) {
+ // No-op.
}
checkExist(igfs, igfsSecondary, new IgfsPath("/k/l"));
@@ -953,7 +953,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
try (IgfsOutputStream os = igfs.create(new IgfsPath("/k/l/m"), true)) {}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
checkNotExist(igfs, igfsSecondary, new IgfsPath("/k/l/m"));
@@ -964,7 +964,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
try (IgfsOutputStream os = igfs.create(new IgfsPath("/k/l/m/n/o/p"), true)) {}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
checkNotExist(igfs, igfsSecondary, new IgfsPath("/k/l/m"));
@@ -976,7 +976,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
try (IgfsOutputStream os = igfs.create(new IgfsPath("/x/y"), true)) {}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
@@ -1337,7 +1337,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
createCtr.incrementAndGet();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
// No-op.
}
catch (IOException e) {
@@ -1439,7 +1439,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
checkNotExist(igfs, igfsSecondary, new IgfsPath("/d1"));
@@ -1457,7 +1457,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
checkNotExist(igfs, igfsSecondary, new IgfsPath("/k/l/m"));
@@ -1471,7 +1471,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
checkNotExist(igfs, igfsSecondary, new IgfsPath("/k/l/m"));
@@ -1488,7 +1488,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
@@ -1519,7 +1519,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
}
fail("Exception expected");
- } catch (IgniteException e) {
+ } catch (IgniteException ignored) {
// okay
}
checkNotExist(igfs, igfsSecondary, new IgfsPath("/d1"));
@@ -2549,4 +2549,4 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
U.joinThreads(threads, null);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
index 486179c..b2b87dc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
@@ -43,8 +43,6 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
public void testSerialization() throws Exception {
marshaller.setContext(new MarshallerContextTestImpl());
- final int max = Integer.MAX_VALUE;
-
multithreaded(new Callable<Object>() {
private final Random rnd = new Random();
@@ -77,4 +75,4 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
private <T> T mu(T obj) throws IgniteCheckedException {
return marshaller.unmarshal(marshaller.marshal(obj), null);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
index a4100ea..01e1a2e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
@@ -158,7 +158,6 @@ public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest {
for (IgniteBiTuple<IgniteUuid, String> tup: Arrays.asList(F.t(dir.id(), "dir"), F.t(file.id(), "file"))) {
IgniteUuid fileId = tup.get1();
- String fileName = tup.get2();
for (Map<String, String> props : Arrays.asList(null, Collections.<String, String>emptyMap()))
expectsUpdatePropertiesFail(fileId, props, AssertionError.class, "Expects not-empty file's properties");
@@ -419,4 +418,4 @@ public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest {
assertTrue("Unexpected cause: " + err, err instanceof IgfsException);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java
index 7932660..2b231cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java
@@ -98,8 +98,8 @@ public class IgfsModeResolverSelfTest extends TestCase {
fail("IgniteCheckedException expected");
}
- catch (IgniteCheckedException ice) {
- // Expected.
+ catch (IgniteCheckedException ignored) {
+ // No-op.
}
// PRIMARY default mode and non-primary subfolder:
@@ -111,8 +111,8 @@ public class IgfsModeResolverSelfTest extends TestCase {
fail("IgniteCheckedException expected");
}
- catch (IgniteCheckedException ice) {
- // Expected.
+ catch (IgniteCheckedException ignored) {
+ // No-op.
}
}
}
@@ -178,4 +178,4 @@ public class IgfsModeResolverSelfTest extends TestCase {
add(new IgfsPath("/a/b/x/y"));
}});
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java
index 9cf6e8f..f3bce8e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/benchmark/IgfsBenchmark.java
@@ -96,7 +96,7 @@ class WriteFileOperation extends FileOperation {
/** {@inheritDoc} */
@Override public void handleFile(String strPath) throws Exception {
IgfsPath path = new IgfsPath(strPath);
- IgfsOutputStream out = null;
+ IgfsOutputStream out;
try {
out = fs.create(path, false);
@@ -154,7 +154,7 @@ class ReadFileOperation extends FileOperation {
/** {@inheritDoc} */
@Override public void handleFile(String strPath) throws Exception {
IgfsPath path = new IgfsPath(strPath);
- IgfsInputStream in = null;
+ IgfsInputStream in;
try {
in = fs.open(path);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
index eadf674..c26376e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java
@@ -38,7 +38,6 @@ import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
import org.apache.ignite.internal.processors.rest.GridRestCommand;
-import org.apache.ignite.internal.processors.rest.GridRestResponse;
import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandler;
import org.apache.ignite.internal.processors.rest.request.GridRestCacheRequest;
import org.apache.ignite.internal.util.future.GridFinishedFuture;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java
index 811594f..156a72e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceDeploymentExceptionPropagationTest.java
@@ -45,7 +45,7 @@ public class GridServiceDeploymentExceptionPropagationTest extends GridCommonAbs
try {
client.services().deployClusterSingleton("my-service", new ServiceImpl());
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
assertTrue(log.toString().contains("ServiceImpl init exception"));
return; // Exception is what we expect.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
index 92b18ab..08595f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorStopSelfTest.java
@@ -65,7 +65,7 @@ public class GridServiceProcessorStopSelfTest extends GridCommonAbstractTest {
try {
services.future().get();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
finishLatch.countDown();
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
index d7937ec..09c631c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceReassignmentTest.java
@@ -176,7 +176,7 @@ public class IgniteServiceReassignmentTest extends GridCommonAbstractTest {
return true;
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
return false;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
index d774065..c068984 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteUtilsSelfTest.java
@@ -54,7 +54,6 @@ import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.http.GridEmbeddedHttpServer;
-import org.apache.ignite.testframework.junits.GridTestKernalContext;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
import org.jetbrains.annotations.Nullable;
@@ -325,7 +324,7 @@ public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
col = Arrays.asList(this, this, this);
- GridTestKernalContext ctx = newContext();
+ newContext();
subGrid = ignite.cluster().forNodes(Collections.singleton(node));
}
@@ -780,4 +779,4 @@ public class IgniteUtilsSelfTest extends GridCommonAbstractTest {
private interface I3 extends I2 {}
@Ann2 private interface I4 {}
private interface I5 extends I4 {}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffheapSnapTreeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffheapSnapTreeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffheapSnapTreeSelfTest.java
index 92d9ec2..0d97d54 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffheapSnapTreeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/offheap/unsafe/GridOffheapSnapTreeSelfTest.java
@@ -72,7 +72,10 @@ public class GridOffheapSnapTreeSelfTest extends GridCommonAbstractTest {
guard.begin();
try {
- GridOffHeapSmartPointer res = put ? m.put(fx, fx) : m.remove(fx);
+ if (put)
+ m.put(fx, fx);
+ else
+ m.remove(fx);
}
finally {
lock.readLock().unlock();
@@ -320,4 +323,4 @@ public class GridOffheapSnapTreeSelfTest extends GridCommonAbstractTest {
return ptr + "(" + refs + ")";
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
index a0a926a..f202fa9 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
@@ -51,7 +51,7 @@ public class GridMetadataAwareAdapterSelfTest extends GridCommonAbstractTest {
int k3 = cnt++;
int a1 = cnt++;
int a2 = cnt++;
- int a3 = cnt++;
+ int a3 = cnt;
// addMeta(name, val).
assert ma.addMeta(attr1, "val1") == null;
@@ -139,4 +139,4 @@ public class GridMetadataAwareAdapterSelfTest extends GridCommonAbstractTest {
assert !ma.hasMeta(a3);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java
index ba5e15b..9ac4852 100644
--- a/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/p2p/GridP2PSameClassLoaderSelfTest.java
@@ -82,12 +82,10 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
/**
* Test.
- * @param isIsolatedDifferentTask Isolated different task flag.
- * @param isIsolatedDifferentNode Isolated different mode flag.
* @throws Exception if error occur
*/
@SuppressWarnings({"unchecked"})
- private void processTest(boolean isIsolatedDifferentTask, boolean isIsolatedDifferentNode) throws Exception {
+ private void processTest() throws Exception {
try {
final Ignite ignite1 = startGrid(1);
Ignite ignite2 = startGrid(2);
@@ -128,7 +126,7 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
public void testPrivateMode() throws Exception {
depMode = DeploymentMode.PRIVATE;
- processTest(true, true);
+ processTest();
}
/**
@@ -139,7 +137,7 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
public void testIsolatedMode() throws Exception {
depMode = DeploymentMode.ISOLATED;
- processTest(false, true);
+ processTest();
}
/**
@@ -150,7 +148,7 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
public void testContinuousMode() throws Exception {
depMode = DeploymentMode.CONTINUOUS;
- processTest(false, false);
+ processTest();
}
/**
@@ -161,7 +159,7 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
public void testSharedMode() throws Exception {
depMode = DeploymentMode.SHARED;
- processTest(false, false);
+ processTest();
}
/**
@@ -177,4 +175,4 @@ public class GridP2PSameClassLoaderSelfTest extends GridCommonAbstractTest {
return m1[0] != m2[0] && m1[1] != m2[1];
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/platform/PlatformEventsWriteEventTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformEventsWriteEventTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformEventsWriteEventTask.java
index 9fbe272..2e5a3e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformEventsWriteEventTask.java
+++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformEventsWriteEventTask.java
@@ -23,15 +23,6 @@ import org.apache.ignite.compute.ComputeJob;
import org.apache.ignite.compute.ComputeJobAdapter;
import org.apache.ignite.compute.ComputeJobResult;
import org.apache.ignite.compute.ComputeTaskAdapter;
-import org.apache.ignite.events.CacheEvent;
-import org.apache.ignite.events.CacheQueryExecutedEvent;
-import org.apache.ignite.events.CacheQueryReadEvent;
-import org.apache.ignite.events.CacheRebalancingEvent;
-import org.apache.ignite.events.CheckpointEvent;
-import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.events.JobEvent;
-import org.apache.ignite.events.SwapSpaceEvent;
-import org.apache.ignite.events.TaskEvent;
import org.apache.ignite.internal.binary.BinaryRawWriterEx;
import org.apache.ignite.internal.processors.platform.PlatformContext;
import org.apache.ignite.internal.processors.platform.memory.PlatformMemory;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java
index 9a1c9a0..1483364 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java
@@ -128,7 +128,7 @@ public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest<LocalDep
assert false : "Exception must be thrown for registering with the same name.";
}
- catch (IgniteSpiException e) {
+ catch (IgniteSpiException ignored) {
// No-op.
}
@@ -147,7 +147,7 @@ public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest<LocalDep
assert false : "Exception must be thrown for registering with the same name.";
}
- catch (IgniteSpiException e) {
+ catch (IgniteSpiException ignored) {
// No-op.
}
@@ -192,4 +192,4 @@ public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest<LocalDep
return null;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
index 35aa934..a0545f5 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java
@@ -313,8 +313,8 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov
try {
Thread.sleep(2000);
}
- catch (InterruptedException e) {
- // Ignore
+ catch (InterruptedException ignored) {
+ // No-op.
}
throw new SocketTimeoutException("Forced timeout");
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
index 043208c..fc40f13 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
@@ -1327,7 +1327,7 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
nodeSpi.set(new TestCustomEventRaceSpi());
- Ignite ignite2 = startGrid(2);
+ startGrid(2);
return null;
}
@@ -2040,7 +2040,7 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
return false;
}
- catch (IgniteIllegalStateException e) {
+ catch (IgniteIllegalStateException ignored) {
return true;
}
}
@@ -2406,8 +2406,8 @@ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
try {
Thread.sleep(5_000);
}
- catch (InterruptedException e) {
- // Ignore.
+ catch (InterruptedException ignored) {
+ // No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java
index 4ef984f..a496f30 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiFailureTimeoutSelfTest.java
@@ -323,14 +323,14 @@ public class TcpDiscoverySpiFailureTimeoutSelfTest extends AbstractDiscoverySelf
try {
Thread.sleep(timeout + 1000);
}
- catch (InterruptedException e) {
- // Ignore
+ catch (InterruptedException ignored) {
+ // No-op.
}
try {
timeoutHelper.nextTimeoutChunk(0);
}
- catch (IgniteSpiOperationTimeoutException e) {
+ catch (IgniteSpiOperationTimeoutException ignored) {
throw (err = new IgniteSpiOperationTimeoutException("Timeout: openSocketTimeoutWait"));
}
}
@@ -340,8 +340,8 @@ public class TcpDiscoverySpiFailureTimeoutSelfTest extends AbstractDiscoverySelf
try {
Thread.sleep(1500);
}
- catch (InterruptedException e) {
- // Ignore
+ catch (InterruptedException ignored) {
+ // No-op.
}
return sock;
@@ -369,8 +369,8 @@ public class TcpDiscoverySpiFailureTimeoutSelfTest extends AbstractDiscoverySelf
try {
Thread.sleep(timeout);
}
- catch (InterruptedException e) {
- // Ignore
+ catch (InterruptedException ignored) {
+ // No-op.
}
}
else
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java
index 9e927dd..e573afc 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/swapspace/GridSwapSpaceSpiAbstractSelfTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.internal.util.typedef.CI1;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.P1;
import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.spi.IgniteSpiCloseableIterator;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -650,4 +649,4 @@ public abstract class GridSwapSpaceSpiAbstractSelfTest extends GridCommonAbstrac
return "Key: " + i;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
index ac50ef9..b19d07b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
@@ -665,10 +665,9 @@ public class GridSpiTestContext implements IgniteSpiContext {
@Override public void onMessage(UUID nodeId, Object msg) {
GridIoUserMessage ioMsg = (GridIoUserMessage)msg;
- ClusterNode node = locNode;
- Object msgBody = ioMsg.body();
+ Object msgBody = ioMsg.body();
- assert msgBody != null || ioMsg.bodyBytes() != null;
+ assert msgBody != null || ioMsg.bodyBytes() != null;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
index 157e1f5..861c139 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
@@ -130,7 +130,7 @@ public class IgniteTestSuite extends TestSuite {
try {
getTestConstructor(theClass);
}
- catch (NoSuchMethodException ex) {
+ catch (NoSuchMethodException ignored) {
addTest(warning("Class " + theClass.getName() +
" has no public constructor TestCase(String name) or TestCase()"));
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
index d14aa4e..980d550 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
@@ -24,7 +24,6 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDa
import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDiscoveryDataStructuresTest;
import org.apache.ignite.internal.processors.cache.datastructures.IgniteDataStructureUniqueNameTest;
import org.apache.ignite.internal.processors.cache.datastructures.IgniteDataStructureWithJobTest;
-import org.apache.ignite.internal.processors.cache.datastructures.SemaphoreFailoverSafeReleasePermitsTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicOffheapSetSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicQueueApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicSetSelfTest;
@@ -69,7 +68,6 @@ import org.apache.ignite.internal.processors.cache.datastructures.partitioned.Gr
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedSetSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedAtomicLongApiSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedCountDownLatchSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedLockSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedQueueNoBackupsTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedSemaphoreSelfTest;
import org.apache.ignite.internal.processors.cache.datastructures.partitioned.IgnitePartitionedSetNoBackupsSelfTest;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java
index 6933ae9..bfb9cd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMessagingConfigVariationFullApiTestSuite.java
@@ -27,8 +27,6 @@ import org.apache.ignite.testframework.configvariations.ConfigVariations;
import org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder;
import org.apache.ignite.testframework.configvariations.Parameters;
-import javax.cache.configuration.Factory;
-
/**
* Test sute for Messaging process.
*/
@@ -69,4 +67,4 @@ public class IgniteMessagingConfigVariationFullApiTestSuite extends TestSuite {
return suite;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java
index 58be549..4f5ed19 100644
--- a/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/util/mbeans/GridMBeanSelfTest.java
@@ -90,7 +90,7 @@ public class GridMBeanSelfTest extends GridCommonAbstractTest {
mbean.getMBeanInfo();
}
- catch (AssertionError e) {
+ catch (AssertionError ignored) {
return;
}
@@ -109,7 +109,7 @@ public class GridMBeanSelfTest extends GridCommonAbstractTest {
mbean.getMBeanInfo();
}
- catch (AssertionError e) {
+ catch (AssertionError ignored) {
return;
}
@@ -128,7 +128,7 @@ public class GridMBeanSelfTest extends GridCommonAbstractTest {
mbean.getMBeanInfo();
}
- catch (AssertionError e) {
+ catch (AssertionError ignored) {
return;
}
@@ -147,7 +147,7 @@ public class GridMBeanSelfTest extends GridCommonAbstractTest {
mbean.getMBeanInfo();
}
- catch (AssertionError e) {
+ catch (AssertionError ignored) {
return;
}
@@ -371,4 +371,4 @@ public class GridMBeanSelfTest extends GridCommonAbstractTest {
return null;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/CacheNoValueClassOnServerTestClient.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/CacheNoValueClassOnServerTestClient.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/CacheNoValueClassOnServerTestClient.java
index 5c82469..bbf8abf 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/CacheNoValueClassOnServerTestClient.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/cache/CacheNoValueClassOnServerTestClient.java
@@ -22,7 +22,6 @@ import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -84,4 +83,4 @@ public class CacheNoValueClassOnServerTestClient {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
index e0406c2..9798025 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
@@ -24,7 +24,6 @@ import org.apache.ignite.Ignition;
import org.apache.ignite.cache.query.SqlQuery;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -114,4 +113,4 @@ public class CacheConfigurationP2PTestClient {
cache2.destroy();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/gce/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/gce/TcpDiscoveryGoogleStorageIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/gce/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/gce/TcpDiscoveryGoogleStorageIpFinder.java b/modules/gce/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/gce/TcpDiscoveryGoogleStorageIpFinder.java
index 980c696..71074c0 100644
--- a/modules/gce/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/gce/TcpDiscoveryGoogleStorageIpFinder.java
+++ b/modules/gce/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/gce/TcpDiscoveryGoogleStorageIpFinder.java
@@ -379,7 +379,7 @@ public class TcpDiscoveryGoogleStorageIpFinder extends TcpDiscoveryIpFinderAdapt
try {
port = Integer.parseInt(res[1]);
}
- catch (NumberFormatException e) {
+ catch (NumberFormatException ignored) {
throw new IgniteSpiException("Invalid port number: " + res[1]);
}
@@ -403,4 +403,4 @@ public class TcpDiscoveryGoogleStorageIpFinder extends TcpDiscoveryIpFinderAdapt
throw new IgniteSpiException("Failed to remove the bucket: " + bucketName, e);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsEndpoint.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsEndpoint.java
index a44e1ae..23db921 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsEndpoint.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsEndpoint.java
@@ -158,7 +158,7 @@ public class HadoopIgfsEndpoint {
if (port < 0 || port > 65535)
throw new IgniteCheckedException("Invalid port number: " + connStr);
}
- catch (NumberFormatException e) {
+ catch (NumberFormatException ignored) {
throw new IgniteCheckedException("Invalid port number: " + connStr);
}
}
@@ -207,4 +207,4 @@ public class HadoopIgfsEndpoint {
@Override public String toString() {
return S.toString(HadoopIgfsEndpoint.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopBasicFileSystemFactoryDelegate.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopBasicFileSystemFactoryDelegate.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopBasicFileSystemFactoryDelegate.java
index 59488be..2db0271 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopBasicFileSystemFactoryDelegate.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopBasicFileSystemFactoryDelegate.java
@@ -154,7 +154,7 @@ public class HadoopBasicFileSystemFactoryDelegate implements HadoopFileSystemFac
try {
fullUri = new URI(proxy0.getUri());
}
- catch (URISyntaxException use) {
+ catch (URISyntaxException ignored) {
throw new IgniteException("Failed to resolve secondary file system URI: " + proxy0.getUri());
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsInProc.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsInProc.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsInProc.java
index 8bdcc83..f9f98ed 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsInProc.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsInProc.java
@@ -117,7 +117,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to get file info because Grid is stopping: " + path);
}
}
@@ -134,7 +134,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to update file because Grid is stopping: " + path);
}
}
@@ -155,9 +155,8 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
- throw new HadoopIgfsCommunicationException("Failed to set path times because Grid is stopping: " +
- path);
+ catch (IllegalStateException ignored) {
+ throw new HadoopIgfsCommunicationException("Failed to set path times because Grid is stopping: " + path);
}
}
@@ -177,7 +176,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to rename path because Grid is stopping: " + src);
}
}
@@ -194,7 +193,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to delete path because Grid is stopping: " + path);
}
}
@@ -208,14 +207,13 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
}
});
}
- catch (IllegalStateException e) {
- throw new HadoopIgfsCommunicationException("Failed to get file system status because Grid is " +
- "stopping.");
+ catch (IllegalStateException ignored) {
+ throw new HadoopIgfsCommunicationException("Failed to get file system status because Grid is stopping.");
}
catch (IgniteCheckedException | RuntimeException | Error e) {
throw e;
}
- catch (Exception e) {
+ catch (Exception ignored) {
throw new AssertionError("Must never go there.");
}
}
@@ -232,7 +230,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to list paths because Grid is stopping: " + path);
}
}
@@ -249,7 +247,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to list files because Grid is stopping: " + path);
}
}
@@ -270,7 +268,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to create directory because Grid is stopping: " +
path);
}
@@ -288,7 +286,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to get content summary because Grid is stopping: " +
path);
}
@@ -307,7 +305,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to get affinity because Grid is stopping: " + path);
}
}
@@ -326,7 +324,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to open file because Grid is stopping: " + path);
}
}
@@ -346,7 +344,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to open file because Grid is stopping: " + path);
}
}
@@ -367,7 +365,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to create file because Grid is stopping: " + path);
}
}
@@ -387,7 +385,7 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
catch (IgniteException e) {
throw new IgniteCheckedException(e);
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
throw new HadoopIgfsCommunicationException("Failed to append file because Grid is stopping: " + path);
}
}
@@ -508,4 +506,4 @@ public class HadoopIgfsInProc implements HadoopIgfsEx {
@Override public String user() {
return user;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
index 1f4e675..6202622 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
@@ -31,7 +31,6 @@ import org.apache.hadoop.mapreduce.task.JobContextImpl;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.processors.hadoop.HadoopFileBlock;
import org.apache.ignite.internal.processors.hadoop.HadoopInputSplit;
-import org.apache.ignite.internal.processors.hadoop.HadoopMapperAwareTaskOutput;
import org.apache.ignite.internal.processors.hadoop.HadoopTaskCancelledException;
import org.apache.ignite.internal.processors.hadoop.HadoopTaskContext;
import org.apache.ignite.internal.processors.hadoop.HadoopTaskInput;
@@ -242,4 +241,4 @@ public class HadoopV2Context extends JobContextImpl implements MapContext, Reduc
public void cancel() {
cancelled = true;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/HadoopExecutorService.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/HadoopExecutorService.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/HadoopExecutorService.java
index 993ecc9..a5f3df9 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/HadoopExecutorService.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/HadoopExecutorService.java
@@ -130,7 +130,7 @@ public class HadoopExecutorService {
return; // Rejected due to shutdown.
}
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
Thread.currentThread().interrupt();
return;
@@ -217,7 +217,7 @@ public class HadoopExecutorService {
awaitTimeMillis -= 100;
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
break;
}
}
@@ -231,4 +231,4 @@ public class HadoopExecutorService {
public boolean isShutdown() {
return shutdown;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/child/HadoopChildProcessRunner.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/child/HadoopChildProcessRunner.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/child/HadoopChildProcessRunner.java
index 3336120..0f418e7 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/child/HadoopChildProcessRunner.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/child/HadoopChildProcessRunner.java
@@ -153,7 +153,7 @@ public class HadoopChildProcessRunner {
shuffleJob = new HadoopShuffleJob<>(comm.localProcessDescriptor(), log, job, mem,
req.totalReducerCount(), req.localReducers(), 0, false);
- initializeExecutors(req);
+ initializeExecutors();
if (log.isDebugEnabled())
log.debug("External process initialized [initWaitTime=" +
@@ -233,13 +233,9 @@ public class HadoopChildProcessRunner {
/**
* Creates executor services.
*
- * @param req Init child process request.
*/
- private void initializeExecutors(HadoopPrepareForJobRequest req) {
+ private void initializeExecutors() {
int cpus = Runtime.getRuntime().availableProcessors();
-//
-// concMappers = get(req.jobInfo(), EXTERNAL_CONCURRENT_MAPPERS, cpus);
-// concReducers = get(req.jobInfo(), EXTERNAL_CONCURRENT_REDUCERS, cpus);
execSvc = new HadoopExecutorService(log, "", cpus * 2, 1024);
}
@@ -466,4 +462,4 @@ public class HadoopChildProcessRunner {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopErrorSimulator.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopErrorSimulator.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopErrorSimulator.java
index b89dcc1..7c76cc3 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopErrorSimulator.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopErrorSimulator.java
@@ -208,8 +208,8 @@ public class HadoopErrorSimulator {
if ((bits & 1) != 0)
simulateError();
}
- catch (IOException e) {
- // ignore
+ catch (IOException ignored) {
+ // No-op.
}
}
@@ -237,8 +237,8 @@ public class HadoopErrorSimulator {
if ((bits & 16) != 0)
simulateError();
}
- catch (IOException e) {
- // ignore
+ catch (IOException ignored) {
+ // No-op.
}
}
@@ -266,8 +266,8 @@ public class HadoopErrorSimulator {
if ((bits & 256) != 0)
simulateError();
}
- catch (IOException e) {
- // ignore
+ catch (IOException ignored) {
+ // No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java
index d8f6f54..a297aef 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfs20FileSystemAbstractSelfTest.java
@@ -66,7 +66,6 @@ import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration;
import org.apache.ignite.igfs.IgfsMetrics;
import org.apache.ignite.igfs.IgfsMode;
import org.apache.ignite.igfs.IgfsPath;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsUtils;
import org.apache.ignite.internal.processors.igfs.IgfsCommonAbstractTest;
import org.apache.ignite.internal.util.GridConcurrentHashSet;
import org.apache.ignite.internal.util.typedef.F;
@@ -2044,4 +2043,4 @@ public abstract class HadoopIgfs20FileSystemAbstractSelfTest extends IgfsCommonA
pathUri.getAuthority() != null ? secondaryUri.getAuthority() : null, pathUri.getPath(), null, null));
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java
index 555da1e..ed806db 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgniteHadoopFileSystemClientSelfTest.java
@@ -33,10 +33,6 @@ import org.apache.ignite.igfs.IgfsIpcEndpointType;
import org.apache.ignite.igfs.IgfsPath;
import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.igfs.common.IgfsLogger;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfs;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsOutProc;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsOutputStream;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsStreamDelegate;
import org.apache.ignite.internal.processors.igfs.IgfsCommonAbstractTest;
import org.apache.ignite.internal.processors.igfs.IgfsContext;
import org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter;
@@ -213,4 +209,4 @@ public class IgniteHadoopFileSystemClientSelfTest extends IgfsCommonAbstractTest
return (T)field.get(obj);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/GridH2ResultSetIterator.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/GridH2ResultSetIterator.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/GridH2ResultSetIterator.java
index c8c26c4..fed292a 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/GridH2ResultSetIterator.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/GridH2ResultSetIterator.java
@@ -22,7 +22,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.NoSuchElementException;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteException;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
import org.apache.ignite.internal.processors.query.h2.opt.GridH2ValueCacheObject;
@@ -189,4 +188,4 @@ public abstract class GridH2ResultSetIterator<T> extends GridCloseableIteratorAd
@Override public String toString() {
return S.toString(GridH2ResultSetIterator.class, this);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 9037943..cf044e2 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1232,7 +1232,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
try {
ctx.cache().createMissingCaches();
}
- catch (IgniteCheckedException e1) {
+ catch (IgniteCheckedException ignored) {
throw new CacheException("Failed to create missing caches.", e);
}
@@ -3151,4 +3151,4 @@ public class IgniteH2Indexing implements GridQueryIndexing {
for (Connection conn : conns)
U.close(conn, log);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index c29239f..3820cdc 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@ -1228,7 +1228,7 @@ public abstract class GridH2IndexBase extends BaseIndex {
try {
res = respQueue.poll(500, TimeUnit.MILLISECONDS);
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
throw new GridH2RetryException("Interrupted.");
}
@@ -1535,4 +1535,4 @@ public abstract class GridH2IndexBase extends BaseIndex {
return fltr.apply(key, val);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/DmlAstUtils.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/DmlAstUtils.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/DmlAstUtils.java
index 6deb146..9752c5f 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/DmlAstUtils.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/DmlAstUtils.java
@@ -382,7 +382,7 @@ public final class DmlAstUtils {
try {
dfltVal = dfltExpr != null ? dfltExpr.getValue(null) : null;
}
- catch (Exception e) {
+ catch (Exception ignored) {
throw new IgniteSQLException("Failed to evaluate default value for a column " + col.columnName());
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2Geometry.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2Geometry.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2Geometry.java
index 0d118b4..88aba55 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2Geometry.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2Geometry.java
@@ -41,7 +41,7 @@ public class GridH2Geometry extends GridH2ValueMessage {
try {
GEOMETRY_FROM_BYTES = Class.forName("org.h2.value.ValueGeometry").getMethod("get", byte[].class);
}
- catch (NoSuchMethodException | ClassNotFoundException e) {
+ catch (NoSuchMethodException | ClassNotFoundException ignored) {
throw new IllegalStateException("Check H2 version in classpath.");
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
index 669c482..d205065 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheRebalanceMode;
import org.apache.ignite.cache.CacheTypeMetadata;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.SqlQuery;
import org.apache.ignite.configuration.BinaryConfiguration;
@@ -56,7 +55,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
/**
* Test for query with BinaryMarshaller and different serialization modes.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
index dc0175d..c1e94f0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
@@ -227,7 +227,7 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
ThreadLocalRandom rnd = ThreadLocalRandom.current();
while (U.currentTimeMillis() < stopTime)
- randomOperation(rnd, ignite, cache, indexing);
+ randomOperation(rnd, cache, indexing);
}
}, 1, "test-thread");
}
@@ -238,12 +238,10 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
/**
* @param rnd Random generator.
- * @param ignite Node.
* @param cache Cache.
* @param indexing Indexing flag.
*/
private void randomOperation(ThreadLocalRandom rnd,
- Ignite ignite,
IgniteCache<Object, Object> cache,
boolean indexing) {
int r0 = rnd.nextInt(100);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
index b31447c..ec94b0c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
@@ -113,7 +113,7 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe
/** */
public void testReconnectClient() throws Exception {
try {
- Ignite igniteSrv = startGrid(0);
+ startGrid(0);
Ignite client = startGrid(1);
@@ -159,7 +159,7 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe
Thread.sleep(2_000);
- igniteSrv = startGrid(0);
+ startGrid(0);
Thread.sleep(2_000);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java
index b3aedfc..3b1cf11 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexDisabledSelfTest.java
@@ -80,7 +80,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
}
@@ -99,7 +99,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
@@ -111,7 +111,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
}
@@ -130,7 +130,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
}
@@ -148,7 +148,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
}
}).setLocal(true)).getAll();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
assertTrue("Scan query should work with disable query indexing.", false);
}
}
@@ -166,7 +166,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
}
@@ -185,7 +185,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
}
@@ -204,7 +204,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
catch (CacheException e) {
X.println("Caught expected exception: " + e);
}
- catch (Exception e) {
+ catch (Exception ignored) {
assert false;
}
}
@@ -222,7 +222,7 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
}
})).getAll();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
assertTrue("Scan query should work with disabled query indexing.", false);
}
}
@@ -258,4 +258,4 @@ public class GridCacheQueryIndexDisabledSelfTest extends GridCommonAbstractTest
return S.toString(SqlValue.class, this);
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 7c5b472..ddffb68 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -66,7 +66,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.events.CacheQueryExecutedEvent;
import org.apache.ignite.events.CacheQueryReadEvent;
import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedQuerySelfTest;
import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
@@ -252,7 +251,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
fail();
}
- catch (CacheException e) {
+ catch (CacheException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java
index 1f992e4..69ef79d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java
index fb90c7e..88eedaf 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest.java
@@ -18,8 +18,6 @@
package org.apache.ignite.internal.processors.cache;
import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.IgniteCache;
@@ -270,13 +268,10 @@ public class IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest extends Igni
@Override public void run() {
log.info("Begin run " + keyBegin);
IgniteCache cache = ignite.cache(cacheName);
- Map<Integer, Integer> vals = new HashMap<>();
for (int i = 0; i < KEYS_CNT; ++i)
cache.put(i + keyBegin, i + keyBegin);
-// vals.put(i + keyBegin, i + keyBegin);
-// cache.putAll(vals);
log.info("End run " + keyBegin);
}
}
@@ -315,15 +310,11 @@ public class IgniteCacheLockPartitionOnAffinityRunAtomicCacheOpTest extends Igni
@Override public void run() {
log.info("Begin run " + keyBegin);
IgniteCache cache = ignite.cache(Person.class.getSimpleName());
- Map<Person.Key, Person> pers = new HashMap<>();
for (int i = 0; i < KEYS_CNT; ++i) {
Person p = new Person(i + keyBegin, orgId);
-// pers.put(p.createKey(), p);
cache.put(p.createKey(), p);
}
-
-// cache.putAll(pers);
}
}
-}
\ No newline at end of file
+}
[08/32] ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/ignite
Posted by yz...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ec9a3cd6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ec9a3cd6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ec9a3cd6
Branch: refs/heads/ignite-comm-balance-master
Commit: ec9a3cd679c806a4bc71c5ac55754818e4faece1
Parents: 2caa0c6 6015603
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Jan 27 17:17:52 2017 -0800
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Jan 27 17:17:52 2017 -0800
----------------------------------------------------------------------
.../java/org/apache/ignite/configuration/CacheConfiguration.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[25/32] ignite git commit: IGNITE-3430 .NET: Enable TransactionScope
API again, fix and improve tests
Posted by yz...@apache.org.
IGNITE-3430 .NET: Enable TransactionScope API again, fix and improve tests
This closes #1487
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b0e104e8
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b0e104e8
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b0e104e8
Branch: refs/heads/ignite-comm-balance-master
Commit: b0e104e87e40e6cd4164d96d17d757b822a50e9b
Parents: cfaa5cb
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Feb 2 18:34:54 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Feb 2 18:34:54 2017 +0300
----------------------------------------------------------------------
.../Cache/CacheAbstractTransactionalTest.cs | 105 ++++++++++---------
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 9 +-
2 files changed, 58 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0e104e8/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index 4bf38b9..2107399 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -569,7 +569,6 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/>.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestTransactionScopeSingleCache()
{
var cache = Cache();
@@ -607,7 +606,6 @@ namespace Apache.Ignite.Core.Tests.Cache
/// with multiple participating caches.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestTransactionScopeMultiCache()
{
var cache1 = Cache();
@@ -648,7 +646,6 @@ namespace Apache.Ignite.Core.Tests.Cache
/// when Ignite tx is started manually.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestTransactionScopeWithManualIgniteTx()
{
var cache = Cache();
@@ -674,7 +671,6 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test Ignite transaction with <see cref="TransactionScopeOption.Suppress"/> option.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestSuppressedTransactionScope()
{
var cache = Cache();
@@ -694,7 +690,6 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/> with nested scopes.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestNestedTransactionScope()
{
var cache = Cache();
@@ -737,7 +732,6 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test that ambient <see cref="TransactionScope"/> options propagate to Ignite transaction.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestTransactionScopeOptions()
{
var cache = Cache();
@@ -773,10 +767,9 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Tests all transactional operations with <see cref="TransactionScope"/>.
/// </summary>
[Test]
- [Ignore("IGNITE-3430")]
public void TestTransactionScopeAllOperations()
{
- for (var i = 0; i < 100; i++)
+ for (var i = 0; i < 10; i++)
{
CheckTxOp((cache, key) => cache.Put(key, -5));
CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
@@ -792,7 +785,7 @@ namespace Apache.Ignite.Core.Tests.Cache
CheckTxOp((cache, key) =>
{
cache.Remove(key);
- cache.PutIfAbsentAsync(key, -10);
+ cache.PutIfAbsentAsync(key, -10).Wait();
});
CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
@@ -810,28 +803,28 @@ namespace Apache.Ignite.Core.Tests.Cache
});
CheckTxOp((cache, key) => cache.GetAndRemove(key));
- CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
+ CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key).Wait());
CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
- CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
+ CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11).Wait());
CheckTxOp((cache, key) => cache.Invoke(key, new AddProcessor(), 1));
- CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1).Wait());
CheckTxOp((cache, key) => cache.InvokeAll(new[] {key}, new AddProcessor(), 1));
- CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(), 1).Wait());
CheckTxOp((cache, key) => cache.Remove(key));
- CheckTxOp((cache, key) => cache.RemoveAsync(key));
+ CheckTxOp((cache, key) => cache.RemoveAsync(key).Wait());
CheckTxOp((cache, key) => cache.RemoveAll(new[] {key}));
CheckTxOp((cache, key) => cache.RemoveAllAsync(new[] {key}).Wait());
CheckTxOp((cache, key) => cache.Replace(key, 100));
- CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100));
+ CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100).Wait());
CheckTxOp((cache, key) => cache.Replace(key, cache[key], 100));
- CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100));
+ CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100).Wait());
}
}
@@ -840,50 +833,62 @@ namespace Apache.Ignite.Core.Tests.Cache
/// </summary>
private void CheckTxOp(Action<ICache<int, int>, int> act)
{
- var cache = Cache();
-
- cache[1] = 1;
- cache[2] = 2;
+ var isolationLevels = new[]
+ {
+ IsolationLevel.Serializable, IsolationLevel.RepeatableRead, IsolationLevel.ReadCommitted,
+ IsolationLevel.ReadUncommitted, IsolationLevel.Snapshot, IsolationLevel.Chaos
+ };
- // Rollback.
- using (new TransactionScope())
+ foreach (var isolationLevel in isolationLevels)
{
- act(cache, 1);
+ var txOpts = new TransactionOptions {IsolationLevel = isolationLevel};
+ const TransactionScopeOption scope = TransactionScopeOption.Required;
- Assert.IsNotNull(cache.Ignite.GetTransactions().Tx, "Transaction has not started.");
- }
+ var cache = Cache();
- Assert.AreEqual(1, cache[1]);
- Assert.AreEqual(2, cache[2]);
+ cache[1] = 1;
+ cache[2] = 2;
- using (new TransactionScope())
- {
- act(cache, 1);
- act(cache, 2);
- }
+ // Rollback.
+ using (new TransactionScope(scope, txOpts))
+ {
+ act(cache, 1);
- Assert.AreEqual(1, cache[1]);
- Assert.AreEqual(2, cache[2]);
+ Assert.IsNotNull(cache.Ignite.GetTransactions().Tx, "Transaction has not started.");
+ }
- // Commit.
- using (var ts = new TransactionScope())
- {
- act(cache, 1);
- ts.Complete();
- }
+ Assert.AreEqual(1, cache[1]);
+ Assert.AreEqual(2, cache[2]);
- Assert.IsTrue(!cache.ContainsKey(1) || cache[1] != 1);
- Assert.AreEqual(2, cache[2]);
+ using (new TransactionScope(scope, txOpts))
+ {
+ act(cache, 1);
+ act(cache, 2);
+ }
- using (var ts = new TransactionScope())
- {
- act(cache, 1);
- act(cache, 2);
- ts.Complete();
- }
+ Assert.AreEqual(1, cache[1]);
+ Assert.AreEqual(2, cache[2]);
- Assert.IsTrue(!cache.ContainsKey(1) || cache[1] != 1);
- Assert.IsTrue(!cache.ContainsKey(2) || cache[2] != 2);
+ // Commit.
+ using (var ts = new TransactionScope(scope, txOpts))
+ {
+ act(cache, 1);
+ ts.Complete();
+ }
+
+ Assert.IsTrue(!cache.ContainsKey(1) || cache[1] != 1);
+ Assert.AreEqual(2, cache[2]);
+
+ using (var ts = new TransactionScope(scope, txOpts))
+ {
+ act(cache, 1);
+ act(cache, 2);
+ ts.Complete();
+ }
+
+ Assert.IsTrue(!cache.ContainsKey(1) || cache[1] != 1);
+ Assert.IsTrue(!cache.ContainsKey(2) || cache[2] != 2);
+ }
}
[Serializable]
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0e104e8/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index cb6c8d5..a387e1b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -80,12 +80,9 @@ namespace Apache.Ignite.Core.Impl.Cache
_flagKeepBinary = flagKeepBinary;
_flagNoRetries = flagNoRetries;
- // TransactionScope feature disabled: IGNITE-3430.
- _txManager = null;
-
- //_txManager = GetConfiguration().AtomicityMode == CacheAtomicityMode.Transactional
- // ? new CacheTransactionManager(grid.GetTransactions())
- // : null;
+ _txManager = GetConfiguration().AtomicityMode == CacheAtomicityMode.Transactional
+ ? new CacheTransactionManager(grid.GetTransactions())
+ : null;
}
/** <inheritDoc /> */
[09/32] ignite git commit: .NET: Ignore
TestTransactionScopeAllOperations until IGNITE-3477 is fixed
Posted by yz...@apache.org.
.NET: Ignore TestTransactionScopeAllOperations until IGNITE-3477 is fixed
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e613c009
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e613c009
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e613c009
Branch: refs/heads/ignite-comm-balance-master
Commit: e613c0091cb4ef47fa5e7b1915272b1ff8c93970
Parents: ec9a3cd
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Jan 30 20:14:43 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Jan 30 20:14:43 2017 +0300
----------------------------------------------------------------------
.../Cache/CacheAbstractTransactionalTest.cs | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/e613c009/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index 37a22ae..f355187 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -767,6 +767,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Tests all transactional operations with <see cref="TransactionScope"/>.
/// </summary>
[Test]
+ [Ignore("IGNITE-3477")]
public void TestTransactionScopeAllOperations()
{
CheckTxOp((cache, key) => cache.Put(key, -5));
[11/32] ignite git commit: IGNITE-4612 Minor code cleanup
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java
index 168b25c..fbc94ed 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cache.query.ScanQuery;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.compute.ComputeJobMasterLeaveAware;
import org.apache.ignite.compute.ComputeTaskSession;
import org.apache.ignite.internal.IgniteEx;
@@ -58,19 +57,18 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
private static int getPersonsCountFromPartitionMapCheckBothCaches(final IgniteEx ignite, IgniteLogger log,
int orgId) throws Exception {
- assertEquals(1, getOrganizationCountFromPartitionMap(ignite, log, orgId));
+ assertEquals(1, getOrganizationCountFromPartitionMap(ignite, orgId));
- return getPersonsCountFromPartitionMap(ignite, log, orgId);
+ return getPersonsCountFromPartitionMap(ignite, orgId);
}
/**
* @param ignite Ignite.
- * @param log Logger.
* @param orgId Organization id.
* @return Count of found Person object with specified orgId
* @throws Exception If failed.
*/
- private static int getOrganizationCountFromPartitionMap(final IgniteEx ignite, IgniteLogger log,
+ private static int getOrganizationCountFromPartitionMap(final IgniteEx ignite,
int orgId) throws Exception {
int part = ignite.affinity(Organization.class.getSimpleName()).partition(orgId);
@@ -95,12 +93,11 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
/**
* @param ignite Ignite.
- * @param log Logger.
* @param orgId Organization id.
* @return Count of found Person object with specified orgId
* @throws Exception If failed.
*/
- private static int getPersonsCountFromPartitionMap(final IgniteEx ignite, IgniteLogger log, int orgId)
+ private static int getPersonsCountFromPartitionMap(final IgniteEx ignite, int orgId)
throws Exception {
int part = ignite.affinity(Organization.class.getSimpleName()).partition(orgId);
@@ -125,11 +122,10 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
/**
* @param ignite Ignite.
- * @param log Logger.
* @param orgId Organization id.
* @return Count of found Person object with specified orgId
*/
- private static int getPersonsCountBySqlFieldLocalQuery(final IgniteEx ignite, IgniteLogger log, int orgId) {
+ private static int getPersonsCountBySqlFieldLocalQuery(final IgniteEx ignite, int orgId) {
List res = ignite.cache(Person.class.getSimpleName())
.query(new SqlFieldsQuery(
String.format("SELECT p.id FROM \"%s\".Person as p " +
@@ -142,11 +138,10 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
/**
* @param ignite Ignite.
- * @param log Logger.
* @param orgId Organization id.
* @return Count of found Person object with specified orgId
*/
- private static int getPersonsCountBySqlFieledLocalQueryJoinOrgs(final IgniteEx ignite, IgniteLogger log,
+ private static int getPersonsCountBySqlFieledLocalQueryJoinOrgs(final IgniteEx ignite,
int orgId) {
List res = ignite.cache(Person.class.getSimpleName())
.query(new SqlFieldsQuery(
@@ -162,11 +157,10 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
/**
* @param ignite Ignite.
- * @param log Logger.
* @param orgId Organization id.
* @return Count of found Person object with specified orgId
*/
- private static int getPersonsCountBySqlLocalQuery(final IgniteEx ignite, IgniteLogger log, int orgId) {
+ private static int getPersonsCountBySqlLocalQuery(final IgniteEx ignite, int orgId) {
List res = ignite.cache(Person.class.getSimpleName())
.query(new SqlQuery<Person.Key, Person>(Person.class, "orgId = ?").setArgs(orgId).setLocal(true))
.getAll();
@@ -176,11 +170,10 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
/**
* @param ignite Ignite.
- * @param log Logger.
* @param orgId Organization id.
* @return Count of found Person object with specified orgId
*/
- private static int getPersonsCountByScanLocalQuery(final IgniteEx ignite, IgniteLogger log, final int orgId) {
+ private static int getPersonsCountByScanLocalQuery(final IgniteEx ignite, final int orgId) {
List res = ignite.cache(Person.class.getSimpleName())
.query(new ScanQuery<>(new IgniteBiPredicate<Person.Key, Person>() {
@Override public boolean apply(Person.Key key, Person person) {
@@ -200,10 +193,10 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
*/
private static int getPersonsCountSingleCache(final IgniteEx ignite, IgniteLogger log, final int orgId)
throws Exception {
- int sqlCnt = getPersonsCountBySqlLocalQuery(ignite, log, orgId);
- int sqlFieldCnt = getPersonsCountBySqlFieldLocalQuery(ignite, log, orgId);
- int scanCnt = getPersonsCountByScanLocalQuery(ignite, log, orgId);
- int partCnt = getPersonsCountFromPartitionMap(ignite, log, orgId);
+ int sqlCnt = getPersonsCountBySqlLocalQuery(ignite, orgId);
+ int sqlFieldCnt = getPersonsCountBySqlFieldLocalQuery(ignite, orgId);
+ int scanCnt = getPersonsCountByScanLocalQuery(ignite, orgId);
+ int partCnt = getPersonsCountFromPartitionMap(ignite, orgId);
assertEquals(PERS_AT_ORG_CNT, partCnt);
assertEquals(partCnt, sqlCnt);
@@ -222,7 +215,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
*/
private static int getPersonsCountMultipleCache(final IgniteEx ignite, IgniteLogger log, final int orgId)
throws Exception {
- int sqlFieldCnt = getPersonsCountBySqlFieledLocalQueryJoinOrgs(ignite, log, orgId);
+ int sqlFieldCnt = getPersonsCountBySqlFieledLocalQueryJoinOrgs(ignite, orgId);
int partCnt = getPersonsCountFromPartitionMapCheckBothCaches(ignite, log, orgId);
assertEquals(partCnt, sqlFieldCnt);
@@ -481,7 +474,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
fail("Exception must be thrown");
}
- catch (Exception e) {
+ catch (Exception ignored) {
checkPartitionsReservations(grid(1), orgId, 0);
}
@@ -507,7 +500,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
fail("Exception must be thrown");
}
- catch (Exception e) {
+ catch (Exception ignored) {
checkPartitionsReservations(grid(1), orgId, 0);
}
}
@@ -540,7 +533,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
fail("Error must be thrown");
}
- catch (Throwable e) {
+ catch (Throwable ignored) {
checkPartitionsReservations(grid(1), orgId, 0);
}
@@ -566,7 +559,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
fail("Error must be thrown");
}
- catch (Throwable e) {
+ catch (Throwable ignored) {
checkPartitionsReservations(grid(1), orgId, 0);
}
}
@@ -584,7 +577,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
new JobFailUnmarshaling());
fail("Unmarshaling exception must be thrown");
}
- catch (Exception e) {
+ catch (Exception ignored) {
checkPartitionsReservations(grid(1), orgId, 0);
}
}
@@ -615,7 +608,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
try {
Thread.sleep(1000);
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
// No-op.
}
}
@@ -656,7 +649,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
try {
Thread.sleep(1000);
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
// No-op.
}
return null;
@@ -708,7 +701,7 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
try {
Thread.sleep(1000);
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
// No-op.
}
}
@@ -849,4 +842,4 @@ public class IgniteCacheLockPartitionOnAffinityRunTest extends IgniteCacheLockPa
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java
index c0b896a..2fab000 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest.java
@@ -19,28 +19,22 @@ package org.apache.ignite.internal.processors.cache;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.resources.LoggerResource;
import org.apache.ignite.spi.IgniteSpiAdapter;
-import org.apache.ignite.spi.IgniteSpiContext;
import org.apache.ignite.spi.IgniteSpiException;
import org.apache.ignite.spi.IgniteSpiMultipleInstancesSupport;
import org.apache.ignite.spi.collision.CollisionContext;
import org.apache.ignite.spi.collision.CollisionExternalListener;
import org.apache.ignite.spi.collision.CollisionJobContext;
import org.apache.ignite.spi.collision.CollisionSpi;
-import org.apache.ignite.spi.collision.jobstealing.JobStealingCollisionSpi;
-import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi;
import org.apache.ignite.testframework.GridTestUtils;
-import org.jetbrains.annotations.Nullable;
/**
* Test to validate https://issues.apache.org/jira/browse/IGNITE-2310
@@ -73,7 +67,7 @@ public class IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest
Arrays.asList(Organization.class.getSimpleName(), Person.class.getSimpleName()),
new Integer(orgId),
new TestRun(orgId));
- } catch (Exception e) {
+ } catch (Exception ignored) {
// No-op. Swallow exceptions on run (e.g. job canceling etc.).
// The test checks only correct partition release in case CollisionSpi is used.
}
@@ -201,4 +195,4 @@ public class IgniteCacheLockPartitionOnAffinityRunWithCollisionSpiTest
// No-op.
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java
index 58d07af..32b7a12 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheMergeSqlQuerySelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
/**
*
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
index bddef66..860f7ca 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
@@ -197,7 +197,7 @@ public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest {
X.println("___ all keys removed");
}
- catch (IgniteFutureTimeoutCheckedException e) {
+ catch (IgniteFutureTimeoutCheckedException ignored) {
X.println("___ timeout");
X.println("___ keys: " + keys.get());
@@ -206,4 +206,4 @@ public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest {
fut.get();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
index c9544b9..3be84a1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingQueryErrorTest.java
@@ -54,7 +54,7 @@ public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnm
fail("p2p marshalling failed, but error response was not sent");
}
- catch (CacheException e) {
+ catch (CacheException ignored) {
// No-op.
}
}
@@ -82,7 +82,7 @@ public class IgniteCacheP2pUnmarshallingQueryErrorTest extends IgniteCacheP2pUnm
fail();
}
- catch (Exception e) {
+ catch (Exception ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java
index 58bcaac..575f617 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java
@@ -182,7 +182,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml
cache.query(new SqlFieldsQuery("insert into \"AllTypes\"(_key, _val, \"dateCol\", \"booleanCol\"," +
"\"tsCol\") values(2, ?, '2016-11-30 12:00:00', false, DATE '2016-12-01')").setArgs(new AllTypes(2L)));
- List<?> ll = cache.query(new SqlFieldsQuery("select \"primitiveIntsCol\" from \"AllTypes\"")).getAll();
+ cache.query(new SqlFieldsQuery("select \"primitiveIntsCol\" from \"AllTypes\"")).getAll();
cache.query(new SqlFieldsQuery("update \"AllTypes\" set \"doubleCol\" = CAST('50' as INT)," +
" \"booleanCol\" = 80, \"innerTypeCol\" = ?, \"strCol\" = PI(), \"shortCol\" = " +
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java
index 3fec966..ba58511 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java
@@ -22,9 +22,7 @@ import java.util.List;
import javax.cache.CacheException;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.query.QueryCancelledException;
import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlFunction;
@@ -173,4 +171,4 @@ public class IgniteCacheDistributedQueryCancelSelfTest extends GridCommonAbstrac
throw new IllegalArgumentException();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
index 154daa0..0733940 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest2.java
@@ -360,7 +360,7 @@ public class IgniteCacheQueryNodeRestartSelfTest2 extends GridCommonAbstractTest
// Query thread can stuck in next page waiting loop because all nodes are left.
try {
fut1.get(5_000);
- } catch (IgniteFutureTimeoutCheckedException e) {
+ } catch (IgniteFutureTimeoutCheckedException ignored) {
fut1.cancel();
}
@@ -427,4 +427,4 @@ public class IgniteCacheQueryNodeRestartSelfTest2 extends GridCommonAbstractTest
this.companyId = companyId;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
index 88f1f1e..52ba246 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
@@ -63,10 +63,9 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
/**
* @param name Cache name.
* @param partitioned Partition or replicated cache.
- * @param idxTypes Indexed types.
* @return Cache configuration.
*/
- private static CacheConfiguration cacheConfig(String name, boolean partitioned, Class<?>... idxTypes) {
+ private static CacheConfiguration cacheConfig(String name, boolean partitioned) {
return new CacheConfiguration()
.setName(name)
.setCacheMode(partitioned ? CacheMode.PARTITIONED : CacheMode.REPLICATED)
@@ -91,9 +90,9 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
- final CacheConfiguration cfg = cacheConfig("InSensitiveCache", true, Integer.class, Integer.class)
+ final CacheConfiguration cfg = cacheConfig("InSensitiveCache", true)
.setSqlSchema("InsensitiveCache");
- final CacheConfiguration collisionCfg = cacheConfig("InsensitiveCache", true, Integer.class, Integer.class)
+ final CacheConfiguration collisionCfg = cacheConfig("InsensitiveCache", true)
.setSqlSchema("Insensitivecache");
IgniteConfiguration icfg = new IgniteConfiguration()
.setLocalHost("127.0.0.1")
@@ -114,9 +113,9 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
public void testCacheUnregistration() throws Exception {
startGridsMultiThreaded(3, true);
- final CacheConfiguration<Integer, Fact> cfg = cacheConfig("Insensitive_Cache", true, Integer.class, Fact.class)
+ final CacheConfiguration<Integer, Fact> cfg = cacheConfig("Insensitive_Cache", true)
.setSqlSchema("Insensitive_Cache");
- final CacheConfiguration<Integer, Fact> collisionCfg = cacheConfig("InsensitiveCache", true, Integer.class, Fact.class)
+ final CacheConfiguration<Integer, Fact> collisionCfg = cacheConfig("InsensitiveCache", true)
.setSqlSchema("Insensitive_Cache");
IgniteCache<Integer, Fact> cache = ignite(0).createCache(cfg);
@@ -153,11 +152,11 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
public void testSchemaEscapeAll() throws Exception {
startGridsMultiThreaded(3, true);
- final CacheConfiguration<Integer, Fact> cfg = cacheConfig("simpleSchema", true, Integer.class, Fact.class)
+ final CacheConfiguration<Integer, Fact> cfg = cacheConfig("simpleSchema", true)
.setSqlSchema("SchemaName1")
.setSqlEscapeAll(true);
- final CacheConfiguration<Integer, Fact> cfgEsc = cacheConfig("escapedSchema", true, Integer.class, Fact.class)
+ final CacheConfiguration<Integer, Fact> cfgEsc = cacheConfig("escapedSchema", true)
.setSqlSchema("\"SchemaName2\"")
.setSqlEscapeAll(true);
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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
index e72c9cb..06afe7c 100644
--- 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
@@ -36,8 +36,6 @@ import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.affinity.AffinityKeyMapped;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cache.query.QueryCursor;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import org.apache.ignite.cluster.ClusterNode;
@@ -1584,4 +1582,4 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
@QuerySqlField
private int goodId;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
index 512001f..e412828 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
@@ -236,7 +236,7 @@ public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstract
fail("Enumerations of aliases in select block must be prohibited");
}
- catch (IgniteCheckedException e) {
+ catch (IgniteCheckedException ignored) {
// all fine
}
@@ -713,4 +713,4 @@ public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstract
throw new UnsupportedOperationException();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 537ccdf..b909b36 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -39,12 +39,8 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.h2.command.Prepared;
-import org.h2.command.dml.Query;
-import org.h2.command.dml.Update;
import org.h2.engine.Session;
-import org.h2.expression.Expression;
import org.h2.jdbc.JdbcConnection;
-import org.h2.util.StringUtils;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java
----------------------------------------------------------------------
diff --git a/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java b/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java
index cce493e..1b203ad 100644
--- a/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java
+++ b/modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java
@@ -242,7 +242,7 @@ public class JmsStreamer<T extends Message, K, V> extends StreamAdapter<T, K, V>
session + "]");
}
}
- catch (JMSException e) {
+ catch (JMSException ignored) {
log.warning("Error while committing session: from batch time-based completion " +
"[session=" + session + "]");
}
@@ -536,4 +536,4 @@ public class JmsStreamer<T extends Message, K, V> extends StreamAdapter<T, K, V>
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
index 73820b7..ed3530b 100644
--- a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
+++ b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/KafkaStreamer.java
@@ -167,7 +167,7 @@ public class KafkaStreamer<K, V> extends StreamAdapter<MessageAndMetadata<byte[]
try {
Thread.sleep(retryTimeout);
}
- catch (InterruptedException ie) {
+ catch (InterruptedException ignored) {
// No-op.
}
}
@@ -194,10 +194,10 @@ public class KafkaStreamer<K, V> extends StreamAdapter<MessageAndMetadata<byte[]
if (log.isDebugEnabled())
log.debug("Timed out waiting for consumer threads to shut down, exiting uncleanly.");
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
if (log.isDebugEnabled())
log.debug("Interrupted during shutdown, exiting uncleanly.");
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
index 4c5dc51..d7b63f3 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/TestKafkaBroker.java
@@ -133,7 +133,7 @@ public class TestKafkaBroker {
try {
zkServer.stop();
}
- catch (IOException e) {
+ catch (IOException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java
----------------------------------------------------------------------
diff --git a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java
index a3ce10e..f47450f 100644
--- a/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java
+++ b/modules/kafka/src/test/java/org/apache/ignite/stream/kafka/connect/IgniteSourceConnectorTest.java
@@ -296,7 +296,7 @@ public class IgniteSourceConnectorTest extends GridCommonAbstractTest {
}
}, 5_000));
}
- catch (WakeupException e) {
+ catch (WakeupException ignored) {
// ignore for shutdown.
}
finally {
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java b/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
index 92a530d..49e1f71 100644
--- a/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
+++ b/modules/mqtt/src/test/java/org/apache/ignite/stream/mqtt/IgniteMqttStreamerTest.java
@@ -158,7 +158,7 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
try {
streamer.stop();
}
- catch (Exception e) {
+ catch (Exception ignored) {
// ignore if already stopped
}
@@ -483,7 +483,7 @@ public class IgniteMqttStreamerTest extends GridCommonAbstractTest {
try {
streamer.start();
}
- catch (Exception e) {
+ catch (Exception ignored) {
return;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/BundleDelegatingClassLoader.java
----------------------------------------------------------------------
diff --git a/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/BundleDelegatingClassLoader.java b/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/BundleDelegatingClassLoader.java
index 07c0682..92919b9 100644
--- a/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/BundleDelegatingClassLoader.java
+++ b/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/BundleDelegatingClassLoader.java
@@ -97,14 +97,14 @@ public class BundleDelegatingClassLoader extends ClassLoader {
try {
cls = findClass(name);
}
- catch (ClassNotFoundException e) {
+ catch (ClassNotFoundException ignored) {
if (clsLdr == null)
throw classNotFoundException(name);
try {
cls = clsLdr.loadClass(name);
}
- catch (ClassNotFoundException e2) {
+ catch (ClassNotFoundException ignored2) {
throw classNotFoundException(name);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/ContainerSweepClassLoader.java
----------------------------------------------------------------------
diff --git a/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/ContainerSweepClassLoader.java b/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/ContainerSweepClassLoader.java
index e2e773a..0a4cdc4 100644
--- a/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/ContainerSweepClassLoader.java
+++ b/modules/osgi/src/main/java/org/apache/ignite/osgi/classloaders/ContainerSweepClassLoader.java
@@ -77,7 +77,7 @@ public class ContainerSweepClassLoader extends BundleDelegatingClassLoader {
cls = super.loadClass(name, resolve);
return cls;
}
- catch (ClassNotFoundException e) {
+ catch (ClassNotFoundException ignored) {
// Continue.
}
@@ -119,7 +119,7 @@ public class ContainerSweepClassLoader extends BundleDelegatingClassLoader {
cls = b.loadClass(name);
break;
}
- catch (ClassNotFoundException e) {
+ catch (ClassNotFoundException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
index 343158b..e9d97a4 100644
--- a/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
+++ b/modules/spark/src/test/java/org/apache/ignite/spark/JavaStandaloneIgniteRDDSelfTest.java
@@ -39,7 +39,6 @@ import org.apache.spark.sql.DataFrame;
import org.apache.spark.sql.Row;
import scala.Tuple2;
-import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.List;
@@ -362,4 +361,4 @@ public class JavaStandaloneIgniteRDDSelfTest extends GridCommonAbstractTest {
return t._2();
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/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 7523106..a14f6ba 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
@@ -166,7 +166,7 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
try {
return (T)springCtx.getBean(beanName);
}
- catch (NoSuchBeanDefinitionException e) {
+ catch (NoSuchBeanDefinitionException ignored) {
throw new IgniteCheckedException("Spring bean with provided name doesn't exist [url=" + url +
", beanName=" + beanName + ']');
}
@@ -199,7 +199,7 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
try {
return (T)springCtx.getBean(beanName);
}
- catch (NoSuchBeanDefinitionException e) {
+ catch (NoSuchBeanDefinitionException ignored) {
throw new IgniteCheckedException("Spring bean with provided name doesn't exist " +
", beanName=" + beanName + ']');
}
@@ -216,7 +216,7 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
try {
return (T)springCtx.getBean(beanName);
}
- catch (NoSuchBeanDefinitionException e) {
+ catch (NoSuchBeanDefinitionException ignored) {
throw new IgniteCheckedException("Spring bean with provided name doesn't exist " +
", beanName=" + beanName + ']');
}
@@ -505,4 +505,4 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
return springCtx;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
index e1db958..bb00661 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
@@ -134,7 +134,7 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
fail();
}
- catch (IgniteException expected) {
+ catch (IgniteException ignored) {
// No-op.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java
index 4b735d5..6131193 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/IgniteDynamicCacheConfigTest.java
@@ -205,7 +205,7 @@ public class IgniteDynamicCacheConfigTest extends GridCommonAbstractTest {
fail();
}
- catch (IgniteException e) {
+ catch (IgniteException ignored) {
// No-op.
}
}
@@ -245,4 +245,4 @@ public class IgniteDynamicCacheConfigTest extends GridCommonAbstractTest {
private NearCacheConfiguration loadNear(String path) {
return Ignition.loadSpringBean(path, "nearCache-configuration");
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerSelfTest.java
index 02d6e88..35a0eda 100644
--- a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerSelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerSelfTest.java
@@ -128,7 +128,7 @@ public class GridSpringTransactionManagerSelfTest extends GridCommonAbstractTest
try {
service.putWithError(c, entryCnt);
}
- catch (Exception e) {
+ catch (Exception ignored) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
----------------------------------------------------------------------
diff --git a/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java b/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
index 369e318..360bb2a 100644
--- a/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
+++ b/modules/tools/src/main/java/org/apache/ignite/tools/classgen/ClassesGenerator.java
@@ -240,7 +240,7 @@ public class ClassesGenerator {
if (!Modifier.isPublic(cons.getModifiers()))
errs.add("Default constructor in Externalizable class is not public: " + cls.getName());
}
- catch (NoSuchMethodException e) {
+ catch (NoSuchMethodException ignored) {
errs.add("No default constructor in Externalizable class: " + cls.getName());
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java
index 4ba07ff..f6d51a7 100644
--- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java
+++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java
@@ -127,7 +127,7 @@ public class IgniteTwitterStreamerTest extends GridCommonAbstractTest {
fail("Successful start of already started Twitter Streamer");
}
- catch (IgniteException ex) {
+ catch (IgniteException ignored) {
// No-op.
}
@@ -145,7 +145,7 @@ public class IgniteTwitterStreamerTest extends GridCommonAbstractTest {
fail("Successful stop of already stopped Twitter Streamer");
}
- catch (IgniteException ex) {
+ catch (IgniteException ignored) {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
index cbcac9c..fad7cb2 100644
--- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
+++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java
@@ -21,7 +21,6 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.internal.util.lang.GridAbsPredicateX;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.GridTestUtils;
@@ -170,4 +169,4 @@ public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbs
return uriList;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
----------------------------------------------------------------------
diff --git a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
index bdd57c6..1008b58 100644
--- a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
+++ b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
@@ -292,7 +292,7 @@ class WebSessionV2 implements HttpSession {
try {
genuineSes.invalidate();
}
- catch (IllegalStateException e) {
+ catch (IllegalStateException ignored) {
// Already invalidated, keep going.
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
index bfa12a2..f6a16e2 100644
--- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
@@ -158,7 +158,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
assertNotNull(sesId);
}
- Ignite ignite2 = Ignition.start(srvCfg2);
+ Ignition.start(srvCfg2);
stopGrid(ignite.name());
@@ -305,7 +305,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
*/
private void testSessionRenewalDuringLogin(String cfg) throws Exception {
Server srv = null;
- String sesId = null;
+ String sesId;
try {
srv = startServerWithLoginService(TEST_JETTY_PORT, cfg, null, new SessionLoginServlet());
@@ -1072,7 +1072,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
req.getSession().invalidate();
res.getWriter().println("invalidated");
}
- catch (Exception e) {
+ catch (Exception ignored) {
res.getWriter().println("failed");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
index 609f29b..238ed06 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
@@ -319,7 +319,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
TimeUnit.MILLISECONDS.sleep(schedulerTimeout);
}
}
- catch (InterruptedException e) {
+ catch (InterruptedException ignored) {
// Un-register with ResourceManager
rmClient.unregisterApplicationMaster(FinalApplicationStatus.KILLED, "", "");
@@ -430,4 +430,4 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
public Map<ContainerId, IgniteContainer> getContainers() {
return containers;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
index 158a89a..08913c2 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -154,7 +154,7 @@ public class IgniteProvider {
try {
fileStatuses = fs.listStatus(new Path(folder));
}
- catch (FileNotFoundException e) {
+ catch (FileNotFoundException ignored) {
// Ignore. Folder doesn't exist.
}
catch (Exception e) {
@@ -344,4 +344,4 @@ public class IgniteProvider {
return -1;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/529a5455/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
----------------------------------------------------------------------
diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
index 601323c..7d50149 100644
--- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
+++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
@@ -366,7 +366,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest {
try {
return 0 == zkCurator.getChildren().forPath(SERVICES_IGNITE_ZK_PATH).size();
}
- catch (Exception e) {
+ catch (Exception ignored) {
return false;
}
}
[17/32] ignite git commit: ignite-4557 Fixed wrong affinity manager
call.
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index 6c577c6..fac24cc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -1009,9 +1009,9 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
//And then find out whether they are primary or backup ones.
int primaryCnt = 0;
int backupCnt = 0;
- if (affinity.primary(ctx.localNode(), part, topVer))
+ if (affinity.primaryByPartition(ctx.localNode(), part, topVer))
primaryCnt = cnt;
- else if (affinity.backup(ctx.localNode(), part, topVer))
+ else if (affinity.primaryByPartition(ctx.localNode(), part, topVer))
backupCnt = cnt;
return new T2<>(primaryCnt, backupCnt);
}
@@ -1081,9 +1081,9 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
//And then find out whether they are primary or backup ones.
int primaryCnt = 0;
int backupCnt = 0;
- if (affinity.primary(ctx.localNode(), part, topVer))
+ if (affinity.primaryByPartition(ctx.localNode(), part, topVer))
primaryCnt = cnt;
- else if (affinity.backup(ctx.localNode(), part, topVer))
+ else if (affinity.backupByPartition(ctx.localNode(), part, topVer))
backupCnt = cnt;
return new T2<>(primaryCnt, backupCnt);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
index 45b4b9f..aeca2fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractQueueFailoverDataConsistencySelfTest.java
@@ -365,7 +365,7 @@ public abstract class GridCacheAbstractQueueFailoverDataConsistencySelfTest exte
for (int i = 0; i < gridCount(); i++) {
for (GridCacheEntryEx e : ((IgniteKernal)grid(i)).context().cache().internalCache(cctx.name()).allEntries()) {
- if (aff.primary(grid(i).localNode(), e.key(), AffinityTopologyVersion.NONE)
+ if (aff.primaryByKey(grid(i).localNode(), e.key(), AffinityTopologyVersion.NONE)
&& e.key().value(cctx.cacheObjectContext(), false) instanceof GridCacheQueueHeaderKey)
return i;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
index b4ef11a..8709d05 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
@@ -853,13 +853,13 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
GridCacheAffinityManager aff = ignite0.context().cache().internalCache(null).context().affinity();
- List<ClusterNode> nodes1 = aff.nodes(key1, topVer1);
- List<ClusterNode> nodes2 = aff.nodes(key1, topVer2);
+ List<ClusterNode> nodes1 = aff.nodesByKey(key1, topVer1);
+ List<ClusterNode> nodes2 = aff.nodesByKey(key1, topVer2);
assertEquals(nodes1, nodes2);
- nodes1 = aff.nodes(key2, topVer1);
- nodes2 = aff.nodes(key2, topVer2);
+ nodes1 = aff.nodesByKey(key2, topVer1);
+ nodes2 = aff.nodesByKey(key2, topVer2);
assertFalse(nodes1.get(0).equals(nodes2.get(0)));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
index f6a06c2..66cfc4e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxOptimisticDeadlockDetectionTest.java
@@ -289,7 +289,7 @@ public class TxOptimisticDeadlockDetectionTest extends GridCommonAbstractTest {
key = keys.get(1);
ClusterNode primaryNode =
- ((IgniteCacheProxy)cache).context().affinity().primary(key, NONE);
+ ((IgniteCacheProxy)cache).context().affinity().primaryByKey(key, NONE);
List<Integer> primaryKeys =
primaryKeys(grid(primaryNode).cache(CACHE_NAME), 5, key + (100 * threadNum));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
index 83eb908..ced8b61 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
@@ -293,7 +293,7 @@ public class TxPessimisticDeadlockDetectionTest extends GridCommonAbstractTest {
key = keys.get(1);
ClusterNode primaryNode =
- ((IgniteCacheProxy)cache).context().affinity().primary(key, NONE);
+ ((IgniteCacheProxy)cache).context().affinity().primaryByKey(key, NONE);
List<Integer> primaryKeys =
primaryKeys(grid(primaryNode).cache(CACHE_NAME), 5, key + (100 * threadNum));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 9037943..75944cc 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -2058,7 +2058,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
return new IgniteBiPredicate<K, V>() {
@Override public boolean apply(K k, V v) {
- return aff.primary(locNode, k, topVer0);
+ return aff.primaryByKey(locNode, k, topVer0);
}
};
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index c29239f..5dc8547 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@ -612,7 +612,7 @@ public abstract class GridH2IndexBase extends BaseIndex {
node = cctx.discovery().node(nodeId);
}
else // Get primary node for current topology version.
- node = cctx.affinity().primary(affKeyObj, qctx.topologyVersion());
+ node = cctx.affinity().primaryByKey(affKeyObj, qctx.topologyVersion());
if (node == null) // Node was not found, probably topology changed and we need to retry the whole query.
throw new GridH2RetryException("Failed to find node.");
[04/32] ignite git commit: Minor javadoc fix
Posted by yz...@apache.org.
Minor javadoc fix
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c1466d87
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c1466d87
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c1466d87
Branch: refs/heads/ignite-comm-balance-master
Commit: c1466d877d3bc17417987f2870d3c08d0f03ff4f
Parents: 43007d5
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Jan 27 17:44:57 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Jan 27 17:50:36 2017 +0300
----------------------------------------------------------------------
.../processors/cache/distributed/near/GridNearTxLocal.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c1466d87/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 094c5fb..197792b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -1167,7 +1167,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter {
* @param keys Keys.
* @param retval Return value flag.
* @param read Read flag.
- * @param accessTtl Create ttl.
+ * @param createTtl Create ttl.
* @param accessTtl Access ttl.
* @param <K> Key type.
* @param skipStore Skip store flag.
[23/32] ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e92d44f6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e92d44f6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e92d44f6
Branch: refs/heads/ignite-comm-balance-master
Commit: e92d44f68329797a9f7377da6ceb8885aabc90b8
Parents: b0bc6f0 4908210
Author: devozerov <vo...@gridgain.com>
Authored: Wed Feb 1 18:04:50 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Feb 1 18:04:50 2017 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 10 ++--
.../cache/GridCacheAffinityManager.java | 60 ++++++++------------
.../processors/cache/GridCacheContext.java | 17 ------
.../cache/GridCacheEvictionManager.java | 6 +-
.../processors/cache/GridCacheUtils.java | 20 -------
.../cache/affinity/GridCacheAffinityImpl.java | 16 +++---
.../CacheDataStructuresManager.java | 2 +-
.../distributed/dht/GridDhtCacheAdapter.java | 2 +-
.../distributed/dht/GridDhtCacheEntry.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 4 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 2 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../dht/GridPartitionedSingleGetFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 13 +++--
.../GridNearAtomicSingleUpdateFuture.java | 2 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 4 +-
.../dht/colocated/GridDhtColocatedCache.java | 6 +-
.../colocated/GridDhtColocatedLockFuture.java | 4 +-
.../dht/preloader/GridDhtPartitionDemander.java | 8 +--
.../dht/preloader/GridDhtPartitionSupplier.java | 12 ++--
.../dht/preloader/GridDhtPreloader.java | 4 +-
.../distributed/near/GridNearAtomicCache.java | 2 +-
.../distributed/near/GridNearCacheEntry.java | 6 +-
.../distributed/near/GridNearGetFuture.java | 4 +-
.../distributed/near/GridNearLockFuture.java | 2 +-
...arOptimisticSerializableTxPrepareFuture.java | 2 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 2 +-
.../GridNearPessimisticTxPrepareFuture.java | 2 +-
.../near/GridNearTransactionalCache.java | 6 +-
.../near/GridNearTxFinishFuture.java | 2 +-
.../cache/query/GridCacheQueryManager.java | 9 +--
.../continuous/CacheContinuousQueryHandler.java | 2 +-
.../continuous/CacheContinuousQueryManager.java | 2 +-
.../cache/transactions/IgniteTxAdapter.java | 4 +-
.../transactions/IgniteTxLocalAdapter.java | 4 +-
.../cache/transactions/TxDeadlockDetection.java | 2 +-
.../datastreamer/DataStreamerImpl.java | 2 +-
.../datastructures/GridCacheSetImpl.java | 2 +-
.../datastructures/GridSetQueryPredicate.java | 2 +-
.../processors/job/GridJobProcessor.java | 2 +-
.../cache/CacheAffinityCallSelfTest.java | 4 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 6 +-
.../IgniteCacheConfigVariationsFullApiTest.java | 6 +-
.../cache/IgniteCachePeekModesAbstractTest.java | 8 +--
...actQueueFailoverDataConsistencySelfTest.java | 2 +-
...niteCacheClientNodeChangingTopologyTest.java | 8 +--
.../TxOptimisticDeadlockDetectionTest.java | 2 +-
.../TxPessimisticDeadlockDetectionTest.java | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 2 +-
.../query/h2/opt/GridH2IndexBase.java | 2 +-
.../Cache/CacheAbstractTransactionalTest.cs | 8 ++-
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 9 ++-
53 files changed, 140 insertions(+), 180 deletions(-)
----------------------------------------------------------------------
[10/32] ignite git commit: Merge branches
'ignite-comm-balance-master' and 'master' of
https://git-wip-us.apache.org/repos/asf/ignite into
ignite-comm-balance-master-apache
Posted by yz...@apache.org.
Merge branches 'ignite-comm-balance-master' and 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-comm-balance-master-apache
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d1c01d0a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d1c01d0a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d1c01d0a
Branch: refs/heads/ignite-comm-balance-master
Commit: d1c01d0aa0629801041d08d8e2bae8218b30f9a4
Parents: b564686 e613c00
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Feb 1 15:03:40 2017 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Feb 1 15:03:40 2017 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 4 +-
.../apache/ignite/internal/IgniteKernal.java | 3 -
.../cache/distributed/near/GridNearTxLocal.java | 2 +-
.../transactions/PlatformTransactions.java | 9 +
.../Apache.Ignite.Core.Tests.csproj | 1 +
.../Cache/CacheAbstractTest.cs | 21 ++
.../Cache/CacheAbstractTransactionalTest.cs | 325 +++++++++++++++++++
.../Apache.Ignite.Core.csproj | 2 +
.../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 4 +-
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 90 ++++-
.../Transactions/CacheTransactionManager.cs | 160 +++++++++
.../Impl/Transactions/Transaction.cs | 8 +
.../Impl/Transactions/TransactionImpl.cs | 13 +
.../Impl/Transactions/TransactionsImpl.cs | 10 +
.../generator/ConfigurationGenerator.js | 9 +-
15 files changed, 641 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
[30/32] ignite git commit: IGNITE-3793: Need to fix dependencies and
it's licenses Reviewed and merged by Denis Magda (dmagda@apache.org)
Posted by yz...@apache.org.
IGNITE-3793: Need to fix dependencies and it's licenses
Reviewed and merged by Denis Magda (dmagda@apache.org)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d20b7f1d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d20b7f1d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d20b7f1d
Branch: refs/heads/ignite-comm-balance-master
Commit: d20b7f1d29fae7c7907fa9905ac39493ec66b465
Parents: 96527d9
Author: Alexander Fedotov <al...@gmail.com>
Authored: Fri Feb 3 10:10:49 2017 -0800
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Feb 3 10:10:49 2017 -0800
----------------------------------------------------------------------
assembly/LICENSE_FABRIC | 35 ++++++++++----------
assembly/LICENSE_HADOOP | 17 +++++-----
examples/schema-import/bin/h2-server.bat | 2 +-
examples/schema-import/bin/h2-server.sh | 4 +--
.../schema-import/bin/schema-import.properties | 2 +-
.../src/main/resources/META-INF/licenses.txt.vm | 7 ++--
6 files changed, 32 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/d20b7f1d/assembly/LICENSE_FABRIC
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_FABRIC b/assembly/LICENSE_FABRIC
index b9c75b2..35a8529 100644
--- a/assembly/LICENSE_FABRIC
+++ b/assembly/LICENSE_FABRIC
@@ -214,9 +214,8 @@ licenses.
==============================================================================
For SnapTree:
==============================================================================
-This product bundles SnapTree, which is available under a
-"3-clause BSD" license. For details, see
-https://github.com/nbronson/snaptree/blob/master/LICENSE.
+This product bundles SnapTree, which is available under the following:
+"3-clause BSD" license. For details, see https://github.com/nbronson/snaptree/blob/master/LICENSE.
==============================================================================
For JSR 166 classes in "org.jsr166" package
@@ -228,55 +227,55 @@ http://creativecommons.org/publicdomain/zero/1.0/
==============================================================================
For JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
==============================================================================
-This product bundles JSR107 API and SPI which is available under a:
-JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. For details, see https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt.
+This product bundles JSR107 API and SPI which is available under the following:
+JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt
==============================================================================
For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
==============================================================================
-This product bundles JSch which is available under a:
+This product bundles JSch which is available under the following:
Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
==============================================================================
For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
==============================================================================
-This product bundles JLine which is available under a:
+This product bundles JLine which is available under the following:
The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
==============================================================================
For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.*
==============================================================================
-This product bundles Scala Library which is available under a:
+This product bundles Scala Library which is available under the following:
BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
==============================================================================
-For H2 Database Engine (http://www.h2database.com) com.h2database:h2:jar:1.3.175
+For H2 Database Engine (http://www.h2database.com) com.h2database:h2:jar:1.4.191
==============================================================================
-This product bundles H2 Database Engine which is available under a:
-The H2 License, Version 1.0. For details, see http://h2database.com/html/license.html.
+This product bundles H2 Database Engine which is available under the following:
+MPL 2.0, and EPL 1.0. For details, see http://h2database.com/html/license.html.
==============================================================================
For JTidy (http://jtidy.sourceforge.net) net.sf.jtidy:jtidy:jar:r938
==============================================================================
-This product bundles JTidy which is available under a:
+This product bundles JTidy which is available under the following:
Java HTML Tidy License. For details, see http://jtidy.svn.sourceforge.net/viewvc/jtidy/trunk/jtidy/LICENSE.txt?revision=95.
==============================================================================
For tomcat-servlet-api (http://tomcat.apache.org/) org.apache.tomcat:tomcat-servlet-api:jar:8.0.23
==============================================================================
-This product bundles tomcat-servlet-api which is available under a:
+This product bundles tomcat-servlet-api which is available under the following:
Apache License, Version 2.0 and Common Development And Distribution License (CDDL) Version 1.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.txt and http://www.opensource.org/licenses/cddl1.txt.
==============================================================================
For AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
==============================================================================
-This product bundles AOP alliance which is available under a:
+This product bundles AOP alliance which is available under the following:
Public Domain.
==============================================================================
For AspectJ (http://www.aspectj.org) org.aspectj:*:jar:1.7.2
==============================================================================
-This product bundles AspectJ which is available under a:
+This product bundles AspectJ which is available under the following:
Eclipse Public License - v 1.0. For details, see http://www.eclipse.org/legal/epl-v10.html.
==============================================================================
@@ -288,18 +287,18 @@ See http://download.oracle.com/otndocs/jcp/jta-1.1-classes-oth-JSpec/jta-1.1-cla
==============================================================================
For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:4.2
==============================================================================
-This product bundles ASM All which is available under a:
+This product bundles ASM All which is available under the following:
BSD. For details, see http://asm.objectweb.org/license.html.
==============================================================================
For Jetty (http://www.eclipse.org/jetty) org.eclipse.jetty:*:jar:9.2.11.v20150529
==============================================================================
-This product bundles Jetty which is available under a:
+This product bundles Jetty which is available under the following:
Apache Software License - Version 2.0. For details, see http://www.apache.org/licenses/LICENSE-2.0.
Eclipse Public License - Version 1.0. For details, see http://www.eclipse.org/org/documents/epl-v10.php.
==============================================================================
For SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4
==============================================================================
-This product bundles SLF4J API Module which is available under a:
+This product bundles SLF4J API Module which is available under the following:
MIT License. For details, see http://www.opensource.org/licenses/mit-license.php.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d20b7f1d/assembly/LICENSE_HADOOP
----------------------------------------------------------------------
diff --git a/assembly/LICENSE_HADOOP b/assembly/LICENSE_HADOOP
index 0256b20..f2128fe 100644
--- a/assembly/LICENSE_HADOOP
+++ b/assembly/LICENSE_HADOOP
@@ -214,9 +214,8 @@ licenses.
==============================================================================
For SnapTree:
==============================================================================
-This product bundles SnapTree, which is available under a
-"3-clause BSD" license. For details, see
-https://github.com/nbronson/snaptree/blob/master/LICENSE.
+This product bundles SnapTree, which is available under the following:
+"3-clause BSD" license. For details, see https://github.com/nbronson/snaptree/blob/master/LICENSE.
==============================================================================
For JSR 166 classes in "org.jsr166" package
@@ -228,31 +227,31 @@ http://creativecommons.org/publicdomain/zero/1.0/
==============================================================================
For JSR107 API and SPI (https://github.com/jsr107/jsr107spec) javax.cache:cache-api:jar:1.0.0
==============================================================================
-This product bundles JSR107 API and SPI which is available under a:
-JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. For details, see https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt.
+This product bundles JSR107 API and SPI which is available under the following:
+JSR-000107 JCACHE 2.9 Public Review - Updated Specification License. https://raw.github.com/jsr107/jsr107spec/master/LICENSE.txt
==============================================================================
For JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.50
==============================================================================
-This product bundles JSch which is available under a:
+This product bundles JSch which is available under the following:
Revised BSD. For details, see http://www.jcraft.com/jsch/LICENSE.txt.
==============================================================================
For JLine (http://nexus.sonatype.org/oss-repository-hosting.html/jline) jline:jline:jar:2.12.1
==============================================================================
-This product bundles JLine which is available under a:
+This product bundles JLine which is available under the following:
The BSD License. For details, see http://www.opensource.org/licenses/bsd-license.php.
==============================================================================
For Scala Library (http://www.scala-lang.org/) org.scala-lang:scala-library:jar:2.11.2
==============================================================================
-This product bundles Scala Library which is available under a:
+This product bundles Scala Library which is available under the following:
BSD 3-Clause. For details, see http://www.scala-lang.org/license.html.
==============================================================================
For ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:4.2
==============================================================================
-This product bundles ASM All which is available under a:
+This product bundles ASM All which is available under the following:
BSD. For details, see http://asm.objectweb.org/license.html.
http://git-wip-us.apache.org/repos/asf/ignite/blob/d20b7f1d/examples/schema-import/bin/h2-server.bat
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/h2-server.bat b/examples/schema-import/bin/h2-server.bat
index 3f220d1..d445231 100644
--- a/examples/schema-import/bin/h2-server.bat
+++ b/examples/schema-import/bin/h2-server.bat
@@ -75,6 +75,6 @@ if exist "%IGNITE_HOME%\config" goto run
:run
:: Starts H2 server and console.
-"%JAVA_HOME%\bin\java.exe" -cp "%IGNITE_HOME%\libs\ignite-indexing\h2-1.3.175.jar" org.h2.tools.Console %*
+"%JAVA_HOME%\bin\java.exe" -cp "%IGNITE_HOME%\libs\ignite-indexing\h2-1.4.191.jar" org.h2.tools.Console %*
:error_finish
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/d20b7f1d/examples/schema-import/bin/h2-server.sh
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/h2-server.sh b/examples/schema-import/bin/h2-server.sh
index e714f4c..512a1d9 100755
--- a/examples/schema-import/bin/h2-server.sh
+++ b/examples/schema-import/bin/h2-server.sh
@@ -58,9 +58,9 @@ fi
# Starts H2 server and console.
case $osname in
Darwin*)
- "${JAVA}" "${DOCK_OPTS}" -cp "${IGNITE_HOME}/libs/ignite-indexing/h2-1.3.175.jar" org.h2.tools.Console ${ARGS}
+ "${JAVA}" "${DOCK_OPTS}" -cp "${IGNITE_HOME}/libs/ignite-indexing/h2-1.4.191.jar" org.h2.tools.Console ${ARGS}
;;
*)
- "${JAVA}" -cp "${IGNITE_HOME}/libs/ignite-indexing/h2-1.3.175.jar" org.h2.tools.Console ${ARGS}
+ "${JAVA}" -cp "${IGNITE_HOME}/libs/ignite-indexing/h2-1.4.191.jar" org.h2.tools.Console ${ARGS}
;;
esac
http://git-wip-us.apache.org/repos/asf/ignite/blob/d20b7f1d/examples/schema-import/bin/schema-import.properties
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/schema-import.properties b/examples/schema-import/bin/schema-import.properties
index 5d31965..99ebab8 100644
--- a/examples/schema-import/bin/schema-import.properties
+++ b/examples/schema-import/bin/schema-import.properties
@@ -19,7 +19,7 @@
# Predefined properties for Ignite Schema Import Demo
#
jdbc.db.preset=0
-jdbc.driver.jar=libs/ignite-indexing/h2-1.3.175.jar
+jdbc.driver.jar=libs/ignite-indexing/h2-1.4.191.jar
jdbc.driver.class=org.h2.Driver
jdbc.url=jdbc:h2:tcp://localhost/~/schema-import/demo
jdbc.user=sa
http://git-wip-us.apache.org/repos/asf/ignite/blob/d20b7f1d/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
----------------------------------------------------------------------
diff --git a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
index ca1988b..ede7960 100644
--- a/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
+++ b/modules/apache-license-gen/src/main/resources/META-INF/licenses.txt.vm
@@ -19,17 +19,16 @@
## $Id$
##
// ------------------------------------------------------------------
-// List of #if ($projectName)$projectName#else${project.name}#end module's dependencies provided as a part of this distribution
-// which licenses differ from Apache Software License.
+// List of #if ($projectName)$projectName#else${project.name}#end module's dependencies provided as a part of this distribution.
// ------------------------------------------------------------------
#foreach ( $organizationName in $projectsSortedByOrganization.keySet() )
#foreach ( $project in $projectsSortedByOrganization.get( $organizationName ) )
-#if((!($project.licenses.size() == 1 && $project.licenses.get(0).url.contains("www.apache.org/licenses/LICENSE-2.0") && !$project.licenses.get(0).url.contains("and"))) && $project.licenses.size() > 0)
+#if($project.licenses.size() > 0)
==============================================================================
For $project.name #if ($project.url)($project.url)#end $project.artifact
==============================================================================
-This product bundles $project.name which is available under a:
+This product bundles $project.name which is available under the following:
#foreach ( $license in $project.licenses )
$license.name.replaceAll("[ ]{2,}"," ").replaceAll("\n",""). #if ($license.url)For details, see $license.url.replaceAll("[ ]{2,}"," ").replaceAll("\n","").#end
[18/32] ignite git commit: ignite-4557 Fixed wrong affinity manager
call.
Posted by yz...@apache.org.
ignite-4557 Fixed wrong affinity manager call.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6d5adcb7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6d5adcb7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6d5adcb7
Branch: refs/heads/ignite-comm-balance-master
Commit: 6d5adcb7b3cec01bce18bba10fbd22c426563e93
Parents: e613c00
Author: Evgeny Stanilovskiy <es...@gridgain.com>
Authored: Wed Feb 1 14:21:49 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Feb 1 17:12:26 2017 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 10 ++--
.../cache/GridCacheAffinityManager.java | 60 ++++++++------------
.../processors/cache/GridCacheContext.java | 17 ------
.../cache/GridCacheEvictionManager.java | 6 +-
.../processors/cache/GridCacheUtils.java | 20 -------
.../cache/affinity/GridCacheAffinityImpl.java | 16 +++---
.../CacheDataStructuresManager.java | 2 +-
.../distributed/dht/GridDhtCacheAdapter.java | 2 +-
.../distributed/dht/GridDhtCacheEntry.java | 2 +-
.../distributed/dht/GridDhtLocalPartition.java | 4 +-
.../dht/GridDhtPartitionTopologyImpl.java | 4 +-
.../cache/distributed/dht/GridDhtTxRemote.java | 2 +-
.../dht/GridPartitionedGetFuture.java | 2 +-
.../dht/GridPartitionedSingleGetFuture.java | 2 +-
.../dht/atomic/GridDhtAtomicCache.java | 13 +++--
.../GridNearAtomicSingleUpdateFuture.java | 2 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 4 +-
.../dht/colocated/GridDhtColocatedCache.java | 6 +-
.../colocated/GridDhtColocatedLockFuture.java | 4 +-
.../dht/preloader/GridDhtPartitionDemander.java | 8 +--
.../dht/preloader/GridDhtPartitionSupplier.java | 12 ++--
.../dht/preloader/GridDhtPreloader.java | 4 +-
.../distributed/near/GridNearAtomicCache.java | 2 +-
.../distributed/near/GridNearCacheEntry.java | 6 +-
.../distributed/near/GridNearGetFuture.java | 4 +-
.../distributed/near/GridNearLockFuture.java | 2 +-
...arOptimisticSerializableTxPrepareFuture.java | 2 +-
.../near/GridNearOptimisticTxPrepareFuture.java | 2 +-
.../GridNearPessimisticTxPrepareFuture.java | 2 +-
.../near/GridNearTransactionalCache.java | 6 +-
.../near/GridNearTxFinishFuture.java | 2 +-
.../cache/query/GridCacheQueryManager.java | 9 +--
.../continuous/CacheContinuousQueryHandler.java | 2 +-
.../continuous/CacheContinuousQueryManager.java | 2 +-
.../cache/transactions/IgniteTxAdapter.java | 4 +-
.../transactions/IgniteTxLocalAdapter.java | 4 +-
.../cache/transactions/TxDeadlockDetection.java | 2 +-
.../datastreamer/DataStreamerImpl.java | 2 +-
.../datastructures/GridCacheSetImpl.java | 2 +-
.../datastructures/GridSetQueryPredicate.java | 2 +-
.../processors/job/GridJobProcessor.java | 2 +-
.../cache/CacheAffinityCallSelfTest.java | 4 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 6 +-
.../IgniteCacheConfigVariationsFullApiTest.java | 6 +-
.../cache/IgniteCachePeekModesAbstractTest.java | 8 +--
...actQueueFailoverDataConsistencySelfTest.java | 2 +-
...niteCacheClientNodeChangingTopologyTest.java | 8 +--
.../TxOptimisticDeadlockDetectionTest.java | 2 +-
.../TxPessimisticDeadlockDetectionTest.java | 2 +-
.../processors/query/h2/IgniteH2Indexing.java | 2 +-
.../query/h2/opt/GridH2IndexBase.java | 2 +-
51 files changed, 127 insertions(+), 176 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/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 ecf9ea9..8d0a962 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
@@ -778,7 +778,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
boolean nearKey;
if (!(modes.near && modes.primary && modes.backup)) {
- boolean keyPrimary = ctx.affinity().primary(ctx.localNode(), part, topVer);
+ boolean keyPrimary = ctx.affinity().primaryByPartition(ctx.localNode(), part, topVer);
if (keyPrimary) {
if (!modes.primary)
@@ -787,7 +787,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
nearKey = false;
}
else {
- boolean keyBackup = ctx.affinity().belongs(ctx.localNode(), part, topVer);
+ boolean keyBackup = ctx.affinity().partitionBelongs(ctx.localNode(), part, topVer);
if (keyBackup) {
if (!modes.backup)
@@ -808,7 +808,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
}
else {
- nearKey = !ctx.affinity().belongs(ctx.localNode(), part, topVer);
+ nearKey = !ctx.affinity().partitionBelongs(ctx.localNode(), part, topVer);
if (nearKey) {
// Swap and offheap are disabled for near cache.
@@ -3763,8 +3763,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** {@inheritDoc} */
@Override public boolean apply(ClusterNode clusterNode) {
return clusterNode.version().compareTo(PartitionSizeLongTask.SINCE_VER) >= 0 &&
- ((modes.primary && aff.primary(clusterNode, part, topVer)) ||
- (modes.backup && aff.backup(clusterNode, part, topVer)));
+ ((modes.primary && aff.primaryByPartition(clusterNode, part, topVer)) ||
+ (modes.backup && aff.backupByPartition(clusterNode, part, topVer)));
}
}).nodes();
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index 8b7be1b..d85e76e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -238,8 +238,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return Affinity nodes.
*/
- public List<ClusterNode> nodes(Object key, AffinityTopologyVersion topVer) {
- return nodes(partition(key), topVer);
+ public List<ClusterNode> nodesByKey(Object key, AffinityTopologyVersion topVer) {
+ return nodesByPartition(partition(key), topVer);
}
/**
@@ -247,7 +247,7 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return Affinity nodes.
*/
- public List<ClusterNode> nodes(int part, AffinityTopologyVersion topVer) {
+ public List<ClusterNode> nodesByPartition(int part, AffinityTopologyVersion topVer) {
if (cctx.isLocal())
topVer = LOC_CACHE_TOP_VER;
@@ -282,8 +282,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return Primary node for given key.
*/
- @Nullable public ClusterNode primary(Object key, AffinityTopologyVersion topVer) {
- return primary(partition(key), topVer);
+ @Nullable public ClusterNode primaryByKey(Object key, AffinityTopologyVersion topVer) {
+ return primaryByPartition(partition(key), topVer);
}
/**
@@ -291,8 +291,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return Primary node for given key.
*/
- @Nullable public ClusterNode primary(int part, AffinityTopologyVersion topVer) {
- List<ClusterNode> nodes = nodes(part, topVer);
+ @Nullable public ClusterNode primaryByPartition(int part, AffinityTopologyVersion topVer) {
+ List<ClusterNode> nodes = nodesByPartition(part, topVer);
if (nodes.isEmpty())
return null;
@@ -306,8 +306,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return {@code True} if checked node is primary for given key.
*/
- public boolean primary(ClusterNode n, Object key, AffinityTopologyVersion topVer) {
- return F.eq(primary(key, topVer), n);
+ public boolean primaryByKey(ClusterNode n, Object key, AffinityTopologyVersion topVer) {
+ return F.eq(primaryByKey(key, topVer), n);
}
/**
@@ -316,8 +316,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return {@code True} if checked node is primary for given partition.
*/
- public boolean primary(ClusterNode n, int part, AffinityTopologyVersion topVer) {
- return F.eq(primary(part, topVer), n);
+ public boolean primaryByPartition(ClusterNode n, int part, AffinityTopologyVersion topVer) {
+ return F.eq(primaryByPartition(part, topVer), n);
}
/**
@@ -325,8 +325,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return Backup nodes.
*/
- public Collection<ClusterNode> backups(Object key, AffinityTopologyVersion topVer) {
- return backups(partition(key), topVer);
+ public Collection<ClusterNode> backupsByKey(Object key, AffinityTopologyVersion topVer) {
+ return backupsByPartition(partition(key), topVer);
}
/**
@@ -334,8 +334,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return Backup nodes.
*/
- public Collection<ClusterNode> backups(int part, AffinityTopologyVersion topVer) {
- List<ClusterNode> nodes = nodes(part, topVer);
+ private Collection<ClusterNode> backupsByPartition(int part, AffinityTopologyVersion topVer) {
+ List<ClusterNode> nodes = nodesByPartition(part, topVer);
assert !F.isEmpty(nodes);
@@ -351,8 +351,8 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return {@code True} if checked node is a backup node for given partition.
*/
- public boolean backup(ClusterNode n, int part, AffinityTopologyVersion topVer) {
- List<ClusterNode> nodes = nodes(part, topVer);
+ public boolean backupByPartition(ClusterNode n, int part, AffinityTopologyVersion topVer) {
+ List<ClusterNode> nodes = nodesByPartition(part, topVer);
assert !F.isEmpty(nodes);
@@ -360,26 +360,12 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
}
/**
- * @param keys keys.
- * @param topVer Topology version.
- * @return Nodes for the keys.
- */
- public Collection<ClusterNode> remoteNodes(Iterable keys, AffinityTopologyVersion topVer) {
- Collection<Collection<ClusterNode>> colcol = new GridLeanSet<>();
-
- for (Object key : keys)
- colcol.add(nodes(key, topVer));
-
- return F.view(F.flatCollections(colcol), F.remoteNodes(cctx.localNodeId()));
- }
-
- /**
* @param key Key to check.
* @param topVer Topology version.
* @return {@code true} if given key belongs to local node.
*/
- public boolean localNode(Object key, AffinityTopologyVersion topVer) {
- return localNode(partition(key), topVer);
+ public boolean keyLocalNode(Object key, AffinityTopologyVersion topVer) {
+ return partitionLocalNode(partition(key), topVer);
}
/**
@@ -387,10 +373,10 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return {@code true} if given partition belongs to local node.
*/
- public boolean localNode(int part, AffinityTopologyVersion topVer) {
+ public boolean partitionLocalNode(int part, AffinityTopologyVersion topVer) {
assert part >= 0 : "Invalid partition: " + part;
- return nodes(part, topVer).contains(cctx.localNode());
+ return nodesByPartition(part, topVer).contains(cctx.localNode());
}
/**
@@ -399,11 +385,11 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
* @param topVer Topology version.
* @return {@code true} if given partition belongs to specified node.
*/
- public boolean belongs(ClusterNode node, int part, AffinityTopologyVersion topVer) {
+ public boolean partitionBelongs(ClusterNode node, int part, AffinityTopologyVersion topVer) {
assert node != null;
assert part >= 0 : "Invalid partition: " + part;
- return nodes(part, topVer).contains(node);
+ return nodesByPartition(part, topVer).contains(node);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 66b71b4..fdcef3c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -1591,23 +1591,6 @@ public class GridCacheContext<K, V> implements Externalizable {
}
/**
- * Checks if at least one of the given keys belongs to one of the given partitions.
- *
- * @param keys Collection of keys to check.
- * @param movingParts Collection of partitions to check against.
- * @return {@code True} if there exist a key in collection {@code keys} that belongs
- * to one of partitions in {@code movingParts}
- */
- public boolean hasKey(Iterable<? extends K> keys, Collection<Integer> movingParts) {
- for (K key : keys) {
- if (movingParts.contains(affinity().partition(key)))
- return true;
- }
-
- return false;
- }
-
- /**
* Check whether conflict resolution is required.
*
* @return {@code True} in case DR is required.
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 134e743..f8722d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -808,7 +808,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
return;
// Don't track non-primary entries if evicts are synchronized.
- if (!cctx.isNear() && evictSync && !cctx.affinity().primary(cctx.localNode(), e.partition(), topVer))
+ if (!cctx.isNear() && evictSync && !cctx.affinity().primaryByPartition(cctx.localNode(), e.partition(), topVer))
return;
if (!busyLock.enterBusy())
@@ -910,7 +910,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
if (evictSyncAgr) {
assert !cctx.isNear(); // Make sure cache is not NEAR.
- if (cctx.affinity().backups(
+ if (cctx.affinity().backupsByKey(
entry.key(),
cctx.topology().topologyVersion()).contains(cctx.localNode()) &&
evictSync)
@@ -1498,7 +1498,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter {
if (!evts.isEmpty())
break;
- if (!cctx.affinity().primary(loc, it.next(), topVer))
+ if (!cctx.affinity().primaryByPartition(loc, it.next(), topVer))
it.remove();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/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 969c41a..b927096 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
@@ -953,26 +953,6 @@ public class GridCacheUtils {
}
/**
- * Gets primary node on which given key is cached.
- *
- * @param ctx Cache.
- * @param key Key to find primary node for.
- * @return Primary node for the key.
- */
- @SuppressWarnings( {"unchecked"})
- @Nullable public static ClusterNode primaryNode(GridCacheContext ctx, Object key) {
- assert ctx != null;
- assert key != null;
-
- CacheConfiguration cfg = ctx.cache().configuration();
-
- if (cfg.getCacheMode() != PARTITIONED)
- return ctx.localNode();
-
- return ctx.affinity().primary(key, ctx.affinity().affinityTopologyVersion());
- }
-
- /**
* @param asc {@code True} for ascending.
* @return Descending order comparator.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
index 9e85bad..11361a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
@@ -82,21 +82,21 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
@Override public boolean isPrimary(ClusterNode n, K key) {
A.notNull(n, "n", key, "key");
- return cctx.affinity().primary(n, key, topologyVersion());
+ return cctx.affinity().primaryByKey(n, key, topologyVersion());
}
/** {@inheritDoc} */
@Override public boolean isBackup(ClusterNode n, K key) {
A.notNull(n, "n", key, "key");
- return cctx.affinity().backups(key, topologyVersion()).contains(n);
+ return cctx.affinity().backupsByKey(key, topologyVersion()).contains(n);
}
/** {@inheritDoc} */
@Override public boolean isPrimaryOrBackup(ClusterNode n, K key) {
A.notNull(n, "n", key, "key");
- return cctx.affinity().belongs(n, cctx.affinity().partition(key), topologyVersion());
+ return cctx.affinity().partitionBelongs(n, cctx.affinity().partition(key), topologyVersion());
}
/** {@inheritDoc} */
@@ -126,7 +126,7 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
AffinityTopologyVersion topVer = topologyVersion();
for (int partsCnt = partitions(), part = 0; part < partsCnt; part++) {
- for (ClusterNode affNode : cctx.affinity().nodes(part, topVer)) {
+ for (ClusterNode affNode : cctx.affinity().nodesByPartition(part, topVer)) {
if (n.id().equals(affNode.id())) {
parts.add(part);
@@ -142,7 +142,7 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
@Override public ClusterNode mapPartitionToNode(int part) {
A.ensure(part >= 0 && part < partitions(), "part >= 0 && part < total partitions");
- return F.first(cctx.affinity().nodes(part, topologyVersion()));
+ return F.first(cctx.affinity().nodesByPartition(part, topologyVersion()));
}
/** {@inheritDoc} */
@@ -204,7 +204,7 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
Map<ClusterNode, Collection<K>> res = new HashMap<>(nodesCnt, 1.0f);
for (K key : keys) {
- ClusterNode primary = cctx.affinity().primary(key, topVer);
+ ClusterNode primary = cctx.affinity().primaryByKey(key, topVer);
if (primary == null)
throw new IgniteException("Failed to get primary node [topVer=" + topVer + ", key=" + key + ']');
@@ -227,14 +227,14 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K> {
@Override public Collection<ClusterNode> mapKeyToPrimaryAndBackups(K key) {
A.notNull(key, "key");
- return cctx.affinity().nodes(partition(key), topologyVersion());
+ return cctx.affinity().nodesByPartition(partition(key), topologyVersion());
}
/** {@inheritDoc} */
@Override public Collection<ClusterNode> mapPartitionToPrimaryAndBackups(int part) {
A.ensure(part >= 0 && part < partitions(), "part >= 0 && part < total partitions");
- return cctx.affinity().nodes(part, topologyVersion());
+ return cctx.affinity().nodesByPartition(part, topologyVersion());
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
index c1983df..d864d3c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
@@ -455,7 +455,7 @@ public class CacheDataStructuresManager extends GridCacheManagerAdapter {
Collection<SetItemKey> keys = new ArrayList<>(BATCH_SIZE);
for (SetItemKey key : set) {
- if (!loc && !aff.primary(cctx.localNode(), key, topVer))
+ if (!loc && !aff.primaryByKey(cctx.localNode(), key, topVer))
continue;
keys.add(key);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index c9f7c5c..2d69fd1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -931,7 +931,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
AffinityTopologyVersion topVer = ctx.shared().exchange().readyAffinityVersion();
for (Map.Entry<KeyCacheObject, GridCacheVersion> e : entries.entrySet()) {
- List<ClusterNode> nodes = ctx.affinity().nodes(e.getKey(), topVer);
+ List<ClusterNode> nodes = ctx.affinity().nodesByKey(e.getKey(), topVer);
for (int i = 0; i < nodes.size(); i++) {
ClusterNode node = nodes.get(i);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index cf4085b..39571ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -402,7 +402,7 @@ public class GridDhtCacheEntry extends GridDistributedCacheEntry {
}
// If remote node is (primary?) or back up, don't add it as a reader.
- if (cctx.affinity().belongs(node, partition(), topVer)) {
+ if (cctx.affinity().partitionBelongs(node, partition(), topVer)) {
if (log.isDebugEnabled())
log.debug("Ignoring near reader because remote node is affinity node [locNodeId=" + cctx.localNodeId()
+ ", rmtNodeId=" + nodeId + ", key=" + key + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 3ce1dd8..142982b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -616,7 +616,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
* @return {@code True} if local node is primary for this partition.
*/
public boolean primary(AffinityTopologyVersion topVer) {
- return cctx.affinity().primary(cctx.localNode(), id, topVer);
+ return cctx.affinity().primaryByPartition(cctx.localNode(), id, topVer);
}
/**
@@ -624,7 +624,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
* @return {@code True} if local node is backup for this partition.
*/
public boolean backup(AffinityTopologyVersion topVer) {
- return cctx.affinity().backup(cctx.localNode(), id, topVer);
+ return cctx.affinity().backupByPartition(cctx.localNode(), id, topVer);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/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 1b4dcc9..97d1053 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
@@ -568,7 +568,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
for (int p = 0; p < num; p++) {
GridDhtLocalPartition locPart = localPartition(p, topVer, false, false);
- if (cctx.affinity().localNode(p, topVer)) {
+ if (cctx.affinity().partitionLocalNode(p, topVer)) {
// This partition will be created during next topology event,
// which obviously has not happened at this point.
if (locPart == null) {
@@ -691,7 +691,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
try {
loc = locParts.get(p);
- boolean belongs = cctx.affinity().localNode(p, topVer);
+ boolean belongs = cctx.affinity().partitionLocalNode(p, topVer);
if (loc != null && loc.state() == EVICTED) {
locParts.set(p, loc = null);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
index 6ad20c7..f3c4963 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
@@ -274,7 +274,7 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
return true;
// Check if we are on the backup node.
- return !cacheCtx.affinity().backups(key, topVer).contains(cctx.localNode());
+ return !cacheCtx.affinity().backupsByKey(key, topVer).contains(cctx.localNode());
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 7efe841..12df74f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -379,7 +379,7 @@ public class GridPartitionedGetFuture<K, V> extends CacheDistributedGetFutureAda
) {
int part = cctx.affinity().partition(key);
- List<ClusterNode> affNodes = cctx.affinity().nodes(part, topVer);
+ List<ClusterNode> affNodes = cctx.affinity().nodesByPartition(part, topVer);
if (affNodes.isEmpty()) {
onDone(serverNotFoundError(topVer));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index a0b7940..b3c09e3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -325,7 +325,7 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im
@Nullable private ClusterNode mapKeyToNode(AffinityTopologyVersion topVer) {
int part = cctx.affinity().partition(key);
- List<ClusterNode> affNodes = cctx.affinity().nodes(part, topVer);
+ List<ClusterNode> affNodes = cctx.affinity().nodesByPartition(part, topVer);
if (affNodes.isEmpty()) {
onDone(serverNotFoundError(topVer));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index acfe141..c116639 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -2463,7 +2463,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
assert !(newConflictVer instanceof GridCacheVersionEx) : newConflictVer;
- boolean primary = !req.fastMap() || ctx.affinity().primary(ctx.localNode(), entry.partition(),
+ boolean primary = !req.fastMap() || ctx.affinity().primaryByPartition(ctx.localNode(), entry.partition(),
req.topologyVersion());
Object writeVal = op == TRANSFORM ? req.entryProcessor(i) : req.writeValue(i);
@@ -2553,7 +2553,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
if (hasNear) {
if (primary && updRes.sendToDht()) {
- if (!ctx.affinity().belongs(node, entry.partition(), topVer)) {
+ if (!ctx.affinity().partitionBelongs(node, entry.partition(), topVer)) {
// If put the same value as in request then do not need to send it back.
if (op == TRANSFORM || writeVal != updRes.newValue()) {
res.addNearValue(i,
@@ -2684,7 +2684,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
Map<KeyCacheObject, CacheObject> storeMap = req.fastMap() ?
F.view(putMap, new P1<CacheObject>() {
@Override public boolean apply(CacheObject key) {
- return ctx.affinity().primary(ctx.localNode(), key, req.topologyVersion());
+ return ctx.affinity().primaryByKey(ctx.localNode(), key, req.topologyVersion());
}
}) :
putMap;
@@ -2707,7 +2707,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
Collection<KeyCacheObject> storeKeys = req.fastMap() ?
F.view(rmvKeys, new P1<Object>() {
@Override public boolean apply(Object key) {
- return ctx.affinity().primary(ctx.localNode(), key, req.topologyVersion());
+ return ctx.affinity().primaryByKey(ctx.localNode(), key, req.topologyVersion());
}
}) :
rmvKeys;
@@ -2746,7 +2746,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
assert writeVal != null || op == DELETE : "null write value found.";
- boolean primary = !req.fastMap() || ctx.affinity().primary(ctx.localNode(), entry.key(),
+ boolean primary = !req.fastMap() || ctx.affinity().primaryByPartition(ctx.localNode(),
+ entry.partition(),
req.topologyVersion());
Collection<UUID> readers = null;
@@ -2842,7 +2843,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
if (hasNear) {
if (primary) {
- if (!ctx.affinity().belongs(node, entry.partition(), topVer)) {
+ if (!ctx.affinity().partitionBelongs(node, entry.partition(), topVer)) {
int idx = firstEntryIdx + i;
if (req.operation() == TRANSFORM) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index 7376aff..891a20c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -543,7 +543,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
else
val = EntryProcessorResourceInjectorProxy.wrap(cctx.kernalContext(), (EntryProcessor)val);
- ClusterNode primary = cctx.affinity().primary(cacheKey, topVer);
+ ClusterNode primary = cctx.affinity().primaryByKey(cacheKey, topVer);
if (primary == null)
throw new ClusterTopologyServerNotFoundException("Failed to map keys for cache (all partition nodes " +
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 950e5bd..2315a18 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -936,7 +936,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
else
val = EntryProcessorResourceInjectorProxy.wrap(cctx.kernalContext(), (EntryProcessor)val);
- ClusterNode primary = cctx.affinity().primary(cacheKey.partition(), topVer);
+ ClusterNode primary = cctx.affinity().primaryByPartition(cacheKey.partition(), topVer);
if (primary == null)
throw new ClusterTopologyServerNotFoundException("Failed to map keys for cache (all partition nodes " +
@@ -987,7 +987,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
// If we can send updates in parallel - do it.
return fastMap ? cctx.topology().nodes(affMgr.partition(key), topVer) :
- Collections.singletonList(affMgr.primary(key, topVer));
+ Collections.singletonList(affMgr.primaryByKey(key, topVer));
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index 2d18a47..20b8791 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -173,7 +173,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
AffinityTopologyVersion topVer,
boolean allowDetached
) {
- return allowDetached && !ctx.affinity().primary(ctx.localNode(), key, topVer) ?
+ return allowDetached && !ctx.affinity().primaryByKey(ctx.localNode(), key, topVer) ?
createEntry(key) : entryExx(key, topVer);
}
@@ -663,7 +663,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
assert topVer.compareTo(AffinityTopologyVersion.ZERO) > 0;
// Send request to remove from remote nodes.
- ClusterNode primary = ctx.affinity().primary(key, topVer);
+ ClusterNode primary = ctx.affinity().primaryByKey(key, topVer);
if (primary == null) {
if (log.isDebugEnabled())
@@ -783,7 +783,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
map = U.newHashMap(affNodes.size());
}
- ClusterNode primary = ctx.affinity().primary(key, topVer);
+ ClusterNode primary = ctx.affinity().primaryByKey(key, topVer);
if (primary == null) {
if (log.isDebugEnabled())
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index 69b66f9..79ca108 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -1203,7 +1203,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
boolean explicit = false;
for (KeyCacheObject key : keys) {
- if (!cctx.affinity().primary(cctx.localNode(), key, topVer)) {
+ if (!cctx.affinity().primaryByKey(cctx.localNode(), key, topVer)) {
// Remove explicit locks added so far.
for (KeyCacheObject k : keys)
cctx.mvcc().removeExplicitLock(threadId, cctx.txKey(k), lockVer);
@@ -1287,7 +1287,7 @@ public final class GridDhtColocatedLockFuture extends GridCompoundIdentityFuture
) throws IgniteCheckedException {
assert mapping == null || mapping.node() != null;
- ClusterNode primary = cctx.affinity().primary(key, topVer);
+ ClusterNode primary = cctx.affinity().primaryByKey(key, topVer);
if (primary == null)
throw new ClusterTopologyServerNotFoundException("Failed to lock keys " +
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 02c31da..274205b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -623,7 +623,7 @@ public class GridDhtPartitionDemander {
for (Map.Entry<Integer, CacheEntryInfoCollection> e : supply.infos().entrySet()) {
int p = e.getKey();
- if (cctx.affinity().localNode(p, topVer)) {
+ if (cctx.affinity().partitionLocalNode(p, topVer)) {
GridDhtLocalPartition part = top.localPartition(p, topVer, true);
assert part != null;
@@ -693,7 +693,7 @@ public class GridDhtPartitionDemander {
// Only request partitions based on latest topology version.
for (Integer miss : supply.missed()) {
- if (cctx.affinity().localNode(miss, topVer))
+ if (cctx.affinity().partitionLocalNode(miss, topVer))
fut.partitionMissed(id, miss);
}
@@ -1384,7 +1384,7 @@ public class GridDhtPartitionDemander {
for (Map.Entry<Integer, CacheEntryInfoCollection> e : supply.infos().entrySet()) {
int p = e.getKey();
- if (cctx.affinity().localNode(p, topVer)) {
+ if (cctx.affinity().partitionLocalNode(p, topVer)) {
GridDhtLocalPartition part = top.localPartition(p, topVer, true);
assert part != null;
@@ -1461,7 +1461,7 @@ public class GridDhtPartitionDemander {
// Only request partitions based on latest topology version.
for (Integer miss : s.supply().missed()) {
- if (cctx.affinity().localNode(miss, topVer))
+ if (cctx.affinity().partitionLocalNode(miss, topVer))
fut.partitionMissed(node.id(), miss);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
index b082c47..9942423 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
@@ -302,7 +302,7 @@ class GridDhtPartitionSupplier {
(Iterator<GridCacheMapEntry>)sctx.entryIt : loc.allEntries().iterator();
while (entIt.hasNext()) {
- if (!cctx.affinity().belongs(node, part, d.topologyVersion())) {
+ if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
// Demander no longer needs this partition, so we send '-1' partition and move on.
s.missed(part);
@@ -387,7 +387,7 @@ class GridDhtPartitionSupplier {
boolean prepared = false;
while (iter.hasNext()) {
- if (!cctx.affinity().belongs(node, part, d.topologyVersion())) {
+ if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
// Demander no longer needs this partition,
// so we send '-1' partition and move on.
s.missed(part);
@@ -510,7 +510,7 @@ class GridDhtPartitionSupplier {
(Iterator<GridCacheEntryInfo>)sctx.entryIt : entries.iterator();
while (lsnrIt.hasNext()) {
- if (!cctx.affinity().belongs(node, part, d.topologyVersion())) {
+ if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
// Demander no longer needs this partition,
// so we send '-1' partition and move on.
s.missed(part);
@@ -808,7 +808,7 @@ class GridDhtPartitionSupplier {
boolean partMissing = false;
for (GridCacheEntryEx e : loc.allEntries()) {
- if (!cctx.affinity().belongs(node, part, d.topologyVersion())) {
+ if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
// Demander no longer needs this partition, so we send '-1' partition and move on.
s.missed(part);
@@ -859,7 +859,7 @@ class GridDhtPartitionSupplier {
boolean prepared = false;
for (Map.Entry<byte[], GridCacheSwapEntry> e : iter) {
- if (!cctx.affinity().belongs(node, part, d.topologyVersion())) {
+ if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
// Demander no longer needs this partition,
// so we send '-1' partition and move on.
s.missed(part);
@@ -947,7 +947,7 @@ class GridDhtPartitionSupplier {
swapLsnr = null;
for (GridCacheEntryInfo info : entries) {
- if (!cctx.affinity().belongs(node, part, d.topologyVersion())) {
+ if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
// Demander no longer needs this partition,
// so we send '-1' partition and move on.
s.missed(part);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index 41bc2fc..a4a0c35 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -289,7 +289,7 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
}
// If partition belongs to local node.
- if (cctx.affinity().localNode(p, topVer)) {
+ if (cctx.affinity().partitionLocalNode(p, topVer)) {
GridDhtLocalPartition part = top.localPartition(p, topVer, true);
assert part != null;
@@ -349,7 +349,7 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
* @return Picked owners.
*/
private Collection<ClusterNode> pickedOwners(int p, AffinityTopologyVersion topVer) {
- Collection<ClusterNode> affNodes = cctx.affinity().nodes(p, topVer);
+ Collection<ClusterNode> affNodes = cctx.affinity().nodesByPartition(p, topVer);
int affCnt = affNodes.size();
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index b843e4e..41632ef 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -161,7 +161,7 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> {
if (F.contains(failed, key))
continue;
- if (ctx.affinity().belongs(ctx.localNode(), ctx.affinity().partition(key), req.topologyVersion())) { // Reader became backup.
+ if (ctx.affinity().partitionBelongs(ctx.localNode(), ctx.affinity().partition(key), req.topologyVersion())) { // Reader became backup.
GridCacheEntryEx entry = peekEx(key);
if (entry != null && entry.markObsolete(ver))
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
index 30fc213..d022805 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
@@ -112,7 +112,7 @@ public class GridNearCacheEntry extends GridDistributedCacheEntry {
return false;
}
- if (cctx.affinity().backup(cctx.localNode(), part, topVer)) {
+ if (cctx.affinity().backupByPartition(cctx.localNode(), part, topVer)) {
this.topVer = AffinityTopologyVersion.NONE;
return false;
@@ -162,7 +162,7 @@ public class GridNearCacheEntry extends GridDistributedCacheEntry {
}
}
- ClusterNode primaryNode = cctx.affinity().primary(key, topVer);
+ ClusterNode primaryNode = cctx.affinity().primaryByKey(key, topVer);
if (primaryNode == null)
this.topVer = AffinityTopologyVersion.NONE;
@@ -686,7 +686,7 @@ public class GridNearCacheEntry extends GridDistributedCacheEntry {
ClusterNode primary = null;
try {
- primary = cctx.affinity().primary(part, topVer);
+ primary = cctx.affinity().primaryByPartition(part, topVer);
}
catch (IllegalStateException ignore) {
// Do not have affinity history.
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 6ac55f8..47ba043 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -413,7 +413,7 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
) {
int part = cctx.affinity().partition(key);
- List<ClusterNode> affNodes = cctx.affinity().nodes(part, topVer);
+ List<ClusterNode> affNodes = cctx.affinity().nodesByPartition(part, topVer);
if (affNodes.isEmpty()) {
onDone(serverNotFoundError(topVer));
@@ -724,7 +724,7 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
info.unmarshalValue(cctx, cctx.deploy().globalLoader());
// Entries available locally in DHT should not be loaded into near cache for reading.
- if (!cctx.affinity().localNode(info.key(), cctx.affinity().affinityTopologyVersion())) {
+ if (!cctx.affinity().keyLocalNode(info.key(), cctx.affinity().affinityTopologyVersion())) {
GridNearCacheEntry entry = savedEntries.get(info.key());
if (entry == null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index d7a0fb5..d3e3a15 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -1373,7 +1373,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
) throws IgniteCheckedException {
assert mapping == null || mapping.node() != null;
- ClusterNode primary = cctx.affinity().primary(key, topVer);
+ ClusterNode primary = cctx.affinity().primaryByKey(key, topVer);
if (primary == null)
throw new ClusterTopologyServerNotFoundException("Failed to lock keys " +
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index c464b36..a8448dc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -529,7 +529,7 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
GridCacheContext cacheCtx = entry.context();
List<ClusterNode> nodes = cacheCtx.isLocal() ?
- cacheCtx.affinity().nodes(entry.key(), topVer) :
+ cacheCtx.affinity().nodesByKey(entry.key(), topVer) :
cacheCtx.topology().nodes(cacheCtx.affinity().partition(entry.key()), topVer);
txMapping.addMapping(nodes);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index b314b81..606d70f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -605,7 +605,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
nodes = cacheCtx.topology().nodes(cached0.partition(), topVer);
else
nodes = cacheCtx.isLocal() ?
- cacheCtx.affinity().nodes(entry.key(), topVer) :
+ cacheCtx.affinity().nodesByKey(entry.key(), topVer) :
cacheCtx.topology().nodes(cacheCtx.affinity().partition(entry.key()), topVer);
txMapping.addMapping(nodes);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index f9a2f90..a4132f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -196,7 +196,7 @@ public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureA
GridCacheContext cacheCtx = txEntry.context();
List<ClusterNode> nodes = cacheCtx.isLocal() ?
- cacheCtx.affinity().nodes(txEntry.key(), topVer) :
+ cacheCtx.affinity().nodesByKey(txEntry.key(), topVer) :
cacheCtx.topology().nodes(cacheCtx.affinity().partition(txEntry.key()), topVer);
ClusterNode primary = F.first(nodes);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index b3eb755..940dd80 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -476,7 +476,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
* @return {@code True} if entry is locally mapped as a primary or back up node.
*/
protected boolean isNearLocallyMapped(GridCacheEntryEx e, AffinityTopologyVersion topVer) {
- return ctx.affinity().belongs(ctx.localNode(), e.partition(), topVer);
+ return ctx.affinity().partitionBelongs(ctx.localNode(), e.partition(), topVer);
}
/**
@@ -548,7 +548,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
topVer = cand.topologyVersion();
// Send request to remove from remote nodes.
- ClusterNode primary = ctx.affinity().primary(key, topVer);
+ ClusterNode primary = ctx.affinity().primaryByKey(key, topVer);
if (primary == null) {
if (log.isDebugEnabled())
@@ -668,7 +668,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K, V>
map = U.newHashMap(affNodes.size());
}
- ClusterNode primary = ctx.affinity().primary(key, cand.topologyVersion());
+ ClusterNode primary = ctx.affinity().primaryByKey(key, cand.topologyVersion());
if (primary == null) {
if (log.isDebugEnabled())
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index 9acab56..aed1ab0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -350,7 +350,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
GridCacheContext cacheCtx = e.context();
try {
- if (e.op() != NOOP && !cacheCtx.affinity().localNode(e.key(), topVer)) {
+ if (e.op() != NOOP && !cacheCtx.affinity().keyLocalNode(e.key(), topVer)) {
GridCacheEntryEx entry = cacheCtx.cache().peekEx(e.key());
if (entry != null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/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 85c01d9..4fa7e36 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
@@ -1525,11 +1525,11 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
// Other types are filtered in indexing manager.
if (!cctx.isReplicated() && qry.type() == SCAN && qry.partition() == null &&
cctx.config().getCacheMode() != LOCAL && !incBackups &&
- !cctx.affinity().primary(cctx.localNode(), key, topVer)) {
+ !cctx.affinity().primaryByKey(cctx.localNode(), key, topVer)) {
if (log.isDebugEnabled())
log.debug("Ignoring backup element [row=" + row +
", cacheMode=" + cctx.config().getCacheMode() + ", incBackups=" + incBackups +
- ", primary=" + cctx.affinity().primary(cctx.localNode(), key, topVer) + ']');
+ ", primary=" + cctx.affinity().primaryByKey(cctx.localNode(), key, topVer) + ']');
continue;
}
@@ -1537,7 +1537,8 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
V val = row.getValue();
if (log.isDebugEnabled()) {
- ClusterNode primaryNode = CU.primaryNode(cctx, key);
+ ClusterNode primaryNode = cctx.affinity().primaryByKey(key,
+ cctx.affinity().affinityTopologyVersion());
log.debug(S.toString("Record",
"key", key, true,
@@ -2300,7 +2301,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
return new IgniteBiPredicate<K, V>() {
@Override public boolean apply(K k, V v) {
- return cache.context().affinity().primary(ctx.discovery().localNode(), k, NONE);
+ return cache.context().affinity().primaryByKey(ctx.discovery().localNode(), k, NONE);
}
};
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 10784fc..dbbcbff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -861,7 +861,7 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
GridCacheAffinityManager aff = cctx.affinity();
if (initUpdCntrsPerNode != null) {
- for (ClusterNode node : aff.nodes(partId, initTopVer)) {
+ for (ClusterNode node : aff.nodesByPartition(partId, initTopVer)) {
Map<Integer, Long> map = initUpdCntrsPerNode.get(node.id());
if (map != null) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
index 91c1991..6887a50 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
@@ -367,7 +367,7 @@ public class CacheContinuousQueryManager extends GridCacheManagerAdapter {
if (F.isEmpty(lsnrCol))
return;
- boolean primary = cctx.affinity().primary(cctx.localNode(), e.partition(), AffinityTopologyVersion.NONE);
+ boolean primary = cctx.affinity().primaryByPartition(cctx.localNode(), e.partition(), AffinityTopologyVersion.NONE);
if (cctx.isReplicated() || primary) {
boolean recordIgniteEvt = cctx.gridEvents().isRecordable(EVT_CACHE_QUERY_OBJECT_READ);
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/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 18c3011..b07a117 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
@@ -1288,7 +1288,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter implement
if (!skip && skipNonPrimary) {
skip = e.cached().isNear() ||
e.cached().detached() ||
- !e.context().affinity().primary(e.cached().partition(), topologyVersion()).isLocal();
+ !e.context().affinity().primaryByPartition(e.cached().partition(), topologyVersion()).isLocal();
}
if (!skip && !local() && // Update local store at backups only if needed.
@@ -1707,7 +1707,7 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter implement
int part = cached != null ? cached.partition() : cacheCtx.affinity().partition(e.key());
- List<ClusterNode> affNodes = cacheCtx.affinity().nodes(part, topologyVersion());
+ List<ClusterNode> affNodes = cacheCtx.affinity().nodesByPartition(part, topologyVersion());
e.locallyMapped(F.contains(affNodes, cctx.localNode()));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/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 3043ecc..9e2f321 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
@@ -1101,7 +1101,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
* @return {@code True} if local node is current primary for given entry.
*/
private boolean primaryLocal(GridCacheEntryEx entry) {
- return entry.context().affinity().primary(cctx.localNode(), entry.partition(), AffinityTopologyVersion.NONE);
+ return entry.context().affinity().primaryByPartition(cctx.localNode(), entry.partition(), AffinityTopologyVersion.NONE);
}
/**
@@ -1389,7 +1389,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
finally {
if (entry != null && readCommitted()) {
if (cacheCtx.isNear()) {
- if (cacheCtx.affinity().belongs(cacheCtx.localNode(), entry.partition(), topVer)) {
+ if (cacheCtx.affinity().partitionBelongs(cacheCtx.localNode(), entry.partition(), topVer)) {
if (entry.markObsolete(xidVer))
cacheCtx.cache().removeEntry(entry);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetection.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetection.java
index 70d938e..67d00ea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetection.java
@@ -401,7 +401,7 @@ public class TxDeadlockDetection {
private UUID primary(IgniteTxKey txKey) {
GridCacheContext ctx = cctx.cacheContext(txKey.cacheId());
- ClusterNode node = ctx.affinity().primary(txKey.key(), topVer);
+ ClusterNode node = ctx.affinity().primaryByKey(txKey.key(), topVer);
assert node != null : topVer;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index bb9ffdd..56ab235 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -1945,7 +1945,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
expiryTime = CU.toExpireTime(ttl);
}
- boolean primary = cctx.affinity().primary(cctx.localNode(), entry.key(), topVer);
+ boolean primary = cctx.affinity().primaryByKey(cctx.localNode(), entry.key(), topVer);
entry.initialValue(e.getValue(),
ver,
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
index 70232af..d5f277e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetImpl.java
@@ -496,7 +496,7 @@ public class GridCacheSetImpl<T> extends AbstractCollection<T> implements Ignite
Collection<ClusterNode> nodes;
if (collocated) {
- List<ClusterNode> nodes0 = ctx.affinity().nodes(hdrPart, topVer);
+ List<ClusterNode> nodes0 = ctx.affinity().nodesByPartition(hdrPart, topVer);
nodes = !nodes0.isEmpty() ?
Collections.singleton(nodes0.contains(ctx.localNode()) ? ctx.localNode() : F.first(nodes0)) : nodes0;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridSetQueryPredicate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridSetQueryPredicate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridSetQueryPredicate.java
index e8b2cc7..bc6c182 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridSetQueryPredicate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridSetQueryPredicate.java
@@ -91,7 +91,7 @@ public class GridSetQueryPredicate<K, V> implements IgniteBiPredicate<K, V>, Ext
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public boolean apply(K k, V v) {
- return !filter || ctx.affinity().primary(ctx.localNode(), k, ctx.affinity().affinityTopologyVersion());
+ return !filter || ctx.affinity().primaryByKey(ctx.localNode(), k, ctx.affinity().affinityTopologyVersion());
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
index ea9cbd7..2b6699d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
@@ -1568,7 +1568,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
}
}
finally {
- if (checkPartMapping && !cctx.affinity().primary(partId, topVer).id().equals(ctx.localNodeId()))
+ if (checkPartMapping && !cctx.affinity().primaryByPartition(partId, topVer).id().equals(ctx.localNodeId()))
throw new IgniteException("Failed partition reservation. " +
"Partition is not primary on the node. [partition=" + partId + ", cacheName=" + cctx.name() +
", nodeId=" + ctx.localNodeId() + ", topology=" + topVer + ']');
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
index 92e2b9b..b0337d6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java
@@ -214,12 +214,12 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest {
ClusterNode loc = ignite.cluster().localNode();
- if (loc.equals(aff.primary(key, topVer)))
+ if (loc.equals(aff.primaryByKey(key, topVer)))
return true;
AffinityTopologyVersion topVer0 = new AffinityTopologyVersion(topVer.topologyVersion() + 1, 0);
- assertEquals(loc, aff.primary(key, topVer0));
+ assertEquals(loc, aff.primaryByKey(key, topVer0));
}
return null;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 56341bd..7a0b713 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -5875,7 +5875,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
int size = 0;
for (String key : keys) {
- if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx())) {
+ if (ctx.affinity().keyLocalNode(key, ctx.discovery().topologyVersionEx())) {
GridCacheEntryEx e =
ctx.isNear() ? ctx.near().dht().peekEx(key) : ctx.cache().peekEx(key);
@@ -5911,7 +5911,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
int size = 0;
for (String key : map.keySet())
- if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx()))
+ if (ctx.affinity().keyLocalNode(key, ctx.discovery().topologyVersionEx()))
size++;
assertEquals("Incorrect key size on cache #" + idx, size, ignite.cache(ctx.name()).localSize(ALL));
@@ -6154,7 +6154,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
int size = 0;
for (String key : keys)
- if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx()))
+ if (ctx.affinity().keyLocalNode(key, ctx.discovery().topologyVersionEx()))
size++;
assertEquals("Incorrect key size on cache #" + idx, size, ignite.cache(null).localSize(ALL));
http://git-wip-us.apache.org/repos/asf/ignite/blob/6d5adcb7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
index 6b0e193..d4449f9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
@@ -5548,7 +5548,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
int size = 0;
for (String key : keys) {
- if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx())) {
+ if (ctx.affinity().keyLocalNode(key, ctx.discovery().topologyVersionEx())) {
GridCacheEntryEx e =
ctx.isNear() ? ctx.near().dht().peekEx(key) : ctx.cache().peekEx(key);
@@ -5589,7 +5589,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
int size = 0;
for (String key : map.keySet())
- if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx()))
+ if (ctx.affinity().keyLocalNode(key, ctx.discovery().topologyVersionEx()))
size++;
assertEquals("Incorrect key size on cache #" + idx, size, ignite.cache(ctx.name()).localSize(ALL));
@@ -5850,7 +5850,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
int size = 0;
for (String key : keys)
- if (ctx.affinity().localNode(key, ctx.discovery().topologyVersionEx()))
+ if (ctx.affinity().keyLocalNode(key, ctx.discovery().topologyVersionEx()))
size++;
assertEquals("Incorrect key size on cache #" + idx, size, ignite.cache(cacheName).localSize(ALL));
[26/32] ignite git commit: IGNITE-4610 Added more informative message.
Posted by yz...@apache.org.
IGNITE-4610 Added more informative message.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9ff2a8f6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9ff2a8f6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9ff2a8f6
Branch: refs/heads/ignite-comm-balance-master
Commit: 9ff2a8f62f7f7ce36153e317758c19b2982eecd0
Parents: b0e104e
Author: Andrey Novikov <an...@gridgain.com>
Authored: Fri Feb 3 11:58:43 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Fri Feb 3 11:58:43 2017 +0700
----------------------------------------------------------------------
modules/web-console/frontend/views/templates/agent-download.jade | 2 +-
modules/web-console/web-agent/README.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9ff2a8f6/modules/web-console/frontend/views/templates/agent-download.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/agent-download.jade b/modules/web-console/frontend/views/templates/agent-download.jade
index 20b6b03..f57bf1d 100644
--- a/modules/web-console/frontend/views/templates/agent-download.jade
+++ b/modules/web-console/frontend/views/templates/agent-download.jade
@@ -41,7 +41,7 @@
p Connection to Ignite Web Agent is established, but agent failed to connect to Ignite Node
p Please check the following:
ul
- li Ignite Grid is up and running
+ li Ignite Grid is up and Ignite REST server started (copy "ignite-rest-http" folder from libs/optional/ to libs/)
li In agent settings check URI for connect to Ignite REST server
li Check agent logs for errors
li Refer to #[b README.txt] in agent folder for more information
http://git-wip-us.apache.org/repos/asf/ignite/blob/9ff2a8f6/modules/web-console/web-agent/README.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/README.txt b/modules/web-console/web-agent/README.txt
index cc0c80f..81df1cb 100644
--- a/modules/web-console/web-agent/README.txt
+++ b/modules/web-console/web-agent/README.txt
@@ -32,7 +32,7 @@ Security tokens:
3) One may specify several comma separated tokens using configuration file or command line arguments of web agent.
Ignite Web agent requirements:
- 1) In order to communicate with web agent Ignite node should be started with REST server (move ignite-rest-http folder from lib/optional/ to lib/).
+ 1) In order to communicate with web agent Ignite node should be started with REST server (copy "ignite-rest-http" folder from "libs/optional/" to "libs/").
2) Configure web agent serverURI property by Ignite node REST server URI.
Options:
[02/32] ignite git commit: .NET: Remove unused imports
Posted by yz...@apache.org.
.NET: Remove unused imports
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/23c49184
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/23c49184
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/23c49184
Branch: refs/heads/ignite-comm-balance-master
Commit: 23c491846780499a97fbf3a414558568e7252ceb
Parents: f5375de
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Jan 26 19:54:25 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Jan 26 19:54:25 2017 +0300
----------------------------------------------------------------------
.../dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/23c49184/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
index ff5d6a2..4ddbc6d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Impl.Transactions
using System.Threading.Tasks;
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Impl.Binary;
- using Apache.Ignite.Core.Impl.Binary.IO;
using Apache.Ignite.Core.Impl.Unmanaged;
using Apache.Ignite.Core.Transactions;
[20/32] ignite git commit: IGNITE-4046: Added DML support to CPP
platform. This closes #1432.
Posted by yz...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
index bba806c..4c0f892 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
@@ -25,6 +25,7 @@
#include "test_utils.h"
using namespace ignite;
+using namespace ignite_test;
using namespace boost::unit_test;
@@ -192,7 +193,7 @@ BOOST_AUTO_TEST_CASE(TestTimestampSelect)
{
TestType in1;
in1.i32Field = 1;
- in1.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2017, 1, 13, 19, 54, 01, 987654321);
+ in1.timestampField = common::MakeTimestampGmt(2017, 1, 13, 19, 54, 01, 987654321);
testCache.Put(1, in1);
@@ -230,7 +231,7 @@ BOOST_AUTO_TEST_CASE(TestTimestampInsert)
data.fraction = 987654321;
using ignite::impl::binary::BinaryUtils;
- Timestamp expected = BinaryUtils::MakeTimestampGmt(data.year, data.month, data.day, data.hour,
+ Timestamp expected = common::MakeTimestampGmt(data.year, data.month, data.day, data.hour,
data.minute, data.second, data.fraction);
SQLLEN lenInd = sizeof(data);
@@ -259,7 +260,7 @@ BOOST_AUTO_TEST_CASE(TestTimeSelect)
TestType in1;
in1.i32Field = 1;
- in1.timestampField = impl::binary::BinaryUtils::MakeTimestampGmt(2017, 1, 13, ts.hour, ts.minute, ts.second);
+ in1.timestampField = common::MakeTimestampGmt(2017, 1, 13, ts.hour, ts.minute, ts.second);
testCache.Put(1, in1);
@@ -293,8 +294,7 @@ BOOST_AUTO_TEST_CASE(TestTimeInsertToTimestamp)
data.second = 1;
using ignite::impl::binary::BinaryUtils;
- Timestamp expected = BinaryUtils::MakeTimestampGmt(1970, 1, 1, data.hour,
- data.minute, data.second, 0);
+ Timestamp expected = common::MakeTimestampGmt(1970, 1, 1, data.hour, data.minute, data.second, 0);
SQLLEN lenInd = sizeof(data);
ret = SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_TIME, SQL_TIMESTAMP, sizeof(data), 0, &data, sizeof(data), &lenInd);
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc-test/src/test_utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/test_utils.cpp b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
index 48f409b..89d50ef 100644
--- a/modules/platforms/cpp/odbc-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
@@ -15,11 +15,12 @@
* limitations under the License.
*/
+#include <cassert>
+
#include "test_utils.h"
-namespace ignite
+namespace ignite_test
{
-
std::string GetOdbcErrorMessage(SQLSMALLINT handleType, SQLHANDLE handle)
{
SQLCHAR sqlstate[7] = {};
@@ -33,4 +34,59 @@ namespace ignite
return std::string(reinterpret_cast<char*>(sqlstate)) + ": " +
std::string(reinterpret_cast<char*>(message), reallen);
}
+
+ void InitConfig(ignite::IgniteConfiguration& cfg, const char* cfgFile)
+ {
+ using namespace ignite;
+
+ assert(cfgFile != 0);
+
+ cfg.jvmOpts.push_back("-Xdebug");
+ cfg.jvmOpts.push_back("-Xnoagent");
+ cfg.jvmOpts.push_back("-Djava.compiler=NONE");
+ cfg.jvmOpts.push_back("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005");
+ cfg.jvmOpts.push_back("-XX:+HeapDumpOnOutOfMemoryError");
+ cfg.jvmOpts.push_back("-Duser.timezone=GMT");
+ cfg.jvmOpts.push_back("-DIGNITE_QUIET=false");
+ cfg.jvmOpts.push_back("-DIGNITE_CONSOLE_APPENDER=false");
+ cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
+
+#ifdef IGNITE_TESTS_32
+ cfg.jvmInitMem = 256;
+ cfg.jvmMaxMem = 768;
+#else
+ cfg.jvmInitMem = 1024;
+ cfg.jvmMaxMem = 4096;
+#endif
+
+ char* cfgPath = getenv("IGNITE_NATIVE_TEST_ODBC_CONFIG_PATH");
+
+ assert(cfgPath != 0);
+
+ cfg.springCfgPath = std::string(cfgPath).append("/").append(cfgFile);
+ }
+
+ ignite::Ignite StartNode(const char* cfgFile)
+ {
+ using namespace ignite;
+
+ IgniteConfiguration cfg;
+
+ InitConfig(cfg, cfgFile);
+
+ return Ignition::Start(cfg);
+ }
+
+ ignite::Ignite StartNode(const char* cfgFile, const char* name)
+ {
+ using namespace ignite;
+
+ assert(name != 0);
+
+ IgniteConfiguration cfg;
+
+ InitConfig(cfg, cfgFile);
+
+ return Ignition::Start(cfg, name);
+ }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0bc6f0c/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
index 85979c8..026cd60 100644
--- a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
+++ b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
@@ -672,7 +672,7 @@ namespace ignite
tm tmTime;
- BinaryUtils::DateToCTm(value, tmTime);
+ common::DateToCTm(value, tmTime);
SqlLen* resLenPtr = GetResLen();
void* dataPtr = GetData();
@@ -806,7 +806,7 @@ namespace ignite
tm tmTime;
- BinaryUtils::TimestampToCTm(value, tmTime);
+ common::TimestampToCTm(value, tmTime);
SqlLen* resLenPtr = GetResLen();
void* dataPtr = GetData();
@@ -1306,7 +1306,7 @@ namespace ignite
break;
}
- return BinaryUtils::CTmToDate(tmTime);
+ return common::CTmToDate(tmTime);
}
Timestamp ApplicationDataBuffer::GetTimestamp() const
@@ -1382,7 +1382,7 @@ namespace ignite
break;
}
- return BinaryUtils::CTmToTimestamp(tmTime, nanos);
+ return common::CTmToTimestamp(tmTime, nanos);
}
void ApplicationDataBuffer::GetDecimal(common::Decimal& val) const
[24/32] ignite git commit: IGNITE-3430 .NET: Suppress unused class
warning for TransactionScope feature
Posted by yz...@apache.org.
IGNITE-3430 .NET: Suppress unused class warning for TransactionScope feature
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cfaa5cb2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cfaa5cb2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cfaa5cb2
Branch: refs/heads/ignite-comm-balance-master
Commit: cfaa5cb2741bec3622d0796695d533a71185e67d
Parents: e92d44f
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Wed Feb 1 18:36:00 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Wed Feb 1 18:36:00 2017 +0300
----------------------------------------------------------------------
.../Cache/CacheAbstractTransactionalTest.cs | 87 ++++++++++----------
.../Transactions/CacheTransactionManager.cs | 1 +
2 files changed, 46 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cfaa5cb2/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index d18cdbe..4bf38b9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -776,60 +776,63 @@ namespace Apache.Ignite.Core.Tests.Cache
[Ignore("IGNITE-3430")]
public void TestTransactionScopeAllOperations()
{
- CheckTxOp((cache, key) => cache.Put(key, -5));
- CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
+ for (var i = 0; i < 100; i++)
+ {
+ CheckTxOp((cache, key) => cache.Put(key, -5));
+ CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
- CheckTxOp((cache, key) => cache.PutAll(new Dictionary<int, int> {{key, -7}}));
- CheckTxOp((cache, key) => cache.PutAllAsync(new Dictionary<int, int> {{key, -7}}).Wait());
+ CheckTxOp((cache, key) => cache.PutAll(new Dictionary<int, int> {{key, -7}}));
+ CheckTxOp((cache, key) => cache.PutAllAsync(new Dictionary<int, int> {{key, -7}}).Wait());
- CheckTxOp((cache, key) =>
- {
- cache.Remove(key);
- cache.PutIfAbsent(key, -10);
- });
- CheckTxOp((cache, key) =>
- {
- cache.Remove(key);
- cache.PutIfAbsentAsync(key, -10);
- });
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.PutIfAbsent(key, -10);
+ });
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.PutIfAbsentAsync(key, -10);
+ });
- CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
- CheckTxOp((cache, key) => cache.GetAndPutAsync(key, -9).Wait());
+ CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
+ CheckTxOp((cache, key) => cache.GetAndPutAsync(key, -9).Wait());
- CheckTxOp((cache, key) =>
- {
- cache.Remove(key);
- cache.GetAndPutIfAbsent(key, -10);
- });
- CheckTxOp((cache, key) =>
- {
- cache.Remove(key);
- cache.GetAndPutIfAbsentAsync(key, -10).Wait();
- });
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.GetAndPutIfAbsent(key, -10);
+ });
+ CheckTxOp((cache, key) =>
+ {
+ cache.Remove(key);
+ cache.GetAndPutIfAbsentAsync(key, -10).Wait();
+ });
- CheckTxOp((cache, key) => cache.GetAndRemove(key));
- CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
+ CheckTxOp((cache, key) => cache.GetAndRemove(key));
+ CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
- CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
- CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
+ CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
+ CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
- CheckTxOp((cache, key) => cache.Invoke(key, new AddProcessor(), 1));
- CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.Invoke(key, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1));
- CheckTxOp((cache, key) => cache.InvokeAll(new[] {key}, new AddProcessor(), 1));
- CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAll(new[] {key}, new AddProcessor(), 1));
+ CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(), 1));
- CheckTxOp((cache, key) => cache.Remove(key));
- CheckTxOp((cache, key) => cache.RemoveAsync(key));
+ CheckTxOp((cache, key) => cache.Remove(key));
+ CheckTxOp((cache, key) => cache.RemoveAsync(key));
- CheckTxOp((cache, key) => cache.RemoveAll(new[] { key }));
- CheckTxOp((cache, key) => cache.RemoveAllAsync(new[] { key }).Wait());
+ CheckTxOp((cache, key) => cache.RemoveAll(new[] {key}));
+ CheckTxOp((cache, key) => cache.RemoveAllAsync(new[] {key}).Wait());
- CheckTxOp((cache, key) => cache.Replace(key, 100));
- CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100));
+ CheckTxOp((cache, key) => cache.Replace(key, 100));
+ CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100));
- CheckTxOp((cache, key) => cache.Replace(key, cache[key], 100));
- CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100));
+ CheckTxOp((cache, key) => cache.Replace(key, cache[key], 100));
+ CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100));
+ }
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/cfaa5cb2/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
index f5a1617..bc76ca1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
@@ -27,6 +27,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
/// Cache transaction enlistment manager,
/// allows using Ignite transactions via standard <see cref="TransactionScope"/>.
/// </summary>
+ // ReSharper disable once ClassNeverInstantiated.Global
internal class CacheTransactionManager : IEnlistmentNotification
{
/** */
[29/32] ignite git commit: IGNITE-4630
org.apache.ignite.lang.IgniteProductVersion.releaseDate returns not valid
date
Posted by yz...@apache.org.
IGNITE-4630 org.apache.ignite.lang.IgniteProductVersion.releaseDate returns not valid date
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96527d92
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96527d92
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96527d92
Branch: refs/heads/ignite-comm-balance-master
Commit: 96527d92f003dbb5010e155d4f2e7f394640a6c1
Parents: 26562d3
Author: Evgenii Zhuravlev <ez...@gridgain.com>
Authored: Fri Feb 3 12:45:17 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Feb 3 12:45:17 2017 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/lang/IgniteProductVersion.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/96527d92/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
index 0abe64f..457ec55 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteProductVersion.java
@@ -159,7 +159,7 @@ public class IgniteProductVersion implements Comparable<IgniteProductVersion>, E
* @return Release date.
*/
public Date releaseDate() {
- return new Date(revTs);
+ return new Date(revTs * 1000);
}
/**
[16/32] ignite git commit: IGNITE-3430 .NET: Disable TransactionScope
feature
Posted by yz...@apache.org.
IGNITE-3430 .NET: Disable TransactionScope feature
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e126e558
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e126e558
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e126e558
Branch: refs/heads/ignite-comm-balance-master
Commit: e126e558df3584edebb63687e7e91cd9361178eb
Parents: 529a545
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Wed Feb 1 16:13:44 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Wed Feb 1 16:13:44 2017 +0300
----------------------------------------------------------------------
.../Cache/CacheAbstractTransactionalTest.cs | 8 +++++++-
.../dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 9 ++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/e126e558/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index f355187..d18cdbe 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -569,6 +569,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/>.
/// </summary>
[Test]
+ [Ignore("IGNITE-3430")]
public void TestTransactionScopeSingleCache()
{
var cache = Cache();
@@ -606,6 +607,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// with multiple participating caches.
/// </summary>
[Test]
+ [Ignore("IGNITE-3430")]
public void TestTransactionScopeMultiCache()
{
var cache1 = Cache();
@@ -646,6 +648,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// when Ignite tx is started manually.
/// </summary>
[Test]
+ [Ignore("IGNITE-3430")]
public void TestTransactionScopeWithManualIgniteTx()
{
var cache = Cache();
@@ -671,6 +674,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test Ignite transaction with <see cref="TransactionScopeOption.Suppress"/> option.
/// </summary>
[Test]
+ [Ignore("IGNITE-3430")]
public void TestSuppressedTransactionScope()
{
var cache = Cache();
@@ -690,6 +694,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test Ignite transaction enlistment in ambient <see cref="TransactionScope"/> with nested scopes.
/// </summary>
[Test]
+ [Ignore("IGNITE-3430")]
public void TestNestedTransactionScope()
{
var cache = Cache();
@@ -732,6 +737,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Test that ambient <see cref="TransactionScope"/> options propagate to Ignite transaction.
/// </summary>
[Test]
+ [Ignore("IGNITE-3430")]
public void TestTransactionScopeOptions()
{
var cache = Cache();
@@ -767,7 +773,7 @@ namespace Apache.Ignite.Core.Tests.Cache
/// Tests all transactional operations with <see cref="TransactionScope"/>.
/// </summary>
[Test]
- [Ignore("IGNITE-3477")]
+ [Ignore("IGNITE-3430")]
public void TestTransactionScopeAllOperations()
{
CheckTxOp((cache, key) => cache.Put(key, -5));
http://git-wip-us.apache.org/repos/asf/ignite/blob/e126e558/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index a387e1b..cb6c8d5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -80,9 +80,12 @@ namespace Apache.Ignite.Core.Impl.Cache
_flagKeepBinary = flagKeepBinary;
_flagNoRetries = flagNoRetries;
- _txManager = GetConfiguration().AtomicityMode == CacheAtomicityMode.Transactional
- ? new CacheTransactionManager(grid.GetTransactions())
- : null;
+ // TransactionScope feature disabled: IGNITE-3430.
+ _txManager = null;
+
+ //_txManager = GetConfiguration().AtomicityMode == CacheAtomicityMode.Transactional
+ // ? new CacheTransactionManager(grid.GetTransactions())
+ // : null;
}
/** <inheritDoc /> */