ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ira...@apache.org
Subject ignite git commit: IGNITE-8696 control.sh utility does not show atomicity mode - Fixes #4127.
Date Wed, 06 Jun 2018 10:09:00 GMT
Repository: ignite
Updated Branches:
  refs/heads/master a05f78f5e -> 78e5d970b


IGNITE-8696 control.sh utility does not show atomicity mode - Fixes #4127.

Signed-off-by: Ivan Rakov <irakov@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/78e5d970
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/78e5d970
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/78e5d970

Branch: refs/heads/master
Commit: 78e5d970be74c04b01857123b1a623038aa18440
Parents: a05f78f
Author: Sergey Kosarev <skosarev@gridgain.com>
Authored: Wed Jun 6 12:59:28 2018 +0300
Committer: Ivan Rakov <irakov@apache.org>
Committed: Wed Jun 6 12:59:28 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/verify/CacheInfo.java      | 30 ++++++++++++++++++--
 .../cache/verify/ViewCacheClosure.java          |  2 ++
 2 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/78e5d970/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/CacheInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/CacheInfo.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/CacheInfo.java
index 9a090a0..31c0b3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/CacheInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/CacheInfo.java
@@ -20,6 +20,8 @@ package org.apache.ignite.internal.processors.cache.verify;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -67,6 +69,9 @@ public class CacheInfo extends VisorDataTransferObject {
     /** Mode. */
     private CacheMode mode;
 
+    /** Atomicity mode. */
+    private CacheAtomicityMode atomicityMode;
+
     /** Backups count. */
     private int backupsCnt;
 
@@ -228,6 +233,20 @@ public class CacheInfo extends VisorDataTransferObject {
     /**
      *
      */
+    public CacheAtomicityMode getAtomicityMode() {
+        return atomicityMode;
+    }
+
+    /**
+     * @param atomicityMode
+     */
+    public void setAtomicityMode(CacheAtomicityMode atomicityMode) {
+        this.atomicityMode = atomicityMode;
+    }
+
+    /**
+     *
+     */
     public int getBackupsCnt() {
         return backupsCnt;
     }
@@ -269,19 +288,24 @@ public class CacheInfo extends VisorDataTransferObject {
             case GROUPS:
                 System.out.println("[grpName=" + getGrpName() + ", grpId=" + getGrpId() +
", cachesCnt=" + getCachesCnt() +
                     ", prim=" + getPartitions() + ", mapped=" + getMapped() + ", mode=" +
getMode() +
-                    ", backups=" + getBackupsCnt() + ", affCls=" + getAffinityClsName() +
']');
+                    ", atomicity=" + getAtomicityMode() + ", backups=" + getBackupsCnt()
+ ", affCls=" + getAffinityClsName() + ']');
 
                 break;
 
             default:
                 System.out.println("[cacheName=" + getCacheName() + ", cacheId=" + getCacheId()
+
                     ", grpName=" + getGrpName() + ", grpId=" + getGrpId() + ", prim=" + getPartitions()
+
-                    ", mapped=" + getMapped() + ", mode=" + getMode() +
+                    ", mapped=" + getMapped() + ", mode=" + getMode() + ", atomicity=" +
getAtomicityMode() +
                     ", backups=" + getBackupsCnt() + ", affCls=" + getAffinityClsName() +
']');
         }
     }
 
     /** {@inheritDoc} */
+    @Override public byte getProtocolVersion() {
+        return V2;
+    }
+
+    /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws IOException {
         U.writeString(out, seqName);
         out.writeLong(seqVal);
@@ -296,6 +320,7 @@ public class CacheInfo extends VisorDataTransferObject {
         out.writeInt(backupsCnt);
         U.writeString(out, affinityClsName);
         out.writeInt(cachesCnt);
+        U.writeEnum(out, atomicityMode);
     }
 
     /** {@inheritDoc} */
@@ -313,6 +338,7 @@ public class CacheInfo extends VisorDataTransferObject {
         backupsCnt = in.readInt();
         affinityClsName = U.readString(in);
         cachesCnt = in.readInt();
+        atomicityMode = protoVer >= V2 ? CacheAtomicityMode.fromOrdinal(in.readByte())
: null;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/78e5d970/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/ViewCacheClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/ViewCacheClosure.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/ViewCacheClosure.java
index 1f363f3..9003ac0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/ViewCacheClosure.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/ViewCacheClosure.java
@@ -99,6 +99,7 @@ public class ViewCacheClosure implements IgniteCallable<List<CacheInfo>>
{
                     ci.setBackupsCnt(context.config().getBackups());
                     ci.setAffinityClsName(context.config().getAffinity().getClass().getSimpleName());
                     ci.setMode(context.config().getCacheMode());
+                    ci.setAtomicityMode(context.config().getAtomicityMode());
                     ci.setMapped(mapped(context.caches().iterator().next().name()));
 
                     cacheInfo.add(ci);
@@ -126,6 +127,7 @@ public class ViewCacheClosure implements IgniteCallable<List<CacheInfo>>
{
                     ci.setBackupsCnt(desc.cacheConfiguration().getBackups());
                     ci.setAffinityClsName(desc.cacheConfiguration().getAffinity().getClass().getSimpleName());
                     ci.setMode(desc.cacheConfiguration().getCacheMode());
+                    ci.setAtomicityMode(desc.cacheConfiguration().getAtomicityMode());
                     ci.setMapped(mapped(desc.cacheName()));
 
                     cacheInfo.add(ci);


Mime
View raw message