You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/04/14 08:53:04 UTC
[10/50] [abbrv] ignite git commit: Merge remote-tracking branch
'upstream/master' into ignite-3477-master
Merge remote-tracking branch 'upstream/master' into ignite-3477-master
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5f724512
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5f724512
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5f724512
Branch: refs/heads/ignite-4929
Commit: 5f724512a9997d8e2b2a4ec7d482772fbeb741a3
Parents: 7883668 775c6e5
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Apr 12 15:40:11 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Wed Apr 12 15:40:11 2017 +0300
----------------------------------------------------------------------
.gitignore | 31 +-
examples/pom.xml | 6 +
.../examples/springdata/PersonRepository.java | 59 ++++
.../examples/springdata/SpringAppCfg.java | 69 ++++
.../examples/springdata/SpringDataExample.java | 154 +++++++++
.../examples/SpringDataExampleSelfTest.java | 32 ++
.../testsuites/IgniteExamplesSelfTestSuite.java | 2 +
.../rendezvous/RendezvousAffinityFunction.java | 26 +-
.../datastructures/GridCacheSemaphoreImpl.java | 74 ++++-
.../datastructures/GridCacheSemaphoreState.java | 22 ++
...inityFunctionFastPowerOfTwoHashSelfTest.java | 50 +++
...ousAffinityFunctionStandardHashSelfTest.java | 50 +++
...eAbstractDataStructuresFailoverSelfTest.java | 21 +-
.../testsuites/IgniteCacheTestSuite2.java | 8 +
.../binary/include/ignite/binary/binary_type.h | 127 +++----
.../ignite/impl/binary/binary_id_resolver.h | 33 +-
.../ignite/impl/binary/binary_object_impl.h | 3 +-
.../ignite/impl/binary/binary_reader_impl.h | 80 ++++-
.../include/ignite/impl/binary/binary_utils.h | 6 +-
.../ignite/impl/binary/binary_writer_impl.h | 15 +-
.../core-test/include/ignite/binary_test_defs.h | 95 +++---
.../cpp/core-test/include/ignite/complex_type.h | 30 +-
.../cpp/core-test/include/ignite/test_type.h | 37 +--
.../src/binary_identity_resolver_test.cpp | 38 +--
.../cpp/core-test/src/binary_object_test.cpp | 4 +-
.../cpp/core-test/src/binary_test_defs.cpp | 5 +
.../cpp/core-test/src/cache_invoke_test.cpp | 18 +-
.../cpp/core-test/src/cache_query_test.cpp | 12 +-
.../platforms/cpp/core-test/src/cache_test.cpp | 36 +-
.../cpp/core-test/src/continuous_query_test.cpp | 30 +-
.../cpp/core/include/ignite/ignite_binding.h | 6 +-
.../impl/cache/cache_entry_processor_holder.h | 33 +-
.../cpp/odbc-test/include/complex_type.h | 26 +-
.../platforms/cpp/odbc-test/include/test_type.h | 37 +--
modules/spring-data/README.txt | 32 ++
modules/spring-data/licenses/apache-2.0.txt | 202 ++++++++++++
modules/spring-data/pom.xml | 79 +++++
.../springdata/repository/IgniteRepository.java | 58 ++++
.../config/EnableIgniteRepositories.java | 119 +++++++
.../config/IgniteRepositoriesRegistar.java | 36 ++
.../IgniteRepositoryConfigurationExtension.java | 49 +++
.../springdata/repository/config/Query.java | 37 +++
.../repository/config/RepositoryConfig.java | 39 +++
.../repository/config/package-info.java | 22 ++
.../springdata/repository/package-info.java | 22 ++
.../repository/query/IgniteQuery.java | 83 +++++
.../repository/query/IgniteQueryGenerator.java | 243 ++++++++++++++
.../repository/query/IgniteRepositoryQuery.java | 306 +++++++++++++++++
.../repository/query/package-info.java | 22 ++
.../support/IgniteRepositoryFactory.java | 168 ++++++++++
.../support/IgniteRepositoryFactoryBean.java | 85 +++++
.../support/IgniteRepositoryImpl.java | 160 +++++++++
.../repository/support/package-info.java | 22 ++
.../IgniteSpringDataCrudSelfTest.java | 233 +++++++++++++
.../IgniteSpringDataQueriesSelfTest.java | 291 ++++++++++++++++
.../misc/ApplicationConfiguration.java | 46 +++
.../apache/ignite/springdata/misc/Person.java | 97 ++++++
.../springdata/misc/PersonRepository.java | 92 ++++++
.../springdata/misc/PersonSecondRepository.java | 40 +++
.../testsuites/IgniteSpringDataTestSuite.java | 41 +++
modules/web-console/frontend/.eslintrc | 2 +-
modules/web-console/frontend/app/app.js | 3 -
.../form-field-datepicker.pug | 59 ----
.../form-field-datepicker.scss | 20 --
.../list-of-registered-users.categories.js | 4 +-
.../list-of-registered-users.column-defs.js | 44 +--
.../list-of-registered-users.controller.js | 141 ++++++--
.../list-of-registered-users.scss | 4 +
.../list-of-registered-users.tpl.pug | 76 +++--
.../ui-grid-header/ui-grid-header.scss | 91 -----
.../ui-grid-header/ui-grid-header.tpl.pug | 29 --
.../ui-grid-settings/ui-grid-settings.pug | 33 --
.../ui-grid-settings/ui-grid-settings.scss | 144 --------
.../frontend/app/helpers/jade/mixins.pug | 3 +
.../frontend/app/modules/states/admin.state.js | 11 +-
.../frontend/app/primitives/badge/index.scss | 4 +
.../frontend/app/primitives/btn/index.scss | 41 +++
.../app/primitives/datepicker/index.pug | 60 ++++
.../app/primitives/datepicker/index.scss | 64 ++++
.../frontend/app/primitives/dropdown/index.pug | 43 +++
.../frontend/app/primitives/dropdown/index.scss | 82 +++++
.../frontend/app/primitives/index.js | 8 +
.../frontend/app/primitives/page/index.scss | 35 ++
.../frontend/app/primitives/panel/index.scss | 51 +++
.../frontend/app/primitives/tabs/index.scss | 15 +
.../app/primitives/ui-grid-header/index.scss | 91 +++++
.../app/primitives/ui-grid-header/index.tpl.pug | 29 ++
.../app/primitives/ui-grid-settings/index.pug | 33 ++
.../app/primitives/ui-grid-settings/index.scss | 171 ++++++++++
.../frontend/app/primitives/ui-grid/index.scss | 329 +++++++++++++++++++
.../frontend/public/stylesheets/style.scss | 5 -
modules/web-console/frontend/views/base2.pug | 22 ++
.../frontend/views/settings/admin.tpl.pug | 3 +-
.../web-console/frontend/views/sql/sql.tpl.pug | 1 -
.../cache/websession/WebSessionFilter.java | 22 +-
parent/pom.xml | 1 +
pom.xml | 1 +
97 files changed, 4811 insertions(+), 863 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
index c9081fc,dcac7d4..8d52564
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
@@@ -186,10 -189,11 +189,12 @@@ public class RendezvousAffinityFunctio
private RendezvousAffinityFunction(boolean exclNeighbors, int parts,
IgniteBiPredicate<ClusterNode, ClusterNode> backupFilter) {
A.ensure(parts > 0, "parts > 0");
+ A.ensure(parts <= CacheConfiguration.MAX_PARTITIONS_COUNT, "parts <=" + CacheConfiguration.MAX_PARTITIONS_COUNT);
this.exclNeighbors = exclNeighbors;
- this.parts = parts;
+
+ setPartitions(parts);
+
this.backupFilter = backupFilter;
try {
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
index f902242,0db7d06..6f9b401
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
@@@ -18,8 -18,12 +18,10 @@@
package org.apache.ignite.testsuites;
import junit.framework.TestSuite;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionBackupFilterSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionExcludeNeighborsSelfTest;
import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionBackupFilterSelfTest;
import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionExcludeNeighborsSelfTest;
+ import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionFastPowerOfTwoHashSelfTest;
+ import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionStandardHashSelfTest;
import org.apache.ignite.internal.processors.cache.CacheConcurrentReadThroughTest;
import org.apache.ignite.internal.processors.cache.CacheConfigurationLeakTest;
import org.apache.ignite.internal.processors.cache.CacheDhtLocalPartitionAfterRemoveSelfTest;
@@@ -107,9 -117,11 +109,12 @@@ import org.apache.ignite.internal.proce
import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedTxTimeoutSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheRendezvousAffinityClientSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheStoreUpdateTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridPartitionedBackupLoadSelfTest;
+ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearOffheapCacheStoreUpdateTest;
+ import org.apache.ignite.internal.processors.cache.distributed.near.GridPartitionedBackupLoadSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.near.NearCacheSyncUpdateTest;
import org.apache.ignite.internal.processors.cache.distributed.near.NoneRebalanceModeSelfTest;
+ import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedEvictionSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedJobExecutionTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicBasicStoreSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicGetAndTransformStoreSelfTest;
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/binary/include/ignite/binary/binary_type.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
index 07e8a14,0870997..6c2bde7
--- a/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
+++ b/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
@@@ -156,17 -158,22 +158,17 @@@ namespace ignit
return GetBinaryStringHashCode(name);
}
- static int32_t GetHashCode(const gt::BinaryDummy& obj)
- {
- return 0;
- }
-
- static bool IsNull(const gt::BinaryDummy& obj)
+ bool IsNull(const gt::BinaryInner& obj)
{
- return obj.GetValue() == 0;
+ return false;
}
- gt::BinaryInner GetNull()
+ static void GetNull(gt::BinaryDummy& dst)
{
- return gt::BinaryInner(0);
+ dst = gt::BinaryDummy();
}
- void Write(BinaryWriter& writer, const gt::BinaryDummy& obj)
+ static void Write(BinaryWriter& writer, const gt::BinaryDummy& obj)
{
// No-op.
}
@@@ -180,17 -187,17 +182,17 @@@
template<>
struct BinaryType<gt::BinaryInner>
{
- int32_t GetTypeId()
- static int32_t GetTypeId()
++ static int32_t GetTypeId()
{
return GetBinaryStringHashCode("BinaryInner");
}
- std::string GetTypeName()
+ static void GetTypeName(std::string& dst)
{
- return "BinaryInner";
+ dst = "BinaryInner";
}
- int32_t GetFieldId(const char* name)
- static int32_t GetFieldId(const char* name)
++ static int32_t GetFieldId(const char* name)
{
return GetBinaryStringHashCode(name);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/include/ignite/complex_type.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/include/ignite/test_type.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
index 62f37f9,802ec97..dd1e790
--- a/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
@@@ -212,17 -336,45 +204,13 @@@ namespace ignit
writer.WriteInt64("i64", obj.i64);
}
- CompositeKeySimple Read(BinaryReader& reader)
+ static void Read(BinaryReader& reader, CompositeKeySimple& dst)
{
- CompositeKeySimple val;
-
- val.str = reader.ReadString("str");
- val.ts = reader.ReadTimestamp("ts");
- val.i64 = reader.ReadInt64("i64");
-
- return val;
+ dst.str = reader.ReadString("str");
+ dst.ts = reader.ReadTimestamp("ts");
+ dst.i64 = reader.ReadInt64("i64");
}
};
-
- /**
- * Binary type definition for ComplexType2.
- */
- template<>
- struct BinaryType<ComplexType2>
- {
- IGNITE_BINARY_GET_TYPE_ID_AS_HASH(ComplexType2)
- IGNITE_BINARY_GET_TYPE_NAME_AS_IS(ComplexType2)
- IGNITE_BINARY_GET_FIELD_ID_AS_HASH
- IGNITE_BINARY_IS_NULL_FALSE(ComplexType2)
- IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(ComplexType2)
-
- static ignite::Reference<ignite::binary::BinaryIdentityResolver> GetIdentityResolver()
- {
- return ignite::MakeReferenceFromCopy(CustomFieldIdResolver());
- }
-
- static void Write(BinaryWriter& writer, const ComplexType2& obj)
- {
- writer.WriteInt32("i32Field", obj.i32Field);
- writer.WriteObject("objField", obj.objField);
- writer.WriteString("strField", obj.strField);
- }
-
- static void Read(BinaryReader& reader, ComplexType2& dst)
- {
- dst.i32Field = reader.ReadInt32("i32Field");
- dst.objField = reader.ReadObject<InnerObject>("objField");
- dst.strField = reader.ReadString("strField");
- }
- };
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/src/binary_object_test.cpp
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/src/cache_invoke_test.cpp
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core-test/src/cache_test.cpp
index d269f65,99e0f1b..d222009
--- a/modules/platforms/cpp/core-test/src/cache_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_test.cpp
@@@ -50,25 -50,24 +50,23 @@@ namespace ignit
namespace binary
{
IGNITE_BINARY_TYPE_START(Person)
- IGNITE_BINARY_GET_TYPE_ID_AS_HASH(Person)
- IGNITE_BINARY_GET_TYPE_NAME_AS_IS(Person)
- IGNITE_BINARY_GET_FIELD_ID_AS_HASH
- IGNITE_BINARY_IS_NULL_FALSE(Person)
- IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(Person)
+ IGNITE_BINARY_GET_TYPE_ID_AS_HASH(Person)
+ IGNITE_BINARY_GET_TYPE_NAME_AS_IS(Person)
+ IGNITE_BINARY_GET_FIELD_ID_AS_HASH
- 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);
- writer.WriteInt32("age", obj.age);
- }
+ static void Write(BinaryWriter& writer, const Person& obj)
+ {
+ writer.WriteString("name", obj.name);
- writer.WriteInt32("age", obj.age);
++ writer.WriteInt32("age", obj.age);
+ }
- Person Read(BinaryReader& reader)
- {
- std::string name = reader.ReadString("name");
- int age = reader.ReadInt32("age");
-
- return Person(name, age);
- }
+ static void Read(BinaryReader& reader, Person& dst)
+ {
+ dst.name = reader.ReadString("name");
+ dst.age = reader.ReadInt32("age");
+ }
IGNITE_BINARY_TYPE_END
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
----------------------------------------------------------------------
diff --cc modules/platforms/cpp/core-test/src/continuous_query_test.cpp
index 2d1a2ee,8579c54..ea3d665
--- a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
@@@ -290,14 -288,20 +287,15 @@@ namespace ignit
return GetBinaryStringHashCode("RangeFilter");
}
- std::string GetTypeName()
+ static void GetTypeName(std::string& dst)
{
- return "RangeFilter";
+ dst = "RangeFilter";
}
+
IGNITE_BINARY_GET_FIELD_ID_AS_HASH
- static int32_t GetHashCode(const RangeFilter<K,V>&)
- {
- return 0;
- }
-
- static bool IsNull(const RangeFilter<K,V>&)
+ bool IsNull(const RangeFilter<K,V>&)
{
return false;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/odbc-test/include/complex_type.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/modules/platforms/cpp/odbc-test/include/test_type.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5f724512/pom.xml
----------------------------------------------------------------------