You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by nishadi <gi...@git.apache.org> on 2018/05/01 05:53:12 UTC
[GitHub] gora pull request #132: Gora-444 : Add #size() to Result API
Github user nishadi commented on a diff in the pull request:
https://github.com/apache/gora/pull/132#discussion_r185170628
--- Diff: gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java ---
@@ -92,7 +92,9 @@ public boolean nextInner() throws IOException {
@Override
public int size() {
- return map.navigableKeySet().size();
+ int totalSize = map.navigableKeySet().size();
+ int intLimit = (int)this.limit;
+ return intLimit > 0 && totalSize>intLimit ? intLimit : totalSize;
--- End diff --
Please reformat the code with desired spacing.
---