You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2016/02/18 08:48:09 UTC
ignite git commit: IGNITE-2682 Added BinaryConfiguration.nameMapper
property.
Repository: ignite
Updated Branches:
refs/heads/ignite-843-rc2 befbccfc3 -> cb427d061
IGNITE-2682 Added BinaryConfiguration.nameMapper property.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cb427d06
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cb427d06
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cb427d06
Branch: refs/heads/ignite-843-rc2
Commit: cb427d06145711095826b5a4171b172a1217186c
Parents: befbccf
Author: vsisko <vs...@gridgain.com>
Authored: Thu Feb 18 14:48:28 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Feb 18 14:48:28 2016 +0700
----------------------------------------------------------------------
.../states/configuration/clusters/binary.jade | 33 ++++++++++++++++----
.../js/helpers/generator/generator-common.js | 5 +--
.../main/js/helpers/generator/generator-java.js | 6 ++++
.../main/js/helpers/generator/generator-xml.js | 2 ++
.../src/main/js/serve/mongo.js | 9 +++++-
5 files changed, 46 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/cb427d06/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/binary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/binary.jade b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/binary.jade
index 9e63adf..60e34db 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/binary.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/binary.jade
@@ -28,7 +28,7 @@ form.panel.panel-default(name='binary' novalidate)
.panel-body(ng-if='__show__')
.col-sm-6
.settings-row
- ignite-form-field
+ ignite-form-field
ignite-form-field-label
| ID mapper:
ignite-form-field-tooltip
@@ -40,7 +40,18 @@ form.panel.panel-default(name='binary' novalidate)
data-ng-model='#{model}.idMapper'
)
.settings-row
- ignite-form-field
+ ignite-form-field
+ ignite-form-field-label
+ | Name mapper:
+ ignite-form-field-tooltip
+ | Name mapper
+ ignite-form-field-java-class(
+ data-id='nameMapper'
+ data-name='nameMapper'
+ data-ng-model='#{model}.nameMapper'
+ )
+ .settings-row
+ ignite-form-field
ignite-form-field-label
| Serializer:
ignite-form-field-tooltip
@@ -63,7 +74,7 @@ form.panel.panel-default(name='binary' novalidate)
.group-content(ng-form='form' ng-repeat='model in #{types} track by $index')
hr(ng-if='$index !== 0')
.settings-row
- ignite-form-field
+ ignite-form-field
ignite-form-field-label
| Type name:
ignite-form-field-tooltip
@@ -79,20 +90,30 @@ form.panel.panel-default(name='binary' novalidate)
data-ng-required='true'
)
.settings-row
- ignite-form-field
+ ignite-form-field
ignite-form-field-label
| ID mapper:
ignite-form-field-tooltip
| Type and field ID mapper for binary objects#[br]
| Ignite never writes full strings for field or type names. Instead, for performance reasons, Ignite writes integer hash codes for type and field names. It has been tested that hash code conflicts for the type names or the field names within the same type are virtually non-existent and, to gain performance, it is safe to work with hash codes. For the cases when hash codes for different types or fields actually do collide #[b BinaryIdMapper] allows to override the automatically generated hash code IDs for the type and field names
-
ignite-form-field-java-class(
data-id='idMapper'
data-name='idMapper'
data-ng-model='model.idMapper'
)
.settings-row
- ignite-form-field
+ ignite-form-field
+ ignite-form-field-label
+ | Name mapper:
+ ignite-form-field-tooltip
+ | Name mapper
+ ignite-form-field-java-class(
+ data-id='nameMapper'
+ data-name='nameMapper'
+ data-ng-model='model.nameMapper'
+ )
+ .settings-row
+ ignite-form-field
ignite-form-field-label
| Serializer:
ignite-form-field-tooltip
http://git-wip-us.apache.org/repos/asf/ignite/blob/cb427d06/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
index e3b16e2..40614b6 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-common.js
@@ -499,8 +499,9 @@ $generatorCommon.secretPropertiesNeeded = function (cluster) {
// Check that binary is configured.
$generatorCommon.binaryIsDefined = function (binary) {
- return binary && ($commonUtils.isDefinedAndNotEmpty(binary.idMapper) || $commonUtils.isDefinedAndNotEmpty(binary.serializer) ||
- $commonUtils.isDefinedAndNotEmpty(binary.typeConfigurations) || ($commonUtils.isDefined(binary.compactFooter) && !binary.compactFooter));
+ return binary && ($commonUtils.isDefinedAndNotEmpty(binary.idMapper) || $commonUtils.isDefinedAndNotEmpty(binary.nameMapper) ||
+ $commonUtils.isDefinedAndNotEmpty(binary.serializer) || $commonUtils.isDefinedAndNotEmpty(binary.typeConfigurations) ||
+ ($commonUtils.isDefined(binary.compactFooter) && !binary.compactFooter));
};
// Extract domain model metadata location.
http://git-wip-us.apache.org/repos/asf/ignite/blob/cb427d06/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
index cf76738..08e88c6 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-java.js
@@ -594,6 +594,9 @@ $generatorJava.clusterBinary = function (cluster, res) {
if ($commonUtils.isDefinedAndNotEmpty(binary.idMapper))
res.line(varName + '.setIdMapper(new ' + res.importClass(binary.idMapper) + '());');
+ if ($commonUtils.isDefinedAndNotEmpty(binary.nameMapper))
+ res.line(varName + '.setNameMapper(new ' + res.importClass(binary.nameMapper) + '());');
+
if ($commonUtils.isDefinedAndNotEmpty(binary.serializer))
res.line(varName + '.setSerializer(new ' + res.importClass(binary.serializer) + '());');
@@ -663,6 +666,9 @@ $generatorJava.binaryTypeConfiguration = function (type, res) {
if ($commonUtils.isDefinedAndNotEmpty(type.idMapper))
res.line(typeVar + '.setIdMapper(new ' + res.importClass(type.idMapper) + '());');
+ if ($commonUtils.isDefinedAndNotEmpty(type.nameMapper))
+ res.line(typeVar + '.setNameMapper(new ' + res.importClass(type.nameMapper) + '());');
+
if ($commonUtils.isDefinedAndNotEmpty(type.serializer))
res.line(typeVar + '.setSerializer(new ' + res.importClass(type.serializer) + '());');
http://git-wip-us.apache.org/repos/asf/ignite/blob/cb427d06/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
index dcacae9..6d4fd6c 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-xml.js
@@ -419,6 +419,7 @@ $generatorXml.clusterBinary = function (cluster, res) {
$generatorXml.emptyBeanProperty(res, binary, 'idMapper');
$generatorXml.emptyBeanProperty(res, binary, 'serializer');
+ $generatorXml.emptyBeanProperty(res, binary, 'nameMapper');
if ($commonUtils.isDefinedAndNotEmpty(binary.typeConfigurations)) {
res.startBlock('<property name="typeConfigurations">');
@@ -429,6 +430,7 @@ $generatorXml.clusterBinary = function (cluster, res) {
$generatorXml.property(res, type, 'typeName');
$generatorXml.emptyBeanProperty(res, type, 'idMapper');
+ $generatorXml.emptyBeanProperty(res, type, 'nameMapper');
$generatorXml.emptyBeanProperty(res, type, 'serializer');
$generatorXml.property(res, type, 'enum', undefined, false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/cb427d06/modules/control-center-web/src/main/js/serve/mongo.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/mongo.js b/modules/control-center-web/src/main/js/serve/mongo.js
index 5f7ef9e..cfb0040 100644
--- a/modules/control-center-web/src/main/js/serve/mongo.js
+++ b/modules/control-center-web/src/main/js/serve/mongo.js
@@ -375,8 +375,15 @@ module.exports.factory = function(deepPopulatePlugin, passportMongo, settings, p
},
binaryConfiguration: {
idMapper: String,
+ nameMapper: String,
serializer: String,
- typeConfigurations: [{typeName: String, idMapper: String, serializer: String, enum: Boolean}],
+ typeConfigurations: [{
+ typeName: String,
+ idMapper: String,
+ nameMapper: String,
+ serializer: String,
+ enum: Boolean
+ }],
compactFooter: Boolean
},
caches: [{type: ObjectId, ref: 'Cache'}],