You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/06/09 14:21:19 UTC
[41/42] ignite git commit: Merge from ignite-5267
Merge from ignite-5267
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fbb51b01
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fbb51b01
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fbb51b01
Branch: refs/heads/ignite-5267-merge-ea
Commit: fbb51b01caa666ec9625b9c7f05f80020b05d647
Parents: 4b89ae0 b6c7361
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Jun 9 17:17:47 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Jun 9 17:17:47 2017 +0300
----------------------------------------------------------------------
config/ignite-log4j.xml | 6 +-
config/ignite-log4j2.xml | 6 +-
.../ClientTcpUnreachableMultiNodeSelfTest.java | 6 +-
.../jdbc/suite/IgniteJdbcDriverTestSuite.java | 2 +
.../thin/JdbcThinAutoCloseServerCursorTest.java | 359 +++++++++++++++++++
.../jdbc/thin/JdbcThinConnectionSelfTest.java | 36 ++
modules/clients/src/test/resources/log4j.xml | 2 +-
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../configuration/CacheConfiguration.java | 24 ++
.../configuration/IgniteConfiguration.java | 6 +
.../SqlConnectorConfiguration.java | 2 +-
.../internal/binary/BinaryClassDescriptor.java | 1 -
.../ignite/internal/binary/BinaryContext.java | 1 -
.../ignite/internal/binary/BinaryFieldEx.java | 5 +
.../ignite/internal/binary/BinaryFieldImpl.java | 5 +
.../ignite/internal/client/GridClientNode.java | 9 +-
.../client/impl/GridClientNodeImpl.java | 22 +-
.../connection/GridClientNioTcpConnection.java | 3 +-
.../internal/jdbc/thin/JdbcThinConnection.java | 4 +-
.../internal/jdbc/thin/JdbcThinResultSet.java | 18 +-
.../internal/jdbc/thin/JdbcThinStatement.java | 2 +-
.../internal/jdbc/thin/JdbcThinTcpIo.java | 17 +-
.../internal/jdbc/thin/JdbcThinUtils.java | 7 +-
.../discovery/GridDiscoveryManager.java | 32 +-
.../processors/cache/ClusterCachesInfo.java | 29 +-
.../processors/cache/GridCacheAttributes.java | 17 +-
.../GridCachePartitionExchangeManager.java | 142 ++++----
.../processors/cache/GridCacheProcessor.java | 138 ++++---
.../processors/cache/StoredCacheData.java | 17 +
.../GridDhtPartitionsExchangeFuture.java | 62 ++--
.../query/jdbc/GridCacheQueryJdbcTask.java | 6 +-
.../processors/cluster/ClusterProcessor.java | 5 +-
.../processors/odbc/SqlListenerNioListener.java | 5 +-
.../processors/odbc/jdbc/JdbcQueryCursor.java | 9 +-
.../odbc/jdbc/JdbcRequestHandler.java | 21 +-
.../PlatformDotNetConfigurationClosure.java | 8 +-
.../utils/PlatformConfigurationUtils.java | 94 +++++
.../query/DynamicTableAffinityKeyMapper.java | 92 +++++
.../processors/query/GridQueryProcessor.java | 18 +-
.../internal/processors/query/QueryUtils.java | 51 ++-
.../rest/client/message/GridClientNodeBean.java | 25 ++
.../handlers/cache/GridCacheCommandHandler.java | 4 +-
.../top/GridTopologyCommandHandler.java | 11 +-
.../service/GridServiceProcessor.java | 32 +-
.../node/VisorExecutorServiceConfiguration.java | 20 +-
.../visor/node/VisorGridConfiguration.java | 22 +-
.../visor/node/VisorOdbcConfiguration.java | 114 ------
.../node/VisorSqlConnectorConfiguration.java | 166 +++++++++
.../visor/query/VisorQueryIndexField.java | 32 +-
.../internal/visor/query/VisorRunningQuery.java | 20 +-
.../resources/META-INF/classnames.properties | 2 +-
modules/core/src/test/config/log4j-test.xml | 6 +-
modules/core/src/test/config/log4j2-test.xml | 6 +-
.../src/test/config/log4j2-verbose-test.xml | 4 +-
.../ignite/internal/ClusterGroupSelfTest.java | 100 ++++++
.../processors/cache/IgniteCacheGroupsTest.java | 98 ++---
.../top/CacheTopologyCommandHandlerTest.java | 152 ++++++++
.../loadtest/GridSingleExecutionTest.java | 4 +-
.../cache/GridCacheAbstractLoadTest.java | 4 +-
.../testframework/junits/GridAbstractTest.java | 4 +-
.../junits/logger/GridTestLog4jLogger.java | 4 +-
.../testsuites/IgniteRestHandlerTestSuite.java | 2 +
.../shuffle/streams/HadoopOffheapBuffer.java | 2 +-
.../query/h2/ddl/DdlStatementsProcessor.java | 16 +-
.../processors/query/h2/opt/GridH2Table.java | 5 +-
.../query/h2/sql/GridSqlCreateTable.java | 37 +-
.../processors/query/h2/sql/GridSqlJoin.java | 7 +
.../query/h2/sql/GridSqlQueryParser.java | 54 +++
.../query/h2/sql/GridSqlQuerySplitter.java | 147 +++++++-
.../h2/twostep/msg/GridH2IndexRangeRequest.java | 2 +
.../cache/index/H2DynamicTableSelfTest.java | 270 +++++++++++---
.../query/IgniteSqlSplitterSelfTest.java | 97 +++++
.../apache/ignite/logger/log4j/Log4JLogger.java | 4 +-
.../log4j/GridLog4jCorrectFileNameTest.java | 2 +-
.../ignite/logger/log4j2/Log4J2Logger.java | 2 +-
.../impls/matrix/SparseDistributedMatrix.java | 9 -
.../matrix/SparseDistributedMatrixTest.java | 9 -
.../IgnitePersistentStoreSchemaLoadTest.java | 10 +-
.../Cache/CacheConfigurationTest.cs | 10 +
.../Config/Log/dotnet-log4j.xml | 2 +-
.../IgniteConfigurationSerializerTest.cs | 37 +-
.../IgniteConfigurationTest.cs | 60 ++++
.../Apache.Ignite.Core.csproj | 2 +
.../Cache/Configuration/CacheConfiguration.cs | 23 ++
.../Configuration/Package-Info.cs | 26 ++
.../Configuration/SqlConnectorConfiguration.cs | 159 ++++++++
.../Datastream/IDataStreamer.cs | 8 +-
.../Apache.Ignite.Core/IgniteConfiguration.cs | 184 ++++++++++
.../IgniteConfigurationSection.xsd | 104 ++++++
.../Common/IgniteConfigurationXmlSerializer.cs | 10 +
.../config/VisorConfigurationCommand.scala | 1 +
.../src/main/java/log4j.properties | 2 +-
modules/web-console/backend/.gitignore | 1 +
modules/web-console/backend/app/mongo.js | 12 +
modules/web-console/frontend/.gitignore | 1 +
.../app/modules/agent/AgentManager.service.js | 2 +
.../modules/configuration/Version.service.js | 4 +
.../generator/AbstractTransformer.js | 9 +-
.../generator/ConfigurationGenerator.js | 35 +-
.../generator/defaults/Cluster.service.js | 9 +
.../states/configuration/caches/query.pug | 3 +-
.../states/configuration/clusters/memory.pug | 9 +
.../states/configuration/clusters/odbc.pug | 2 +-
.../configuration/clusters/sql-connector.pug | 62 ++++
.../frontend/controllers/clusters-controller.js | 5 +-
.../frontend/controllers/domains-controller.js | 169 ++++-----
.../views/configuration/clusters.tpl.pug | 6 +
.../views/configuration/domains-import.tpl.pug | 4 +-
.../apache/ignite/console/agent/AgentUtils.java | 24 +-
.../ignite/console/agent/db/DbColumn.java | 17 +-
.../ignite/console/agent/db/DbSchema.java | 60 ++++
.../apache/ignite/console/agent/db/DbTable.java | 21 +-
.../db/dialect/DatabaseMetadataDialect.java | 27 +-
.../agent/db/dialect/JdbcMetadataDialect.java | 42 ++-
.../agent/db/dialect/OracleMetadataDialect.java | 116 ++++--
.../agent/handlers/DatabaseListener.java | 18 +-
.../src/main/resources/log4j.properties | 6 +-
117 files changed, 3351 insertions(+), 738 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index e3b0ebf,e3bda2c..5b61c2f
--- 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
@@@ -49,7 -49,6 +49,8 @@@ import org.apache.ignite.cluster.Cluste
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.events.DiscoveryEvent;
import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException;
+import org.apache.ignite.internal.IgniteDiagnosticAware;
++import org.apache.ignite.internal.IgniteDiagnosticAware;
import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
@@@ -1428,93 -1428,83 +1433,92 @@@ public class GridCachePartitionExchange
/**
* @param timeout Operation timeout.
+ * @return {@code True} if found long running operations.
*/
- public void dumpLongRunningOperations(long timeout) {
- try {
- GridDhtPartitionsExchangeFuture lastFut = lastInitializedFut;
-
- // If exchange is in progress it will dump all hanging operations if any.
- if (lastFut != null && !lastFut.isDone())
- return;
+ private boolean dumpLongRunningOperations0(long timeout) {
+ long curTime = U.currentTimeMillis();
- long curTime = U.currentTimeMillis();
+ boolean found = false;
- boolean found = false;
+ IgniteTxManager tm = cctx.tm();
- IgniteTxManager tm = cctx.tm();
+ GridCacheMvccManager mvcc = cctx.mvcc();
- if (tm != null) {
- for (IgniteInternalTx tx : tm.activeTransactions()) {
- if (curTime - tx.startTime() > timeout) {
- found = true;
+ if (tm != null) {
+ for (IgniteInternalTx tx : tm.activeTransactions()) {
+ if (curTime - tx.startTime() > timeout) {
+ found = true;
- if (longRunningOpsDumpCnt < GridDhtPartitionsExchangeFuture.DUMP_PENDING_OBJECTS_THRESHOLD) {
- U.warn(log, "Found long running transaction [startTime=" + formatTime(tx.startTime()) +
- ", curTime=" + formatTime(curTime) + ", tx=" + tx + ']');
- }
- else
- break;
- }
+ U.warn(log, "Found long running transaction [startTime=" + formatTime(tx.startTime()) +
+ ", curTime=" + formatTime(curTime) + ", tx=" + tx + ']');
}
}
+ }
- GridCacheMvccManager mvcc = cctx.mvcc();
-
- if (mvcc != null) {
- for (GridCacheFuture<?> fut : mvcc.activeFutures()) {
- if (curTime - fut.startTime() > timeout) {
- found = true;
+ if (mvcc != null) {
+ for (GridCacheFuture<?> fut : mvcc.activeFutures()) {
+ if (curTime - fut.startTime() > timeout) {
+ found = true;
- if (longRunningOpsDumpCnt < GridDhtPartitionsExchangeFuture.DUMP_PENDING_OBJECTS_THRESHOLD) {
- U.warn(log, "Found long running cache future [startTime=" + formatTime(fut.startTime()) +
- ", curTime=" + formatTime(curTime) + ", fut=" + fut + ']');
+ U.warn(log, "Found long running cache future [startTime=" + formatTime(fut.startTime()) +
+ ", curTime=" + formatTime(curTime) + ", fut=" + fut + ']');
+
- if (fut instanceof IgniteDiagnosticAware)
- ((IgniteDiagnosticAware)fut).dumpDiagnosticInfo();
- }
- else
- break;
- }
++ if (fut instanceof IgniteDiagnosticAware)
++ ((IgniteDiagnosticAware)fut).dumpDiagnosticInfo();
}
+ }
- for (GridCacheFuture<?> fut : mvcc.atomicFutures()) {
- if (curTime - fut.startTime() > timeout) {
- found = true;
+ for (GridCacheFuture<?> fut : mvcc.atomicFutures()) {
+ if (curTime - fut.startTime() > timeout) {
+ found = true;
- if (longRunningOpsDumpCnt < GridDhtPartitionsExchangeFuture.DUMP_PENDING_OBJECTS_THRESHOLD) {
- U.warn(log, "Found long running cache future [startTime=" + formatTime(fut.startTime()) +
- ", curTime=" + formatTime(curTime) + ", fut=" + fut + ']');
+ U.warn(log, "Found long running cache future [startTime=" + formatTime(fut.startTime()) +
+ ", curTime=" + formatTime(curTime) + ", fut=" + fut + ']');
+
- if (fut instanceof IgniteDiagnosticAware)
- ((IgniteDiagnosticAware)fut).dumpDiagnosticInfo();
- }
- else
- break;
- }
++ if (fut instanceof IgniteDiagnosticAware)
++ ((IgniteDiagnosticAware)fut).dumpDiagnosticInfo();
}
}
+ }
+
++ cctx.io().dumpPendingMessages();
++
+ return found;
+ }
- cctx.io().dumpPendingMessages();
+ /**
+ * @param timeout Operation timeout.
+ */
+ public void dumpLongRunningOperations(long timeout) {
+ try {
+ GridDhtPartitionsExchangeFuture lastFut = lastInitializedFut;
- if (found) {
- if (longRunningOpsDumpCnt < GridDhtPartitionsExchangeFuture.DUMP_PENDING_OBJECTS_THRESHOLD) {
- longRunningOpsDumpCnt++;
+ // If exchange is in progress it will dump all hanging operations if any.
+ if (lastFut != null && !lastFut.isDone())
+ return;
- if (IgniteSystemProperties.getBoolean(IGNITE_THREAD_DUMP_ON_EXCHANGE_TIMEOUT, false)) {
- U.warn(log, "Found long running cache operations, dump threads.");
+ if (U.currentTimeMillis() < nextLongRunningOpsDumpTime)
+ return;
- U.dumpThreads(log);
- }
+ if (dumpLongRunningOperations0(timeout)) {
+ nextLongRunningOpsDumpTime = U.currentTimeMillis() + nextDumpTimeout(longRunningOpsDumpStep++, timeout);
- U.warn(log, "Found long running cache operations, dump IO statistics.");
+ if (IgniteSystemProperties.getBoolean(IGNITE_THREAD_DUMP_ON_EXCHANGE_TIMEOUT, false)) {
+ U.warn(log, "Found long running cache operations, dump threads.");
- // Dump IO manager statistics.
- if (IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_IO_DUMP_ON_TIMEOUT, false))
- cctx.gridIO().dumpStats();
+ U.dumpThreads(log);
}
+
+ U.warn(log, "Found long running cache operations, dump IO statistics.");
+
+ // Dump IO manager statistics.
- cctx.gridIO().dumpStats();
++ if (IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_IO_DUMP_ON_TIMEOUT, false))
++ cctx.gridIO().dumpStats();
+ }
+ else {
+ nextLongRunningOpsDumpTime = 0;
+ longRunningOpsDumpStep = 0;
}
- else
- longRunningOpsDumpCnt = 0;
}
catch (Exception e) {
U.error(log, "Failed to dump debug information: " + e, e);
@@@ -1839,9 -1825,7 +1847,9 @@@
if (IgniteSystemProperties.getBoolean(IGNITE_THREAD_DUMP_ON_EXCHANGE_TIMEOUT, false))
U.dumpThreads(log);
- dumpedObjects++;
+ nextDumpTime = U.currentTimeMillis() + nextDumpTimeout(dumpCnt++, futTimeout);
+
+ exchFut.dumpDiagnosticInfo();
}
}
catch (Exception e) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 90eec85,1d04dec..aaa4944
--- 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
@@@ -52,20 -50,19 +51,16 @@@ import org.apache.ignite.internal.clust
import org.apache.ignite.internal.events.DiscoveryCustomEvent;
import org.apache.ignite.internal.managers.discovery.DiscoCache;
import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
- import org.apache.ignite.internal.managers.discovery.DiscoCache;
- import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
import org.apache.ignite.internal.pagemem.snapshot.SnapshotOperation;
-import org.apache.ignite.internal.pagemem.snapshot.SnapshotOperationType;
import org.apache.ignite.internal.pagemem.snapshot.StartSnapshotOperationAckDiscoveryMessage;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
import org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage;
--import org.apache.ignite.internal.processors.cache.CacheGroupDescriptor;
import org.apache.ignite.internal.processors.cache.CacheGroupContext;
import org.apache.ignite.internal.processors.cache.CacheInvalidStateException;
import org.apache.ignite.internal.processors.cache.CachePartitionExchangeWorkerTask;
import org.apache.ignite.internal.processors.cache.ClusterState;
import org.apache.ignite.internal.processors.cache.DynamicCacheChangeBatch;
--import org.apache.ignite.internal.processors.cache.DynamicCacheChangeRequest;
import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
import org.apache.ignite.internal.processors.cache.ExchangeActions;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@@ -94,7 -91,7 +88,6 @@@ import org.apache.ignite.internal.util.
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgniteRunnable;
--import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
@@@ -114,14 -114,7 +110,10 @@@ import static org.apache.ignite.interna
*/
@SuppressWarnings({"TypeMayBeWeakened", "unchecked"})
public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityTopologyVersion>
- implements Comparable<GridDhtPartitionsExchangeFuture>, GridDhtTopologyFuture, CachePartitionExchangeWorkerTask {
+ implements Comparable<GridDhtPartitionsExchangeFuture>, GridDhtTopologyFuture, CachePartitionExchangeWorkerTask, IgniteDiagnosticAware {
+ /** */
- public static final int DUMP_PENDING_OBJECTS_THRESHOLD =
- IgniteSystemProperties.getInteger(IgniteSystemProperties.IGNITE_DUMP_PENDING_OBJECTS_THRESHOLD, 10);
-
- /** */
+ public static final String EXCHANGE_LOG = "org.apache.ignite.internal.exchange.time";
+
/** Dummy flag. */
private final boolean dummy;
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
index 2396b10,542ee43..26b1a2e
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
@@@ -120,106 -78,7 +120,103 @@@ public class ClusterProcessor extends G
public ClusterProcessor(GridKernalContext ctx) {
super(ctx);
- notifyEnabled.set(IgniteSystemProperties.getBoolean(IGNITE_UPDATE_NOTIFIER,
- Boolean.parseBoolean(IgniteProperties.get("ignite.update.notifier.enabled.by.default"))));
-
cluster = new IgniteClusterImpl(ctx);
+
+ diagnosticLog = ctx.log(DIAGNOSTIC_LOG_CATEGORY);
+ }
+
+ /**
+ * @throws IgniteCheckedException If failed.
+ */
+ public void initListeners() throws IgniteCheckedException {
+ ctx.event().addLocalEventListener(new GridLocalEventListener() {
+ @Override public void onEvent(Event evt) {
+ assert evt instanceof DiscoveryEvent;
+ assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT;
+
+ DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
+
+ UUID nodeId = discoEvt.eventNode().id();
+
+ ConcurrentHashMap<Long, InternalDiagnosticFuture> futs = diagnosticFutMap.get();
+
+ if (futs != null) {
+ for (InternalDiagnosticFuture fut : futs.values()) {
+ if (fut.nodeId.equals(nodeId))
+ fut.onDone("Target node failed: " + nodeId);
+ }
+ }
+ }
+ },
+ EVT_NODE_FAILED, EVT_NODE_LEFT);
+
+ ctx.io().addMessageListener(GridTopic.TOPIC_INTERNAL_DIAGNOSTIC, new GridMessageListener() {
+ @Override public void onMessage(UUID nodeId, Object msg) {
+ if (msg instanceof IgniteDiagnosticMessage) {
+ IgniteDiagnosticMessage msg0 = (IgniteDiagnosticMessage)msg;
+
+ if (msg0.request()) {
+ ClusterNode node = ctx.discovery().node(nodeId);
+
+ if (node == null) {
+ if (diagnosticLog.isDebugEnabled()) {
+ diagnosticLog.debug("Skip diagnostic request, sender node left " +
+ "[node=" + nodeId + ", msg=" + msg + ']');
+ }
+
+ return;
+ }
+
+ String resMsg;
+
+ IgniteClosure<GridKernalContext, String> c;
+
+ try {
+ c = msg0.unmarshalClosure(ctx);
+
+ resMsg = c.apply(ctx);
+ }
+ catch (Exception e) {
+ U.error(diagnosticLog, "Failed to run diagnostic closure: " + e, e);
+
+ resMsg = "Failed to run diagnostic closure: " + e;
+ }
+
+ IgniteDiagnosticMessage res = IgniteDiagnosticMessage.createResponse(resMsg, msg0.futureId());
+
+ try {
+ ctx.io().sendToGridTopic(node, GridTopic.TOPIC_INTERNAL_DIAGNOSTIC, res, GridIoPolicy.SYSTEM_POOL);
+ }
+ catch (ClusterTopologyCheckedException ignore) {
+ if (diagnosticLog.isDebugEnabled()) {
+ diagnosticLog.debug("Failed to send diagnostic response, node left " +
+ "[node=" + nodeId + ", msg=" + msg + ']');
+ }
+ }
+ catch (IgniteCheckedException e) {
+ U.error(diagnosticLog, "Failed to send diagnostic response [msg=" + msg0 + "]", e);
+ }
+ }
+ else {
+ InternalDiagnosticFuture fut = diagnosticFuturesMap().get(msg0.futureId());
+
+ if (fut != null)
+ fut.onResponse(msg0);
+ else
+ U.warn(diagnosticLog, "Failed to find diagnostic message future [msg=" + msg0 + ']');
+ }
+ }
+ else
+ U.warn(diagnosticLog, "Received unexpected message: " + msg);
+ }
+ });
+ }
+
+ /**
+ * @return Logger for diagnostic category.
+ */
+ public IgniteLogger diagnosticLog() {
+ return diagnosticLog;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/fbb51b01/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------