ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-5460 WIP.
Date Sat, 10 Jun 2017 02:17:59 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5460 [created] 02615ef2b


IGNITE-5460 WIP.


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

Branch: refs/heads/ignite-5460
Commit: 02615ef2b0ae8806cbf6980bebfd534faef159a4
Parents: 3c5ffd1
Author: Alexey Kuznetsov <akuznetsov@gridgain.com>
Authored: Sat Jun 10 09:17:21 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@gridgain.com>
Committed: Sat Jun 10 09:17:21 2017 +0700

----------------------------------------------------------------------
 .../ignite/internal/visor/cache/VisorCache.java       | 14 ++++++++++++++
 .../internal/visor/cache/VisorCacheConfiguration.java | 13 +++++++++++++
 .../visor/commands/cache/VisorCacheCommand.scala      |  1 +
 modules/web-console/backend/app/mongo.js              |  1 +
 .../configuration/generator/ConfigurationGenerator.js |  8 ++++++--
 .../modules/states/configuration/caches/general.pug   |  4 ++++
 6 files changed, 39 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/02615ef2/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
index 4a35795..a046058 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
@@ -54,6 +54,9 @@ public class VisorCache extends VisorDataTransferObject {
     /** Cache name. */
     private String name;
 
+    /** Cache group name. */
+    private String grpName;
+
     /** Cache deployment ID. */
     private IgniteUuid dynamicDeploymentId;
 
@@ -116,6 +119,7 @@ public class VisorCache extends VisorDataTransferObject {
 
         CacheConfiguration cfg = ca.configuration();
 
+        grpName = cfg.getGroupName();
         mode = cfg.getCacheMode();
 
         boolean partitioned = (mode == CacheMode.PARTITIONED || mode == CacheMode.REPLICATED)
@@ -193,6 +197,7 @@ public class VisorCache extends VisorDataTransferObject {
         VisorCache c = new VisorCache();
 
         c.name = name;
+        c.grpName = grpName;
         c.mode = mode;
         c.memorySize = memorySize;
         c.indexesSize = indexesSize;
@@ -225,6 +230,13 @@ public class VisorCache extends VisorDataTransferObject {
     }
 
     /**
+     * @return Cache group name.
+     */
+    public String getGroupName() {
+        return grpName;
+    }
+
+    /**
      * @return Dynamic deployment ID.
      */
     public IgniteUuid getDynamicDeploymentId() {
@@ -318,6 +330,7 @@ public class VisorCache extends VisorDataTransferObject {
     /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws IOException {
         U.writeString(out, name);
+        U.writeString(out, grpName);
         U.writeGridUuid(out, dynamicDeploymentId);
         U.writeEnum(out, mode);
         out.writeLong(memorySize);
@@ -336,6 +349,7 @@ public class VisorCache extends VisorDataTransferObject {
     /** {@inheritDoc} */
     @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException,
ClassNotFoundException {
         name = U.readString(in);
+        grpName = U.readString(in);
         dynamicDeploymentId = U.readGridUuid(in);
         mode = CacheMode.fromOrdinal(in.readByte());
         memorySize = in.readLong();

http://git-wip-us.apache.org/repos/asf/ignite/blob/02615ef2/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 f40df80..f7330f7 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
@@ -48,6 +48,9 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
     /** Cache name. */
     private String name;
 
+    /** Cache group name. */
+    private String grpName;
+
     /** Cache mode. */
     private CacheMode mode;
 
@@ -174,6 +177,7 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
      */
     public VisorCacheConfiguration(IgniteEx ignite, CacheConfiguration ccfg) {
         name = ccfg.getName();
+        grpName = ccfg.getGroupName();
         mode = ccfg.getCacheMode();
         atomicityMode = ccfg.getAtomicityMode();
         eagerTtl = ccfg.isEagerTtl();
@@ -226,6 +230,13 @@ public class VisorCacheConfiguration extends VisorDataTransferObject
{
     }
 
     /**
+     * @return Cache group name.
+     */
+    @Nullable public String getGroupName() {
+        return grpName;
+    }
+
+    /**
      * @return Cache mode.
      */
     public CacheMode getMode() {
@@ -503,6 +514,7 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
     /** {@inheritDoc} */
     @Override protected void writeExternalData(ObjectOutput out) throws IOException {
         U.writeString(out, name);
+        U.writeString(out, grpName);
         U.writeEnum(out, mode);
         U.writeEnum(out, atomicityMode);
         out.writeBoolean(eagerTtl);
@@ -545,6 +557,7 @@ public class VisorCacheConfiguration extends VisorDataTransferObject {
     /** {@inheritDoc} */
     @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException,
ClassNotFoundException {
         name = U.readString(in);
+        grpName = U.readString(in);
         mode = CacheMode.fromOrdinal(in.readByte());
         atomicityMode = CacheAtomicityMode.fromOrdinal(in.readByte());
         eagerTtl = in.readBoolean();

http://git-wip-us.apache.org/repos/asf/ignite/blob/02615ef2/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 680522f..10350f2 100755
--- 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
@@ -837,6 +837,7 @@ object VisorCacheCommand {
 
         cacheT #= ("Name", "Value")
 
+        cacheT += ("Group", cfg.getGroupName)
         cacheT += ("Mode", cfg.getMode)
         cacheT += ("Atomicity Mode", safe(cfg.getAtomicityMode))
         cacheT += ("Statistic Enabled", bool2Str(cfg.isStatisticsEnabled))

http://git-wip-us.apache.org/repos/asf/ignite/blob/02615ef2/modules/web-console/backend/app/mongo.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/app/mongo.js b/modules/web-console/backend/app/mongo.js
index 8e75719..e3ae30d 100644
--- a/modules/web-console/backend/app/mongo.js
+++ b/modules/web-console/backend/app/mongo.js
@@ -141,6 +141,7 @@ module.exports.factory = function(passportMongo, settings, pluginMongo,
mongoose
     const CacheSchema = new Schema({
         space: {type: ObjectId, ref: 'Space', index: true, required: true},
         name: {type: String},
+        groupName: {type: String},
         clusters: [{type: ObjectId, ref: 'Cluster'}],
         domains: [{type: ObjectId, ref: 'DomainModel'}],
         cacheMode: {type: String, enum: ['PARTITIONED', 'REPLICATED', 'LOCAL']},

http://git-wip-us.apache.org/repos/asf/ignite/blob/02615ef2/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
index a55fdf1..dc29751 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -1717,8 +1717,12 @@ export default class IgniteConfigurationGenerator {
 
     // Generate cache general group.
     static cacheGeneral(cache, available, ccfg = this.cacheConfigurationBean(cache)) {
-        ccfg.stringProperty('name')
-            .enumProperty('cacheMode')
+        ccfg.stringProperty('name');
+
+        if (available('2.1.0'))
+            ccfg.stringProperty('groupName');
+
+        ccfg.enumProperty('cacheMode')
             .enumProperty('atomicityMode');
 
         if (ccfg.valueOf('cacheMode') === 'PARTITIONED' && ccfg.valueOf('backups'))
{

http://git-wip-us.apache.org/repos/asf/ignite/blob/02615ef2/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
b/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
index 8eda4a1..91af451 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/general.pug
@@ -32,6 +32,10 @@ include /app/helpers/jade/mixins
             .col-sm-6
                 .settings-row
                     +text('Name:', `${model}.name`, '"cacheName"', 'true', 'Input name',
'Cache name')
+                .settings-row(ng-if='$ctrl.available("2.1.0")')
+                    +text('Group:', `${model}.groupName`, '"groupName"', 'false', 'Input
group name',
+                        'Cache group name.<br/>\
+                        Caches with the same group name share single underlying "physical"
cache (partition set), but are logically isolated.')
                 .settings-row
                     +clusters(model, 'Associate clusters with the current cache')
                 .settings-row


Mime
View raw message