Skip to content

Commit

Permalink
merge hugegrpah master (#16)
Browse files Browse the repository at this point in the history
* merge hugegrpah master

* version 0.13.0

* improve min version support to 0.13.0
  • Loading branch information
zyxxoo authored May 5, 2022
1 parent f9a845f commit 50518b4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>hugegraph</artifactId>
<groupId>com.baidu.hugegraph</groupId>
<version>0.12.0</version>
<version>0.13.0</version>
<relativePath>../hugegraph/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ private boolean match(int expected) {
@Override
public boolean hasNext() {
// Update position for paging
if (!this.iter.hasNext()) {
matched = this.iter.hasNext();
if (!matched) {
this.position = null;
this.close();
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.baidu.hugegraph.backend.store.BackendStore;
import com.baidu.hugegraph.backend.store.tikv.TikvStore.TikvGraphStore;
import com.baidu.hugegraph.backend.store.tikv.TikvStore.TikvSchemaStore;
import com.baidu.hugegraph.config.HugeConfig;

public class TikvStoreProvider extends AbstractBackendStoreProvider {

Expand All @@ -33,12 +34,12 @@ protected String namespace() {
}

@Override
protected BackendStore newSchemaStore(String store) {
protected BackendStore newSchemaStore(HugeConfig config, String store) {
return new TikvSchemaStore(this, this.namespace(), store);
}

@Override
protected BackendStore newGraphStore(String store) {
protected BackendStore newGraphStore(HugeConfig config, String store) {
return new TikvGraphStore(this, this.namespace(), store);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import com.baidu.hugegraph.backend.store.BackendEntry;
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn;
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumnIterator;
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumnIteratorWrapper;
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumnIterator.BackendColumnIteratorWrapper;
import com.baidu.hugegraph.backend.store.BackendEntryIterator;
import com.baidu.hugegraph.backend.store.BackendTable;
import com.baidu.hugegraph.backend.store.Shard;
Expand Down Expand Up @@ -210,7 +210,7 @@ protected BackendColumnIterator getById(Session session, Id id) {
return BackendColumnIterator.empty();
}
BackendColumn col = BackendColumn.of(id.asBytes(), value);
return new BackendEntry.BackendColumnIteratorWrapper(col);
return BackendColumnIterator.iterator(col);
}

protected BackendColumnIterator queryByPrefix(Session session,
Expand Down Expand Up @@ -259,7 +259,7 @@ protected BackendColumnIterator queryByRange(Session session, Shard shard,
start = position;
}
if (start == null) {
start = ShardSpliter.START_BYTES;
start = ShardSplitter.START_BYTES;
}
int type = Session.SCAN_GTE_BEGIN;
if (end != null) {
Expand All @@ -281,7 +281,7 @@ protected static final BackendEntryIterator newEntryIterator(
});
}

private static class TikvShardSpliter extends ShardSpliter<Session> {
private static class TikvShardSpliter extends ShardSplitter<Session> {

public TikvShardSpliter(String table) {
super(table);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/baidu/hugegraph/tikv/TikvPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public void register() {

@Override
public String supportsMinVersion() {
return "0.12.0";
return "0.13.0";
}

@Override
public String supportsMaxVersion() {
return "0.13";
return "0.14";
}

public static void main(String[] args) {
Expand Down

0 comments on commit 50518b4

Please sign in to comment.