Repository: falcon Updated Branches: refs/heads/0.7 9ac89247c -> 37fbf122d
FALCON-1374 Remove the cap on numResults. Contributed by Pragya Mittal. Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/37fbf122 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/37fbf122 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/37fbf122 Branch: refs/heads/0.7 Commit: 37fbf122da5dc5b215ff33c0b7bef3985a756be9 Parents: ddb9240 Author: Ajay Yadava <[email protected]> Authored: Fri Aug 14 07:43:24 2015 +0530 Committer: Ajay Yadava <[email protected]> Committed: Fri Aug 14 12:43:02 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ common/src/main/resources/runtime.properties | 1 - .../apache/falcon/resource/AbstractEntityManager.java | 14 -------------- .../org/apache/falcon/resource/EntityManagerTest.java | 8 ++++---- src/conf/runtime.properties | 4 ---- 5 files changed, 6 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/37fbf122/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a790384..1b71717 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,8 @@ Trunk (Unreleased) FALCON-796 Enable users to triage data processing issues through falcon (Ajay Yadava) IMPROVEMENTS + FALCON-1374 Remove the cap on numResults(Pragya Mittal via Ajay Yadava) + FALCON-1379 Doc describes retention incorrectly(Ajay Yadava) FALCON-1359 Improve output format for Feed Instance Listing(Ajay Yadava) http://git-wip-us.apache.org/repos/asf/falcon/blob/37fbf122/common/src/main/resources/runtime.properties ---------------------------------------------------------------------- diff --git a/common/src/main/resources/runtime.properties b/common/src/main/resources/runtime.properties index 2159e1a..f0253e6 100644 --- a/common/src/main/resources/runtime.properties +++ b/common/src/main/resources/runtime.properties @@ -23,7 +23,6 @@ *.falcon.replication.workflow.maxmaps=5 *.falcon.replication.workflow.mapbandwidth=100 -*.webservices.default.max.results.per.page=3000 *.webservices.default.results.per.page=3000 # Default configs to handle replication for late arriving feeds. http://git-wip-us.apache.org/repos/asf/falcon/blob/37fbf122/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java ---------------------------------------------------------------------- diff --git a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java index 43461c8..ff5dc04 100644 --- a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java +++ b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java @@ -78,7 +78,6 @@ public abstract class AbstractEntityManager { protected static final int XML_DEBUG_LEN = 10 * 1024; protected static final Integer DEFAULT_NUM_RESULTS = getDefaultResultsPerPage(); - protected static final int MAX_RESULTS = getMaxResultsPerPage(); private AbstractWorkflowEngine workflowEngine; protected ConfigurationStore configStore = ConfigurationStore.get(); @@ -91,18 +90,6 @@ public abstract class AbstractEntityManager { } } - private static int getMaxResultsPerPage() { - Integer result = 3000; - final String key = "webservices.default.max.results.per.page"; - String value = RuntimeProperties.get().getProperty(key, result.toString()); - try { - result = Integer.valueOf(value); - } catch (NumberFormatException e) { - LOG.warn("Invalid value:{} for key:{} in runtime.properties", value, key); - } - return result; - } - private static int getDefaultResultsPerPage() { Integer result = 3000; final String key = "webservices.default.results.per.page"; @@ -969,7 +956,6 @@ public abstract class AbstractEntityManager { return 0; } - numresults = numresults <= MAX_RESULTS ? numresults : MAX_RESULTS; int retLen = arraySize - offset; if (retLen > numresults) { retLen = numresults; http://git-wip-us.apache.org/repos/asf/falcon/blob/37fbf122/prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java ---------------------------------------------------------------------- diff --git a/prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java b/prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java index c37da40..be1fe1f 100644 --- a/prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java +++ b/prism/src/test/java/org/apache/falcon/resource/EntityManagerTest.java @@ -168,11 +168,11 @@ public class EntityManagerTest extends AbstractEntityManager { CurrentUser.authenticate(System.getProperty("user.name")); } - @Test - public void testCapOnNumberOfResults() { - Assert.assertNotEquals(getRequiredNumberOfResults(10000, 0, 10000), 10000); - Assert.assertEquals(getRequiredNumberOfResults(10000, 0, 10000), MAX_RESULTS); + public void testNumberOfResults() { + Assert.assertEquals(getRequiredNumberOfResults(10000, 0, 10000), 10000); + Assert.assertEquals(getRequiredNumberOfResults(10000, 0, 4000), 4000); + Assert.assertNotEquals(getRequiredNumberOfResults(10000, 0, 10000), 3000); } @Test http://git-wip-us.apache.org/repos/asf/falcon/blob/37fbf122/src/conf/runtime.properties ---------------------------------------------------------------------- diff --git a/src/conf/runtime.properties b/src/conf/runtime.properties index 4d3088b..1eb3f1c 100644 --- a/src/conf/runtime.properties +++ b/src/conf/runtime.properties @@ -30,12 +30,8 @@ prism.falcon.local.endpoint=https://localhost:15443 # falcon server should have the following properties falcon.current.colo=local - #default number of results per call, if numResults option is not specified then this value is used. *.webservices.default.results.per.page=3000 -# maximum number of results allowed to be returned from server, acts as an upper limit for numResults option -*.webservices.default.max.results.per.page=3000 - # retry count - to fetch the status from the workflow engine *.workflow.status.retry.count=30
