geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [21/21] incubator-geode git commit: GEODE-1566: rename GeodeRedisServer and repackage redis code into org.apache.geode
Date Fri, 08 Jul 2016 18:21:29 GMT
GEODE-1566: rename GeodeRedisServer and repackage redis code into org.apache.geode

This closes #182


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dfd481e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dfd481e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dfd481e0

Branch: refs/heads/develop
Commit: dfd481e0bcb6cdc42f16461c2444c04718424629
Parents: 7965bd7
Author: Kirk Lund <klund@apache.org>
Authored: Fri Jul 8 11:08:40 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Fri Jul 8 11:20:58 2016 -0700

----------------------------------------------------------------------
 .../distributed/ConfigurationProperties.java    |   10 +-
 .../internal/AbstractDistributionConfig.java    |    6 +-
 .../internal/DistributionConfig.java            |    6 +-
 .../internal/DistributionConfigImpl.java        |   23 +-
 .../internal/cache/GemFireCacheImpl.java        |    6 +-
 .../gemfire/internal/hll/HyperLogLog.java       |    2 +-
 .../gemfire/internal/hll/HyperLogLogPlus.java   |    2 +-
 .../gemfire/internal/i18n/LocalizedStrings.java |    4 +-
 .../internal/redis/ByteArrayWrapper.java        |  180 --
 .../internal/redis/ByteToCommandDecoder.java    |  188 --
 .../gemstone/gemfire/internal/redis/Coder.java  |  516 ----
 .../gemfire/internal/redis/Command.java         |  149 --
 .../gemfire/internal/redis/DoubleWrapper.java   |   78 -
 .../internal/redis/ExecutionHandlerContext.java |  379 ---
 .../gemfire/internal/redis/Executor.java        |   37 -
 .../gemfire/internal/redis/Extendable.java      |   32 -
 .../redis/RedisCommandParserException.java      |   44 -
 .../internal/redis/RedisCommandType.java        | 2344 ------------------
 .../gemfire/internal/redis/RedisConstants.java  |  202 --
 .../gemfire/internal/redis/RedisDataType.java   |  118 -
 .../redis/RedisDataTypeMismatchException.java   |   38 -
 .../internal/redis/RegionCreationException.java |   38 -
 .../gemfire/internal/redis/RegionProvider.java  |  552 -----
 .../redis/executor/AbstractExecutor.java        |  138 --
 .../redis/executor/AbstractScanExecutor.java    |   47 -
 .../internal/redis/executor/AuthExecutor.java   |   54 -
 .../internal/redis/executor/DBSizeExecutor.java |   31 -
 .../internal/redis/executor/DelExecutor.java    |   55 -
 .../internal/redis/executor/EchoExecutor.java   |   40 -
 .../internal/redis/executor/ExistsExecutor.java |   49 -
 .../redis/executor/ExpirationExecutor.java      |   41 -
 .../redis/executor/ExpireAtExecutor.java        |   93 -
 .../internal/redis/executor/ExpireExecutor.java |   93 -
 .../redis/executor/FlushAllExecutor.java        |   49 -
 .../internal/redis/executor/KeysExecutor.java   |   70 -
 .../internal/redis/executor/ListQuery.java      |   53 -
 .../redis/executor/PExpireAtExecutor.java       |   32 -
 .../redis/executor/PExpireExecutor.java         |   32 -
 .../internal/redis/executor/PTTLExecutor.java   |   33 -
 .../redis/executor/PersistExecutor.java         |   52 -
 .../internal/redis/executor/PingExecutor.java   |   31 -
 .../internal/redis/executor/QuitExecutor.java   |   31 -
 .../internal/redis/executor/ScanExecutor.java   |  144 --
 .../redis/executor/ShutDownExecutor.java        |   28 -
 .../internal/redis/executor/SortedSetQuery.java |  204 --
 .../internal/redis/executor/TTLExecutor.java    |   77 -
 .../internal/redis/executor/TimeExecutor.java   |   51 -
 .../internal/redis/executor/TypeExecutor.java   |   48 -
 .../internal/redis/executor/UnkownExecutor.java |   31 -
 .../redis/executor/hash/HDelExecutor.java       |   67 -
 .../redis/executor/hash/HExistsExecutor.java    |   66 -
 .../redis/executor/hash/HGetAllExecutor.java    |   63 -
 .../redis/executor/hash/HGetExecutor.java       |   62 -
 .../redis/executor/hash/HIncrByExecutor.java    |  109 -
 .../executor/hash/HIncrByFloatExecutor.java     |   99 -
 .../redis/executor/hash/HKeysExecutor.java      |   63 -
 .../redis/executor/hash/HLenExecutor.java       |   57 -
 .../redis/executor/hash/HMGetExecutor.java      |   72 -
 .../redis/executor/hash/HMSetExecutor.java      |   62 -
 .../redis/executor/hash/HScanExecutor.java      |  163 --
 .../redis/executor/hash/HSetExecutor.java       |   78 -
 .../redis/executor/hash/HSetNXExecutor.java     |   33 -
 .../redis/executor/hash/HValsExecutor.java      |   62 -
 .../redis/executor/hash/HashExecutor.java       |   39 -
 .../redis/executor/hll/HllExecutor.java         |   38 -
 .../redis/executor/hll/PFAddExecutor.java       |   66 -
 .../redis/executor/hll/PFCountExecutor.java     |   70 -
 .../redis/executor/hll/PFMergeExecutor.java     |   74 -
 .../internal/redis/executor/hll/Varint.java     |  241 --
 .../redis/executor/list/LIndexExecutor.java     |  118 -
 .../redis/executor/list/LInsertExecutor.java    |   29 -
 .../redis/executor/list/LLenExecutor.java       |   58 -
 .../redis/executor/list/LPopExecutor.java       |   34 -
 .../redis/executor/list/LPushExecutor.java      |   34 -
 .../redis/executor/list/LPushXExecutor.java     |   34 -
 .../redis/executor/list/LRangeExecutor.java     |  113 -
 .../redis/executor/list/LRemExecutor.java       |  116 -
 .../redis/executor/list/LSetExecutor.java       |  108 -
 .../redis/executor/list/LTrimExecutor.java      |  124 -
 .../redis/executor/list/ListExecutor.java       |  150 --
 .../redis/executor/list/PopExecutor.java        |  150 --
 .../redis/executor/list/PushExecutor.java       |   54 -
 .../redis/executor/list/PushXExecutor.java      |   59 -
 .../redis/executor/list/RPopExecutor.java       |   34 -
 .../redis/executor/list/RPushExecutor.java      |   34 -
 .../redis/executor/list/RPushXExecutor.java     |   34 -
 .../redis/executor/set/SAddExecutor.java        |   60 -
 .../redis/executor/set/SCardExecutor.java       |   55 -
 .../redis/executor/set/SDiffExecutor.java       |   46 -
 .../redis/executor/set/SDiffStoreExecutor.java  |   33 -
 .../redis/executor/set/SInterExecutor.java      |   49 -
 .../redis/executor/set/SInterStoreExecutor.java |   34 -
 .../redis/executor/set/SIsMemberExecutor.java   |   62 -
 .../redis/executor/set/SMembersExecutor.java    |   56 -
 .../redis/executor/set/SMoveExecutor.java       |   72 -
 .../redis/executor/set/SPopExecutor.java        |   61 -
 .../redis/executor/set/SRandMemberExecutor.java |   96 -
 .../redis/executor/set/SRemExecutor.java        |   63 -
 .../redis/executor/set/SScanExecutor.java       |  154 --
 .../redis/executor/set/SUnionExecutor.java      |   51 -
 .../redis/executor/set/SUnionStoreExecutor.java |   34 -
 .../redis/executor/set/SetExecutor.java         |   23 -
 .../redis/executor/set/SetOpExecutor.java       |  109 -
 .../executor/sortedset/SortedSetExecutor.java   |   41 -
 .../redis/executor/sortedset/ZAddExecutor.java  |   88 -
 .../redis/executor/sortedset/ZCardExecutor.java |   54 -
 .../executor/sortedset/ZCountExecutor.java      |  145 --
 .../executor/sortedset/ZIncrByExecutor.java     |   77 -
 .../executor/sortedset/ZLexCountExecutor.java   |  143 --
 .../executor/sortedset/ZRangeByLexExecutor.java |  209 --
 .../sortedset/ZRangeByScoreExecutor.java        |  209 --
 .../executor/sortedset/ZRangeExecutor.java      |  125 -
 .../redis/executor/sortedset/ZRankExecutor.java |   98 -
 .../redis/executor/sortedset/ZRemExecutor.java  |   64 -
 .../sortedset/ZRemRangeByLexExecutor.java       |  153 --
 .../sortedset/ZRemRangeByRankExecutor.java      |  121 -
 .../sortedset/ZRemRangeByScoreExecutor.java     |  143 --
 .../sortedset/ZRevRangeByScoreExecutor.java     |   33 -
 .../executor/sortedset/ZRevRangeExecutor.java   |   34 -
 .../executor/sortedset/ZRevRankExecutor.java    |   32 -
 .../redis/executor/sortedset/ZScanExecutor.java |  161 --
 .../executor/sortedset/ZScoreExecutor.java      |   59 -
 .../redis/executor/string/AppendExecutor.java   |   69 -
 .../redis/executor/string/BitCountExecutor.java |   97 -
 .../redis/executor/string/BitOpExecutor.java    |  153 --
 .../redis/executor/string/BitPosExecutor.java   |  134 -
 .../redis/executor/string/DecrByExecutor.java   |  110 -
 .../redis/executor/string/DecrExecutor.java     |   95 -
 .../redis/executor/string/GetBitExecutor.java   |   82 -
 .../redis/executor/string/GetExecutor.java      |   51 -
 .../redis/executor/string/GetRangeExecutor.java |   98 -
 .../redis/executor/string/GetSetExecutor.java   |   59 -
 .../redis/executor/string/IncrByExecutor.java   |  107 -
 .../executor/string/IncrByFloatExecutor.java    |  122 -
 .../redis/executor/string/IncrExecutor.java     |   91 -
 .../redis/executor/string/MGetExecutor.java     |   73 -
 .../redis/executor/string/MSetExecutor.java     |   64 -
 .../redis/executor/string/MSetNXExecutor.java   |   88 -
 .../redis/executor/string/PSetEXExecutor.java   |   34 -
 .../redis/executor/string/SetBitExecutor.java   |  106 -
 .../redis/executor/string/SetEXExecutor.java    |   88 -
 .../redis/executor/string/SetExecutor.java      |  154 --
 .../redis/executor/string/SetNXExecutor.java    |   60 -
 .../redis/executor/string/SetRangeExecutor.java |   96 -
 .../redis/executor/string/StringExecutor.java   |   45 -
 .../redis/executor/string/StrlenExecutor.java   |   56 -
 .../executor/transactions/DiscardExecutor.java  |   42 -
 .../executor/transactions/ExecExecutor.java     |   88 -
 .../executor/transactions/MultiExecutor.java    |   47 -
 .../transactions/TransactionExecutor.java       |   23 -
 .../executor/transactions/UnwatchExecutor.java  |   31 -
 .../executor/transactions/WatchExecutor.java    |   31 -
 .../redis/org/apache/hadoop/fs/GlobPattern.java |  164 --
 .../internal/cli/i18n/CliStrings.java           |    2 +-
 .../gemfire/redis/GemFireRedisServer.java       |  695 ------
 .../apache/geode/redis/GeodeRedisServer.java    |  719 ++++++
 .../geode/redis/internal/ByteArrayWrapper.java  |  180 ++
 .../redis/internal/ByteToCommandDecoder.java    |  188 ++
 .../org/apache/geode/redis/internal/Coder.java  |  516 ++++
 .../apache/geode/redis/internal/Command.java    |  149 ++
 .../geode/redis/internal/DoubleWrapper.java     |   78 +
 .../redis/internal/ExecutionHandlerContext.java |  379 +++
 .../apache/geode/redis/internal/Executor.java   |   37 +
 .../apache/geode/redis/internal/Extendable.java |   32 +
 .../internal/RedisCommandParserException.java   |   44 +
 .../geode/redis/internal/RedisCommandType.java  | 2344 ++++++++++++++++++
 .../geode/redis/internal/RedisConstants.java    |  202 ++
 .../geode/redis/internal/RedisDataType.java     |  118 +
 .../RedisDataTypeMismatchException.java         |   38 +
 .../redis/internal/RegionCreationException.java |   38 +
 .../geode/redis/internal/RegionProvider.java    |  552 +++++
 .../internal/executor/AbstractExecutor.java     |  138 ++
 .../internal/executor/AbstractScanExecutor.java |   47 +
 .../redis/internal/executor/AuthExecutor.java   |   54 +
 .../redis/internal/executor/DBSizeExecutor.java |   31 +
 .../redis/internal/executor/DelExecutor.java    |   55 +
 .../redis/internal/executor/EchoExecutor.java   |   40 +
 .../redis/internal/executor/ExistsExecutor.java |   49 +
 .../internal/executor/ExpirationExecutor.java   |   41 +
 .../internal/executor/ExpireAtExecutor.java     |   93 +
 .../redis/internal/executor/ExpireExecutor.java |   93 +
 .../internal/executor/FlushAllExecutor.java     |   49 +
 .../redis/internal/executor/KeysExecutor.java   |   70 +
 .../redis/internal/executor/ListQuery.java      |   53 +
 .../internal/executor/PExpireAtExecutor.java    |   32 +
 .../internal/executor/PExpireExecutor.java      |   32 +
 .../redis/internal/executor/PTTLExecutor.java   |   33 +
 .../internal/executor/PersistExecutor.java      |   52 +
 .../redis/internal/executor/PingExecutor.java   |   31 +
 .../redis/internal/executor/QuitExecutor.java   |   31 +
 .../redis/internal/executor/ScanExecutor.java   |  145 ++
 .../internal/executor/ShutDownExecutor.java     |   28 +
 .../redis/internal/executor/SortedSetQuery.java |  204 ++
 .../redis/internal/executor/TTLExecutor.java    |   77 +
 .../redis/internal/executor/TimeExecutor.java   |   51 +
 .../redis/internal/executor/TypeExecutor.java   |   48 +
 .../redis/internal/executor/UnkownExecutor.java |   31 +
 .../internal/executor/hash/HDelExecutor.java    |   67 +
 .../internal/executor/hash/HExistsExecutor.java |   66 +
 .../internal/executor/hash/HGetAllExecutor.java |   63 +
 .../internal/executor/hash/HGetExecutor.java    |   62 +
 .../internal/executor/hash/HIncrByExecutor.java |  109 +
 .../executor/hash/HIncrByFloatExecutor.java     |   99 +
 .../internal/executor/hash/HKeysExecutor.java   |   63 +
 .../internal/executor/hash/HLenExecutor.java    |   57 +
 .../internal/executor/hash/HMGetExecutor.java   |   72 +
 .../internal/executor/hash/HMSetExecutor.java   |   62 +
 .../internal/executor/hash/HScanExecutor.java   |  163 ++
 .../internal/executor/hash/HSetExecutor.java    |   78 +
 .../internal/executor/hash/HSetNXExecutor.java  |   33 +
 .../internal/executor/hash/HValsExecutor.java   |   62 +
 .../internal/executor/hash/HashExecutor.java    |   39 +
 .../internal/executor/hll/HllExecutor.java      |   38 +
 .../internal/executor/hll/PFAddExecutor.java    |   66 +
 .../internal/executor/hll/PFCountExecutor.java  |   70 +
 .../internal/executor/hll/PFMergeExecutor.java  |   74 +
 .../redis/internal/executor/hll/Varint.java     |  241 ++
 .../internal/executor/list/LIndexExecutor.java  |  118 +
 .../internal/executor/list/LInsertExecutor.java |   29 +
 .../internal/executor/list/LLenExecutor.java    |   58 +
 .../internal/executor/list/LPopExecutor.java    |   34 +
 .../internal/executor/list/LPushExecutor.java   |   34 +
 .../internal/executor/list/LPushXExecutor.java  |   34 +
 .../internal/executor/list/LRangeExecutor.java  |  113 +
 .../internal/executor/list/LRemExecutor.java    |  116 +
 .../internal/executor/list/LSetExecutor.java    |  108 +
 .../internal/executor/list/LTrimExecutor.java   |  123 +
 .../internal/executor/list/ListExecutor.java    |  149 ++
 .../internal/executor/list/PopExecutor.java     |  150 ++
 .../internal/executor/list/PushExecutor.java    |   54 +
 .../internal/executor/list/PushXExecutor.java   |   59 +
 .../internal/executor/list/RPopExecutor.java    |   34 +
 .../internal/executor/list/RPushExecutor.java   |   34 +
 .../internal/executor/list/RPushXExecutor.java  |   34 +
 .../internal/executor/set/SAddExecutor.java     |   60 +
 .../internal/executor/set/SCardExecutor.java    |   55 +
 .../internal/executor/set/SDiffExecutor.java    |   46 +
 .../executor/set/SDiffStoreExecutor.java        |   33 +
 .../internal/executor/set/SInterExecutor.java   |   49 +
 .../executor/set/SInterStoreExecutor.java       |   34 +
 .../executor/set/SIsMemberExecutor.java         |   62 +
 .../internal/executor/set/SMembersExecutor.java |   56 +
 .../internal/executor/set/SMoveExecutor.java    |   72 +
 .../internal/executor/set/SPopExecutor.java     |   61 +
 .../executor/set/SRandMemberExecutor.java       |   96 +
 .../internal/executor/set/SRemExecutor.java     |   63 +
 .../internal/executor/set/SScanExecutor.java    |  154 ++
 .../internal/executor/set/SUnionExecutor.java   |   51 +
 .../executor/set/SUnionStoreExecutor.java       |   34 +
 .../internal/executor/set/SetExecutor.java      |   23 +
 .../internal/executor/set/SetOpExecutor.java    |  109 +
 .../executor/sortedset/SortedSetExecutor.java   |   41 +
 .../executor/sortedset/ZAddExecutor.java        |   88 +
 .../executor/sortedset/ZCardExecutor.java       |   54 +
 .../executor/sortedset/ZCountExecutor.java      |  145 ++
 .../executor/sortedset/ZIncrByExecutor.java     |   77 +
 .../executor/sortedset/ZLexCountExecutor.java   |  143 ++
 .../executor/sortedset/ZRangeByLexExecutor.java |  209 ++
 .../sortedset/ZRangeByScoreExecutor.java        |  209 ++
 .../executor/sortedset/ZRangeExecutor.java      |  125 +
 .../executor/sortedset/ZRankExecutor.java       |   98 +
 .../executor/sortedset/ZRemExecutor.java        |   64 +
 .../sortedset/ZRemRangeByLexExecutor.java       |  153 ++
 .../sortedset/ZRemRangeByRankExecutor.java      |  121 +
 .../sortedset/ZRemRangeByScoreExecutor.java     |  143 ++
 .../sortedset/ZRevRangeByScoreExecutor.java     |   33 +
 .../executor/sortedset/ZRevRangeExecutor.java   |   34 +
 .../executor/sortedset/ZRevRankExecutor.java    |   32 +
 .../executor/sortedset/ZScanExecutor.java       |  161 ++
 .../executor/sortedset/ZScoreExecutor.java      |   59 +
 .../executor/string/AppendExecutor.java         |   69 +
 .../executor/string/BitCountExecutor.java       |   97 +
 .../internal/executor/string/BitOpExecutor.java |  153 ++
 .../executor/string/BitPosExecutor.java         |  134 +
 .../executor/string/DecrByExecutor.java         |  110 +
 .../internal/executor/string/DecrExecutor.java  |   95 +
 .../executor/string/GetBitExecutor.java         |   82 +
 .../internal/executor/string/GetExecutor.java   |   51 +
 .../executor/string/GetRangeExecutor.java       |   98 +
 .../executor/string/GetSetExecutor.java         |   59 +
 .../executor/string/IncrByExecutor.java         |  107 +
 .../executor/string/IncrByFloatExecutor.java    |  122 +
 .../internal/executor/string/IncrExecutor.java  |   91 +
 .../internal/executor/string/MGetExecutor.java  |   73 +
 .../internal/executor/string/MSetExecutor.java  |   64 +
 .../executor/string/MSetNXExecutor.java         |   88 +
 .../executor/string/PSetEXExecutor.java         |   34 +
 .../executor/string/SetBitExecutor.java         |  106 +
 .../internal/executor/string/SetEXExecutor.java |   89 +
 .../internal/executor/string/SetExecutor.java   |  155 ++
 .../internal/executor/string/SetNXExecutor.java |   60 +
 .../executor/string/SetRangeExecutor.java       |   96 +
 .../executor/string/StringExecutor.java         |   45 +
 .../executor/string/StrlenExecutor.java         |   56 +
 .../executor/transactions/DiscardExecutor.java  |   42 +
 .../executor/transactions/ExecExecutor.java     |   88 +
 .../executor/transactions/MultiExecutor.java    |   47 +
 .../transactions/TransactionExecutor.java       |   23 +
 .../executor/transactions/UnwatchExecutor.java  |   31 +
 .../executor/transactions/WatchExecutor.java    |   31 +
 .../org/apache/hadoop/fs/GlobPattern.java       |  164 ++
 .../gemstone/gemfire/redis/AuthJUnitTest.java   |  159 --
 .../gemfire/redis/ConcurrentStartTest.java      |   99 -
 .../gemstone/gemfire/redis/HashesJUnitTest.java |  183 --
 .../gemstone/gemfire/redis/ListsJUnitTest.java  |  251 --
 .../gemfire/redis/RedisDistDUnitTest.java       |  263 --
 .../gemstone/gemfire/redis/SetsJUnitTest.java   |  257 --
 .../gemfire/redis/SortedSetsJUnitTest.java      |  418 ----
 .../gemfire/redis/StringsJunitTest.java         |  304 ---
 .../org/apache/geode/redis/AuthJUnitTest.java   |  161 ++
 .../apache/geode/redis/ConcurrentStartTest.java |  101 +
 .../org/apache/geode/redis/HashesJUnitTest.java |  185 ++
 .../org/apache/geode/redis/ListsJUnitTest.java  |  253 ++
 .../apache/geode/redis/RedisDistDUnitTest.java  |  263 ++
 .../org/apache/geode/redis/SetsJUnitTest.java   |  259 ++
 .../apache/geode/redis/SortedSetsJUnitTest.java |  420 ++++
 .../apache/geode/redis/StringsJunitTest.java    |  306 +++
 .../sanctionedDataSerializables.txt             |  487 ++--
 .../codeAnalysis/sanctionedSerializables.txt    |  309 ++-
 .../cli/commands/golden-help-offline.properties |    2 +-
 320 files changed, 18099 insertions(+), 18005 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
index 580f342..49a421a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java
@@ -17,6 +17,8 @@
 
 package com.gemstone.gemfire.distributed;
 
+import org.apache.geode.redis.GeodeRedisServer;
+
 /**
  * This interface defines all the configuration properties that can be used.
  * <U>Since</U>: Geode 1.0
@@ -1501,9 +1503,9 @@ public interface ConfigurationProperties {
   /**
    * The static String definition of the <i>"redis-port"</i> property
    * <a name="redis-port"/a></p>
-   * <U>Description</U>: Specifies the port used by {@link com.gemstone.gemfire.redis.GemFireRedisServer}
+   * <U>Description</U>: Specifies the port used by {@link GeodeRedisServer}
    * which enables redis clients to connect and store data in GemFire distributed system.
-   * see {@link com.gemstone.gemfire.redis.GemFireRedisServer} for other configuration options.</p>
+   * see {@link GeodeRedisServer} for other configuration options.</p>
    * <U>Default</U>: "0" disables GemFireMemcachedServer</p>
    * <U>Allowed values</U>: 0..65535
    */
@@ -1511,14 +1513,14 @@ public interface ConfigurationProperties {
   /**
    * The static String definition of the <i>"redis-bind-address"</i> property
    * <a name="redis-bind-address"/a></p>
-   * <U>Description</U>: Specifies the bind address used by {@link com.gemstone.gemfire.redis.GemFireRedisServer}</p>
+   * <U>Description</U>: Specifies the bind address used by {@link GeodeRedisServer}</p>
    * <U>Default</U>: ""
    */
   String REDIS_BIND_ADDRESS = "redis-bind-address";
   /**
    * The static String definition of the <i>"redis-password"</i> property
    * <a name="redis-password"/a></p>
-   * <U>Description</U>: Specifies the password to authenticate a client of {@link com.gemstone.gemfire.redis.GemFireRedisServer}</p>
+   * <U>Description</U>: Specifies the password to authenticate a client of {@link GeodeRedisServer}</p>
    * <U>Default</U>: ""
    */
   String REDIS_PASSWORD = "redis-password";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index fdda8a9..8731fdc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -1028,9 +1028,9 @@ public abstract class AbstractDistributionConfig
     m.put(MEMCACHED_PORT, "The port GemFireMemcachedServer will listen on. Default is 0. Set to zero to disable GemFireMemcachedServer.");
     m.put(MEMCACHED_PROTOCOL, "The protocol that GemFireMemcachedServer understands. Default is ASCII. Values may be ASCII or BINARY");
     m.put(MEMCACHED_BIND_ADDRESS, "The address the GemFireMemcachedServer will listen on for remote connections. Default is \"\" which causes the GemFireMemcachedServer to listen on the host's default address. This property is ignored if memcached-port is \"0\".");
-    m.put(REDIS_PORT, "The port GemFireRedisServer will listen on. Default is 0. Set to zero to disable GemFireRedisServer.");
-    m.put(REDIS_BIND_ADDRESS, "The address the GemFireRedisServer will listen on for remote connections. Default is \"\" which causes the GemFireRedisServer to listen on the host's default address. This property is ignored if redis-port is \"0\".");
-    m.put(REDIS_PASSWORD, "The password which client of GemFireRedisServer must use to authenticate themselves. The default is none and no authentication will be required.");
+    m.put(REDIS_PORT, "The port GeodeRedisServer will listen on. Default is 0. Set to zero to disable GeodeRedisServer.");
+    m.put(REDIS_BIND_ADDRESS, "The address the GeodeRedisServer will listen on for remote connections. Default is \"\" which causes the GeodeRedisServer to listen on the host's default address. This property is ignored if redis-port is \"0\".");
+    m.put(REDIS_PASSWORD, "The password which client of GeodeRedisServer must use to authenticate themselves. The default is none and no authentication will be required.");
     m.put(ENABLE_CLUSTER_CONFIGURATION, LocalizedStrings.AbstractDistributionConfig_ENABLE_SHARED_CONFIGURATION.toLocalizedString());
     m.put(USE_CLUSTER_CONFIGURATION, LocalizedStrings.AbstractDistributionConfig_USE_SHARED_CONFIGURATION.toLocalizedString());
     m.put(LOAD_CLUSTER_CONFIGURATION_FROM_DIR, LocalizedStrings.AbstractDistributionConfig_LOAD_SHARED_CONFIGURATION_FROM_DIR.toLocalizedString(SharedConfiguration.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index f80d746..71651d7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -3039,7 +3039,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /**
    * Returns the value of the {@link ConfigurationProperties#REDIS_PORT} property
    *
-   * @return the port on which GemFireRedisServer should be started
+   * @return the port on which GeodeRedisServer should be started
    * @since GemFire 8.0
    */
   @ConfigAttributeGetter(name = REDIS_PORT)
@@ -3055,7 +3055,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /**
    * Returns the value of the {@link ConfigurationProperties#REDIS_BIND_ADDRESS} property
    *
-   * @return the bind address for GemFireRedisServer
+   * @return the bind address for GeodeRedisServer
    * @since GemFire 8.0
    */
   @ConfigAttributeGetter(name = REDIS_BIND_ADDRESS)
@@ -3071,7 +3071,7 @@ public interface DistributionConfig extends Config, LogConfig {
   /**
    * Returns the value of the {@link ConfigurationProperties#REDIS_PASSWORD} property
    *
-   * @return the authentication password for GemFireRedisServer
+   * @return the authentication password for GeodeRedisServer
    * @since GemFire 8.0
    */
   @ConfigAttributeGetter(name = REDIS_PASSWORD)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index ac80ee1..2b4cc5c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -19,6 +19,16 @@ package com.gemstone.gemfire.distributed.internal;
 
 import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
+import com.gemstone.gemfire.GemFireConfigException;
+import com.gemstone.gemfire.GemFireIOException;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.ConfigSource;
+import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
+import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
+import org.apache.geode.redis.GeodeRedisServer;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
@@ -34,15 +44,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.ConfigSource;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
-import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
-
 /**
  * Provides an implementation of <code>DistributionConfig</code> that
  * knows how to read the configuration file.
@@ -318,12 +319,12 @@ public class DistributionConfigImpl
 
   
   /**
-   * port on which {@link com.gemstone.gemfire.redis.GemFireRedisServer} is started
+   * port on which {@link GeodeRedisServer} is started
    */
   private int redisPort = DEFAULT_REDIS_PORT;
   
   /**
-   * Bind address for GemFireRedisServer
+   * Bind address for GeodeRedisServer
    */
   private String redisBindAddress = DEFAULT_REDIS_BIND_ADDRESS;
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 8c4c463..953e023 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -167,7 +167,7 @@ import com.gemstone.gemfire.pdx.internal.AutoSerializableManager;
 import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
 import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
 import com.gemstone.gemfire.pdx.internal.TypeRegistry;
-import com.gemstone.gemfire.redis.GemFireRedisServer;
+import org.apache.geode.redis.GeodeRedisServer;
 import com.sun.jna.Native;
 import com.sun.jna.Platform;
 
@@ -496,7 +496,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
   /**
    * Redis server is started when {@link DistributionConfig#getRedisPort()} is set
    */
-  private GemFireRedisServer redisServer;
+  private GeodeRedisServer redisServer;
   
   /**
    * {@link ExtensionPoint} support.
@@ -1158,7 +1158,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
         getLoggerI18n().info(LocalizedStrings.GemFireCacheImpl_STARTING_GEMFIRE_REDIS_SERVER_ON_BIND_ADDRESS_0_PORT_1,
             new Object[] { bindAddress, port });
       }
-      this.redisServer = new GemFireRedisServer(bindAddress, port);
+      this.redisServer = new GeodeRedisServer(bindAddress, port);
       this.redisServer.start();
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLog.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLog.java
index 7e88198..95e1696 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLog.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLog.java
@@ -15,7 +15,7 @@
  */
 package com.gemstone.gemfire.internal.hll;
 
-import com.gemstone.gemfire.internal.redis.executor.hll.HllExecutor;
+import org.apache.geode.redis.internal.executor.hll.HllExecutor;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLogPlus.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLogPlus.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLogPlus.java
index 86b74ef..054cc58 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLogPlus.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/hll/HyperLogLogPlus.java
@@ -15,7 +15,7 @@
  */
 package com.gemstone.gemfire.internal.hll;
 
-import com.gemstone.gemfire.internal.redis.executor.hll.Varint;
+import org.apache.geode.redis.internal.executor.hll.Varint;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index a09952e..fa930f3 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -2852,7 +2852,7 @@ public class LocalizedStrings {
   public static final StringId QueueManagerImpl_QUEUEMANAGERIMPL_FAILED_TO_RECOVER_INTEREST_TO_SERVER_0 = new StringId(4456, "QueueManagerImpl failed to recover interest to server {0}.");
   public static final StringId QueueManagerImpl_ERROR_IN_REDUNDANCY_SATISFIER = new StringId(4457, "Error in redundancy satisfier");
   public static final StringId GroupMembershipService_MEMBERSHIP_EXPIRING_MEMBERSHIP_OF_SURPRISE_MEMBER_0 = new StringId(4458, "Membership: expiring membership of surprise member <{0}>");
-  public static final StringId GemFireCacheImpl_STARTING_GEMFIRE_REDIS_SERVER_ON_PORT_0 = new StringId(4459, "Starting GemFireRedisServer on port {0}");
+  public static final StringId GemFireCacheImpl_STARTING_GEMFIRE_REDIS_SERVER_ON_PORT_0 = new StringId(4459, "Starting GeodeRedisServer on port {0}");
   public static final StringId GroupMembershipService_EXCEPTION_DESERIALIZING_MESSAGE_PAYLOAD_0 = new StringId(4460, "Exception deserializing message payload: {0}");
   public static final StringId GroupMembershipService_MEMBERSHIP_SERVICE_FAILURE_0 = new StringId(4461, "Membership service failure: {0}");
   public static final StringId GroupMembershipService_EXCEPTION_CAUGHT_WHILE_SHUTTING_DOWN = new StringId(4462, "Exception caught while shutting down");
@@ -3149,7 +3149,7 @@ public class LocalizedStrings {
   public static final StringId RemotePutMessage_UNABLE_TO_PERFORM_PUT_BUT_OPERATION_SHOULD_NOT_FAIL_0 = new StringId(4838, "unable to perform put, but operation should not fail {0}");
   public static final StringId TXState_REGION_CLEAR_NOT_SUPPORTED_IN_A_TRANSACTION = new StringId(4839,"clear() is not supported while in a transaction");
   public static final StringId PartitionedRegion_TX_FUNCTION_EXECUTION_NOT_COLOCATED_0_1 = new StringId(4840, "Function execution is not colocated with transaction. The transactional data is hosted on node {0}, but you are trying to target node {1}");
-  public static final StringId GemFireCacheImpl_STARTING_GEMFIRE_REDIS_SERVER_ON_BIND_ADDRESS_0_PORT_1 = new StringId(4841, "Starting GemFireRedisServer on bind address {0} on port {1}"); 
+  public static final StringId GemFireCacheImpl_STARTING_GEMFIRE_REDIS_SERVER_ON_BIND_ADDRESS_0_PORT_1 = new StringId(4841, "Starting GeodeRedisServer on bind address {0} on port {1}");
   public static final StringId RemoteFetchEntryMessage_ENTRY_NOT_FOUND = new StringId(4842, "entry not found");
   public static final StringId RemoteFetchEntryMessage_FAILED_SENDING_0 = new StringId(4843, "Failed sending < {0} >");
   public static final StringId RemoteFetchEntryMessage_FETCHENTRYRESPONSE_GOT_REMOTE_CACHEEXCEPTION_FORCING_REATTEMPT = new StringId(4844, "FetchEntryResponse got remote CacheException; forcing reattempt.");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteArrayWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteArrayWrapper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteArrayWrapper.java
deleted file mode 100755
index 790101d..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteArrayWrapper.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.redis;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Arrays;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * This class is a wrapper for the any Regions that need to store a 
- * byte[]. The only data this an instance will store is a byte[]
- * for the data but it is also serializable and comparable so it is able to be used
- * in querying
- * 
- *
- */
-public class ByteArrayWrapper implements DataSerializable, Comparable<ByteArrayWrapper> {
-  /**
-   * Generated serialVerionUID
-   */
-  private static final long serialVersionUID = 9066391742266642992L;
-
-  /**
-   * The data portion of ValueWrapper
-   */
-  private byte[] value;
-
-  /**
-   * Hash of {@link #value}, this value is cached for performance
-   */
-  private transient int hashCode;
-
-  private transient String toString;
-
-  /**
-   * Empty constructor for serialization
-   */
-  public ByteArrayWrapper() {
-  }
-
-  /**
-   * Default constructor constructs a ValueWrapper
-   * and initialize the {@link #value}
-   * 
-   * @param value
-   */
-  public ByteArrayWrapper(byte[] value) {
-    this.value = value;
-    this.hashCode = Arrays.hashCode(value);
-  }
-
-  @Override
-  public void toData(DataOutput out) throws IOException {
-    DataSerializer.writeByteArray(value, out);
-  }
-
-  @Override
-  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
-    this.value = DataSerializer.readByteArray(in);;
-    this.hashCode = Arrays.hashCode(this.value);
-  }
-
-  @Override
-  public String toString() {
-    if (toString == null)
-      toString = Coder.bytesToString(this.value);
-    return toString;
-  }
-
-  public byte[] toBytes() {
-    return this.value;
-  }
-
-  public void setBytes(byte[] bytes) {
-    this.value = bytes;
-    this.toString = null;
-    this.hashCode = Arrays.hashCode(bytes);
-  }
-
-  /**
-   * Getter for the length of the {@link #value} array
-   * @return The length of the value array
-   */
-  public int length() {
-    return value.length;
-  }
-
-  /**
-   * Hash code for byte[] wrapped by this object,
-   * the actual hashcode is determined by Arrays.hashCode(byte[])
-   */
-  @Override
-  public int hashCode() {
-    return this.hashCode;
-  }
-
-
-  /**
-   * This equals is neither symmetric and therefore not transitive, 
-   * because a String with the same underlying bytes is considered
-   * equal. Clearly calling {@link String#equals(Object)} would not 
-   * yield the same result
-   */
-  @Override
-  public boolean equals(Object other) {
-    if (other instanceof ByteArrayWrapper)
-      return Arrays.equals(value, ((ByteArrayWrapper) other).value);
-    else if (other instanceof String) {
-      return Arrays.equals(value, Coder.stringToBytes((String) other));
-    }
-    return false;
-  }
-
-  /**
-   * This is a byte to byte comparator, it is not lexicographical but purely compares
-   * byte by byte values
-   */
-  @Override
-  public int compareTo(ByteArrayWrapper other) {
-    return arrayCmp(value, other.value);
-
-  }
-
-  /**
-   * Private helper method to compare two byte arrays, A.compareTo(B). The comparison
-   * is basically numerical, for each byte index, the byte representing the greater
-   * value will be the greater
-   * 
-   * @param A byte[]
-   * @param B byte[]
-   * @return 1 if A > B, -1 if B > A, 0 if A == B
-   */
-  private int arrayCmp(byte[] A, byte[] B) {
-    if (A == B)
-      return 0;
-    if (A == null) {
-      return -1;
-    } else if (B == null) {
-      return 1;
-    }
-
-    int len = Math.min(A.length, B.length);
-
-    for (int i = 0; i < len; i++) {
-      byte a = A[i];
-      byte b = B[i];
-      int diff = a - b;
-      if (diff > 0)
-        return 1;
-      else if (diff < 0)
-        return -1;
-    }
-
-    if (A.length > B.length)
-      return 1;
-    else if (B.length > A.length)
-      return -1;
-
-    return 0;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteToCommandDecoder.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteToCommandDecoder.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteToCommandDecoder.java
deleted file mode 100644
index 31a0c71..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ByteToCommandDecoder.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.redis;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.handler.codec.ByteToMessageDecoder;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This is the first part of the channel pipeline for Netty. Here incoming
- * bytes are read and a created {@link Command} is sent down the pipeline.
- * It is unfortunate that this class is not {@link io.netty.channel.ChannelHandler.Sharable} because no state
- * is kept in this class. State is kept by {@link ByteToMessageDecoder}, it may
- * be worthwhile to look at a different decoder setup as to avoid allocating a decoder
- * for every new connection.
- * <p>
- * The code flow of the protocol parsing may not be exactly Java like, but this is done 
- * very intentionally. It was found that in cases where large Redis requests are sent
- * that end up being fragmented, throwing exceptions when the command could not be fully
- * parsed took up an enormous amount of cpu time. The simplicity of the Redis protocol
- * allows us to just back out and wait for more data, while exceptions are left to 
- * malformed requests which should never happen if using a proper Redis client.
- * 
- *
- */
-public class ByteToCommandDecoder extends ByteToMessageDecoder {
-
-  /**
-   * Important note
-   * 
-   * Do not use '' <-- java primitive chars. Redis uses {@link Coder#CHARSET}
-   * encoding so we should not risk java handling char to byte conversions, rather 
-   * just hard code {@link Coder#CHARSET} chars as bytes
-   */
-  
-  private static final byte rID = 13; // '\r';
-  private static final byte nID = 10; // '\n';
-  private static final byte bulkStringID = 36; // '$';
-  private static final byte arrayID = 42; // '*';
-  private static final int MAX_BULK_STRING_LENGTH = 512 * 1024 * 1024; // 512 MB
-  
-  public ByteToCommandDecoder() {
-  }
-
-  @Override
-  protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
-    Command c = null;
-    do {
-      in.markReaderIndex();
-      c = parse(in);
-      if (c == null) {
-        in.resetReaderIndex();
-        return;
-      }
-      out.add(c);
-    } while (in.isReadable()); // Try to take advantage of pipelining if it is being used
-  }
-
-  private Command parse(ByteBuf buffer) throws RedisCommandParserException {
-    if (buffer == null)
-      throw new NullPointerException();
-    if (!buffer.isReadable())
-      return null;
-
-    byte firstB = buffer.readByte();
-    if (firstB != arrayID)
-      throw new RedisCommandParserException("Expected: " + (char) arrayID + " Actual: " + (char) firstB);
-    ArrayList<byte[]> commandElems = new ArrayList<byte[]>();
-
-    if (!parseArray(commandElems, buffer))
-      return null;
-
-    return new Command(commandElems);
-  }
-
-  private boolean parseArray(ArrayList<byte[]> commandElems, ByteBuf buffer) throws RedisCommandParserException { 
-    byte currentChar;
-    int arrayLength = parseCurrentNumber(buffer);
-    if (arrayLength == Integer.MIN_VALUE || !parseRN(buffer))
-      return false;
-    if (arrayLength < 0 || arrayLength > 1000000000)
-      throw new RedisCommandParserException("invalid multibulk length");
-
-    for (int i = 0; i < arrayLength; i++) {
-      if (!buffer.isReadable())
-        return false;
-      currentChar = buffer.readByte();
-      if (currentChar == bulkStringID) {
-        byte[] newBulkString = parseBulkString(buffer);
-        if (newBulkString == null)
-          return false;
-        commandElems.add(newBulkString);
-      } else
-        throw new RedisCommandParserException("expected: \'$\', got \'" + (char) currentChar + "\'");
-    }
-    return true;
-  }
-
-  /**
-   * Helper method to parse a bulk string when one is seen
-   * 
-   * @param buffer Buffer to read from
-   * @return byte[] representation of the Bulk String read
-   * @throws RedisCommandParserException Thrown when there is illegal syntax
-   */
-  private byte[] parseBulkString(ByteBuf buffer) throws RedisCommandParserException {
-    int bulkStringLength = parseCurrentNumber(buffer);
-    if (bulkStringLength == Integer.MIN_VALUE)
-      return null;
-    if (bulkStringLength > MAX_BULK_STRING_LENGTH)
-      throw new RedisCommandParserException("invalid bulk length, cannot exceed max length of " + MAX_BULK_STRING_LENGTH);
-    if (!parseRN(buffer))
-      return null;
-
-    if (!buffer.isReadable(bulkStringLength))
-      return null;
-    byte[] bulkString = new byte[bulkStringLength];
-    buffer.readBytes(bulkString);
-
-    if (!parseRN(buffer))
-      return null;
-
-    return bulkString;
-  }
-
-  /**
-   * Helper method to parse the number at the beginning of the buffer
-   * 
-   * @param buffer Buffer to read
-   * @return The number found at the beginning of the buffer
-   */
-  private int parseCurrentNumber(ByteBuf buffer) {
-    int number = 0;
-    int readerIndex = buffer.readerIndex();
-    byte b = 0;
-    while (true) {
-      if (!buffer.isReadable())
-        return Integer.MIN_VALUE;
-      b = buffer.readByte();
-      if (Character.isDigit(b)) {
-        number = number * 10 + (int) (b - '0');
-        readerIndex++;
-      } else {
-        buffer.readerIndex(readerIndex);
-        break;
-      }
-    }
-    return number;
-  }
-
-  /**
-   * Helper method that is called when the next characters are 
-   * supposed to be "\r\n"
-   * 
-   * @param buffer Buffer to read from
-   * @throws RedisCommandParserException Thrown when the next two characters
-   * are not "\r\n"
-   */
-  private boolean parseRN(ByteBuf buffer) throws RedisCommandParserException {
-    if (!buffer.isReadable(2))
-      return false;
-    byte b = buffer.readByte();
-    if (b != rID)
-      throw new RedisCommandParserException("expected \'" + (char) rID + "\', got \'" + (char) b + "\'");
-    b = buffer.readByte();
-    if (b != nID)
-      throw new RedisCommandParserException("expected: \'" + (char) nID + "\', got \'" + (char) b + "\'");
-    return true;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
deleted file mode 100644
index 89cc5d4..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.redis;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.ByteBufAllocator;
-
-import java.io.UnsupportedEncodingException;
-import java.text.DecimalFormat;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.query.Struct;
-
-/**
- * This is a safe encoder and decoder for all redis matching needs
- * 
- *
- */
-public class Coder {
-
-  /*
-   * Take no chances on char to byte conversions with default charsets on jvms, 
-   * so we'll hard code the UTF-8 symbol values as bytes here
-   */
-
-
-  /**
-   * byte identifier of a bulk string
-   */
-  public static final byte BULK_STRING_ID = 36; // '$'
-
-  /**
-   * byte identifier of an array
-   */
-  public static final byte ARRAY_ID = 42; // '*'
-
-  /**
-   * byte identifier of an error
-   */
-  public static final byte ERROR_ID = 45; // '-'
-
-  /**
-   * byte identifier of an integer
-   */
-  public static final byte INTEGER_ID = 58; // ':'
-
-  public static final byte OPEN_BRACE_ID = 0x28; // '('
-  public static final byte OPEN_BRACKET_ID = 0x5b; // '['
-  public static final byte HYPHEN_ID = 0x2d; // '-'
-  public static final byte PLUS_ID = 0x2b; // '+'
-  public static final byte NUMBER_1_BYTE = 0x31; // '1'
-  /**
-   * byte identifier of a simple string
-   */
-  public static final byte SIMPLE_STRING_ID = 43; // '+'
-  public static final String CRLF = "\r\n";
-  public static final byte[] CRLFar = stringToBytes(CRLF); // {13, 10} == {'\r', '\n'}
-
-  /**
-   * byte array of a nil response
-   */
-  public static final byte[] bNIL = stringToBytes("$-1\r\n"); // {'$', '-', '1', '\r', '\n'};
-
-  /**
-   * byte array of an empty string
-   */
-  public static final byte[] bEMPTY_ARRAY = stringToBytes("*0\r\n"); // {'*', '0', '\r', '\n'};
-
-  public static final byte[] err = stringToBytes("ERR ");
-  public static final byte[] noAuth = stringToBytes("NOAUTH ");
-  public static final byte[] wrongType = stringToBytes("WRONGTYPE ");
-
-  /**
-   * The charset being used by this coder, {@value #CHARSET}.
-   */
-  public static final String CHARSET = "UTF-8";
-
-  protected static final DecimalFormat decimalFormatter = new DecimalFormat("#");
-  static {
-    decimalFormatter.setMaximumFractionDigits(10);
-  }
-
-  /**
-   * Positive infinity string
-   */
-  public static final String P_INF = "+inf";
-
-  /**
-   * Negative infinity string
-   */
-  public static final String N_INF = "-inf";
-
-  public static final ByteBuf getBulkStringResponse(ByteBufAllocator alloc, byte[] value) {
-    ByteBuf response = alloc.buffer(value.length + 20);
-    response.writeByte(BULK_STRING_ID);
-    response.writeBytes(intToBytes(value.length));
-    response.writeBytes(CRLFar);
-    response.writeBytes(value);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getBulkStringResponse(ByteBufAllocator alloc, double value) {
-    ByteBuf response = alloc.buffer();
-    byte[] doub = doubleToBytes(value);
-    response.writeByte(BULK_STRING_ID);
-    response.writeBytes(intToBytes(doub.length));
-    response.writeBytes(CRLFar);
-    response.writeBytes(doub);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getBulkStringResponse(ByteBufAllocator alloc, String value) {
-    byte[] valueAr = stringToBytes(value);
-    int length = valueAr == null ? 0 : valueAr.length;
-    ByteBuf response = alloc.buffer(length + 20);
-    response.writeByte(BULK_STRING_ID);
-    response.writeBytes(intToBytes(length));
-    response.writeBytes(CRLFar);
-    response.writeBytes(valueAr);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getBulkStringArrayResponse(ByteBufAllocator alloc, List<String> items) {
-    Iterator<String> it = items.iterator();
-    ByteBuf response = alloc.buffer();
-    response.writeByte(ARRAY_ID);
-    response.writeBytes(intToBytes(items.size()));
-    response.writeBytes(CRLFar);
-    while(it.hasNext()) {
-      String next = it.next();
-      response.writeByte(BULK_STRING_ID);
-      response.writeBytes(intToBytes(next.length()));
-      response.writeBytes(CRLFar);
-      response.writeBytes(stringToBytes(next));
-      response.writeBytes(CRLFar);
-    }
-    return response;
-  }
-
-  public static final ByteBuf getBulkStringArrayResponse(ByteBufAllocator alloc, Collection<ByteArrayWrapper> items) {
-    Iterator<ByteArrayWrapper> it = items.iterator();
-    ByteBuf response = alloc.buffer();
-    response.writeByte(ARRAY_ID);
-    response.writeBytes(intToBytes(items.size()));
-    response.writeBytes(CRLFar);
-    while(it.hasNext()) {
-      ByteArrayWrapper nextWrapper = it.next();
-      if (nextWrapper != null) {
-        response.writeByte(BULK_STRING_ID);
-        response.writeBytes(intToBytes(nextWrapper.length()));
-        response.writeBytes(CRLFar);
-        response.writeBytes(nextWrapper.toBytes());
-        response.writeBytes(CRLFar);
-      } else
-        response.writeBytes(getNilResponse(alloc));
-    }
-
-    return response;
-  }
-
-  public static final ByteBuf getKeyValArrayResponse(ByteBufAllocator alloc, Collection<Entry<ByteArrayWrapper, ByteArrayWrapper>> items) {
-    Iterator<Map.Entry<ByteArrayWrapper,ByteArrayWrapper>> it = items.iterator();
-    ByteBuf response = alloc.buffer();
-    response.writeByte(ARRAY_ID);
-
-    int size = 0;
-    ByteBuf tmp = alloc.buffer();
-    while(it.hasNext()) {
-      Map.Entry<ByteArrayWrapper,ByteArrayWrapper> next = it.next();
-      byte[] key;
-      byte[] nextByteArray;
-      try {
-        key = next.getKey().toBytes();
-        nextByteArray = next.getValue().toBytes();
-      } catch (EntryDestroyedException e) {
-        continue;
-      }
-      tmp.writeByte(BULK_STRING_ID); // Add key
-      tmp.writeBytes(intToBytes(key.length));
-      tmp.writeBytes(CRLFar);
-      tmp.writeBytes(key);
-      tmp.writeBytes(CRLFar);
-      tmp.writeByte(BULK_STRING_ID); // Add value
-      tmp.writeBytes(intToBytes(nextByteArray.length));
-      tmp.writeBytes(CRLFar);
-      tmp.writeBytes(nextByteArray);
-      tmp.writeBytes(CRLFar);
-      size++;
-    }
-
-    response.writeBytes(intToBytes(size*2));
-    response.writeBytes(CRLFar);
-    response.writeBytes(tmp);
-
-    tmp.release();
-
-    return response;
-  }
-
-  public static final ByteBuf getScanResponse(ByteBufAllocator alloc, List<?> items) {
-    ByteBuf response = alloc.buffer();
-    response.writeByte(ARRAY_ID);
-    response.writeBytes(intToBytes(2));
-    response.writeBytes(CRLFar);
-    response.writeByte(BULK_STRING_ID);
-    byte[] cursor = stringToBytes((String) items.get(0));
-    response.writeBytes(intToBytes(cursor.length));
-    response.writeBytes(CRLFar);
-    response.writeBytes(cursor);
-    response.writeBytes(CRLFar);
-    items = items.subList(1, items.size());
-    Iterator<?> it = items.iterator();
-    response.writeByte(ARRAY_ID);
-    response.writeBytes(intToBytes(items.size()));
-    response.writeBytes(CRLFar);
-
-    while(it.hasNext()) {
-      Object nextObject = it.next();
-      if (nextObject instanceof String) {
-        String next = (String) nextObject;
-        response.writeByte(BULK_STRING_ID);
-        response.writeBytes(intToBytes(next.length()));
-        response.writeBytes(CRLFar);
-        response.writeBytes(stringToBytes(next));
-        response.writeBytes(CRLFar);
-      } else if (nextObject instanceof ByteArrayWrapper) {
-        byte[] next = ((ByteArrayWrapper) nextObject).toBytes();
-        response.writeByte(BULK_STRING_ID);
-        response.writeBytes(intToBytes(next.length));
-        response.writeBytes(CRLFar);
-        response.writeBytes(next);
-        response.writeBytes(CRLFar);
-      }
-    }
-    return response;
-  }
-
-  public static final ByteBuf getEmptyArrayResponse(ByteBufAllocator alloc) {
-    ByteBuf buf = alloc.buffer().writeBytes(bEMPTY_ARRAY);
-    return buf;
-  }
-
-  public static final ByteBuf getSimpleStringResponse(ByteBufAllocator alloc, String string) {
-    byte[] simpAr = stringToBytes(string);
-
-    ByteBuf response = alloc.buffer(simpAr.length + 20);
-    response.writeByte(SIMPLE_STRING_ID);
-    response.writeBytes(simpAr);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getErrorResponse(ByteBufAllocator alloc, String error) {
-    byte[] errorAr = stringToBytes(error);
-    ByteBuf response = alloc.buffer(errorAr.length + 25);
-    response.writeByte(ERROR_ID);
-    response.writeBytes(err);
-    response.writeBytes(errorAr);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getNoAuthResponse(ByteBufAllocator alloc, String error) {
-    byte[] errorAr = stringToBytes(error);
-    ByteBuf response = alloc.buffer(errorAr.length + 25);
-    response.writeByte(ERROR_ID);
-    response.writeBytes(noAuth);
-    response.writeBytes(errorAr);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getWrongTypeResponse(ByteBufAllocator alloc, String error) {
-    byte[] errorAr = stringToBytes(error);
-    ByteBuf response = alloc.buffer(errorAr.length + 31);
-    response.writeByte(ERROR_ID);
-    response.writeBytes(wrongType);
-    response.writeBytes(errorAr);
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getIntegerResponse(ByteBufAllocator alloc, int integer) {
-    ByteBuf response = alloc.buffer(15);
-    response.writeByte(INTEGER_ID);
-    response.writeBytes(intToBytes(integer));
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getIntegerResponse(ByteBufAllocator alloc, long l) {
-    ByteBuf response = alloc.buffer(25);
-    response.writeByte(INTEGER_ID);
-    response.writeBytes(longToBytes(l));
-    response.writeBytes(CRLFar);
-    return response;
-  }
-
-  public static final ByteBuf getNilResponse(ByteBufAllocator alloc) {
-    ByteBuf buf = alloc.buffer().writeBytes(bNIL);
-    return buf;
-  }
-
-  public static ByteBuf getBulkStringArrayResponseOfValues(ByteBufAllocator alloc, Collection<?> items) {
-    Iterator<?> it = items.iterator();
-    ByteBuf response = alloc.buffer();
-    response.writeByte(Coder.ARRAY_ID);
-    ByteBuf tmp = alloc.buffer();
-    int size = 0;
-    while(it.hasNext()) {
-      Object next = it.next();
-      ByteArrayWrapper nextWrapper = null;
-      if (next instanceof Entry) {
-        try {
-          nextWrapper = (ByteArrayWrapper) ((Entry<?, ?>) next).getValue();
-        } catch (EntryDestroyedException e) {
-          continue;
-        }
-      } else if (next instanceof Struct) {
-        nextWrapper = (ByteArrayWrapper) ((Struct) next).getFieldValues()[1];
-      }
-      if (nextWrapper != null) {
-        tmp.writeByte(Coder.BULK_STRING_ID);
-        tmp.writeBytes(intToBytes(nextWrapper.length()));
-        tmp.writeBytes(Coder.CRLFar);
-        tmp.writeBytes(nextWrapper.toBytes());
-        tmp.writeBytes(Coder.CRLFar);
-      } else {
-        tmp.writeBytes(Coder.bNIL);
-      }
-      size++;
-    }
-
-    response.writeBytes(intToBytes(size));
-    response.writeBytes(Coder.CRLFar);
-    response.writeBytes(tmp);
-
-    tmp.release();
-
-    return response;
-  }
-
-  public static ByteBuf zRangeResponse(ByteBufAllocator alloc, Collection<?> list, boolean withScores) {
-    if (list.isEmpty())
-      return Coder.getEmptyArrayResponse(alloc);
-
-    ByteBuf buffer = alloc.buffer();
-    buffer.writeByte(Coder.ARRAY_ID);
-    ByteBuf tmp = alloc.buffer();
-    int size = 0;
-
-    for(Object entry: list) {
-      ByteArrayWrapper key;
-      DoubleWrapper score;
-      if (entry instanceof Entry) {
-        try {
-          key = (ByteArrayWrapper) ((Entry<?, ?>) entry).getKey();
-          score = (DoubleWrapper) ((Entry<?, ?>) entry).getValue();
-        } catch (EntryDestroyedException e) {
-          continue;
-        }
-      } else {
-        Object[] fieldVals = ((Struct) entry).getFieldValues();
-        key = (ByteArrayWrapper) fieldVals[0];
-        score = (DoubleWrapper) fieldVals[1];
-      }
-      byte[] byteAr = key.toBytes();
-      tmp.writeByte(Coder.BULK_STRING_ID);
-      tmp.writeBytes(intToBytes(byteAr.length));
-      tmp.writeBytes(Coder.CRLFar);
-      tmp.writeBytes(byteAr);
-      tmp.writeBytes(Coder.CRLFar);
-      size++;
-      if (withScores) {
-        String scoreString = score.toString();
-        byte[] scoreAr = stringToBytes(scoreString);
-        tmp.writeByte(Coder.BULK_STRING_ID);
-        tmp.writeBytes(intToBytes(scoreString.length()));
-        tmp.writeBytes(Coder.CRLFar);
-        tmp.writeBytes(scoreAr);
-        tmp.writeBytes(Coder.CRLFar);
-        size++;
-      }
-    }
-
-    buffer.writeBytes(intToBytes(size));
-    buffer.writeBytes(Coder.CRLFar);
-    buffer.writeBytes(tmp);
-
-    tmp.release();
-
-    return buffer;
-  }
-
-  public static ByteBuf getArrayOfNils(ByteBufAllocator alloc, int length) {
-    ByteBuf response = alloc.buffer();
-    response.writeByte(Coder.ARRAY_ID);
-    response.writeBytes(intToBytes(length));
-    response.writeBytes(Coder.CRLFar);
-
-    for (int i = 0; i < length; i++)
-      response.writeBytes(bNIL);
-
-    return response;
-  }
-
-  public static String bytesToString(byte[] bytes) {
-    if (bytes == null)
-      return null;
-    try {
-      return new String(bytes, CHARSET).intern();
-    } catch (UnsupportedEncodingException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public static String doubleToString(double d) {
-    if (d == Double.POSITIVE_INFINITY)
-      return "Infinity";
-    else if (d == Double.NEGATIVE_INFINITY)
-      return "-Infinity";
-    return String.valueOf(d);
-  }
-
-  public static byte[] stringToBytes(String string) {
-    if (string == null || string.equals(""))
-      return null;
-    try {
-      return string.getBytes(CHARSET);
-    } catch (UnsupportedEncodingException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public static ByteArrayWrapper stringToByteArrayWrapper(String s) {
-    return new ByteArrayWrapper(stringToBytes(s));
-  }
-
-  /*
-   * These toByte methods convert to byte arrays of the
-   * string representation of the input, not literal to byte
-   */
-
-  public static byte[] intToBytes(int i) {
-    return stringToBytes(String.valueOf(i));
-  }
-
-  public static byte[] longToBytes(long l) {
-    return stringToBytes(String.valueOf(l));
-  }
-
-  public static byte[] doubleToBytes(double d) {
-    return stringToBytes(doubleToString(d));
-  }
-
-  public static int bytesToInt(byte[] bytes) {
-    return Integer.parseInt(bytesToString(bytes));
-  }
-
-  public static long bytesToLong(byte[] bytes) {
-    return Long.parseLong(bytesToString(bytes));
-  }
-
-  /**
-   * A conversion where the byte array actually represents a string,
-   * so it is converted as a string not as a literal double
-   * @param bytes Array holding double
-   * @return Parsed value
-   * @throws NumberFormatException if bytes to string does not yield a convertible double
-   */
-  public static Double bytesToDouble(byte[] bytes) {
-    return stringToDouble(bytesToString(bytes));
-  }
-
-  /**
-   * Redis specific manner to parse floats
-   * @param d String holding double
-   * @return Value of string
-   * @throws NumberFormatException if the double cannot be parsed
-   */
-  public static double stringToDouble(String d) {
-    if (d.equalsIgnoreCase(P_INF))
-      return Double.POSITIVE_INFINITY;
-    else if (d.equalsIgnoreCase(N_INF))
-      return Double.NEGATIVE_INFINITY;
-    else
-      return Double.parseDouble(d);
-  }
-
-  public static ByteArrayWrapper stringToByteWrapper(String s) {
-    return new ByteArrayWrapper(stringToBytes(s));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Command.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Command.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Command.java
deleted file mode 100755
index 24bf0bb..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/Command.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.redis;
-
-import io.netty.buffer.ByteBuf;
-
-import java.nio.channels.SocketChannel;
-import java.util.List;
-
-/**
- * The command class is used in holding a received Redis command. Each sent 
- * command resides in an instance of this class. This class is designed to be
- * used strictly by getter and setter methods.
- * 
- *
- */
-public class Command {
-
-  private final List<byte[]> commandElems;
-  private final RedisCommandType commandType;
-  private ByteBuf response;
-  private String key;
-  private ByteArrayWrapper bytes;
-
-  /**
-   * Constructor for {@link Command}. Must initialize Command with a {@link SocketChannel}
-   * and a {@link List} of command elements
-   * 
-   * @param commandElems List of elements in command
-   */
-  public Command (List<byte[]> commandElems) {
-    if (commandElems == null || commandElems.isEmpty())
-      throw new IllegalArgumentException("List of command elements cannot be empty -> List:" + commandElems);
-    this.commandElems = commandElems;
-    this.response = null;
-
-    RedisCommandType type;
-
-    try {
-      byte[] charCommand = commandElems.get(0);
-      String commandName = Coder.bytesToString(charCommand).toUpperCase();
-      type = RedisCommandType.valueOf(commandName);
-    } catch (Exception e) {
-      type = RedisCommandType.UNKNOWN;
-    }
-    this.commandType = type;
-
-  }
-
-  /**
-   * Used to get the command element list
-   * 
-   * @return List of command elements in form of {@link List}
-   */
-  public List<byte[]> getProcessedCommand() {
-    return this.commandElems;
-  }
-
-  /**
-   * Getter method for the command type
-   * 
-   * @return The command type
-   */
-  public RedisCommandType getCommandType() {
-    return this.commandType;
-  }
-
-  /**
-   * Getter method to get the response to be sent
-   * 
-   * @return The response
-   */
-  public ByteBuf getResponse() {
-    return response;
-  }
-
-  /**
-   * Setter method to set the response to be sent
-   * 
-   * @param response The response to be sent
-   */
-  public void setResponse(ByteBuf response) {
-    this.response = response;
-  }
-
-  public boolean hasError() {
-    if (response == null)
-      return false;
-
-    if (response.getByte(0) == Coder.ERROR_ID)
-      return true;
-
-    return false;
-  }
-
-  /**
-   * Convenience method to get a String representation of the key
-   * in a Redis command, always at the second position in the sent
-   * command array
-   * 
-   * @return Returns the second element in the parsed command
-   * list, which is always the key for commands indicating
-   * a key
-   */
-  public String getStringKey() {
-    if (this.commandElems.size() > 1) {
-      if (this.bytes == null) {
-        this.bytes = new ByteArrayWrapper(this.commandElems.get(1));
-        this.key = this.bytes.toString();
-      } else if (this.key == null)
-        this.key = this.bytes.toString();
-      return this.key;
-    } else 
-      return null;
-  }
-
-  public ByteArrayWrapper getKey() {
-    if (this.commandElems.size() > 1) {
-      if (this.bytes == null)
-        this.bytes = new ByteArrayWrapper(this.commandElems.get(1));
-      return this.bytes;
-    } else 
-      return null;
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder b = new StringBuilder();
-    for (byte[] bs : this.commandElems) {
-      b.append(Coder.bytesToString(bs));
-      b.append(' ');
-    }
-    return b.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/DoubleWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/DoubleWrapper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/DoubleWrapper.java
deleted file mode 100755
index 48d62fc..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/DoubleWrapper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.redis;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * This is a wrapper class for doubles, similar to {@link ByteArrayWrapper}
- * 
- *
- */
-public class DoubleWrapper implements DataSerializable, Comparable<Object> {
-
-  private static final long serialVersionUID = 6946858357297398633L;
-
-  public Double score;
-  private String toString;
-  
-  public DoubleWrapper() {}
-
-  public DoubleWrapper(Double dubs) {
-    this.score = dubs;
-  }
-
-  @Override
-  public void toData(DataOutput out) throws IOException {
-    DataSerializer.writeDouble(score, out);
-  }
-
-  @Override
-  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
-    this.score = DataSerializer.readDouble(in);
-  }
-
-  @Override
-  public int compareTo(Object arg0) {
-    Double other;
-    if (arg0 instanceof DoubleWrapper) {
-      other = ((DoubleWrapper) arg0).score;
-    } else if (arg0 instanceof Double) {
-      other = (Double) arg0;
-    } else
-      return 0;
-    Double diff = this.score - other;
-    if (diff > 0)
-      return 1;
-    else if (diff < 0)
-      return -1;
-    else
-      return 0;
-  }
-
-  public String toString() {
-    if (this.toString == null)
-      this.toString = Coder.doubleToString(score);
-    return this.toString;
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfd481e0/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ExecutionHandlerContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ExecutionHandlerContext.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ExecutionHandlerContext.java
deleted file mode 100644
index d4c3d47..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/redis/ExecutionHandlerContext.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.redis;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.ByteBufAllocator;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.channel.ChannelInboundHandlerAdapter;
-import io.netty.handler.codec.DecoderException;
-import io.netty.util.concurrent.EventExecutor;
-
-import java.io.IOException;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.internal.redis.executor.transactions.TransactionExecutor;
-import com.gemstone.gemfire.redis.GemFireRedisServer;
-
-/**
- * This class extends {@link ChannelInboundHandlerAdapter} from Netty and it is
- * the last part of the channel pipeline. The {@link ByteToCommandDecoder} forwards a
- * {@link Command} to this class which executes it and sends the result back to the
- * client. Additionally, all exception handling is done by this class. 
- * <p>
- * Besides being part of Netty's pipeline, this class also serves as a context to the
- * execution of a command. It abstracts transactions, provides access to the {@link RegionProvider}
- * and anything else an executing {@link Command} may need.
- * 
- *
- */
-public class ExecutionHandlerContext extends ChannelInboundHandlerAdapter {
-
-  private static final int WAIT_REGION_DSTRYD_MILLIS = 100;
-  private static final int MAXIMUM_NUM_RETRIES = (1000*60)/WAIT_REGION_DSTRYD_MILLIS; // 60 seconds total
-
-  private final Cache cache;
-  private final GemFireRedisServer server;
-  private final LogWriter logger;
-  private final Channel channel;
-  private final AtomicBoolean needChannelFlush;
-  private final Runnable flusher;
-  private final EventExecutor lastExecutor;
-  private final ByteBufAllocator byteBufAllocator;
-  /**
-   * TransactionId for any transactions started by this client
-   */
-  private TransactionId transactionID;
-
-  /**
-   * Queue of commands for a given transaction
-   */
-  private Queue<Command> transactionQueue;
-  private final RegionProvider regionProvider;
-  private final byte[] authPwd;
-
-  private boolean isAuthenticated;
-
-  /**
-   * Default constructor for execution contexts. 
-   * 
-   * @param ch Channel used by this context, should be one to one
-   * @param cache The Geode cache instance of this vm
-   * @param regionProvider The region provider of this context
-   * @param server Instance of the server it is attached to, only used so that any execution can initiate a shutdwon
-   * @param pwd Authentication password for each context, can be null
-   */
-  public ExecutionHandlerContext(Channel ch, Cache cache, RegionProvider regionProvider, GemFireRedisServer server, byte[] pwd) {
-    if (ch == null || cache == null || regionProvider == null || server == null)
-      throw new IllegalArgumentException("Only the authentication password may be null");
-    this.cache = cache;
-    this.server = server;
-    this.logger = cache.getLogger();
-    this.channel = ch;
-    this.needChannelFlush  = new AtomicBoolean(false);
-    this.flusher = new Runnable() {
-
-      @Override
-      public void run() {
-        flushChannel();
-      }
-
-    };
-    this.lastExecutor = channel.pipeline().lastContext().executor();
-    this.byteBufAllocator = channel.alloc();
-    this.transactionID = null;
-    this.transactionQueue = null; // Lazy
-    this.regionProvider = regionProvider;
-    this.authPwd = pwd;
-    this.isAuthenticated = pwd != null ? false : true;
-  }
-
-  private void flushChannel() {
-    while (needChannelFlush.getAndSet(false)) {
-      channel.flush();
-    }
-  }
-
-  private void writeToChannel(ByteBuf message) {
-    channel.write(message, channel.voidPromise());
-    if (!needChannelFlush.getAndSet(true)) {
-      this.lastExecutor.execute(flusher);
-    }
-  }
-
-  /**
-   * This will handle the execution of received commands
-   */
-  @Override
-  public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
-    Command command = (Command) msg;
-    executeCommand(ctx, command);
-  }
-
-  /**
-   * Exception handler for the entire pipeline
-   */
-  @Override
-  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
-    if (cause instanceof IOException) {
-      channelInactive(ctx);
-      return;
-    }
-    ByteBuf response = getExceptionResponse(ctx, cause);
-    writeToChannel(response);
-  }
-
-  private ByteBuf getExceptionResponse(ChannelHandlerContext ctx, Throwable cause) {
-    ByteBuf response; 
-    if (cause instanceof RedisDataTypeMismatchException)
-      response = Coder.getWrongTypeResponse(this.byteBufAllocator, cause.getMessage());
-    else if (cause instanceof DecoderException && cause.getCause() instanceof RedisCommandParserException)
-      response = Coder.getErrorResponse(this.byteBufAllocator, RedisConstants.PARSING_EXCEPTION_MESSAGE);
-    else if (cause instanceof RegionCreationException) {
-      this.logger.error(cause);
-      response = Coder.getErrorResponse(this.byteBufAllocator, RedisConstants.ERROR_REGION_CREATION);
-    } else if (cause instanceof InterruptedException || cause instanceof CacheClosedException)
-      response = Coder.getErrorResponse(this.byteBufAllocator, RedisConstants.SERVER_ERROR_SHUTDOWN);
-    else if (cause instanceof IllegalStateException) {
-      response = Coder.getErrorResponse(this.byteBufAllocator, cause.getMessage());
-    } else {
-      if (this.logger.errorEnabled())
-        this.logger.error("GemFireRedisServer-Unexpected error handler for " + ctx.channel(), cause);
-      response = Coder.getErrorResponse(this.byteBufAllocator, RedisConstants.SERVER_ERROR_MESSAGE);
-    }
-    return response;
-  }
-
-  @Override
-  public void channelInactive(ChannelHandlerContext ctx) {
-    if (logger.fineEnabled())
-      logger.fine("GemFireRedisServer-Connection closing with " + ctx.channel().remoteAddress());
-    ctx.channel().close();
-    ctx.close();
-  }
-
-  private void executeCommand(ChannelHandlerContext ctx, Command command) throws Exception {
-    RedisCommandType type = command.getCommandType();
-    Executor exec = type.getExecutor();
-    if (isAuthenticated) {
-      if (type == RedisCommandType.SHUTDOWN) {
-        this.server.shutdown();
-        return;
-      }
-      if (hasTransaction() && !(exec instanceof TransactionExecutor))
-        executeWithTransaction(ctx, exec, command);
-      else
-        executeWithoutTransaction(exec, command); 
-
-      if (hasTransaction() && command.getCommandType() != RedisCommandType.MULTI) {
-        writeToChannel(Coder.getSimpleStringResponse(this.byteBufAllocator, RedisConstants.COMMAND_QUEUED));
-      } else {
-        ByteBuf response = command.getResponse();
-        writeToChannel(response);
-      }
-    } else if (type == RedisCommandType.QUIT) {
-      exec.executeCommand(command, this);
-      ByteBuf response = command.getResponse();
-      writeToChannel(response);
-      channelInactive(ctx);
-    } else if (type == RedisCommandType.AUTH) {
-      exec.executeCommand(command, this);
-      ByteBuf response = command.getResponse();
-      writeToChannel(response);
-    } else {
-      ByteBuf r = Coder.getNoAuthResponse(this.byteBufAllocator, RedisConstants.ERROR_NOT_AUTH);
-      writeToChannel(r);
-    }
-  }
-
-  /**
-   * Private helper method to execute a command without a transaction, done for
-   * special exception handling neatness
-   * 
-   * @param exec Executor to use
-   * @param command Command to execute
-   * @throws Exception Throws exception if exception is from within execution and not to be handled
-   */
-  private void executeWithoutTransaction(final Executor exec, Command command) throws Exception {
-    Exception cause = null;
-    for (int i = 0; i < MAXIMUM_NUM_RETRIES; i++) {
-      try {
-        exec.executeCommand(command, this);
-        return;
-      } catch (Exception e) {
-        cause = e;
-        if (e instanceof RegionDestroyedException || e instanceof RegionNotFoundException || e.getCause() instanceof QueryInvocationTargetException)
-          Thread.sleep(WAIT_REGION_DSTRYD_MILLIS);
-      }
-    }
-    throw cause;
-  }
-
-  private void executeWithTransaction(ChannelHandlerContext ctx, final Executor exec, Command command) throws Exception {
-    CacheTransactionManager txm = cache.getCacheTransactionManager();
-    TransactionId transactionId = getTransactionID();
-    txm.resume(transactionId);
-    try {
-      exec.executeCommand(command, this);
-    } catch(UnsupportedOperationInTransactionException e) {
-      command.setResponse(Coder.getErrorResponse(this.byteBufAllocator, RedisConstants.ERROR_UNSUPPORTED_OPERATION_IN_TRANSACTION));
-    } catch (TransactionException e) {
-      command.setResponse(Coder.getErrorResponse(this.byteBufAllocator, RedisConstants.ERROR_TRANSACTION_EXCEPTION));
-    } catch (Exception e) {
-      ByteBuf response = getExceptionResponse(ctx, e);
-      command.setResponse(response);
-    }
-    getTransactionQueue().add(command);
-    transactionId = txm.suspend();
-    setTransactionID(transactionId);
-  }
-
-  /**
-   * Get the current transacationId
-   * 
-   * @return The current transactionId, null if one doesn't exist
-   */
-  public TransactionId getTransactionID() {
-    return this.transactionID;
-  }
-
-  /**
-   * Check if client has transaction
-   * 
-   * @return True if client has transaction, false otherwise
-   */
-  public boolean hasTransaction() {
-    return transactionID != null;
-  }
-
-  /**
-   * Setter method for transaction
-   * 
-   * @param id TransactionId of current transaction for client
-   */
-  public void setTransactionID(TransactionId id) {
-    this.transactionID = id;
-  }
-
-  /**
-   * Reset the transaction of client
-   */
-  public void clearTransaction() {
-    this.transactionID = null;
-    if (this.transactionQueue != null) {
-      for (Command c : this.transactionQueue) {
-        ByteBuf r = c.getResponse();
-        if (r != null)
-          r.release();
-      }
-      this.transactionQueue.clear();
-    }
-  }
-
-  /**
-   * Getter for transaction command queue
-   * 
-   * @return Command queue
-   */
-  public Queue<Command> getTransactionQueue() {
-    if (this.transactionQueue == null)
-      this.transactionQueue = new ConcurrentLinkedQueue<Command>();
-    return this.transactionQueue;
-  }
-
-  /**
-   * {@link ByteBuf} allocator for this context. All executors
-   * must use this pooled allocator as opposed to having unpooled buffers
-   * for maximum performance
-   * 
-   * @return allocator instance
-   */
-  public ByteBufAllocator getByteBufAllocator() {
-    return this.byteBufAllocator;
-  }
-
-  /**
-   * Gets the provider of Regions
-   * 
-   * @return Provider
-   */
-  public RegionProvider getRegionProvider() {
-    return this.regionProvider;
-  }
-
-  /**
-   * Getter for manager to allow pausing and resuming transactions
-   * @return Instance
-   */
-  public CacheTransactionManager getCacheTransactionManager() {
-    return this.cache.getCacheTransactionManager();
-  }
-
-  /**
-   * Getter for logger
-   * @return instance
-   */
-  public LogWriter getLogger() {
-    return this.cache.getLogger();
-  }
-
-  /**
-   * Get the channel for this context
-   * @return instance
-   *
-  public Channel getChannel() {
-    return this.channel;
-  }
-   */
-
-  /**
-   * Get the authentication password, this will be same server wide.
-   * It is exposed here as opposed to {@link GemFireRedisServer}.
-   * @return password
-   */
-  public byte[] getAuthPwd() {
-    return this.authPwd;
-  }
-
-  /**
-   * Checker if user has authenticated themselves
-   * @return True if no authentication required or authentication complete, false otherwise
-   */
-  public boolean isAuthenticated() {
-    return this.isAuthenticated;
-  }
-
-  /**
-   * Lets this context know the authentication is complete
-   */
-  public void setAuthenticationVerified() {
-    this.isAuthenticated = true;
-  }
-}



Mime
View raw message