geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [88/90] [abbrv] incubator-geode git commit: GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH
Date Wed, 08 Jun 2016 00:06:05 GMT
GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH

This closes #151


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

Branch: refs/heads/feature/GEODE-835
Commit: ec466fc38e8cc5fc65450362b8d313c35e6ea14f
Parents: 103a6bc
Author: Kevin J. Duling <kduling@pivotal.io>
Authored: Tue Jun 7 12:29:19 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Tue Jun 7 16:34:30 2016 -0700

----------------------------------------------------------------------
 .../internal/cli/functions/DataCommandFunction.java      | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ec466fc3/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
index ace24f2..8a4736b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
@@ -77,6 +77,7 @@ import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.JsonUtil;
 import com.gemstone.gemfire.pdx.PdxInstance;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.logging.log4j.Logger;
 import org.json.JSONArray;
 
@@ -947,13 +948,9 @@ public class DataCommandFunction extends FunctionAdapter implements 
InternalEnt
     }
 
     private String addLimit(String query) {
-      boolean containsLimitOrAggregate = query.contains(" limit")
-          || query.contains(" LIMIT") || query.contains("count(*)");
-      if(!containsLimitOrAggregate){
-        String limitQuery = query + " limit " + getFetchSize();
-        return limitQuery;
-      }
-      else  return query;
+      if (StringUtils.containsIgnoreCase(query, " limit") || StringUtils.containsIgnoreCase(query,
"count(*)"))
+        return query;
+      return query + " limit " + getFetchSize();
     }
   };
 


Mime
View raw message