Merge remote-tracking branch 'remotes/origin/master' into ignite-5075 # Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheClientReconnectDiscoveryData.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheData.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheNodeCommonDiscoveryData.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeActions.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentRequest.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAffinityAssignmentResponse.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java # modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStartTest.java # modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDiscoveryDataConcurrentJoinTest.java
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6fd82ea4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6fd82ea4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6fd82ea4 Branch: refs/heads/ignite-5075 Commit: 6fd82ea48c858d73a0a1491c2f4c16f902b29ed4 Parents: fb3c784 2017696 Author: sboikov <sboi...@gridgain.com> Authored: Thu May 18 11:54:05 2017 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Thu May 18 11:54:05 2017 +0300 ---------------------------------------------------------------------- .../ClientAbstractMultiNodeSelfTest.java | 3 +- .../apache/ignite/IgniteSystemProperties.java | 5 + .../client/impl/GridClientDataImpl.java | 3 +- .../internal/executor/GridExecutorService.java | 3 +- .../deployment/GridDeploymentClassLoader.java | 3 +- .../discovery/GridDiscoveryManager.java | 2 +- .../processors/cache/GridCacheProcessor.java | 14 +- .../cache/database/freelist/FreeListImpl.java | 3 +- .../cache/database/freelist/PagesList.java | 3 +- .../cache/database/tree/util/PageHandler.java | 3 +- .../continuous/CacheContinuousQueryHandler.java | 5 +- .../GridAtomicCacheQueueImpl.java | 7 +- .../jobmetrics/GridJobMetricsProcessor.java | 4 +- .../internal/util/gridify/GridifyUtils.java | 6 +- .../offheap/unsafe/GridOffHeapSnapTreeMap.java | 3 +- .../local/LocalAffinityFunctionTest.java | 6 +- .../store/GridCacheBalancingStoreSelfTest.java | 32 +-- .../internal/ClusterNodeMetricsSelfTest.java | 3 +- .../ComputeJobCancelWithServiceSelfTest.java | 3 +- .../IgniteComputeEmptyClusterGroupTest.java | 6 +- .../MarshallerContextLockingSelfTest.java | 3 +- .../GridCacheBinaryObjectsAbstractSelfTest.java | 3 +- .../IgniteCountDownLatchAbstractSelfTest.java | 3 +- .../IgniteDataStructureUniqueNameTest.java | 3 +- .../IgniteCacheTxIteratorSelfTest.java | 21 +- ...eContinuousQueryReplicatedTxOneNodeTest.java | 3 +- ...heWriteBehindStoreMultithreadedSelfTest.java | 3 +- ...gniteComputeConfigVariationsFullApiTest.java | 84 ++------ ...gfsSecondaryFileSystemInjectionSelfTest.java | 6 +- .../GridServiceProcessorAbstractSelfTest.java | 3 +- ...GridUnsafeDataOutputArraySizingSelfTest.java | 4 +- .../IpcSharedMemoryBenchmarkReader.java | 3 +- .../offheap/GridOffHeapMapAbstractSelfTest.java | 3 +- .../unsafe/GridUnsafeMemorySelfTest.java | 3 +- .../marshaller/GridMarshallerAbstractTest.java | 6 +- .../TcpCommunicationSpiFaultyClientTest.java | 3 +- .../tests/p2p/P2PTestTaskExternalPath2.java | 4 +- .../sink/flink/FlinkIgniteSinkSelfTest.java | 9 +- .../HadoopIgfs20FileSystemAbstractSelfTest.java | 3 +- .../IgniteHadoopFileSystemAbstractSelfTest.java | 6 +- .../taskexecutor/HadoopExecutorServiceTest.java | 3 +- .../GridCacheQueryIndexDisabledSelfTest.java | 4 +- ...butedPartitionQueryNodeRestartsSelfTest.java | 6 +- .../kafka/connect/IgniteSinkConnectorTest.java | 3 +- .../connect/IgniteSourceConnectorTest.java | 3 +- .../log4j2/GridLog4j2InitializedTest.java | 3 +- .../log4j2/GridLog4j2LoggingFileTest.java | 3 +- .../org/apache/ignite/mesos/IgniteTask.java | 3 +- .../ignite/ml/math/d3-matrix-template.html | 17 +- .../ignite/ml/math/d3-vector-template.html | 15 +- .../Apache.Ignite.Core.Tests.csproj | 1 + .../Binary/BinaryDateTimeTest.cs | 204 +++++++++++++++++++ .../Binary/BinarySelfTest.cs | 2 +- .../Cache/Query/CacheLinqTest.cs | 2 +- .../Apache.Ignite.Core.csproj | 1 + .../Binary/BinaryReflectiveSerializer.cs | 44 +++- .../Binary/TimestampAttribute.cs | 40 ++++ .../Impl/Binary/BinaryReflectiveActions.cs | 89 ++++---- .../BinaryReflectiveSerializerInternal.cs | 10 +- .../Impl/Binary/BinaryUtils.cs | 4 +- .../spring/SpringTransactionManager.java | 32 +-- .../internal/IgniteDynamicCacheConfigTest.java | 4 +- .../GridSpringTransactionManagerSelfTest.java | 42 ++-- .../spi/deployment/uri/UriDeploymentSpi.java | 6 +- .../scanners/http/UriDeploymentHttpScanner.java | 3 +- .../uri/GridUriDeploymentMd5CheckSelfTest.java | 9 +- modules/web-console/frontend/app/app.js | 4 +- .../activities-user-dialog.tpl.pug | 1 + .../app/components/ignite-icon/directive.js | 67 ++++++ .../app/components/ignite-icon/index.js | 25 +++ .../app/components/ignite-icon/style.scss | 21 ++ .../list-of-registered-users.tpl.pug | 6 +- .../components/web-console-header/style.scss | 5 +- .../components/web-console-header/template.pug | 8 +- .../frontend/app/helpers/jade/mixins.pug | 10 +- .../states/configuration/igfs/secondary.pug | 2 +- .../frontend/app/primitives/btn/index.scss | 47 +---- .../app/primitives/datepicker/index.pug | 2 +- .../frontend/app/primitives/dropdown/index.pug | 9 +- .../frontend/app/primitives/dropdown/index.scss | 88 ++------ .../frontend/app/primitives/modal/index.scss | 18 +- .../app/primitives/ui-grid-settings/index.scss | 30 +-- .../frontend/app/primitives/ui-grid/index.scss | 6 +- .../gulpfile.babel.js/webpack/common.js | 10 +- modules/web-console/frontend/package.json | 1 + .../frontend/public/images/icons/clock.svg | 1 + .../frontend/public/images/icons/cross.svg | 2 +- .../frontend/public/images/icons/csv.svg | 1 + .../frontend/public/images/icons/export.svg | 1 - .../frontend/public/images/icons/gear.svg | 2 +- .../frontend/public/images/icons/index.js | 22 ++ .../frontend/public/images/icons/manual.svg | 1 + .../frontend/public/stylesheets/style.scss | 10 +- modules/web-console/frontend/views/index.pug | 1 + 94 files changed, 710 insertions(+), 537 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/6fd82ea4/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java index ae5e3b4,24c7283..b7c7bdf --- 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 @@@ -304,46 -302,24 +304,46 @@@ public class GridDiscoveryManager exten } /** + * + */ + public void onLocalNodeJoin() { + registeredCacheGrps.clear(); + registeredCaches.clear(); + } + + /** + * @param grpDesc Cache group descriptor. + * @param filter Node filter. + * @param cacheMode Cache mode. + */ + public void addCacheGroup(CacheGroupDescriptor grpDesc, IgnitePredicate<ClusterNode> filter, CacheMode cacheMode) { + CacheGroupAffinity old = registeredCacheGrps.put(grpDesc.groupId(), + new CacheGroupAffinity(grpDesc.groupName(), filter, cacheMode)); + + assert old == null : old; + } + + /** * Adds dynamic cache filter. * + * @param grpId Cache group ID. * @param cacheName Cache name. - * @param filter Cache filter. * @param nearEnabled Near enabled flag. - * @param cacheMode Cache mode. */ public void setCacheFilter( + int grpId, String cacheName, - IgnitePredicate<ClusterNode> filter, - boolean nearEnabled, - CacheMode cacheMode + boolean nearEnabled ) { if (!registeredCaches.containsKey(cacheName)) { - if (cacheMode == CacheMode.REPLICATED) + CacheGroupAffinity grp = registeredCacheGrps.get(grpId); + + assert grp != null : "Failed to find cache group [grpId=" + grpId + ", cache=" + cacheName + ']'; + + if (grp.cacheMode == CacheMode.REPLICATED) nearEnabled = false; -- - registeredCaches.put(cacheName, new CachePredicate(filter, nearEnabled, cacheMode)); ++ + registeredCaches.put(cacheName, new CachePredicate(grp, nearEnabled)); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/6fd82ea4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 9873c1d,06ad62d..e00c182 --- 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 @@@ -1084,35 -1053,37 +1084,37 @@@ public class GridCacheProcessor extend cachesInfo.onDisconnect(); } - /** {@inheritDoc} */ - @Override public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted) throws IgniteCheckedException { - List<GridCacheAdapter> reconnected = new ArrayList<>(caches.size()); + /** + * @param cctx Cache context. + * @param stoppedCaches List where stopped cache should be added. + */ + private void stopCacheOnReconnect(GridCacheContext cctx, List<GridCacheAdapter> stoppedCaches) { + cctx.gate().reconnected(true); - GridCompoundFuture<?, ?> stopFut = null; + sharedCtx.removeCacheContext(cctx); - Set<String> stoppedCaches = cachesInfo.onReconnected(); + caches.remove(cctx.name()); + jCacheProxies.remove(cctx.name()); - for (final GridCacheAdapter cache : caches.values()) { - boolean stopped = stoppedCaches.contains(cache.name()); + stoppedCaches.add(cctx.cache()); + } - if (stopped) { - cache.context().gate().reconnected(true); + /** {@inheritDoc} */ + @Override public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted) throws IgniteCheckedException { + List<GridCacheAdapter> reconnected = new ArrayList<>(caches.size()); - sharedCtx.removeCacheContext(cache.ctx); + ClusterCachesReconnectResult reconnectRes = cachesInfo.onReconnected(); - caches.remove(cache.name()); - jCacheProxies.remove(cache.name()); + final List<GridCacheAdapter> stoppedCaches = new ArrayList<>(); - IgniteInternalFuture<?> fut = ctx.closure().runLocalSafe(new Runnable() { - @Override public void run() { - onKernalStop(cache, true); - stopCache(cache, true, false); - } - }); ++ Set<String> stoppedCaches = cachesInfo.onReconnected(); + - if (stopFut == null) - stopFut = new GridCompoundFuture<>(); + for (final GridCacheAdapter cache : caches.values()) { + boolean stopped = reconnectRes.stoppedCacheGroups().contains(cache.context().groupId()) + || reconnectRes.stoppedCaches().contains(cache.name()); - stopFut.add((IgniteInternalFuture)fut); - } + if (stopped) + stopCacheOnReconnect(cache.context(), stoppedCaches); else { cache.onReconnected(); @@@ -1467,7 -1404,12 +1469,6 @@@ storeMgr.initialize(cfgStore, sesHolders); - String memPlcName = cfg.getMemoryPolicyName(); - - MemoryPolicy memPlc = sharedCtx.database().memoryPolicy(memPlcName); - FreeList freeList = sharedCtx.database().freeList(memPlcName); - ReuseList reuseList = sharedCtx.database().reuseList(memPlcName); -- GridCacheContext<?, ?> cacheCtx = new GridCacheContext( ctx, sharedCtx, @@@ -1690,11 -1636,11 +1691,12 @@@ * @return Collection of started cache names. */ public Collection<String> cacheNames() { - return F.viewReadOnly(cacheDescriptors().values(), new IgniteClosure<DynamicCacheDescriptor, String>() { - return F.viewReadOnly(cacheDescriptors(), new IgniteClosure<DynamicCacheDescriptor, String>() { -- @Override public String apply(DynamicCacheDescriptor desc) { -- return desc.cacheConfiguration().getName(); -- } -- }); ++ return F.viewReadOnly(cacheDescriptors().values(), ++ new IgniteClosure<DynamicCacheDescriptor, String>() { ++ @Override public String apply(DynamicCacheDescriptor desc) { ++ return desc.cacheConfiguration().getName(); ++ } ++ }); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/6fd82ea4/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/6fd82ea4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java ----------------------------------------------------------------------