[
https://issues.apache.org/jira/browse/GEODE-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386366#comment-15386366
]
ASF GitHub Bot commented on GEODE-1617:
---------------------------------------
Github user dschneider-pivotal commented on a diff in the pull request:
https://github.com/apache/incubator-geode/pull/201#discussion_r71579111
--- Diff:
geode-core/src/main/java/org/apache/geode/redis/GeodeRedisServer.java ---
@@ -424,14 +429,26 @@ private void initializeRedis() {
RegionFactory<ByteArrayWrapper, ByteArrayWrapper> rfString =
cache.createRegionFactory(DEFAULT_REGION_TYPE);
RegionFactory<ByteArrayWrapper, HyperLogLogPlus> rfHLL =
cache.createRegionFactory(DEFAULT_REGION_TYPE);
Region<ByteArrayWrapper, ByteArrayWrapper> stringsRegion;
- if ((stringsRegion = this.cache.getRegion(STRING_REGION)) == null)
- stringsRegion = rfString.create(GeodeRedisServer.STRING_REGION);
+ InternalRegionArguments ira = new
InternalRegionArguments().setInternalRegion(true);
+ AttributesFactory af = new AttributesFactory();
+ af.setScope(Scope.LOCAL);
+ RegionAttributes ra = af.create();
Region<ByteArrayWrapper, HyperLogLogPlus> hLLRegion;
- if ((hLLRegion = this.cache.getRegion(HLL_REGION)) == null)
- hLLRegion = rfHLL.create(HLL_REGION);
Region<String, RedisDataType> redisMetaData;
- if ((redisMetaData = this.cache.getRegion(REDIS_META_DATA_REGION))
== null)
- redisMetaData = rfMeta.create(REDIS_META_DATA_REGION);
+ try {
+ if ((stringsRegion = this.cache.getRegion(STRING_REGION)) == null)
+ stringsRegion = rfString.create(GeodeRedisServer.STRING_REGION,
ra, ira);
+ if ((hLLRegion = this.cache.getRegion(HLL_REGION)) == null)
+ hLLRegion = rfHLL.create(HLL_REGION, ra, ira);
+ if ((redisMetaData = this.cache.getRegion(REDIS_META_DATA_REGION))
== null)
+ redisMetaData = rfMeta.create(REDIS_META_DATA_REGION, ra, ira);
+ }
+ catch (IOException | ClassNotFoundException e) {
--- End diff --
The addition of this try/catch does not look related to region names. Seems
like it should have its own ticket.
> Regions can be created with a variety of characters that are unsupported
> ------------------------------------------------------------------------
>
> Key: GEODE-1617
> URL: https://issues.apache.org/jira/browse/GEODE-1617
> Project: Geode
> Issue Type: Bug
> Components: gfsh
> Affects Versions: 1.0.0-incubating.M2
> Reporter: Kevin Duling
> Assignee: Kevin Duling
>
> Per this
> [thread|https://www.mail-archive.com/[email protected]/msg04046.html],
> and this
> [thread|https://www.mail-archive.com/[email protected]/msg07079.html]
> on the dev forums and [geode
> documentation|http://docs-geode-develop.cfapps.io/docs/basic_config/data_regions/region_naming.html],
> region names may only consist of alphanumeric characters, an underscore, and
> a hyphen. These rules are not enforced.
> E.g., it is possible to create a region with:
> {{gfsh> create region --name=not^good --type=REPLICATE}}
> Some of these regions may be removed with the {{destroy}} command, while
> others cannot be located.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)