geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bogle...@apache.org
Subject geode git commit: GEODE-2951: Removed --pageSize option
Date Tue, 23 May 2017 20:27:21 GMT
Repository: geode
Updated Branches:
  refs/heads/develop db028ac06 -> db81d9280


GEODE-2951: Removed --pageSize option


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

Branch: refs/heads/develop
Commit: db81d9280cf9b2286294ebcfa3ee7c3418da2ce2
Parents: db028ac
Author: Barry Oglesby <boglesby@pivotal.io>
Authored: Tue May 23 12:59:17 2017 -0700
Committer: Barry Oglesby <boglesby@pivotal.io>
Committed: Tue May 23 12:59:17 2017 -0700

----------------------------------------------------------------------
 .../cache/lucene/internal/cli/LuceneIndexCommands.java   |  8 +-------
 .../internal/cli/LuceneIndexCommandsJUnitTest.java       | 11 ++++++-----
 2 files changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/db81d928/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
index 033fedc..5e17f6e 100755
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommands.java
@@ -275,19 +275,13 @@ public class LuceneIndexCommands extends AbstractCommandsSupport {
       @CliOption(key = LuceneCliStrings.LUCENE_SEARCH_INDEX__LIMIT, unspecifiedDefaultValue
= "-1",
           help = LuceneCliStrings.LUCENE_SEARCH_INDEX__LIMIT__HELP) final int limit,
 
-      @CliOption(key = LuceneCliStrings.LUCENE_SEARCH_INDEX__PAGE_SIZE,
-          unspecifiedDefaultValue = "-1",
-          help = LuceneCliStrings.LUCENE_SEARCH_INDEX__PAGE_SIZE__HELP) int pageSize,
-
       @CliOption(key = LuceneCliStrings.LUCENE_SEARCH_INDEX__KEYSONLY,
           unspecifiedDefaultValue = "false",
           help = LuceneCliStrings.LUCENE_SEARCH_INDEX__KEYSONLY__HELP) boolean keysOnly)
{
     try {
       LuceneQueryInfo queryInfo =
           new LuceneQueryInfo(indexName, regionPath, queryString, defaultField, limit, keysOnly);
-      if (pageSize == -1) {
-        pageSize = Integer.MAX_VALUE;
-      }
+      int pageSize = Integer.MAX_VALUE;
       searchResults = getSearchResults(queryInfo);
       return displayResults(pageSize, keysOnly);
     } catch (FunctionInvocationTargetException ignore) {

http://git-wip-us.apache.org/repos/asf/geode/blob/db81d928/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommandsJUnitTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommandsJUnitTest.java
index 143e99d..66e15bb 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommandsJUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/cli/LuceneIndexCommandsJUnitTest.java
@@ -50,6 +50,7 @@ import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
@@ -265,7 +266,7 @@ public class LuceneIndexCommandsJUnitTest {
     doReturn(queryResultsList).when(mockResultCollector).getResult();
 
     CommandResult result =
-        (CommandResult) commands.searchIndex("index", "region", "Result1", "field1", -1,
-1, false);
+        (CommandResult) commands.searchIndex("index", "region", "Result1", "field1", -1,
false);
 
     TabularResultData data = (TabularResultData) result.getResultData();
 
@@ -274,7 +275,7 @@ public class LuceneIndexCommandsJUnitTest {
     assertEquals(Arrays.asList("1.1", "1.2", "1.3"), data.retrieveAllValues("score"));
   }
 
-  @Test
+  @Ignore
   public void testSearchIndexWithPaging() throws Exception {
     final InternalCache mockCache = mock(InternalCache.class, "InternalCache");
     final Gfsh mockGfsh = mock(Gfsh.class);
@@ -306,7 +307,7 @@ public class LuceneIndexCommandsJUnitTest {
     String expectedPage3 = getPage(expectedResults, new int[] {4, 5});
     String expectedPage4 = getPage(expectedResults, new int[] {6});
 
-    commands.searchIndex("index", "region", "Result1", "field1", -1, 2, false);
+    commands.searchIndex("index", "region", "Result1", "field1", -1, false);
     verify(mockGfsh, times(20)).printAsInfo(resultCaptor.capture());
     List<String> actualPageResults = resultCaptor.getAllValues();
 
@@ -358,7 +359,7 @@ public class LuceneIndexCommandsJUnitTest {
     doReturn(queryResultsList).when(mockResultCollector).getResult();
 
     CommandResult result =
-        (CommandResult) commands.searchIndex("index", "region", "Result1", "field1", -1,
-1, true);
+        (CommandResult) commands.searchIndex("index", "region", "Result1", "field1", -1,
true);
 
     TabularResultData data = (TabularResultData) result.getResultData();
 
@@ -398,7 +399,7 @@ public class LuceneIndexCommandsJUnitTest {
     doReturn(queryResultsList).when(mockResultCollector).getResult();
 
     CommandResult result =
-        (CommandResult) commands.searchIndex("index", "region", "Result1", "field1", -1,
-1, true);
+        (CommandResult) commands.searchIndex("index", "region", "Result1", "field1", -1,
true);
 
     TabularResultData data = (TabularResultData) result.getResultData();
 


Mime
View raw message