diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java index 242e355d22c7e..d760ac16ba968 100644 --- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java +++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/RootQuery.java @@ -276,7 +276,7 @@ public void run(ExecutionContext ctx, ExecutionPlan plan, FieldsMetadata m } if (wrpEx != null) - log.warning("An exception occures during the query cancel", wrpEx); + log.warning("An exception occurs during the query cancel", wrpEx); } finally { super.tryClose(failure == null && root != null ? root.failure() : failure); diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java index 7618793255f03..1226de98ba23e 100644 --- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java +++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlannerHelper.java @@ -254,7 +254,7 @@ private static class FixDependentModifyNodeShuttle extends IgniteRelShuttle { /** * Process a scan node and raise a {@link #spoolNeeded flag} if needed. * - * @param scan TableScan to analize. + * @param scan TableScan to analyze. * @return The input rel. */ private IgniteRel processScan(TableScan scan) { diff --git a/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java b/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java index ba4bb92641701..0a0519512da2b 100644 --- a/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java +++ b/modules/control-utility/src/test/java/org/apache/ignite/internal/commandline/CommandHandlerParsingTest.java @@ -419,7 +419,7 @@ public void testParseAndValidateWalActions() { } /** - * Tets checks a parser of shutdown policy command. + * Tests checks a parser of shutdown policy command. */ @Test public void testParseShutdownPolicyParameters() { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java index b64762891df78..e37491eb7634d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java @@ -49,7 +49,6 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.cluster.ClusterStartNodeResult; import org.apache.ignite.cluster.ClusterState; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.IgniteComponentType; import org.apache.ignite.internal.IgniteInternalFuture; @@ -90,13 +89,10 @@ /** * */ -public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClusterEx, Externalizable { +public class IgniteClusterImpl extends ClusterGroupAdapter implements IgniteClusterEx { /** */ private static final long serialVersionUID = 0L; - /** */ - private IgniteConfiguration cfg; - /** Node local store. */ @GridToStringExclude private ConcurrentMap nodeLoc; @@ -141,8 +137,6 @@ public IgniteClusterImpl() { public IgniteClusterImpl(GridKernalContext ctx) { super(ctx, (IgnitePredicate)null); - cfg = ctx.config(); - nodeLoc = new ClusterNodeLocalMapImpl(ctx); log = ctx.log(getClass()); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java b/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java index 5d2dabdb9e061..410eeb96d08d9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java @@ -63,6 +63,7 @@ import org.apache.ignite.resources.LoggerResource; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; + import static java.util.Collections.emptyMap; import static org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_DATA; import static org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.GRID_NOT_IDLE_MSG; 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 2e721239ceda2..7a9c0b6dd6490 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 @@ -2775,7 +2775,7 @@ public int getOutboundMessagesQueueSize() { * @param rctx Receiver context to use. * @param ex Exception to close receiver with. */ - private void interruptReceiver(ReceiverContext rctx, Exception ex) { + private void interruptReceiver(@Nullable ReceiverContext rctx, Exception ex) { if (rctx == null) return; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java index dc893677f015d..bb21ee4973e45 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java @@ -2591,7 +2591,8 @@ public StandaloneGridKernalContext createStandaloneKernalContext( * @return Iterator over partition. * @throws IgniteCheckedException If and error occurs. */ - public GridCloseableIterator partitionRowIterator(GridKernalContext ctx, + public GridCloseableIterator partitionRowIterator( + GridKernalContext ctx, String grpName, int partId, FilePageStore pageStore diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java index 56c882b455e77..e168914e712a3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFilesRequestMessage.java @@ -66,24 +66,24 @@ public SnapshotFilesRequestMessage() { } /** - * @param reqId Unique message id. - * @param requestId Snapshot operation request ID. + * @param msgId Unique message id. + * @param reqId Snapshot operation request ID. * @param snpName Snapshot name to request. * @param snpPath Snapshot directory path. * @param parts Map of cache group ids and corresponding set of its partition ids to be snapshot. */ public SnapshotFilesRequestMessage( - String reqId, - UUID requestId, + String msgId, + UUID reqId, String snpName, @Nullable String snpPath, Map> parts ) { - super(reqId); + super(msgId); assert parts != null && !parts.isEmpty(); - this.reqId = requestId; + this.reqId = reqId; this.snpName = snpName; this.snpPath = snpPath; this.parts = new HashMap<>(); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java index 7cefa55238033..60dc42ce977e1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java @@ -199,7 +199,7 @@ public List nodesDirectories() { } /** @return List of snapshot metadata saved in {@link #dumpDir}. */ - public List metadata() throws IOException, IgniteCheckedException { + public List metadata() { return Collections.unmodifiableList(metadata); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java index 0428e7a77e8d4..00d333ef86f03 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java @@ -349,9 +349,10 @@ private void startQuery(GridCacheContext cctx) throws IgniteCheckedException { /** {@inheritDoc} */ @Override public void onActivate(GridKernalContext ctx) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Activating data structure processor [nodeId=" + ctx.localNodeId() + " topVer=" + ctx.discovery().topologyVersionEx() + " ]"); + } initFailed = false; @@ -466,9 +467,10 @@ public void restoreStructuresState(GridKernalContext ctx) { /** {@inheritDoc} */ @Override public void onDeActivate(GridKernalContext ctx) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("DeActivate data structure processor [nodeId=" + ctx.localNodeId() + ", topVer=" + ctx.discovery().topologyVersionEx() + "]"); + } ctx.event().removeLocalEventListener(lsnr, EVT_NODE_LEFT, EVT_NODE_FAILED); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java index d5099b729088a..2ad221bea92bd 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsConfigurationManager.java @@ -126,7 +126,7 @@ public class IgniteStatisticsConfigurationManager { distrMetaStorage.listen( (metaKey) -> metaKey.startsWith(STAT_OBJ_PREFIX), (k, oldV, newV) -> { - // Skip invoke on start node (see 'ReadableDistributedMetaStorage#listen' the second case) + // Skip invocation at node start (see 'ReadableDistributedMetaStorage#listen' the second case) // The update statistics on start node is handled by 'scanAndCheckLocalStatistic' method // called on exchange done. if (topVer == null) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java index ce7cd5ae68edc..a5647f796fd4e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsHelper.java @@ -220,13 +220,13 @@ public static ObjectStatisticsImpl aggregateLocalStatistics( /** * Calculate effective row count. If there are some overrides in statistics configuration - maximum value will be - * choosen. If not - will return actualRowCount. + * choosen. If not - will return {@code actualRowCnt}. * * @param cfg Statistics configuration to dig overrides row count from. - * @param actualRowCount Actual row count. + * @param actualRowCnt Actual row count. * @return Effective row count. */ - public static long calculateRowCount(StatisticsObjectConfiguration cfg, long actualRowCount) { + public static long calculateRowCount(StatisticsObjectConfiguration cfg, long actualRowCnt) { long overridedRowCnt = -1; for (StatisticsColumnConfiguration ccfg : cfg.columns().values()) { @@ -237,7 +237,7 @@ public static long calculateRowCount(StatisticsObjectConfiguration cfg, long act } } - return (overridedRowCnt == -1) ? actualRowCount : overridedRowCnt; + return (overridedRowCnt == -1) ? actualRowCnt : overridedRowCnt; } /** @@ -247,7 +247,7 @@ public static long calculateRowCount(StatisticsObjectConfiguration cfg, long act * @return StatisticsObjectConfiguration array. */ public static StatisticsObjectConfiguration[] buildDefaultConfigurations(StatisticsTarget... targets) { - StatisticsObjectConfiguration[] res = Arrays.stream(targets) + return Arrays.stream(targets) .map(t -> { List colCfgs; if (t.columns() == null) @@ -259,8 +259,6 @@ public static StatisticsObjectConfiguration[] buildDefaultConfigurations(Statist return new StatisticsObjectConfiguration(t.key(), colCfgs, StatisticsObjectConfiguration.DEFAULT_OBSOLESCENCE_MAX_PERCENT); }).toArray(StatisticsObjectConfiguration[]::new); - - return res; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java index c39151b83f864..a9bd0df82e3b0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java @@ -373,7 +373,7 @@ public ObjectStatisticsImpl getLocalStatistics(StatisticsKey key, AffinityTopolo } /** {@inheritDoc} */ - @Override public void refreshStatistics(StatisticsTarget... targets) throws IgniteCheckedException { + @Override public void refreshStatistics(StatisticsTarget... targets) { ensureActive("refresh statistics"); if (usageState() == OFF) @@ -383,7 +383,7 @@ public ObjectStatisticsImpl getLocalStatistics(StatisticsKey key, AffinityTopolo } /** {@inheritDoc} */ - @Override public void dropAll() throws IgniteCheckedException { + @Override public void dropAll() { ensureActive("drop all statistics"); statCfgMgr.dropAll(); @@ -421,7 +421,7 @@ public IgniteStatisticsConfigurationManager statisticConfiguration() { } /** {@inheritDoc} */ - @Override public void usageState(StatisticsUsageState state) throws IgniteCheckedException { + @Override public void usageState(StatisticsUsageState state) { ensureActive("change usage state of statistics"); try { @@ -486,8 +486,8 @@ public synchronized void processObsolescence() { try { cfg = statCfgMgr.config(key); } - catch (IgniteCheckedException e) { - // No-op/ + catch (IgniteCheckedException ignored) { + // No-op. } Set tasksParts = calculateObsolescencedPartitions(cfg, statsRepos.getObsolescence(key)); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java index 8391090e99cb7..a6e81f20ebda8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsUsageState.java @@ -31,7 +31,7 @@ public enum StatisticsUsageState { NO_UPDATE(1), /** - * Statistics used and updated after each changes. + * Statistics used and updated after each change. */ ON(2); @@ -42,7 +42,7 @@ public enum StatisticsUsageState { private static final StatisticsUsageState[] VALS; static { - StatisticsUsageState[] statisticsUsageStates = StatisticsUsageState.values(); + StatisticsUsageState[] statisticsUsageStates = values(); int maxIdx = 0; for (StatisticsUsageState recordType : statisticsUsageStates) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java index ef4e0a7e5f259..41af0d0318dee 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/task/GatherPartitionStatistics.java @@ -154,8 +154,7 @@ public LocalStatisticsGatheringContext context() { private ObjectPartitionStatisticsImpl processPartition( GridCacheContext cctx ) { - ObjectPartitionStatisticsImpl partStat = statRepo.getLocalPartitionStatistics( - gathCtx.configuration().key(), partId); + ObjectPartitionStatisticsImpl partStat = statRepo.getLocalPartitionStatistics(gathCtx.configuration().key(), partId); Map colsToCollect = getColumnsToCollect(partStat); Set colsToRemove = getColumnsToRemove(partStat); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java index 799cadfeb0263..52abb65819d5a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java @@ -211,8 +211,7 @@ public GridTaskProcessor(GridKernalContext ctx) { if (!active) return; - tasksMetaCache = ctx.security().enabled() ? - ctx.cache().utilityCache() : null; + tasksMetaCache = ctx.security().enabled() ? ctx.cache().utilityCache() : null; startLatch.countDown(); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java index 4be44dfb72e27..3106b25accebb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/distributed/InitMessage.java @@ -44,7 +44,7 @@ public class InitMessage implements DiscoveryCustomMessa private final IgniteUuid id = IgniteUuid.randomUuid(); /** Process id. */ - private final UUID processId; + private final UUID procId; /** Process type. */ private final int type; @@ -56,12 +56,12 @@ public class InitMessage implements DiscoveryCustomMessa private final boolean waitClnRes; /** - * @param processId Process id. + * @param procId Process id. * @param type Process type. * @param req Request. */ - public InitMessage(UUID processId, DistributedProcessType type, I req, boolean waitClnRes) { - this.processId = processId; + public InitMessage(UUID procId, DistributedProcessType type, I req, boolean waitClnRes) { + this.procId = procId; this.type = type.ordinal(); this.req = req; this.waitClnRes = waitClnRes; @@ -90,7 +90,7 @@ public InitMessage(UUID processId, DistributedProcessType type, I req, boolean w /** @return Process id. */ public UUID processId() { - return processId; + return procId; } /** @return Process type. */ diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiOperationTimeoutHelper.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiOperationTimeoutHelper.java index d5129317815c8..2fa3ad18461b8 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiOperationTimeoutHelper.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiOperationTimeoutHelper.java @@ -111,7 +111,7 @@ public long nextTimeoutChunk(long dfltTimeout) throws IgniteSpiOperationTimeoutE * @param e Exception to check. * @return {@code True} if given exception is a timeout. {@code False} otherwise. */ - public boolean checkFailureTimeoutReached(Exception e) { + public static boolean checkFailureTimeoutReached(Exception e) { return X.hasCause(e, IgniteSpiOperationTimeoutException.class, SocketTimeoutException.class, SocketException.class); } } 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 e02d591550fb4..22d4c359d50d8 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 @@ -200,7 +200,7 @@ class ClientImpl extends TcpDiscoveryImpl { private final CountDownLatch leaveLatch = new CountDownLatch(1); /** */ - private final ScheduledExecutorService executorService; + private final ScheduledExecutorService executorSrvc; /** */ private MessageWorker msgWorker; @@ -221,7 +221,7 @@ class ClientImpl extends TcpDiscoveryImpl { String instanceName = adapter.ignite() == null || adapter.ignite().name() == null ? "client-node" : adapter.ignite().name(); - executorService = Executors.newSingleThreadScheduledExecutor( + executorSrvc = Executors.newSingleThreadScheduledExecutor( new IgniteThreadFactory(instanceName, "tcp-discovery-exec")); } @@ -318,7 +318,7 @@ class ClientImpl extends TcpDiscoveryImpl { } }.start(); - executorService.scheduleAtFixedRate(new MetricsSender(), spi.metricsUpdateFreq, spi.metricsUpdateFreq, MILLISECONDS); + executorSrvc.scheduleAtFixedRate(new MetricsSender(), spi.metricsUpdateFreq, spi.metricsUpdateFreq, MILLISECONDS); try { joinLatch.await(); @@ -369,7 +369,7 @@ class ClientImpl extends TcpDiscoveryImpl { while (!U.join(sockReader, log, 200)) U.interrupt(sockReader); - executorService.shutdownNow(); + executorSrvc.shutdownNow(); spi.printStopInfo(); } @@ -435,7 +435,7 @@ else if (state == DISCONNECTED) { else { final GridFutureAdapter finalFut = fut; - executorService.schedule(() -> { + executorSrvc.schedule(() -> { if (pingFuts.remove(nodeId, finalFut)) { if (ClientImpl.this.state == DISCONNECTED) finalFut.onDone(new IgniteClientDisconnectedCheckedException(null, @@ -2144,7 +2144,7 @@ private void tryJoin() throws InterruptedException { if (spi.joinTimeout > 0) { final int joinCnt0 = joinCnt; - executorService.schedule(() -> { + executorSrvc.schedule(() -> { queue.add(new JoinTimeout(joinCnt0)); }, spi.joinTimeout, MILLISECONDS); } @@ -2746,7 +2746,7 @@ int queueSize() { */ private static class JoinTimeout { /** */ - private int joinCnt; + private final int joinCnt; /** * @param joinCnt Join count to compare. 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 0ba98ae709756..a841b4c532636 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 @@ -545,9 +545,10 @@ private void spiStop0(boolean disconnect) throws IgniteSpiException { } if (spiState == LEFT) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Verification for local node leave has been received from coordinator" + " (continuing stop procedure)."); + } } else if (log.isInfoEnabled()) { log.info("No verification for local node leave has been received from coordinator" + @@ -981,7 +982,7 @@ else if (!spi.failureDetectionTimeoutEnabled() && reconCnt == spi.getReconnectCo */ private void interruptPing(TcpDiscoveryNode node) { for (InetSocketAddress addr : spi.getAllNodeAddresses(node)) { - GridPingFutureAdapter fut = pingMap.get(addr); + GridPingFutureAdapter fut = pingMap.get(addr); if (fut != null && fut.sock != null) { if (fut.nodeId == null || fut.nodeId.equals(node.id())) @@ -1318,9 +1319,10 @@ private boolean sendJoinRequestMessage(TcpDiscoveryJoinRequestMessage joinMsg) t break; case RES_OK: - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Join request message has been sent to address [addr=" + addr + ", req=" + joinMsg + ']'); + } // Join request sending succeeded, wait for response from topology. return true; @@ -1518,9 +1520,10 @@ else if (U.millisSinceNanos(joinStartNanos) > spi.joinTimeout) debugLog(msg, "Message has been sent directly to address [msg=" + msg + ", addr=" + addr + ", rmtNodeId=" + res.creatorNodeId() + ']'); - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Message has been sent directly to address [msg=" + msg + ", addr=" + addr + ", rmtNodeId=" + res.creatorNodeId() + ']'); + } // Connection has been established, but // join request may not be unmarshalled on remote host. @@ -1693,9 +1696,10 @@ private boolean notifyDiscovery(int type, long topVer, TcpDiscoveryNode node, Sp DebugLogger log = type == EVT_NODE_METRICS_UPDATED ? traceLog : debugLog; if (lsnr != null && node.visible() && (spiState == CONNECTED || spiState == DISCONNECTING)) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Discovery notification [node=" + node + ", spiState=" + spiState + ", type=" + U.gridEventName(type) + ", topVer=" + topVer + ']'); + } Collection top = upcast(ring.visibleNodes()); @@ -1707,10 +1711,9 @@ private boolean notifyDiscovery(int type, long topVer, TcpDiscoveryNode node, Sp return true; } - else { - if (log.isDebugEnabled()) - log.debug("Skipped discovery notification [node=" + node + ", spiState=" + spiState + - ", type=" + U.gridEventName(type) + ", topVer=" + topVer + ']'); + else if (log.isDebugEnabled()) { + log.debug("Skipped discovery notification [node=" + node + ", spiState=" + spiState + + ", type=" + U.gridEventName(type) + ", topVer=" + topVer + ']'); } return false; @@ -1806,7 +1809,7 @@ private void printStatistics() { TcpDiscoveryNode coord = resolveCoordinator(); - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("Discovery SPI statistics [statistics=" + spi.stats + ", spiState=" + spiStateCopy() + ", coord=" + coord + ", next=" + (msgWorker != null ? msgWorker.next : "N/A") + @@ -1822,6 +1825,7 @@ private void printStatistics() { ", lastUpdate=" + (locNode != null ? U.format(locNode.lastUpdateTime()) : "N/A") + ", heapFree=" + runtime.freeMemory() / (1024 * 1024) + "M, heapTotal=" + runtime.maxMemory() / (1024 * 1024) + "M]"); + } } } @@ -3151,9 +3155,10 @@ protected void runTasks() { synchronized (mux) { if (spiState == RING_FAILED) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Discovery detected ring connectivity issues and will stop local node, " + "ignoring message [msg=" + msg + ", locNode=" + locNode + ']'); + } if (msg instanceof TraceableMessage) ((TraceableMessage)msg).spanContainer().span() @@ -3417,9 +3422,10 @@ private void sendMessageAcrossRing(TcpDiscoveryAbstractMessage msg) { } if (!newNext.equals(next)) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("New next node [newNext=" + newNext + ", formerNext=" + next + ", ring=" + ring + ", failedNodes=" + failedNodes + ']'); + } else if (log.isInfoEnabled()) log.info("New next node [newNext=" + newNext + ']'); @@ -3445,9 +3451,10 @@ else if (log.isTraceEnabled()) long ackTimeout0 = spi.getAckTimeout(); if (locNodeAddrs.contains(addr)) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Skip to send message to the local node (probably remote node has the same " + "loopback address that local node): " + addr); + } continue; } @@ -3555,13 +3562,15 @@ else if (log.isTraceEnabled()) if (!next.id().equals(nextId)) { // Node with different ID has bounded to the same port. - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to restore ring because next node ID received is not as " + "expected [expectedId=" + next.id() + ", rcvdId=" + nextId + ']'); + } - if (debugMode) + if (debugMode) { debugLog(msg, "Failed to restore ring because next node ID received is not " + "as expected [expectedId=" + next.id() + ", rcvdId=" + nextId + ']'); + } break; } @@ -3576,15 +3585,17 @@ else if (log.isTraceEnabled()) nextNew = hasPendingAddMessage(nextId); if (!nextNew) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to restore ring because next node order received " + "is not as expected [expected=" + next.internalOrder() + ", rcvd=" + nextOrder + ", id=" + next.id() + ']'); + } - if (debugMode) + if (debugMode) { debugLog(msg, "Failed to restore ring because next node order " + "received is not as expected [expected=" + next.internalOrder() + ", rcvd=" + nextOrder + ", id=" + next.id() + ']'); + } break; } @@ -3669,17 +3680,19 @@ else if (!spi.failureDetectionTimeoutEnabled() && (e instanceof assert !forceSndPending || msg instanceof TcpDiscoveryNodeLeftMessage; if (failure || forceSndPending || newNextNode) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Pending messages will be sent [failure=" + failure + ", newNextNode=" + newNextNode + ", forceSndPending=" + forceSndPending + ", failedNodes=" + failedNodes + ']'); + } - if (debugMode) + if (debugMode) { debugLog(msg, "Pending messages will be sent [failure=" + failure + ", newNextNode=" + newNextNode + ", forceSndPending=" + forceSndPending + ", failedNodes=" + failedNodes + ']'); + } for (TcpDiscoveryAbstractMessage pendingMsg : pendingMsgs) { long tsNanos = System.nanoTime(); @@ -3708,15 +3721,17 @@ else if (!spi.failureDetectionTimeoutEnabled() && (e instanceof spi.stats.onMessageSent(pendingMsg, U.nanosToMillis(tsNanos0 - tsNanos)); - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Pending message has been sent to next node [msgId=" + msg.id() + ", pendingMsgId=" + pendingMsg.id() + ", next=" + next.id() + ", res=" + res + ']'); + } - if (debugMode) + if (debugMode) { debugLog(msg, "Pending message has been sent to next node [msgId=" + msg.id() + ", pendingMsgId=" + pendingMsg.id() + ", next=" + next.id() + ", res=" + res + ']'); + } // Resetting timeout control object to create a new one for the next bunch of // operations. @@ -3827,9 +3842,10 @@ else if (e instanceof SocketTimeoutException || sock = null; - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Message has not been sent [next=" + next.id() + ", msg=" + msg + (!spi.failureDetectionTimeoutEnabled() ? ", i=" + reconCnt : "") + ']'); + } } } } // Try to reconnect. @@ -3949,9 +3965,10 @@ private void processPendingMessagesLocally(TcpDiscoveryAbstractMessage curMsg) { msgWorker.addMessage(pendingMsg); - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Pending message has been sent to local node [msg=" + curMsg.id() + ", pendingMsg=" + pendingMsg + ']'); + } if (debugMode) { debugLog(curMsg, "Pending message has been sent to local node [msg=" + curMsg.id() + @@ -4127,9 +4144,10 @@ private void processJoinRequestMessage(final TcpDiscoveryJoinRequestMessage msg) locNodeId, locNode.addresses(), locNode.hostNames())); } catch (IgniteSpiException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to send loopback problem message to node " + "[node=" + node + ", err=" + e.getMessage() + ']'); + } onException("Failed to send loopback problem message to node " + "[node=" + node + ", err=" + e.getMessage() + ']', e); @@ -4170,10 +4188,11 @@ private void processJoinRequestMessage(final TcpDiscoveryJoinRequestMessage msg) trySendMessageDirectly(node, createTcpDiscoveryDuplicateIdMessage(locNodeId, existingNode)); } catch (IgniteSpiException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to send duplicate ID message to node " + "[node=" + node + ", existingNode=" + existingNode + ", err=" + e.getMessage() + ']'); + } onException("Failed to send duplicate ID message to node " + "[node=" + node + ", existingNode=" + existingNode + ']', e); @@ -4207,18 +4226,20 @@ private void processJoinRequestMessage(final TcpDiscoveryJoinRequestMessage msg) reconMsg.success(true); } - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Send reconnect message to already joined client " + "[clientNode=" + existingNode + ", msg=" + reconMsg + ']'); + } if (getLocalNodeId().equals(node.clientRouterNodeId())) { ClientMessageWorker wrk = clientMsgWorkers.get(node.id()); if (wrk != null) wrk.addMessage(reconMsg); - else if (log.isDebugEnabled()) + else if (log.isDebugEnabled()) { log.debug("Failed to find client message worker " + "[clientNode=" + existingNode + ", msg=" + reconMsg + ']'); + } } else { if (sendMessageToRemotes(reconMsg)) @@ -4242,10 +4263,11 @@ else if (log.isDebugEnabled()) trySendMessageDirectly(node, createTcpDiscoveryDuplicateIdMessage(locNodeId, node)); } catch (IgniteSpiException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to send duplicate ID message to node " + "[node=" + node + ", err=" + e.getMessage() + ']'); + } onException("Failed to send duplicate ID message to node: " + node, e); } @@ -4273,9 +4295,10 @@ else if (log.isDebugEnabled()) ", addrs=" + U.addressesAsString(node) + ']'); // Always output in debug. - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Authentication failed [nodeId=" + node.id() + ", addrs=" + U.addressesAsString(node)); + } try { trySendMessageDirectly( @@ -4284,9 +4307,10 @@ else if (log.isDebugEnabled()) ); } catch (IgniteSpiException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to send unauthenticated message to node " + "[node=" + node + ", err=" + e.getMessage() + ']'); + } onException("Failed to send unauthenticated message to node " + "[node=" + node + ", err=" + e.getMessage() + ']', e); @@ -4307,9 +4331,10 @@ else if (log.isDebugEnabled()) ", addrs=" + U.addressesAsString(node) + ']'); // Always output in debug. - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Authentication subject is not serializable [nodeId=" + node.id() + ", addrs=" + U.addressesAsString(node)); + } try { trySendMessageDirectly( @@ -4318,9 +4343,10 @@ else if (log.isDebugEnabled()) ); } catch (IgniteSpiException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to send unauthenticated message to node " + "[node=" + node + ", err=" + e.getMessage() + ']'); + } } // Ignore join request. @@ -4340,9 +4366,10 @@ else if (log.isDebugEnabled()) LT.error(log, e, "Authentication failed [nodeId=" + node.id() + ", addrs=" + U.addressesAsString(node) + ']'); - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to authenticate node (will ignore join request) [node=" + node + ", err=" + e + ']'); + } onException("Failed to authenticate node (will ignore join request) [node=" + node + ", err=" + e + ']', e); @@ -4391,10 +4418,11 @@ else if (log.isDebugEnabled()) boolean ping = node.id().equals(err0.nodeId()) ? pingNode(node) : pingNode(err0.nodeId()); if (!ping) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Conflicting node has already left, need to wait for event. " + "Will ignore join request for now since it will be recent [req=" + msg + ", err=" + err0.message() + ']'); + } // Ignore join request. return; @@ -4411,9 +4439,10 @@ else if (log.isDebugEnabled()) new TcpDiscoveryCheckFailedMessage(err0.nodeId(), err0.sendMessage())); } catch (IgniteSpiException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to send hash ID resolver validation failed message to node " + "[node=" + node + ", err=" + e.getMessage() + ']'); + } onException("Failed to send hash ID resolver validation failed message to node " + "[node=" + node + ", err=" + e.getMessage() + ']', e); @@ -5312,9 +5341,10 @@ private void processRingLatencyCheckMessage(TcpDiscoveryRingLatencyCheckMessage assert msg != null; if (msg.maxHopsReached()) { - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("Latency check has been discarded (max hops reached) [id=" + msg.id() + ", maxHops=" + msg.maxHops() + ']'); + } return; } @@ -6524,11 +6554,10 @@ private class TcpServer extends GridWorker { blockingSectionEnd(); } - long tsNanos = System.nanoTime(); - - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("TCP discovery accepted incoming connection " + "[rmtAddr=" + sock.getInetAddress() + ", rmtPort=" + sock.getPort() + ']'); + } SocketReader reader = new SocketReader(sock); @@ -6536,9 +6565,10 @@ private class TcpServer extends GridWorker { readers.add(reader); } - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("TCP discovery spawning a new thread for connection " + "[rmtAddr=" + sock.getInetAddress() + ", rmtPort=" + sock.getPort() + ']'); + } reader.start(); @@ -6623,9 +6653,10 @@ private class SocketReader extends IgniteSpiThread { SocketAddress rmtAddr = sock.getRemoteSocketAddress(); - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("Started serving remote node connection [rmtAddr=" + rmtAddr + ", rmtPort=" + sock.getPort() + ']'); + } boolean srvSock; @@ -6693,10 +6724,11 @@ private class SocketReader extends IgniteSpiThread { if (!spi.isNodeStopping0()) { TcpDiscoveryPingRequest req = (TcpDiscoveryPingRequest)msg; - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("Received ping request from the remote node " + "[rmtNodeId=" + msg.creatorNodeId() + ", rmtAddr=" + rmtAddr + ", rmtPort=" + sock.getPort() + "]"); + } TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(locNodeId); @@ -6715,9 +6747,10 @@ private class SocketReader extends IgniteSpiThread { if (!(sock instanceof SSLSocket)) sock.shutdownOutput(); - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("Finished writing ping response " + "[rmtNodeId=" + msg.creatorNodeId() + ", rmtAddr=" + rmtAddr + ", rmtPort=" + sock.getPort() + "]"); + } } else if (log.isDebugEnabled()) log.debug("Ignore ping request, node is stopping."); @@ -7230,9 +7263,10 @@ else if (msg instanceof TcpDiscoveryRingLatencyCheckMessage) { U.close(sock, log); - if (log.isInfoEnabled()) + if (log.isInfoEnabled()) { log.info("Finished serving remote node connection [rmtAddr=" + rmtAddr + ", rmtPort=" + sock.getPort() + ", rmtNodeId=" + nodeId + ']'); + } if (isLocalNodeCoordinator() && !ring.hasRemoteServerNodes()) U.enhanceThreadName(msgWorkerThread, "crd"); @@ -7347,22 +7381,25 @@ private void processClientReconnectMessage(TcpDiscoveryClientReconnectMessage ms msg.pendingMessages(pending); msg.success(true); - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Accept client reconnect, restored pending messages " + "[locNodeId=" + locNodeId + ", clientNodeId=" + nodeId + ']'); + } } else if (!isLocalNodeCoordinator()) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to restore pending messages for reconnecting client. " + "Forwarding reconnection message to coordinator " + "[locNodeId=" + locNodeId + ", clientNodeId=" + nodeId + ']'); + } } else { msg.verify(locNodeId); - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failing reconnecting client node because failed to restore pending " + "messages [locNodeId=" + locNodeId + ", clientNodeId=" + nodeId + ']'); + } TcpDiscoveryNodeFailedMessage nodeFailedMsg = new TcpDiscoveryNodeFailedMessage(locNodeId, node.id(), node.internalOrder()); @@ -7382,9 +7419,10 @@ else if (!isLocalNodeCoordinator()) { if (wrk != null) wrk.addMessage(msg); - else if (log.isDebugEnabled()) + else if (log.isDebugEnabled()) { log.debug("Failed to reconnect client node (disconnected during the process) [locNodeId=" + locNodeId + ", clientNodeId=" + nodeId + ']'); + } } else msgWorker.addMessage(msg); @@ -7401,9 +7439,10 @@ else if (log.isDebugEnabled()) if (wrk != null) wrk.addMessage(msg); - else if (log.isDebugEnabled()) + else if (log.isDebugEnabled()) { log.debug("Failed to reconnect client node (disconnected during the process) [locNodeId=" + locNodeId + ", clientNodeId=" + nodeId + ']'); + } } else if (ring.hasRemoteNodes() && !isLocalNodeCoordinator()) msgWorker.addMessage(msg); @@ -7521,9 +7560,10 @@ private boolean pingJoiningNode(TcpDiscoveryNode node) { } } catch (IgniteCheckedException e) { - if (log.isDebugEnabled()) + if (log.isDebugEnabled()) { log.debug("Failed to ping joining node, closing connection. [node=" + node + ", err=" + e.getMessage() + ']'); + } } } @@ -7693,25 +7733,28 @@ void addMessage(TcpDiscoveryAbstractMessage msg, @Nullable byte[] msgBytes) { if (node != null) clientVer = IgniteUtils.productVersion(node); - else if (msgLog.isDebugEnabled()) + else if (msgLog.isDebugEnabled()) { msgLog.debug("Skip sending message ack to client, fail to get client node " + "[sock=" + sock + ", locNodeId=" + getLocalNodeId() + ", rmtNodeId=" + clientNodeId + ", msg=" + msg + ']'); + } } if (clientVer != null) { - if (msgLog.isDebugEnabled()) + if (msgLog.isDebugEnabled()) { msgLog.debug("Sending message ack to client [sock=" + sock + ", locNodeId=" + getLocalNodeId() + ", rmtNodeId=" + clientNodeId + ", msg=" + msg + ']'); + } spi.writeToSocket(sock, msg, msgBytes, spi.failureDetectionTimeoutEnabled() ? spi.clientFailureDetectionTimeout() : spi.getSocketTimeout()); } } else { - if (msgLog.isDebugEnabled()) + if (msgLog.isDebugEnabled()) { msgLog.debug("Redirecting message to client [sock=" + sock + ", locNodeId=" + getLocalNodeId() + ", rmtNodeId=" + clientNodeId + ", msg=" + msg + ']'); + } assert topologyInitialized(msg) : msg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java index 6d7ec5b6b0cbd..5b45d38542866 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/OnePhaseCommitAndNodeLeftTest.java @@ -185,7 +185,7 @@ private void startTransactionAndFailPrimary(CI3 cacheCl return false; }); - String testVal = "Tets value"; + String testVal = "Test value"; IgniteInternalFuture putFut = GridTestUtils.runAsync(() -> { try { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java index c6d0f25fa44d4..e3802dbae2021 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/RebalanceIsProcessingWhenAssignmentIsEmptyTest.java @@ -89,7 +89,7 @@ public void test() throws Exception { } /** - * Tets affinity function. + * Tests affinity function. * It gives same assignment on second node in topology of three nodes and differences in fours. */ public static class TestAffinity extends RendezvousAffinityFunction { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java index 9beb9f9489ecb..d6dd481f0085f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/SupplyPartitionHistoricallyWithReorderedUpdates.java @@ -179,7 +179,7 @@ private void restartsBackupWithReorderedUpdate(boolean updateExistedKys, boolean } /** - * Tets affinity function with one partition. This implementation maps primary partition to first node and backup + * Tests affinity function with one partition. This implementation maps primary partition to first node and backup * partition to second. */ public static class TestAffinity extends RendezvousAffinityFunction { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java index 8c2b8e4d1648f..2dc8fb425f540 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceLoggingTest.java @@ -267,7 +267,7 @@ private void forceCheckpointAndRollOwerWal() throws Exception { } } - /** Tets WAL record. */ + /** Tests WAL record. */ private static class AdHocWALRecord extends CheckpointRecord { /** Default constructor. */ private AdHocWALRecord() { 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 0bc988cdce86c..14baed337531d 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 @@ -302,7 +302,7 @@ private void checkFailureThresholdWorkability() throws Exception { Thread.sleep(failureDetectionTimeout()); - assertTrue(firstSpi.err != null && X.hasCause(firstSpi.err, SocketTimeoutException.class)); + assertTrue(X.hasCause(firstSpi.err, SocketTimeoutException.class)); firstSpi.reset(); secondSpi.reset(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java index ff7b7d6cf0193..3c79a44268a8b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/TableStatisticsAbstractTest.java @@ -125,7 +125,7 @@ private int extractScanCountFromExplain(List> res) { int scanCnt = 0; while (m.find()) - scanCnt += Integer.valueOf(m.group(1)); + scanCnt += Integer.parseInt(m.group(1)); return scanCnt; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java index 417f837431770..f7ca1b2670acd 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsObsolescenceTest.java @@ -224,7 +224,7 @@ public void testInactiveLoad() throws Exception { Map> statObs = GridTestUtils .getFieldValue(statisticsMgr(0).statisticsRepository(), "statObs"); - Integer oldSize = statObs.get(SMALL_KEY).size(); + int oldSize = statObs.get(SMALL_KEY).size(); ignite.cluster().state(ClusterState.ACTIVE);