Skip to content

Commit

Permalink
rename index.page_size to query.page_size
Browse files Browse the repository at this point in the history
Change-Id: I70a0ac73a1641bdb1a71d30b3ce366fe3c593178
  • Loading branch information
Linary committed Mar 18, 2019
1 parent 274d28e commit 15d7395
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ public Iterator<BackendEntry> fetch() {
assert !queries.isEmpty();
if (this.parent.paging()) {
int pageSize = this.graph.configuration()
.get(CoreOptions.INDEX_PAGE_SIZE);
.get(CoreOptions.QUERY_PAGE_SIZE);
return new PageEntryIterator(this, pageSize);
} else {
return this.fetchAll();
}
}

private Iterator<BackendEntry> fetchAll() {
protected Iterator<BackendEntry> fetchAll() {
return new FlatMapperIterator<>(this.queries.iterator(), q -> {
return q.iterator();
});
}

public PageIterator fetchNext(PageState pageState, long pageSize) {
protected PageIterator fetchNext(PageState pageState, long pageSize) {
QueryHolder query = null;
int offset = pageState.offset();
int current = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ public static synchronized CoreOptions instance() {
(60 * 10)
);

public static final ConfigOption<Integer> INDEX_PAGE_SIZE =
public static final ConfigOption<Integer> QUERY_PAGE_SIZE =
new ConfigOption<>(
"index.page_size",
"The size of each page when query by index in paging.",
"query.page_size",
"The size of each page when query using paging.",
rangeInt(0, 10000),
500
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void put(String table, byte[] family, byte[] rowkey,
}

/**
* Add a row record to a table(for index)
* Add a row record to a table(can be used when adding an index)
*/
public void put(String table, byte[] family,
byte[] rowkey, byte[] qualifier, byte[] value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String version() {
* [1.0] HugeGraph-1328: supports backend table version checking
* [1.1] HugeGraph-1322: add support for full-text search
* [1.2] #296: support range sortKey feature
* [1.3] #287: Support pagination when do index query
* [1.3] #287: support pagination when doing index query
*/
return "1.3";
}
Expand Down
2 changes: 1 addition & 1 deletion hugegraph-test/src/main/resources/hugegraph.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edge.tx_capacity=10000
vertex.cache_expire=300
edge.cache_expire=300

index.page_size=10
query.page_size=10

# cassandra backend config
cassandra.host=127.0.0.1
Expand Down

0 comments on commit 15d7395

Please sign in to comment.