# IGNITE-245 Cleanup Visor code after server-side code changes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a018c87f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a018c87f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a018c87f Branch: refs/heads/ignite-226 Commit: a018c87fb3e16d801f4e507f07fac51d6b922974 Parents: 1651ccc Author: AKuznetsov <akuznet...@gridgain.com> Authored: Fri Feb 13 19:15:20 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Fri Feb 13 19:15:20 2015 +0700 ---------------------------------------------------------------------- .../visor/cache/VisorCacheConfiguration.java | 109 ++----------------- .../commands/cache/VisorCacheCommand.scala | 11 +- 2 files changed, 12 insertions(+), 108 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a018c87f/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java ---------------------------------------------------------------------- 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 6005d6b..afd34ff 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 @@ -51,7 +51,7 @@ public class VisorCacheConfiguration implements Serializable { private CacheAtomicityMode atomicityMode; /** Cache atomic sequence reserve size */ - private int atomicSequenceReserveSize; + private int atomicSeqReserveSize; /** Cache atomicity write ordering mode. */ private CacheAtomicWriteOrderMode atomicWriteOrderMode; @@ -69,10 +69,7 @@ public class VisorCacheConfiguration implements Serializable { private boolean swapEnabled; /** Flag indicating whether Ignite should attempt to index value and/or key instances stored in cache. */ - private boolean queryIndexEnabled; - - /** Flag indicating whether to persist once on commit, or after every operation. */ - private boolean batchUpdateOnCommit; + private boolean qryIdxEnabled; /** Invalidate. */ private boolean invalidate; @@ -80,30 +77,18 @@ public class VisorCacheConfiguration implements Serializable { /** Start size. */ private int startSize; - /** Cloner. */ - private String cloner; - /** Name of class implementing GridCacheTmLookup. */ private String tmLookupClsName; - /** Flag to enable/disable transaction serializable isolation level. */ - private boolean txSerializableEnabled; - /** Off-heap max memory. */ private long offHeapMaxMemory; /** Max query iterator count */ - private int maxQueryIteratorCnt; + private int maxQryIterCnt; /** Max concurrent async operations */ private int maxConcurrentAsyncOps; - /** Pessimistic tx logger size */ - private int pessimisticTxLogSize; - - /** Pessimistic tx logger linger. */ - private int pessimisticTxLogLinger; - /** Memory mode. */ private CacheMemoryMode memoryMode; @@ -149,8 +134,6 @@ public class VisorCacheConfiguration implements Serializable { * @return Data transfer object for cache configuration properties. */ public static VisorCacheConfiguration from(Ignite ignite, CacheConfiguration ccfg) { - // TODO gg-9141 Update Visor. - Collection<CacheTypeMetadata> cacheMetadata = ccfg.getTypeMetadata(); if (cacheMetadata == null) @@ -176,16 +159,12 @@ public class VisorCacheConfiguration implements Serializable { cfg.writeSynchronizationMode(ccfg.getWriteSynchronizationMode()); cfg.swapEnabled(ccfg.isSwapEnabled()); cfg.queryIndexEnabled(ccfg.isQueryIndexEnabled()); -// cfg.batchUpdateOnCommit(ccfg.isBatchUpdateOnCommit()); cfg.invalidate(ccfg.isInvalidate()); cfg.startSize(ccfg.getStartSize()); cfg.transactionManagerLookupClassName(ccfg.getTransactionManagerLookupClassName()); -// cfg.txSerializableEnabled(ccfg.isTxSerializableEnabled()); cfg.offsetHeapMaxMemory(ccfg.getOffHeapMaxMemory()); cfg.maxQueryIteratorCount(ccfg.getMaximumQueryIteratorCount()); cfg.maxConcurrentAsyncOperations(ccfg.getMaxConcurrentAsyncOperations()); -// cfg.pessimisticTxLoggerSize(ccfg.getPessimisticTxLogSize()); -// cfg.pessimisticTxLoggerLinger(ccfg.getPessimisticTxLogLinger()); cfg.memoryMode(ccfg.getMemoryMode()); cfg.indexingSpiName(ccfg.getIndexingSpiName()); cfg.interceptor(compactClass(ccfg.getInterceptor())); @@ -280,14 +259,14 @@ public class VisorCacheConfiguration implements Serializable { * @return Cache atomic sequence reserve size */ public int atomicSequenceReserveSize() { - return atomicSequenceReserveSize; + return atomicSeqReserveSize; } /** * @param atomicSeqReserveSize New cache atomic sequence reserve size */ public void atomicSequenceReserveSize(int atomicSeqReserveSize) { - atomicSequenceReserveSize = atomicSeqReserveSize; + this.atomicSeqReserveSize = atomicSeqReserveSize; } /** @@ -364,7 +343,7 @@ public class VisorCacheConfiguration implements Serializable { * @return Flag indicating whether Ignite should attempt to index value and/or key instances stored in cache. */ public boolean queryIndexEnabled() { - return queryIndexEnabled; + return qryIdxEnabled; } /** @@ -372,21 +351,7 @@ public class VisorCacheConfiguration implements Serializable { * stored in cache. */ public void queryIndexEnabled(boolean qryIdxEnabled) { - queryIndexEnabled = qryIdxEnabled; - } - - /** - * @return Flag indicating whether to persist once on commit, or after every operation. - */ - public boolean batchUpdateOnCommit() { - return batchUpdateOnCommit; - } - - /** - * @param batchUpdateOnCommit New batch update on commit. - */ - public void batchUpdateOnCommit(boolean batchUpdateOnCommit) { - this.batchUpdateOnCommit = batchUpdateOnCommit; + this.qryIdxEnabled = qryIdxEnabled; } /** @@ -418,20 +383,6 @@ public class VisorCacheConfiguration implements Serializable { } /** - * @return Cloner. - */ - @Nullable public String cloner() { - return cloner; - } - - /** - * @param cloner New cloner. - */ - public void cloner(@Nullable String cloner) { - this.cloner = cloner; - } - - /** * @return Name of class implementing GridCacheTmLookup. */ @Nullable public String transactionManagerLookupClassName() { @@ -446,20 +397,6 @@ public class VisorCacheConfiguration implements Serializable { } /** - * @return Flag to enable/disable transaction serializable isolation level. - */ - public boolean txSerializableEnabled() { - return txSerializableEnabled; - } - - /** - * @param txSerEnabled New flag to enable/disable transaction serializable isolation level. - */ - public void txSerializableEnabled(boolean txSerEnabled) { - txSerializableEnabled = txSerEnabled; - } - - /** * @return Off-heap max memory. */ public long offsetHeapMaxMemory() { @@ -477,14 +414,14 @@ public class VisorCacheConfiguration implements Serializable { * @return Max query iterator count */ public int maxQueryIteratorCount() { - return maxQueryIteratorCnt; + return maxQryIterCnt; } /** * @param maxQryIterCnt New max query iterator count */ public void maxQueryIteratorCount(int maxQryIterCnt) { - maxQueryIteratorCnt = maxQryIterCnt; + this.maxQryIterCnt = maxQryIterCnt; } /** @@ -502,34 +439,6 @@ public class VisorCacheConfiguration implements Serializable { } /** - * @return Pessimistic tx logger size - */ - public int pessimisticTxLoggerSize() { - return pessimisticTxLogSize; - } - - /** - * @param pessimisticTxLogSize New pessimistic tx logger size - */ - public void pessimisticTxLoggerSize(int pessimisticTxLogSize) { - this.pessimisticTxLogSize = pessimisticTxLogSize; - } - - /** - * @return Pessimistic tx logger linger. - */ - public int pessimisticTxLoggerLinger() { - return pessimisticTxLogLinger; - } - - /** - * @param pessimisticTxLogLinger New pessimistic tx logger linger. - */ - public void pessimisticTxLoggerLinger(int pessimisticTxLogLinger) { - this.pessimisticTxLogLinger = pessimisticTxLogLinger; - } - - /** * @return Memory mode. */ public CacheMemoryMode memoryMode() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a018c87f/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala ---------------------------------------------------------------------- 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 dcdb07a..0f647ff 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 @@ -359,7 +359,7 @@ class VisorCacheCommand { ciT #= ("Node ID8(@), IP", "CPUs", "Heap Used", "CPU Load", "Up Time", "Size", "Hi/Mi/Rd/Wr") - sortData(m.toMap, sortType.getOrElse("hi"), reversed).foreach { case (nid, cm) => { + sortData(m.toMap, sortType.getOrElse("hi"), reversed).foreach { case (nid, cm) => val nm = ignite.node(nid).metrics() ciT += ( @@ -377,7 +377,7 @@ class VisorCacheCommand { "Wr: " + cm.writes() ) ) - }} + } csT.render() @@ -761,7 +761,7 @@ object VisorCacheCommand { * * @param vs Visor tagging trait. */ - implicit def fromCinfo2Visor(vs: VisorTag) = cmd + implicit def fromCinfo2Visor(vs: VisorTag): VisorCacheCommand = cmd /** * Show table of cache configuration information. @@ -795,11 +795,8 @@ object VisorCacheCommand { cacheT += ("Swap Enabled", cfg.swapEnabled()) cacheT += ("Invalidate", cfg.invalidate()) cacheT += ("Start Size", cfg.startSize()) - cacheT += ("Cloner", cfg.cloner()) - cacheT += ("Batch Update", cfg.batchUpdateOnCommit()) cacheT += ("Transaction Manager Lookup", cfg.transactionManagerLookupClassName()) - cacheT += ("Transaction Serializable", cfg.txSerializableEnabled) cacheT += ("Affinity Function", affinityCfg.function()) cacheT += ("Affinity Backups", affinityCfg.partitionedBackups()) @@ -859,8 +856,6 @@ object VisorCacheCommand { cacheT += ("Write-Behind Flush Threads Count", writeBehind.flushThreadCount()) cacheT += ("Write-Behind Batch Size", writeBehind.batchSize()) - cacheT += ("Pessimistic Tx Log Size", cfg.pessimisticTxLoggerSize()) - cacheT += ("Pessimistic Tx Log Linger", cfg.pessimisticTxLoggerLinger()) cacheT += ("Concurrent Asynchronous Operations Number", cfg.maxConcurrentAsyncOperations()) cacheT += ("Memory Mode", cfg.memoryMode())