From 9c30477a2510012c38327659ff1a4a9ee888e42f Mon Sep 17 00:00:00 2001 From: AKuznetsov Date: Sun, 15 Feb 2015 12:32:19 +0700 Subject: [PATCH] # IGNITE-248 Cleanup code, added missing javadocs, fixed inspections warnings, added new properties to configurations. --- .../configuration/TransactionConfiguration.java | 7 +- .../org/apache/ignite/internal/visor/VisorJob.java | 3 +- .../ignite/internal/visor/VisorMultiNodeTask.java | 9 +- .../ignite/internal/visor/cache/VisorCache.java | 8 +- .../visor/cache/VisorCacheAggregatedMetrics.java | 6 +- .../visor/cache/VisorCacheConfiguration.java | 18 --- .../visor/cache/VisorCacheDgcConfiguration.java | 97 ------------- .../internal/visor/cache/VisorCacheLoadTask.java | 4 +- .../internal/visor/cache/VisorCacheMetrics.java | 18 +-- .../visor/cache/VisorCacheStoreConfiguration.java | 7 +- .../cache/VisorCacheWriteBehindConfiguration.java | 6 +- .../compute/VisorComputeMonitoringHolder.java | 7 +- .../internal/visor/debug/VisorThreadInfo.java | 17 +-- .../internal/visor/debug/VisorThreadLockInfo.java | 12 +- .../visor/debug/VisorThreadMonitorInfo.java | 6 +- .../visor/event/VisorGridAuthenticationEvent.java | 10 +- .../visor/event/VisorGridAuthorizationEvent.java | 10 +- .../visor/event/VisorGridDeploymentEvent.java | 10 +- .../visor/event/VisorGridDiscoveryEvent.java | 10 +- .../internal/visor/event/VisorGridEvent.java | 18 +-- .../internal/visor/event/VisorGridJobEvent.java | 30 ++-- .../visor/event/VisorGridSecuritySessionEvent.java | 10 +- .../internal/visor/event/VisorGridTaskEvent.java | 30 ++-- .../ignite/internal/visor/file/VisorFileBlock.java | 10 +- .../internal/visor/file/VisorFileBlockTask.java | 10 +- .../ignite/internal/visor/igfs/VisorIgfs.java | 3 +- .../internal/visor/igfs/VisorIgfsProfiler.java | 6 +- .../visor/igfs/VisorIgfsProfilerEntry.java | 10 +- .../internal/visor/igfs/VisorIgfsProfilerTask.java | 12 ++ .../igfs/VisorIgfsProfilerUniformityCounters.java | 19 ++- .../visor/igfs/VisorIgfsSamplingStateTask.java | 2 +- .../internal/visor/log/VisorLogSearchResult.java | 20 +-- .../ignite/internal/visor/misc/VisorNopTask.java | 3 + .../visor/node/VisorAtomicConfiguration.java | 104 ++++++++++++++ .../visor/node/VisorBasicConfiguration.java | 10 +- .../node/VisorExecutorServiceConfiguration.java | 86 ++++++++---- .../visor/node/VisorGridConfiguration.java | 37 +++++ .../visor/node/VisorIgfsConfiguration.java | 48 +++---- .../visor/node/VisorMetricsConfiguration.java | 10 +- .../node/VisorNodeDataCollectorJobResult.java | 67 +++++++-- .../visor/node/VisorNodeDataCollectorTask.java | 71 ++++++---- .../visor/node/VisorNodeDataCollectorTaskArg.java | 19 +-- .../node/VisorNodeDataCollectorTaskResult.java | 18 +-- .../visor/node/VisorNodeEventsCollectorTask.java | 33 +++-- .../visor/node/VisorRestConfiguration.java | 6 +- .../visor/node/VisorSpisConfiguration.java | 9 +- .../visor/node/VisorTransactionConfiguration.java | 153 +++++++++++++++++++++ .../visor/query/VisorQueryCleanupTask.java | 2 +- .../internal/visor/query/VisorQueryTask.java | 4 +- .../visor/streamer/VisorStreamerConfiguration.java | 6 +- .../visor/streamer/VisorStreamerMetrics.java | 6 +- .../ignite/internal/visor/util/VisorMimeTypes.java | 51 ++++--- .../ignite/internal/visor/util/VisorTaskUtils.java | 48 ++++--- .../visor/commands/cache/VisorCacheCommand.scala | 5 - .../config/VisorConfigurationCommand.scala | 10 +- 55 files changed, 788 insertions(+), 463 deletions(-) delete mode 100644 modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheDgcConfiguration.java create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java create mode 100644 modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java index 13ac061..ecc21e8 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java @@ -19,15 +19,10 @@ package org.apache.ignite.configuration; import org.apache.ignite.transactions.*; -import java.io.*; - /** * Transactions configuration. */ -public class TransactionConfiguration implements Serializable { - /** */ - private static final long serialVersionUID = 0L; - +public class TransactionConfiguration { /** Default value for 'txSerializableEnabled' flag. */ public static final boolean DFLT_TX_SERIALIZABLE_ENABLED = false; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java index f3dbebe..c8a99f7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java @@ -30,6 +30,7 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*; * Base class for Visor jobs. */ public abstract class VisorJob extends ComputeJobAdapter { + /** Auto-injected grid instance. */ @IgniteInstanceResource protected transient IgniteEx ignite; @@ -37,7 +38,7 @@ public abstract class VisorJob extends ComputeJobAdapter { protected transient long start; /** Debug flag. */ - protected transient boolean debug; + protected boolean debug; /** * Create job with specified argument. diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java index 464f9f5..b92cfe2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java @@ -36,8 +36,9 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*; * @param Task result type. */ public abstract class VisorMultiNodeTask implements ComputeTask, R> { + /** Auto-injected grid instance. */ @IgniteInstanceResource - protected IgniteEx g; + protected IgniteEx ignite; /** Debug flag. */ protected boolean debug; @@ -65,7 +66,7 @@ public abstract class VisorMultiNodeTask implements ComputeTask implements ComputeTask implements ComputeTask metrics = new HashMap<>(); + private final Map metrics = new HashMap<>(); /** Minimum number of elements in the cache. */ private transient Integer minSize; @@ -403,7 +403,7 @@ public class VisorCacheAggregatedMetrics implements Serializable { execsQry = 0; for (VisorCacheMetrics metric : metrics.values()) - execsQry = execsQry + metric.queryMetrics().executions(); + execsQry += metric.queryMetrics().executions(); } return execsQry; @@ -417,7 +417,7 @@ public class VisorCacheAggregatedMetrics implements Serializable { failsQry = 0; for (VisorCacheMetrics metric : metrics.values()) - failsQry = failsQry + metric.queryMetrics().fails(); + failsQry += metric.queryMetrics().fails(); } return failsQry; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java index afd34ff..1b28e38 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java @@ -113,9 +113,6 @@ public class VisorCacheConfiguration implements Serializable { /** Default config */ private VisorCacheDefaultConfiguration dflt; - /** Dgc config */ - private VisorCacheDgcConfiguration dgc; - /** Store config */ private VisorCacheStoreConfiguration store; @@ -173,7 +170,6 @@ public class VisorCacheConfiguration implements Serializable { cfg.evictConfiguration(VisorCacheEvictionConfiguration.from(ccfg)); cfg.nearConfiguration(VisorCacheNearConfiguration.from(ccfg)); cfg.defaultConfiguration(VisorCacheDefaultConfiguration.from(ccfg)); - cfg.dgcConfiguration(VisorCacheDgcConfiguration.from(ccfg)); cfg.storeConfiguration(VisorCacheStoreConfiguration.from(ccfg)); cfg.writeBehind(VisorCacheWriteBehindConfiguration.from(ccfg)); cfg.typeMeta(VisorCacheTypeMetadata.list(ccfg.getTypeMetadata())); @@ -551,20 +547,6 @@ public class VisorCacheConfiguration implements Serializable { } /** - * @return Dgc config - */ - public VisorCacheDgcConfiguration dgcConfiguration() { - return dgc; - } - - /** - * @param dgc New dgc config - */ - public void dgcConfiguration(VisorCacheDgcConfiguration dgc) { - this.dgc = dgc; - } - - /** * @return Store config */ public VisorCacheStoreConfiguration storeConfiguration() { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheDgcConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheDgcConfiguration.java deleted file mode 100644 index 7aff1c9..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheDgcConfiguration.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.internal.visor.cache; - -import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.util.typedef.internal.*; - -import java.io.*; - -/** - * Data transfer object for DGC configuration properties. - */ -public class VisorCacheDgcConfiguration implements Serializable { - /** */ - private static final long serialVersionUID = 0L; - - /** DGC check frequency. */ - private long freq; - - /** DGC remove locks flag. */ - private boolean rmvLocks; - - /** Timeout for considering lock to be suspicious. */ - private long suspectLockTimeout; - - /** - * @param ccfg Cache configuration. - * @return Data transfer object for DGC configuration properties. - */ - public static VisorCacheDgcConfiguration from(CacheConfiguration ccfg) { - VisorCacheDgcConfiguration cfg = new VisorCacheDgcConfiguration(); - - return cfg; - } - - /** - * @return DGC check frequency. - */ - public long frequency() { - return freq; - } - - /** - * @param freq New dGC check frequency. - */ - public void frequency(long freq) { - this.freq = freq; - } - - /** - * @return DGC remove locks flag. - */ - public boolean removedLocks() { - return rmvLocks; - } - - /** - * @param rmvLocks New dGC remove locks flag. - */ - public void removedLocks(boolean rmvLocks) { - this.rmvLocks = rmvLocks; - } - - /** - * @return Timeout for considering lock to be suspicious. - */ - public long suspectLockTimeout() { - return suspectLockTimeout; - } - - /** - * @param suspectLockTimeout New timeout for considering lock to be suspicious. - */ - public void suspectLockTimeout(long suspectLockTimeout) { - this.suspectLockTimeout = suspectLockTimeout; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(VisorCacheDgcConfiguration.class, this); - } -} diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java index 3e395e2..8643fd2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java @@ -60,7 +60,7 @@ public class VisorCacheLoadTask extends try { Set cacheNames = arg.get1(); Long ttl = arg.get2(); - Object[] loaderArgs = arg.get3(); + Object[] ldrArgs = arg.get3(); Map res = new HashMap<>(); @@ -72,7 +72,7 @@ public class VisorCacheLoadTask extends @Override public boolean apply(Object o, Object o2) { return true; } - }, ttl, loaderArgs); + }, ttl, ldrArgs); res.put(cacheName, c.size()); // Put new key size for successfully loaded cache. } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java index 0db8572..1914b18 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java @@ -102,7 +102,7 @@ public class VisorCacheMetrics implements Serializable { private VisorCacheQueryMetrics qryMetrics; /** Current size of evict queue used to batch up evictions. */ - private int dhtEvictQueueCurrentSize; + private int dhtEvictQueueCurrSize; /** Gets transaction per-thread map size. */ private int txThreadMapSize; @@ -117,7 +117,7 @@ public class VisorCacheMetrics implements Serializable { private int txPrepareQueueSize; /** Start version counts map size. */ - private int txStartVersionCountsSize; + private int txStartVerCountsSize; /** Number of cached committed transaction IDs. */ private int txCommittedVersionsSize; @@ -138,7 +138,7 @@ public class VisorCacheMetrics implements Serializable { private int txDhtPrepareQueueSize; /** DHT start version counts map size. */ - private int txDhtStartVersionCountsSize; + private int txDhtStartVerCountsSize; /** Number of cached committed DHT transaction IDs. */ private int txDhtCommittedVersionsSize; @@ -193,19 +193,19 @@ public class VisorCacheMetrics implements Serializable { cm.qryMetrics = VisorCacheQueryMetrics.from(c.queries().metrics()); - cm.dhtEvictQueueCurrentSize = m.getDhtEvictQueueCurrentSize(); + cm.dhtEvictQueueCurrSize = m.getDhtEvictQueueCurrentSize(); cm.txThreadMapSize = m.getTxThreadMapSize(); cm.txXidMapSize = m.getTxXidMapSize(); cm.txCommitQueueSize = m.getTxCommitQueueSize(); cm.txPrepareQueueSize = m.getTxPrepareQueueSize(); - cm.txStartVersionCountsSize = m.getTxStartVersionCountsSize(); + cm.txStartVerCountsSize = m.getTxStartVersionCountsSize(); cm.txCommittedVersionsSize = m.getTxCommittedVersionsSize(); cm.txRolledbackVersionsSize = m.getTxRolledbackVersionsSize(); cm.txDhtThreadMapSize = m.getTxDhtThreadMapSize(); cm.txDhtXidMapSize = m.getTxDhtXidMapSize(); cm.txDhtCommitQueueSize = m.getTxDhtCommitQueueSize(); cm.txDhtPrepareQueueSize = m.getTxDhtPrepareQueueSize(); - cm.txDhtStartVersionCountsSize = m.getTxDhtStartVersionCountsSize(); + cm.txDhtStartVerCountsSize = m.getTxDhtStartVersionCountsSize(); cm.txDhtCommittedVersionsSize = m.getTxDhtCommittedVersionsSize(); cm.txDhtRolledbackVersionsSize = m.getTxDhtRolledbackVersionsSize(); @@ -377,7 +377,7 @@ public class VisorCacheMetrics implements Serializable { * @return Current size of evict queue used to batch up evictions. */ public int dhtEvictQueueCurrentSize() { - return dhtEvictQueueCurrentSize; + return dhtEvictQueueCurrSize; } /** @@ -411,7 +411,7 @@ public class VisorCacheMetrics implements Serializable { * @return Start version counts map size. */ public int txStartVersionCountsSize() { - return txStartVersionCountsSize; + return txStartVerCountsSize; } /** @@ -460,7 +460,7 @@ public class VisorCacheMetrics implements Serializable { * @return DHT start version counts map size. */ public int txDhtStartVersionCountsSize() { - return txDhtStartVersionCountsSize; + return txDhtStartVerCountsSize; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java index e765721..b1ed170 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java @@ -51,19 +51,22 @@ public class VisorCacheStoreConfiguration implements Serializable { return cfg; } + /** + * @return {@code true} if cache has store. + */ public boolean enabled() { return store != null; } /** - * @return Cache store. + * @return Cache store class name. */ @Nullable public String store() { return store; } /** - * @param store New cache store. + * @param store Cache store class name. */ public void store(String store) { this.store = store; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheWriteBehindConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheWriteBehindConfiguration.java index 8acd096..c55078c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheWriteBehindConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheWriteBehindConfiguration.java @@ -36,7 +36,7 @@ public class VisorCacheWriteBehindConfiguration implements Serializable { private int batchSize; /** Frequency with which write-behind cache is flushed to the cache store in milliseconds. */ - private long flushFrequency; + private long flushFreq; /** Maximum object count in write-behind cache. */ private int flushSize; @@ -92,14 +92,14 @@ public class VisorCacheWriteBehindConfiguration implements Serializable { * @return Frequency with which write-behind cache is flushed to the cache store in milliseconds. */ public long flushFrequency() { - return flushFrequency; + return flushFreq; } /** * @param flushFreq New frequency with which write-behind cache is flushed to the cache store in milliseconds. */ public void flushFrequency(long flushFreq) { - flushFrequency = flushFreq; + this.flushFreq = flushFreq; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java index 5205f30..d4b0d58 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java @@ -63,6 +63,7 @@ public class VisorComputeMonitoringHolder { /** * Check if collect events may be disable. + * * @param ignite Grid. * @return {@code true} if task events should remain enabled. */ @@ -79,8 +80,9 @@ public class VisorComputeMonitoringHolder { /** * Disable collect events for Visor instance. - * @param g grid. - * @param visorKey uniq Visor instance key. + * + * @param g Grid. + * @param visorKey Unique Visor instance key. */ public void stopCollect(IgniteEx g, String visorKey) { synchronized(listenVisor) { @@ -92,6 +94,7 @@ public class VisorComputeMonitoringHolder { /** * Schedule cleanup process for events monitoring. + * * @param g grid. */ private void scheduleCleanupJob(final IgniteEx g) { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java index 68f265f..adab9d8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java @@ -27,6 +27,7 @@ public class VisorThreadInfo implements Serializable { /** */ private static final long serialVersionUID = 0L; + /** */ private static final int MAX_FRAMES = 8; /** Thread name. */ @@ -57,13 +58,13 @@ public class VisorThreadInfo implements Serializable { private final Boolean suspended; /** Waited count. */ - private final Long waitedCount; + private final Long waitedCnt; /** Waited time. */ private final Long waitedTime; /** Blocked count. */ - private final Long blockedCount; + private final Long blockedCnt; /** Blocked time. */ private final Long blockedTime; @@ -87,9 +88,9 @@ public class VisorThreadInfo implements Serializable { String lockOwnerName, Boolean inNative, Boolean suspended, - Long waitedCount, + Long waitedCnt, Long waitedTime, - Long blockedCount, + Long blockedCnt, Long blockedTime, StackTraceElement[] stackTrace, VisorThreadLockInfo[] locks, @@ -104,9 +105,9 @@ public class VisorThreadInfo implements Serializable { this.lockOwnerName = lockOwnerName; this.inNative = inNative; this.suspended = suspended; - this.waitedCount = waitedCount; + this.waitedCnt = waitedCnt; this.waitedTime = waitedTime; - this.blockedCount = blockedCount; + this.blockedCnt = blockedCnt; this.blockedTime = blockedTime; this.stackTrace = stackTrace; this.locks = locks; @@ -217,7 +218,7 @@ public class VisorThreadInfo implements Serializable { * @return Waited count. */ public Long waitedCount() { - return waitedCount; + return waitedCnt; } /** @@ -231,7 +232,7 @@ public class VisorThreadInfo implements Serializable { * @return Blocked count. */ public Long blockedCount() { - return blockedCount; + return blockedCnt; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java index 5e782a1..daab2d7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java @@ -30,7 +30,7 @@ public class VisorThreadLockInfo implements Serializable { /** * Fully qualified name of the class of the lock object. */ - protected final String className; + protected final String clsName; /** * Identity hash code of the lock object. @@ -38,10 +38,10 @@ public class VisorThreadLockInfo implements Serializable { protected final Integer identityHashCode; /** Create thread lock info with given parameters. */ - public VisorThreadLockInfo(String className, Integer identityHashCode) { - assert className != null; + public VisorThreadLockInfo(String clsName, Integer identityHashCode) { + assert clsName != null; - this.className = className; + this.clsName = clsName; this.identityHashCode = identityHashCode; } @@ -56,7 +56,7 @@ public class VisorThreadLockInfo implements Serializable { * @return Fully qualified name of the class of the lock object. */ public String className() { - return className; + return clsName; } /** @@ -68,6 +68,6 @@ public class VisorThreadLockInfo implements Serializable { /** {@inheritDoc} */ @Override public String toString() { - return className + '@' + Integer.toHexString(identityHashCode); + return clsName + '@' + Integer.toHexString(identityHashCode); } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java index 099c28d..a12594e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java @@ -35,14 +35,14 @@ public class VisorThreadMonitorInfo extends VisorThreadLockInfo { /** * Create thread monitor info with given parameters. * - * @param className Fully qualified name of the class of the lock object. + * @param clsName Fully qualified name of the class of the lock object. * @param identityHashCode Identity hash code of the lock object. * @param stackDepth Depth in the stack trace where the object monitor was locked. * @param stackFrame Stack frame that locked the object monitor. */ - public VisorThreadMonitorInfo(String className, Integer identityHashCode, Integer stackDepth, + public VisorThreadMonitorInfo(String clsName, Integer identityHashCode, Integer stackDepth, StackTraceElement stackFrame) { - super(className, identityHashCode); + super(clsName, identityHashCode); this.stackDepth = stackDepth; this.stackFrame = stackFrame; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java index bf27fc7..80ace77 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java @@ -46,8 +46,8 @@ public class VisorGridAuthenticationEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. * @param subjType Subject type. * @param subjId Subject ID. @@ -58,14 +58,14 @@ public class VisorGridAuthenticationEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - String message, + long ts, + String msg, String shortDisplay, GridSecuritySubjectType subjType, UUID subjId, Object login ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.subjType = subjType; this.subjId = subjId; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthorizationEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthorizationEvent.java index 1c44e4d..71f0968 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthorizationEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthorizationEvent.java @@ -43,8 +43,8 @@ public class VisorGridAuthorizationEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. */ public VisorGridAuthorizationEvent( @@ -52,13 +52,13 @@ public class VisorGridAuthorizationEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - String message, + long ts, + String msg, String shortDisplay, GridSecurityPermission operation, GridSecuritySubject subject ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.operation = operation; this.subject = subject; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java index 41617c1..414d7c7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java @@ -40,8 +40,8 @@ public class VisorGridDeploymentEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. * @param alias Deployment alias. */ @@ -50,12 +50,12 @@ public class VisorGridDeploymentEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - @Nullable String message, + long ts, + @Nullable String msg, String shortDisplay, String alias ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.alias = alias; } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java index 9879fe9..c5c0c1a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java @@ -46,8 +46,8 @@ public class VisorGridDiscoveryEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. * @param evtNodeId Event node id. * @param addr Event node address. @@ -58,14 +58,14 @@ public class VisorGridDiscoveryEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - @Nullable String message, + long ts, + @Nullable String msg, String shortDisplay, UUID evtNodeId, String addr, boolean isDaemon ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.evtNodeId = evtNodeId; this.addr = addr; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java index 9c47798..e36b034 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java @@ -44,10 +44,10 @@ public class VisorGridEvent implements Serializable { private final UUID nid; /** Event timestamp. */ - private final long timestamp; + private final long ts; /** Event message. */ - private final String message; + private final String msg; /** Shortened version of {@code toString()} result. Suitable for humans to read. */ private final String shortDisplay; @@ -59,18 +59,18 @@ public class VisorGridEvent implements Serializable { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. */ - public VisorGridEvent(int typeId, IgniteUuid id, String name, UUID nid, long timestamp, @Nullable String message, + public VisorGridEvent(int typeId, IgniteUuid id, String name, UUID nid, long ts, @Nullable String msg, String shortDisplay) { this.typeId = typeId; this.id = id; this.name = name; this.nid = nid; - this.timestamp = timestamp; - this.message = message; + this.ts = ts; + this.msg = msg; this.shortDisplay = shortDisplay; } @@ -106,14 +106,14 @@ public class VisorGridEvent implements Serializable { * @return Event timestamp. */ public long timestamp() { - return timestamp; + return ts; } /** * @return Event message. */ @Nullable public String message() { - return message; + return msg; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java index 65b6c8f..0018ab9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java @@ -34,10 +34,10 @@ public class VisorGridJobEvent extends VisorGridEvent { private final String taskName; /** Name of task class that triggered the event. */ - private final String taskClassName; + private final String taskClsName; /** Task session ID of the task that triggered the event. */ - private final IgniteUuid taskSessionId; + private final IgniteUuid taskSesId; /** Job ID. */ private final IgniteUuid jobId; @@ -49,12 +49,12 @@ public class VisorGridJobEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. * @param taskName Name of the task that triggered the event. - * @param taskClassName Name of task class that triggered the event. - * @param taskSessionId Task session ID of the task that triggered the event. + * @param taskClsName Name of task class that triggered the event. + * @param taskSesId Task session ID of the task that triggered the event. * @param jobId Job ID. */ public VisorGridJobEvent( @@ -62,19 +62,19 @@ public class VisorGridJobEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - @Nullable String message, + long ts, + @Nullable String msg, String shortDisplay, String taskName, - String taskClassName, - IgniteUuid taskSessionId, + String taskClsName, + IgniteUuid taskSesId, IgniteUuid jobId ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.taskName = taskName; - this.taskClassName = taskClassName; - this.taskSessionId = taskSessionId; + this.taskClsName = taskClsName; + this.taskSesId = taskSesId; this.jobId = jobId; } @@ -89,14 +89,14 @@ public class VisorGridJobEvent extends VisorGridEvent { * @return Name of task class that triggered the event. */ public String taskClassName() { - return taskClassName; + return taskClsName; } /** * @return Task session ID of the task that triggered the event. */ public IgniteUuid taskSessionId() { - return taskSessionId; + return taskSesId; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java index f184422..16766e8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java @@ -43,8 +43,8 @@ public class VisorGridSecuritySessionEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. * @param subjType Subject type. * @param subjId Subject ID. @@ -54,13 +54,13 @@ public class VisorGridSecuritySessionEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - String message, + long ts, + String msg, String shortDisplay, GridSecuritySubjectType subjType, UUID subjId ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.subjType = subjType; this.subjId = subjId; diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java index 14710b4..28d3404 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java @@ -34,10 +34,10 @@ public class VisorGridTaskEvent extends VisorGridEvent { private final String taskName; /** Name of task class that triggered the event. */ - private final String taskClassName; + private final String taskClsName; /** Task session ID. */ - private final IgniteUuid taskSessionId; + private final IgniteUuid taskSesId; /** Whether task was created for system needs. */ private final boolean internal; @@ -49,12 +49,12 @@ public class VisorGridTaskEvent extends VisorGridEvent { * @param id Event id. * @param name Event name. * @param nid Event node ID. - * @param timestamp Event timestamp. - * @param message Event message. + * @param ts Event timestamp. + * @param msg Event message. * @param shortDisplay Shortened version of {@code toString()} result. * @param taskName Name of the task that triggered the event. - * @param taskClassName Name of task class that triggered the event. - * @param taskSessionId Task session ID of the task that triggered the event. + * @param taskClsName Name of task class that triggered the event. + * @param taskSesId Task session ID of the task that triggered the event. * @param internal Whether task was created for system needs. */ public VisorGridTaskEvent( @@ -62,19 +62,19 @@ public class VisorGridTaskEvent extends VisorGridEvent { IgniteUuid id, String name, UUID nid, - long timestamp, - @Nullable String message, + long ts, + @Nullable String msg, String shortDisplay, String taskName, - String taskClassName, - IgniteUuid taskSessionId, + String taskClsName, + IgniteUuid taskSesId, boolean internal ) { - super(typeId, id, name, nid, timestamp, message, shortDisplay); + super(typeId, id, name, nid, ts, msg, shortDisplay); this.taskName = taskName; - this.taskClassName = taskClassName; - this.taskSessionId = taskSessionId; + this.taskClsName = taskClsName; + this.taskSesId = taskSesId; this.internal = internal; } @@ -89,14 +89,14 @@ public class VisorGridTaskEvent extends VisorGridEvent { * @return Name of task class that triggered the event. */ public String taskClassName() { - return taskClassName; + return taskClsName; } /** * @return Task session ID. */ public IgniteUuid taskSessionId() { - return taskSessionId; + return taskSesId; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java index cdded2a..87b7388 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java @@ -32,7 +32,7 @@ public class VisorFileBlock implements Serializable { private final String path; /** Marker position. */ - private final long offset; + private final long off; /** File size. */ private final long size; @@ -50,15 +50,15 @@ public class VisorFileBlock implements Serializable { * Create file block with given parameters. * * @param path File path. - * @param offset Marker position. + * @param off Marker position. * @param size File size. * @param lastModified Timestamp of last modification of the file. * @param zipped Whether data was zipped. * @param data Data bytes. */ - public VisorFileBlock(String path, long offset, long size, long lastModified, boolean zipped, byte[] data) { + public VisorFileBlock(String path, long off, long size, long lastModified, boolean zipped, byte[] data) { this.path = path; - this.offset = offset; + this.off = off; this.size = size; this.lastModified = lastModified; this.zipped = zipped; @@ -76,7 +76,7 @@ public class VisorFileBlock implements Serializable { * @return Marker position. */ public long offset() { - return offset; + return off; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java index bed273a..a71b5c5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java @@ -54,7 +54,7 @@ public class VisorFileBlockTask extends VisorOneNodeTask(new NoSuchFileException("File path not found: " + arg.path), null); - VisorFileBlock block = readBlock(new File(url.toURI()), arg.offset, arg.blockSz, arg.lastModified); + VisorFileBlock block = readBlock(new File(url.toURI()), arg.off, arg.blockSz, arg.lastModified); return new IgniteBiTuple<>(null, block); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java index b418fae..2258d4d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java @@ -65,9 +65,8 @@ public class VisorIgfs implements Serializable { /** * @param igfs Source IGFS. * @return Data transfer object for given IGFS. - * @throws IgniteCheckedException */ - public static VisorIgfs from(IgniteFs igfs) throws IgniteCheckedException { + public static VisorIgfs from(IgniteFs igfs) { assert igfs != null; return new VisorIgfs( diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java index 2f5158a..173c439 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java @@ -48,7 +48,7 @@ public class VisorIgfsProfiler { Collections.sort(entries, VisorIgfsProfilerEntry.ENTRY_TIMESTAMP_COMPARATOR); - long timestamp = 0; + long ts = 0; long size = 0; long bytesRead = 0; long readTime = 0; @@ -61,7 +61,7 @@ public class VisorIgfsProfiler { for (VisorIgfsProfilerEntry entry : entries) { // Take last timestamp. - timestamp = entry.timestamp(); + ts = entry.timestamp(); // Take last size. size = entry.size(); @@ -80,7 +80,7 @@ public class VisorIgfsProfiler { counters.aggregate(entry.counters()); } - return new VisorIgfsProfilerEntry(path, timestamp, mode, size, bytesRead, readTime, userReadTime, + return new VisorIgfsProfilerEntry(path, ts, mode, size, bytesRead, readTime, userReadTime, bytesWritten, writeTime, userWriteTime, counters); } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java index 5f6a580..c99fd19 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java @@ -34,7 +34,7 @@ public class VisorIgfsProfilerEntry implements Serializable { public static final Comparator ENTRY_TIMESTAMP_COMPARATOR = new Comparator() { @Override public int compare(VisorIgfsProfilerEntry a, VisorIgfsProfilerEntry b) { - return Long.compare(a.timestamp, b.timestamp); + return Long.compare(a.ts, b.ts); } }; @@ -42,7 +42,7 @@ public class VisorIgfsProfilerEntry implements Serializable { private final String path; /** Timestamp of last file operation. */ - private final long timestamp; + private final long ts; /** IGFS mode. */ private final IgfsMode mode; @@ -83,7 +83,7 @@ public class VisorIgfsProfilerEntry implements Serializable { /** Create data transfer object with given parameters. */ public VisorIgfsProfilerEntry( String path, - long timestamp, + long ts, IgfsMode mode, long size, long bytesRead, @@ -97,7 +97,7 @@ public class VisorIgfsProfilerEntry implements Serializable { assert counters != null; this.path = path; - this.timestamp = timestamp; + this.ts = ts; this.mode = mode; this.size = size; this.bytesRead = bytesRead; @@ -141,7 +141,7 @@ public class VisorIgfsProfilerEntry implements Serializable { * @return Timestamp of last file operation. */ public long timestamp() { - return timestamp; + return ts; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java index c0edfa3..5696768 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java @@ -127,17 +127,29 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask counters = new ArrayList<>(); + /** Collection of calculated counters. */ + private final ArrayList counters = new ArrayList<>(); + /** + * Calculate block size. + * + * @param fileSize File size in bytes. + * @return Block size. + */ private long calcBlockSize(long fileSize) { return Math.max(UNIFORMITY_DFLT_BLOCK_SIZE, fileSize / UNIFORMITY_BLOCKS); } @@ -113,12 +120,12 @@ public class VisorIgfsProfilerUniformityCounters implements Serializable { /** * Ensure counters capacity and initial state. * - * @param minCapacity Desired minimum capacity. + * @param minCap Desired minimum capacity. */ - private void capacity(int minCapacity) { - counters.ensureCapacity(minCapacity); + private void capacity(int minCap) { + counters.ensureCapacity(minCap); - while(counters.size() < minCapacity) + while(counters.size() < minCap) counters.add(0); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java index b6e901d..cfe50b3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java @@ -45,7 +45,7 @@ public class VisorIgfsSamplingStateTask extends VisorOneNodeTask arg, boolean debug) { + private VisorIgfsSamplingStateJob(IgniteBiTuple arg, boolean debug) { super(arg, debug); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java index ad2f179..02737f1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java @@ -46,10 +46,10 @@ public class VisorLogSearchResult implements Serializable { private final String[] lines; /** Line number in the file, 1 based. */ - private final int lineNumber; + private final int lineNum; /** Lines count in the file. */ - private final int lineCount; + private final int lineCnt; /** File content encoding. */ private final String encoding; @@ -62,8 +62,8 @@ public class VisorLogSearchResult implements Serializable { * @param fileSize File size. * @param lastModified Timestamp of last modification of the file. * @param lines Lines of text including found line and several lines before and after. - * @param lineNumber Line number in the file, 1 based. - * @param lineCount Lines count in the file. + * @param lineNum Line number in the file, 1 based. + * @param lineCnt Lines count in the file. * @param encoding File content encoding. */ public VisorLogSearchResult( @@ -72,8 +72,8 @@ public class VisorLogSearchResult implements Serializable { long fileSize, long lastModified, String[] lines, - int lineNumber, - int lineCount, + int lineNum, + int lineCnt, String encoding ) { this.nid = nid; @@ -81,8 +81,8 @@ public class VisorLogSearchResult implements Serializable { this.fileSize = fileSize; this.lastModified = lastModified; this.lines = lines; - this.lineNumber = lineNumber; - this.lineCount = lineCount; + this.lineNum = lineNum; + this.lineCnt = lineCnt; this.encoding = encoding; } @@ -125,14 +125,14 @@ public class VisorLogSearchResult implements Serializable { * @return Line number in the file, 1 based. */ public int lineNumber() { - return lineNumber; + return lineNum; } /** * @return Lines count in the file. */ public int lineCount() { - return lineCount; + return lineCnt; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java index 4cf7a2b..f058b90 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java @@ -62,6 +62,9 @@ public class VisorNopTask implements ComputeTask { /** */ private static final long serialVersionUID = 0L; + /** + * @param arg Job argument. + */ private VisorNopJob(@Nullable Object arg) { super(arg); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java new file mode 100644 index 0000000..79ce903 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java @@ -0,0 +1,104 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.visor.node; + +import org.apache.ignite.cache.*; +import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.util.typedef.internal.*; + +import java.io.*; + +/** + * Data transfer object for configuration of atomic data structures. + */ +public class VisorAtomicConfiguration implements Serializable { + /** */ + private static final long serialVersionUID = 0L; + + /** Atomic sequence reservation size. */ + private int seqReserveSize; + + /** Cache mode. */ + private CacheMode cacheMode; + + /** Number of backups. */ + private int backups; + + /** + * Create data transfer object for atomic configuration. + * + * @param src Atomic configuration. + * @return Data transfer object. + */ + public static VisorAtomicConfiguration from(AtomicConfiguration src) { + VisorAtomicConfiguration cfg = new VisorAtomicConfiguration(); + + cfg.atomicSequenceReserveSize(src.getAtomicSequenceReserveSize()); + cfg.cacheMode(src.getCacheMode()); + cfg.backups(src.getBackups()); + + return cfg; + } + + /** + * @return Atomic sequence reservation size. + */ + public int atomicSequenceReserveSize() { + return seqReserveSize; + } + + /** + * @param seqReserveSize Atomic sequence reservation size. + */ + public void atomicSequenceReserveSize(int seqReserveSize) { + this.seqReserveSize = seqReserveSize; + } + + /** + * @return Cache mode. + */ + public CacheMode cacheMode() { + return cacheMode; + } + + /** + * @param cacheMode Cache mode. + */ + public void cacheMode(CacheMode cacheMode) { + this.cacheMode = cacheMode; + } + + /** + * @return Number of backup nodes. + */ + public int backups() { + return backups; + } + + /** + * @param backups Number of backup nodes. + */ + public void backups(int backups) { + this.backups = backups; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(VisorAtomicConfiguration.class, this); + } +} diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java index d69c1c5..6b9df54 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java @@ -100,22 +100,22 @@ public class VisorBasicConfiguration implements Serializable { private String securityCred; /** - * @param g Grid. + * @param ignite Grid. * @param c Grid configuration. * @return Data transfer object for node basic configuration properties. */ - public static VisorBasicConfiguration from(IgniteEx g, IgniteConfiguration c) { + public static VisorBasicConfiguration from(IgniteEx ignite, IgniteConfiguration c) { VisorBasicConfiguration cfg = new VisorBasicConfiguration(); cfg.gridName(c.getGridName()); cfg.ggHome(getProperty(IGNITE_HOME, c.getIgniteHome())); cfg.localHost(getProperty(IGNITE_LOCAL_HOST, c.getLocalHost())); - cfg.nodeId(g.localNode().id()); + cfg.nodeId(ignite.localNode().id()); cfg.marshaller(compactClass(c.getMarshaller())); cfg.deploymentMode(compactObject(c.getDeploymentMode())); cfg.daemon(boolValue(IGNITE_DAEMON, c.isDaemon())); - cfg.jmxRemote(g.isJmxRemoteEnabled()); - cfg.restart(g.isRestartEnabled()); + cfg.jmxRemote(ignite.isJmxRemoteEnabled()); + cfg.restart(ignite.isRestartEnabled()); cfg.networkTimeout(c.getNetworkTimeout()); cfg.logger(compactClass(c.getGridLogger())); cfg.discoStartupDelay(c.getDiscoveryStartupDelay()); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java index 6f987c9..437a3bb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java @@ -30,11 +30,17 @@ public class VisorExecutorServiceConfiguration implements Serializable { private static final long serialVersionUID = 0L; /** Public pool size. */ - private int execPoolSz; + private int pubPoolSize; /** System pool size. */ private int sysPoolSz; + /** Management pool size. */ + private int mgmtPoolSize; + + /** IGFS pool size. */ + private int igfsPoolSize; + /** Peer-to-peer pool size. */ private int p2pPoolSz; @@ -48,16 +54,15 @@ public class VisorExecutorServiceConfiguration implements Serializable { public static VisorExecutorServiceConfiguration from(IgniteConfiguration c) { VisorExecutorServiceConfiguration cfg = new VisorExecutorServiceConfiguration(); - cfg.executeService(c.getPublicThreadPoolSize()); - - cfg.systemExecutorService(c.getSystemThreadPoolSize()); - - cfg.p2pExecutorService(c.getPeerClassLoadingThreadPoolSize()); + cfg.publicThreadPoolSize(c.getPublicThreadPoolSize()); + cfg.systemThreadPoolSize(c.getSystemThreadPoolSize()); + cfg.managementThreadPoolSize(c.getManagementThreadPoolSize()); + cfg.peerClassLoadingThreadPoolSize(c.getPeerClassLoadingThreadPoolSize()); ConnectorConfiguration cc = c.getConnectorConfiguration(); if (cc != null) - cfg.restExecutorService(cc.getThreadPoolSize()); + cfg.restThreadPoolSize(cc.getThreadPoolSize()); return cfg; } @@ -65,59 +70,88 @@ public class VisorExecutorServiceConfiguration implements Serializable { /** * @return Public pool size. */ - public int executeService() { - return execPoolSz; + public int publicThreadPoolSize() { + return pubPoolSize; } /** - * @param execPoolSz Public pool size. + * @param pubPoolSize Public pool size. */ - public void executeService(int execPoolSz) { - this.execPoolSz = execPoolSz; + public void publicThreadPoolSize(int pubPoolSize) { + this.pubPoolSize = pubPoolSize; } /** * @return System pool size. */ - public int systemExecutorService() { + public int systemThreadPoolSize() { return sysPoolSz; } /** - * @param sysExecSvc System pool size. + * @param sysPoolSz System pool size. */ - public void systemExecutorService(int sysExecSvc) { - this.sysPoolSz = sysExecSvc; + public void systemThreadPoolSize(int sysPoolSz) { + this.sysPoolSz = sysPoolSz; } /** - * @return Peer-to-peer pool size. + * @return Management pool size. */ - public int p2pExecutorService() { - return p2pPoolSz; + public int managementThreadPoolSize() { + return mgmtPoolSize; } /** - * @param p2pExecSvc New peer-to-peer pool size. + * @param mgmtPoolSize New Management pool size. */ - public void p2pExecutorService(int p2pExecSvc) { - this.p2pPoolSz = p2pExecSvc; + public void managementThreadPoolSize(int mgmtPoolSize) { + this.mgmtPoolSize = mgmtPoolSize; } /** - * @param restPoolSz REST requests pool size. + * @return IGFS pool size. */ - public void restExecutorService(int restPoolSz) { - this.restPoolSz = restPoolSz; + public int igfsThreadPoolSize() { + return igfsPoolSize; + } + + /** + * @param igfsPoolSize New iGFS pool size. + */ + public void igfsThreadPoolSize(int igfsPoolSize) { + this.igfsPoolSize = igfsPoolSize; + } + + /** + * @return Peer-to-peer pool size. + */ + public int peerClassLoadingThreadPoolSize() { + return p2pPoolSz; + } + + /** + * @param p2pPoolSz New peer-to-peer pool size. + */ + public void peerClassLoadingThreadPoolSize(int p2pPoolSz) { + this.p2pPoolSz = p2pPoolSz; } /** * @return REST requests pool size. */ - public int restExecutorService() { + public int restThreadPoolSize() { return restPoolSz; } + /** + * @param restPoolSz REST requests pool size. + */ + public void restThreadPoolSize(int restPoolSz) { + this.restPoolSz = restPoolSz; + } + + /** {@inheritDoc} */ @Override public String toString() { return S.toString(VisorExecutorServiceConfiguration.class, this); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java index ac53798..09fa368 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java @@ -66,6 +66,7 @@ public class VisorGridConfiguration implements Serializable { /** Include events types. */ private int[] inclEvtTypes; + /** REST configuration. */ private VisorRestConfiguration rest; /** User attributes. */ @@ -86,6 +87,12 @@ public class VisorGridConfiguration implements Serializable { /** System properties. */ private Properties sysProps; + /** Configuration of atomic data structures. */ + private VisorAtomicConfiguration atomic; + + /** Transactions configuration. */ + private VisorTransactionConfiguration txCfg; + /** * @param ignite Grid. * @return Fill data transfer object with node configuration data. @@ -112,6 +119,8 @@ public class VisorGridConfiguration implements Serializable { streamers(VisorStreamerConfiguration.list(c.getStreamerConfiguration())); env(new HashMap<>(getenv())); systemProperties(getProperties()); + atomic(VisorAtomicConfiguration.from(c.getAtomicConfiguration())); + transaction(VisorTransactionConfiguration.from(c.getTransactionConfiguration())); return this; } @@ -354,6 +363,34 @@ public class VisorGridConfiguration implements Serializable { this.sysProps = sysProps; } + /** + * @return Configuration of atomic data structures. + */ + public VisorAtomicConfiguration atomic() { + return atomic; + } + + /** + * @param atomic New configuration of atomic data structures. + */ + public void atomic(VisorAtomicConfiguration atomic) { + this.atomic = atomic; + } + + /** + * @return Transactions configuration. + */ + public VisorTransactionConfiguration transaction() { + return txCfg; + } + + /** + * @param txCfg New transactions configuration. + */ + public void transaction(VisorTransactionConfiguration txCfg) { + this.txCfg = txCfg; + } + /** {@inheritDoc} */ @Override public String toString() { return S.toString(VisorGridConfiguration.class, this); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java index bb0927d..287de27 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java @@ -56,37 +56,37 @@ public class VisorIgfsConfiguration implements Serializable { private int prefetchBlocks; /** Read/write buffer size for IGFS stream operations in bytes. */ - private int streamBufferSize; + private int streamBufSize; /** Number of file blocks buffered on local node before sending batch to remote node. */ private int perNodeBatchSize; /** Number of batches that can be concurrently sent to remote node. */ - private int perNodeParallelBatchCount; + private int perNodeParallelBatchCnt; /** URI of the secondary Hadoop file system. */ - private String secondaryHadoopFileSystemUri; + private String secondaryHadoopFileSysUri; /** Path for the secondary hadoop file system config. */ - private String secondaryHadoopFileSystemConfigPath; + private String secondaryHadoopFileSysCfgPath; /** IGFS instance mode. */ - private IgfsMode defaultMode; + private IgfsMode dfltMode; /** Map of paths to IGFS modes. */ private Map pathModes; /** Dual mode PUT operations executor service. */ - private String dualModePutExecutorService; + private String dualModePutExecutorSrvc; /** Dual mode PUT operations executor service shutdown flag. */ - private boolean dualModePutExecutorServiceShutdown; + private boolean dualModePutExecutorSrvcShutdown; /** Maximum amount of data in pending puts. */ private long dualModeMaxPendingPutsSize; /** Maximum range length. */ - private long maxTaskRangeLength; + private long maxTaskRangeLen; /** Fragmentizer concurrent files. */ private int fragmentizerConcurrentFiles; @@ -262,14 +262,14 @@ public class VisorIgfsConfiguration implements Serializable { * @return Read/write buffer size for IGFS stream operations in bytes. */ public int streamBufferSize() { - return streamBufferSize; + return streamBufSize; } /** * @param streamBufSize New read/write buffer size for IGFS stream operations in bytes. */ public void streamBufferSize(int streamBufSize) { - streamBufferSize = streamBufSize; + this.streamBufSize = streamBufSize; } /** @@ -290,56 +290,56 @@ public class VisorIgfsConfiguration implements Serializable { * @return Number of batches that can be concurrently sent to remote node. */ public int perNodeParallelBatchCount() { - return perNodeParallelBatchCount; + return perNodeParallelBatchCnt; } /** * @param perNodeParallelBatchCnt New number of batches that can be concurrently sent to remote node. */ public void perNodeParallelBatchCount(int perNodeParallelBatchCnt) { - perNodeParallelBatchCount = perNodeParallelBatchCnt; + this.perNodeParallelBatchCnt = perNodeParallelBatchCnt; } /** * @return URI of the secondary Hadoop file system. */ @Nullable public String secondaryHadoopFileSystemUri() { - return secondaryHadoopFileSystemUri; + return secondaryHadoopFileSysUri; } /** * @param secondaryHadoopFileSysUri New URI of the secondary Hadoop file system. */ public void secondaryHadoopFileSystemUri(@Nullable String secondaryHadoopFileSysUri) { - secondaryHadoopFileSystemUri = secondaryHadoopFileSysUri; + this.secondaryHadoopFileSysUri = secondaryHadoopFileSysUri; } /** * @return Path for the secondary hadoop file system config. */ @Nullable public String secondaryHadoopFileSystemConfigPath() { - return secondaryHadoopFileSystemConfigPath; + return secondaryHadoopFileSysCfgPath; } /** * @param secondaryHadoopFileSysCfgPath New path for the secondary hadoop file system config. */ public void secondaryHadoopFileSystemConfigPath(@Nullable String secondaryHadoopFileSysCfgPath) { - secondaryHadoopFileSystemConfigPath = secondaryHadoopFileSysCfgPath; + this.secondaryHadoopFileSysCfgPath = secondaryHadoopFileSysCfgPath; } /** * @return IGFS instance mode. */ public IgfsMode defaultMode() { - return defaultMode; + return dfltMode; } /** * @param dfltMode New IGFS instance mode. */ public void defaultMode(IgfsMode dfltMode) { - defaultMode = dfltMode; + this.dfltMode = dfltMode; } /** @@ -360,28 +360,28 @@ public class VisorIgfsConfiguration implements Serializable { * @return Dual mode PUT operations executor service. */ public String dualModePutExecutorService() { - return dualModePutExecutorService; + return dualModePutExecutorSrvc; } /** * @param dualModePutExecutorSrvc New dual mode PUT operations executor service. */ public void dualModePutExecutorService(String dualModePutExecutorSrvc) { - dualModePutExecutorService = dualModePutExecutorSrvc; + this.dualModePutExecutorSrvc = dualModePutExecutorSrvc; } /** * @return Dual mode PUT operations executor service shutdown flag. */ public boolean dualModePutExecutorServiceShutdown() { - return dualModePutExecutorServiceShutdown; + return dualModePutExecutorSrvcShutdown; } /** * @param dualModePutExecutorSrvcShutdown New dual mode PUT operations executor service shutdown flag. */ public void dualModePutExecutorServiceShutdown(boolean dualModePutExecutorSrvcShutdown) { - dualModePutExecutorServiceShutdown = dualModePutExecutorSrvcShutdown; + this.dualModePutExecutorSrvcShutdown = dualModePutExecutorSrvcShutdown; } /** @@ -402,14 +402,14 @@ public class VisorIgfsConfiguration implements Serializable { * @return Maximum range length. */ public long maxTaskRangeLength() { - return maxTaskRangeLength; + return maxTaskRangeLen; } /** * @param maxTaskRangeLen New maximum range length. */ public void maxTaskRangeLength(long maxTaskRangeLen) { - maxTaskRangeLength = maxTaskRangeLen; + this.maxTaskRangeLen = maxTaskRangeLen; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java index eec959c..51dc092 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java @@ -32,7 +32,7 @@ public class VisorMetricsConfiguration implements Serializable { private long expTime; /** Number of node metrics stored in memory. */ - private int historySize; + private int histSize; /** Frequency of metrics log printout. */ private long logFreq; @@ -69,14 +69,14 @@ public class VisorMetricsConfiguration implements Serializable { * @return Number of node metrics stored in memory. */ public int historySize() { - return historySize; + return histSize; } /** - * @param historySize New number of node metrics stored in memory. + * @param histSize New number of node metrics stored in memory. */ - public void historySize(int historySize) { - this.historySize = historySize; + public void historySize(int histSize) { + this.histSize = histSize; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJobResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJobResult.java index 7d4d665..ea8a8fc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJobResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJobResult.java @@ -36,16 +36,16 @@ public class VisorNodeDataCollectorJobResult implements Serializable { private String gridName; /** Node topology version. */ - private long topologyVersion; + private long topVer; /** Task monitoring state collected from node. */ private boolean taskMonitoringEnabled; /** Node events. */ - private final Collection events = new ArrayList<>(); + private final Collection evts = new ArrayList<>(); /** Exception while collecting node events. */ - private Throwable eventsEx; + private Throwable evtsEx; /** Node caches. */ private final Collection caches = new ArrayList<>(); @@ -86,72 +86,117 @@ public class VisorNodeDataCollectorJobResult implements Serializable { * @return Current topology version. */ public long topologyVersion() { - return topologyVersion; + return topVer; } /** - * @param topologyVersion New topology version value. + * @param topVer New topology version value. */ - public void topologyVersion(long topologyVersion) { - this.topologyVersion = topologyVersion; + public void topologyVersion(long topVer) { + this.topVer = topVer; } + /** + * @return Current task monitoring state. + */ public boolean taskMonitoringEnabled() { return taskMonitoringEnabled; } + /** + * @param taskMonitoringEnabled New value of task monitoring state. + */ public void taskMonitoringEnabled(boolean taskMonitoringEnabled) { this.taskMonitoringEnabled = taskMonitoringEnabled; } + /** + * @return Collection of collected events. + */ public Collection events() { - return events; + return evts; } + /** + * @return Exception caught during collecting events. + */ public Throwable eventsEx() { - return eventsEx; + return evtsEx; } - public void eventsEx(Throwable eventsEx) { - this.eventsEx = eventsEx; + /** + * @param evtsEx Exception caught during collecting events. + */ + public void eventsEx(Throwable evtsEx) { + this.evtsEx = evtsEx; } + /** + * @return Collected cache metrics. + */ public Collection caches() { return caches; } + /** + * @return Exception caught during collecting caches metrics. + */ public Throwable cachesEx() { return cachesEx; } + /** + * @param cachesEx Exception caught during collecting caches metrics. + */ public void cachesEx(Throwable cachesEx) { this.cachesEx = cachesEx; } + /** + * @return Collected IGFSs metrics. + */ public Collection igfss() { return igfss; } + /** + * @return Collected IGFSs endpoints. + */ public Collection igfsEndpoints() { return igfsEndpoints; } + /** + * @return Exception caught during collecting IGFSs metrics. + */ public Throwable igfssEx() { return igfssEx; } + /** + * @param igfssEx Exception caught during collecting IGFSs metrics. + */ public void igfssEx(Throwable igfssEx) { this.igfssEx = igfssEx; } + /** + * @return Collection of streamers metrics. + */ public Collection streamers() { return streamers; } + /** + * @return Exception caught during collecting streamers metrics. + */ public Throwable streamersEx() { return streamersEx; } + /** + * @param streamersEx Exception caught during collecting streamers metrics. + */ public void streamersEx(Throwable streamersEx) { this.streamersEx = streamersEx; } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java index bcc2874..72ab6dd 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java @@ -53,7 +53,7 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask results) { for (ComputeJobResult res : results) { - VisorNodeDataCollectorJobResult jobResult = res.getData(); + VisorNodeDataCollectorJobResult jobRes = res.getData(); - if (jobResult != null) { + if (jobRes != null) { UUID nid = res.getNode().id(); IgniteException unhandledEx = res.getException(); if (unhandledEx == null) - reduceJobResult(taskResult, jobResult, nid); + reduceJobResult(taskRes, jobRes, nid); else { // Ignore nodes that left topology. if (!(unhandledEx instanceof ClusterGroupEmptyException)) - taskResult.unhandledEx().put(nid, unhandledEx); + taskRes.unhandledEx().put(nid, unhandledEx); } } } - return taskResult; + return taskRes; } - protected void reduceJobResult(VisorNodeDataCollectorTaskResult taskResult, - VisorNodeDataCollectorJobResult jobResult, UUID nid) { - taskResult.gridNames().put(nid, jobResult.gridName()); + /** + * Reduce job result. + * + * @param taskRes Task result. + * @param jobRes Job result. + * @param nid Node ID. + */ + protected void reduceJobResult(VisorNodeDataCollectorTaskResult taskRes, + VisorNodeDataCollectorJobResult jobRes, UUID nid) { + taskRes.gridNames().put(nid, jobRes.gridName()); - taskResult.topologyVersions().put(nid, jobResult.topologyVersion()); + taskRes.topologyVersions().put(nid, jobRes.topologyVersion()); - taskResult.taskMonitoringEnabled().put(nid, jobResult.taskMonitoringEnabled()); + taskRes.taskMonitoringEnabled().put(nid, jobRes.taskMonitoringEnabled()); - if (!jobResult.events().isEmpty()) - taskResult.events().addAll(jobResult.events()); + if (!jobRes.events().isEmpty()) + taskRes.events().addAll(jobRes.events()); - if (jobResult.eventsEx() != null) - taskResult.eventsEx().put(nid, jobResult.eventsEx()); + if (jobRes.eventsEx() != null) + taskRes.eventsEx().put(nid, jobRes.eventsEx()); - if (!jobResult.caches().isEmpty()) - taskResult.caches().put(nid, jobResult.caches()); + if (!jobRes.caches().isEmpty()) + taskRes.caches().put(nid, jobRes.caches()); - if (jobResult.cachesEx() != null) - taskResult.cachesEx().put(nid, jobResult.cachesEx()); + if (jobRes.cachesEx() != null) + taskRes.cachesEx().put(nid, jobRes.cachesEx()); - if (!jobResult.streamers().isEmpty()) - taskResult.streamers().put(nid, jobResult.streamers()); + if (!jobRes.streamers().isEmpty()) + taskRes.streamers().put(nid, jobRes.streamers()); - if (jobResult.streamersEx() != null) - taskResult.streamersEx().put(nid, jobResult.streamersEx()); + if (jobRes.streamersEx() != null) + taskRes.streamersEx().put(nid, jobRes.streamersEx()); - if (!jobResult.igfss().isEmpty()) - taskResult.igfss().put(nid, jobResult.igfss()); + if (!jobRes.igfss().isEmpty()) + taskRes.igfss().put(nid, jobRes.igfss()); - if (!jobResult.igfsEndpoints().isEmpty()) - taskResult.igfsEndpoints().put(nid, jobResult.igfsEndpoints()); + if (!jobRes.igfsEndpoints().isEmpty()) + taskRes.igfsEndpoints().put(nid, jobRes.igfsEndpoints()); - if (jobResult.igfssEx() != null) - taskResult.igfssEx().put(nid, jobResult.igfssEx()); + if (jobRes.igfssEx() != null) + taskRes.igfssEx().put(nid, jobRes.igfssEx()); } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskArg.java index f7e1eb9..7be546d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskArg.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskArg.java @@ -39,8 +39,11 @@ public class VisorNodeDataCollectorTaskArg implements Serializable { private int sample; /** If {@code true} then collect information about system caches. */ - private boolean systemCaches; + private boolean sysCaches; + /** + * Default constructor. + */ public VisorNodeDataCollectorTaskArg() { // No-op. } @@ -52,20 +55,20 @@ public class VisorNodeDataCollectorTaskArg implements Serializable { * @param evtOrderKey Event order key, unique for Visor instance. * @param evtThrottleCntrKey Event throttle counter key, unique for Visor instance. * @param sample How many entries use in sampling. - * @param systemCaches If {@code true} then collect information about system caches. + * @param sysCaches If {@code true} then collect information about system caches. */ public VisorNodeDataCollectorTaskArg( boolean taskMonitoringEnabled, String evtOrderKey, String evtThrottleCntrKey, int sample, - boolean systemCaches + boolean sysCaches ) { this.taskMonitoringEnabled = taskMonitoringEnabled; this.evtOrderKey = evtOrderKey; this.evtThrottleCntrKey = evtThrottleCntrKey; this.sample = sample; - this.systemCaches = systemCaches; + this.sysCaches = sysCaches; } /** @@ -128,13 +131,13 @@ public class VisorNodeDataCollectorTaskArg implements Serializable { * @return {@code true} if Visor should collect metrics for system caches. */ public boolean systemCaches() { - return systemCaches; + return sysCaches; } /** - * @param systemCaches {@code true} if Visor should collect metrics for system caches. + * @param sysCaches {@code true} if Visor should collect metrics for system caches. */ - public void systemCaches(boolean systemCaches) { - this.systemCaches = systemCaches; + public void systemCaches(boolean sysCaches) { + this.sysCaches = sysCaches; } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java index 0b3a95c..f9f5214 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java @@ -39,16 +39,16 @@ public class VisorNodeDataCollectorTaskResult implements Serializable { private final Map gridNames = new HashMap<>(); /** Nodes topology versions. */ - private final Map topologyVersions = new HashMap<>(); + private final Map topVersions = new HashMap<>(); /** All task monitoring state collected from nodes. */ private final Map taskMonitoringEnabled = new HashMap<>(); /** All events collected from nodes. */ - private final List events = new ArrayList<>(); + private final List evts = new ArrayList<>(); /** Exceptions caught during collecting events from nodes. */ - private final Map eventsEx = new HashMap<>(); + private final Map evtsEx = new HashMap<>(); /** All caches collected from nodes. */ private final Map> caches = new HashMap<>(); @@ -77,11 +77,11 @@ public class VisorNodeDataCollectorTaskResult implements Serializable { public boolean isEmpty() { return gridNames.isEmpty() && - topologyVersions.isEmpty() && + topVersions.isEmpty() && unhandledEx.isEmpty() && taskMonitoringEnabled.isEmpty() && - events.isEmpty() && - eventsEx.isEmpty() && + evts.isEmpty() && + evtsEx.isEmpty() && caches.isEmpty() && cachesEx.isEmpty() && igfss.isEmpty() && @@ -109,7 +109,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable { * @return Nodes topology versions. */ public Map topologyVersions() { - return topologyVersions; + return topVersions; } /** @@ -123,14 +123,14 @@ public class VisorNodeDataCollectorTaskResult implements Serializable { * @return All events collected from nodes. */ public List events() { - return events; + return evts; } /** * @return Exceptions caught during collecting events from nodes. */ public Map eventsEx() { - return eventsEx; + return evtsEx; } /** diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java index 0d25312..41090b7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java @@ -25,7 +25,6 @@ import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.internal.visor.*; import org.apache.ignite.internal.visor.event.*; -import org.apache.ignite.internal.visor.util.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; @@ -33,6 +32,7 @@ import java.io.*; import java.util.*; import static org.apache.ignite.events.EventType.*; +import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*; /** * Task that runs on specified node and returns events data. @@ -50,14 +50,14 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask reduce0(List results) { - Collection allEvents = new ArrayList<>(); + Collection allEvts = new ArrayList<>(); for (ComputeJobResult r : results) { if (r.getException() == null) - allEvents.addAll((Collection) r.getData()); + allEvts.addAll((Collection) r.getData()); } - return allEvents.isEmpty() ? Collections.emptyList() : allEvents; + return allEvts.isEmpty() ? Collections.emptyList() : allEvts; } /** @@ -81,23 +81,23 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask> collectSpiInfo(IgniteSpi spi) { Class spiCls = spi.getClass(); @@ -127,6 +127,10 @@ public class VisorSpisConfiguration implements Serializable { return new IgniteBiTuple>(spi.getName(), res); } + /** + * @param spis Array of spi to process. + * @return Tuple where first component is SPI name and map with properties as second. + */ private static IgniteBiTuple>[] collectSpiInfo(IgniteSpi[] spis) { IgniteBiTuple[] res = new IgniteBiTuple[spis.length]; @@ -321,7 +325,8 @@ public class VisorSpisConfiguration implements Serializable { /** * @param indexingSpis New indexing SPIs. */ - public void indexingSpis(IgniteBiTuple>... indexingSpis) { + @SafeVarargs + public final void indexingSpis(IgniteBiTuple>... indexingSpis) { this.indexingSpis = indexingSpis; } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java new file mode 100644 index 0000000..9f2c74a --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java @@ -0,0 +1,153 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.visor.node; + +import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.util.typedef.internal.*; +import org.apache.ignite.transactions.*; + +/** + * Data transfer object for transaction configuration. + */ +public class VisorTransactionConfiguration { + /** Default cache concurrency. */ + private IgniteTxConcurrency dfltConcurrency; + + /** Default transaction isolation. */ + private IgniteTxIsolation dfltIsolation; + + /** Default transaction timeout. */ + private long dfltTxTimeout; + + /** Pessimistic tx log linger. */ + private int pessimisticTxLogLinger; + + /** Pessimistic tx log size. */ + private int pessimisticTxLogSize; + + /** Default transaction serializable flag. */ + private boolean txSerEnabled; + + /** + * Create data transfer object for transaction configuration. + * + * @param src Transaction configuration. + * @return Data transfer object. + */ + public static VisorTransactionConfiguration from(TransactionConfiguration src) { + VisorTransactionConfiguration cfg = new VisorTransactionConfiguration(); + + cfg.defaultTxConcurrency(src.getDefaultTxConcurrency()); + cfg.defaultTxIsolation(src.getDefaultTxIsolation()); + cfg.defaultTxTimeout(src.getDefaultTxTimeout()); + cfg.pessimisticTxLogLinger(src.getPessimisticTxLogLinger()); + cfg.pessimisticTxLogSize(src.getPessimisticTxLogSize()); + cfg.txSerializableEnabled(src.isTxSerializableEnabled()); + + return cfg; + } + + /** + * @return Default cache transaction concurrency. + */ + public IgniteTxConcurrency defaultTxConcurrency() { + return dfltConcurrency; + } + + /** + * @param dfltConcurrency Default cache transaction concurrency. + */ + public void defaultTxConcurrency(IgniteTxConcurrency dfltConcurrency) { + this.dfltConcurrency = dfltConcurrency; + } + + /** + * @return Default cache transaction isolation. + */ + public IgniteTxIsolation defaultTxIsolation() { + return dfltIsolation; + } + + /** + * @param dfltIsolation Default cache transaction isolation. + */ + public void defaultTxIsolation(IgniteTxIsolation dfltIsolation) { + this.dfltIsolation = dfltIsolation; + } + + /** + * @return Default transaction timeout. + */ + public long defaultTxTimeout() { + return dfltTxTimeout; + } + + /** + * @param dfltTxTimeout Default transaction timeout. + */ + public void defaultTxTimeout(long dfltTxTimeout) { + this.dfltTxTimeout = dfltTxTimeout; + } + + /** + * @return Pessimistic log cleanup delay in milliseconds. + */ + public int pessimisticTxLogLinger() { + return pessimisticTxLogLinger; + } + + /** + * @param pessimisticTxLogLinger Pessimistic log cleanup delay. + */ + public void pessimisticTxLogLinger(int pessimisticTxLogLinger) { + this.pessimisticTxLogLinger = pessimisticTxLogLinger; + } + + /** + * @return Pessimistic transaction log size. + */ + public int getPessimisticTxLogSize() { + return pessimisticTxLogSize; + } + + /** + * @param pessimisticTxLogSize Pessimistic transactions log size. + */ + public void pessimisticTxLogSize(int pessimisticTxLogSize) { + this.pessimisticTxLogSize = pessimisticTxLogSize; + } + + /** + * @return {@code True} if serializable transactions are enabled, {@code false} otherwise. + */ + public boolean txSerializableEnabled() { + return txSerEnabled; + } + + /** + * @param txSerEnabled Flag to enable/disable serializable cache transactions. + */ + public void txSerializableEnabled(boolean txSerEnabled) { + this.txSerEnabled = txSerEnabled; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(VisorTransactionConfiguration.class, this); + } +} diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java index 5cf9c1b..060af20 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java @@ -57,7 +57,7 @@ public class VisorQueryCleanupTask extends VisorMultiNodeTask mimeTypes = U.newHashMap(810); static { @@ -840,6 +840,10 @@ public class VisorMimeTypes { mimeTypes.put("dssc", "application/dssc+der"); } + /** + * @param f File to detect content type. + * @return Content type. + */ @Nullable public static String getContentType(File f) { try (FileInputStream is = new FileInputStream(f)) { byte[] data = new byte[Math.min((int)f.length(), PREVIEW_SIZE)]; @@ -853,25 +857,30 @@ public class VisorMimeTypes { } } + /** + * @param data Bytes to detect content type. + * @param name File name to detect content type by file name. + * @return Content type. + */ @Nullable public static String getContentType(byte[] data, String name) { if (data == null) return null; - byte[] header = new byte[PREVIEW_SIZE]; + byte[] hdr = new byte[PREVIEW_SIZE]; - System.arraycopy(data, 0, header, 0, Math.min(data.length, header.length)); + System.arraycopy(data, 0, hdr, 0, Math.min(data.length, hdr.length)); - int c1 = header[0] & 0xff; - int c2 = header[1] & 0xff; - int c3 = header[2] & 0xff; - int c4 = header[3] & 0xff; - int c5 = header[4] & 0xff; - int c6 = header[5] & 0xff; - int c7 = header[6] & 0xff; - int c8 = header[7] & 0xff; - int c9 = header[8] & 0xff; - int c10 = header[9] & 0xff; - int c11 = header[10] & 0xff; + int c1 = hdr[0] & 0xff; + int c2 = hdr[1] & 0xff; + int c3 = hdr[2] & 0xff; + int c4 = hdr[3] & 0xff; + int c5 = hdr[4] & 0xff; + int c6 = hdr[5] & 0xff; + int c7 = hdr[6] & 0xff; + int c8 = hdr[7] & 0xff; + int c9 = hdr[8] & 0xff; + int c10 = hdr[9] & 0xff; + int c11 = hdr[10] & 0xff; if (c1 == 0xCA && c2 == 0xFE && c3 == 0xBA && c4 == 0xBE) return "application/java-vm"; @@ -879,8 +888,10 @@ public class VisorMimeTypes { if (c1 == 0xD0 && c2 == 0xCF && c3 == 0x11 && c4 == 0xE0 && c5 == 0xA1 && c6 == 0xB1 && c7 == 0x1A && c8 == 0xE1) { // if the name is set then check if it can be validated by name, because it could be a xls or powerpoint String contentType = guessContentTypeFromName(name); + if (contentType != null) return contentType; + return "application/msword"; } if (c1 == 0x25 && c2 == 0x50 && c3 == 0x44 && c4 == 0x46 && c5 == 0x2d && c6 == 0x31 && c7 == 0x2e) @@ -987,14 +998,18 @@ public class VisorMimeTypes { return guessContentTypeFromName(name); } + /** + * @param name File name to detect content type by file name. + * @return Content type. + */ @Nullable public static String guessContentTypeFromName(String name) { if (name == null) return null; - int lastIndex = name.lastIndexOf('.'); + int lastIdx = name.lastIndexOf('.'); - if (lastIndex != -1) { - String extention = name.substring(lastIndex + 1).toLowerCase(); + if (lastIdx != -1) { + String extention = name.substring(lastIdx + 1).toLowerCase(); return mimeTypes.get(extention); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java index 4f54e50..728b569 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java @@ -94,6 +94,7 @@ public class VisorTaskUtils { /** Maximum folder depth. I.e. if depth is 4 we look in starting folder and 3 levels of sub-folders. */ public static final int MAX_FOLDER_DEPTH = 4; + /** Comparator for log files by last modified date. */ private static final Comparator LAST_MODIFIED = new Comparator() { @Override public int compare(VisorLogFile f1, VisorLogFile f2) { return Long.compare(f2.lastModified(), f1.lastModified()); @@ -135,12 +136,12 @@ public class VisorTaskUtils { assert arrays != null; assert arrays.length > 1; - int length = 0; + int len = 0; for (int[] a : arrays) - length += a.length; + len += a.length; - int[] r = Arrays.copyOf(arrays[0], length); + int[] r = Arrays.copyOf(arrays[0], len); for (int i = 1, shift = 0; i < arrays.length; i++) { shift += arrays[i - 1].length; @@ -173,9 +174,8 @@ public class VisorTaskUtils { int i = 0; - for (Object elm : col) { + for (Object elm : col) res[i++] = compactObject(elm); - } return res; } @@ -446,6 +446,11 @@ public class VisorTaskUtils { return F.asList(new VisorLogFile(file)); } + /** + * @param fld Folder with files to match. + * @param ptrn Pattern to match against file name. + * @return Collection of matched files. + */ public static List matchedFiles(File fld, final String ptrn) { List files = fileTree(fld, MAX_FOLDER_DEPTH, new FileFilter() { @@ -483,6 +488,13 @@ public class VisorTaskUtils { return false; } + /** + * Decode file charset. + * + * @param f File to process. + * @return File charset. + * @throws IOException + */ public static Charset decode(File f) throws IOException { SortedMap charsets = Charset.availableCharsets(); @@ -497,11 +509,11 @@ public class VisorTaskUtils { orderedCharsets.addAll(charsets.values()); try (RandomAccessFile raf = new RandomAccessFile(f, "r")) { - FileChannel channel = raf.getChannel(); + FileChannel ch = raf.getChannel(); ByteBuffer buf = ByteBuffer.allocate(4096); - channel.read(buf); + ch.read(buf); buf.flip(); @@ -597,18 +609,18 @@ public class VisorTaskUtils { /** * Extract max size from eviction policy if available. * - * @param policy Eviction policy. + * @param plc Eviction policy. * @return Extracted max size. */ - public static Integer evictionPolicyMaxSize(CacheEvictionPolicy policy) { - if (policy instanceof CacheLruEvictionPolicyMBean) - return ((CacheLruEvictionPolicyMBean)policy).getMaxSize(); + public static Integer evictionPolicyMaxSize(CacheEvictionPolicy plc) { + if (plc instanceof CacheLruEvictionPolicyMBean) + return ((CacheLruEvictionPolicyMBean)plc).getMaxSize(); - if (policy instanceof CacheRandomEvictionPolicyMBean) - return ((CacheRandomEvictionPolicyMBean)policy).getMaxSize(); + if (plc instanceof CacheRandomEvictionPolicyMBean) + return ((CacheRandomEvictionPolicyMBean)plc).getMaxSize(); - if (policy instanceof CacheFifoEvictionPolicyMBean) - return ((CacheFifoEvictionPolicyMBean)policy).getMaxSize(); + if (plc instanceof CacheFifoEvictionPolicyMBean) + return ((CacheFifoEvictionPolicyMBean)plc).getMaxSize(); return null; } @@ -736,11 +748,11 @@ public class VisorTaskUtils { String cmd = String.format("ping -%s 1 %s", U.isWindows() ? "n" : "c", addr.getHostAddress()); - Process myProcess = Runtime.getRuntime().exec(cmd); + Process myProc = Runtime.getRuntime().exec(cmd); - myProcess.waitFor(); + myProc.waitFor(); - return myProcess.exitValue() == 0; + return myProc.exitValue() == 0; } catch (IOException ignore) { return false; diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala index 1fd989b..775a696 100644 --- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala +++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala @@ -775,7 +775,6 @@ object VisorCacheCommand { val preloadCfg = cfg.preloadConfiguration() val evictCfg = cfg.evictConfiguration() val defaultCfg = cfg.defaultConfiguration() - val dgcCfg = cfg.dgcConfiguration() val storeCfg = cfg.storeConfiguration() val writeBehind = cfg.writeBehind() @@ -840,10 +839,6 @@ object VisorCacheCommand { cacheT += ("Indexing SPI Name", cfg.indexingSpiName()) cacheT += ("Cache Interceptor", cfg.interceptor()) - cacheT += ("DGC Frequency", dgcCfg.frequency()) - cacheT += ("DGC Remove Locks Flag", dgcCfg.removedLocks()) - cacheT += ("DGC Suspect Lock Timeout", dgcCfg.suspectLockTimeout()) - cacheT += ("Store Enabled", storeCfg.enabled()) cacheT += ("Store", storeCfg.store()) cacheT += ("Store Values In Bytes", storeCfg.valueBytes()) diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala index 463e41d..afa1023 100644 --- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala +++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala @@ -323,10 +323,12 @@ class VisorConfigurationCommand { val execCfg = cfg.executeService() - execSvcT += ("Executor service", safe(execCfg.executeService(), DFLT)) - execSvcT += ("System executor service", safe(execCfg.systemExecutorService(), DFLT)) - execSvcT += ("Peer-to-Peer executor service", safe(execCfg.p2pExecutorService(), DFLT)) - execSvcT += ("REST Executor Service", safe(execCfg.restExecutorService(), DFLT)) + execSvcT += ("Public thread pool size", safe(execCfg.publicThreadPoolSize(), DFLT)) + execSvcT += ("System thread pool size", safe(execCfg.systemThreadPoolSize(), DFLT)) + execSvcT += ("Management thread pool size", safe(execCfg.managementThreadPoolSize(), DFLT)) + execSvcT += ("IGFS thread pool size", safe(execCfg.igfsThreadPoolSize(), DFLT)) + execSvcT += ("Peer-to-Peer thread pool size", safe(execCfg.peerClassLoadingThreadPoolSize(), DFLT)) + execSvcT += ("REST thread pool size", safe(execCfg.restThreadPoolSize(), DFLT)) execSvcT.render() -- 1.8.5.2.msysgit.0