Skip to content

Commit 50518b4

Browse files
authored
merge hugegrpah master (#16)
* merge hugegrpah master * version 0.13.0 * improve min version support to 0.13.0
1 parent f9a845f commit 50518b4

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>hugegraph</artifactId>
88
<groupId>com.baidu.hugegraph</groupId>
9-
<version>0.12.0</version>
9+
<version>0.13.0</version>
1010
<relativePath>../hugegraph/pom.xml</relativePath>
1111
</parent>
1212
<modelVersion>4.0.0</modelVersion>

src/main/java/com/baidu/hugegraph/backend/store/tikv/TikvStdSessions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,8 @@ private boolean match(int expected) {
590590
@Override
591591
public boolean hasNext() {
592592
// Update position for paging
593-
if (!this.iter.hasNext()) {
593+
matched = this.iter.hasNext();
594+
if (!matched) {
594595
this.position = null;
595596
this.close();
596597
return false;

src/main/java/com/baidu/hugegraph/backend/store/tikv/TikvStoreProvider.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.baidu.hugegraph.backend.store.BackendStore;
2424
import com.baidu.hugegraph.backend.store.tikv.TikvStore.TikvGraphStore;
2525
import com.baidu.hugegraph.backend.store.tikv.TikvStore.TikvSchemaStore;
26+
import com.baidu.hugegraph.config.HugeConfig;
2627

2728
public class TikvStoreProvider extends AbstractBackendStoreProvider {
2829

@@ -33,12 +34,12 @@ protected String namespace() {
3334
}
3435

3536
@Override
36-
protected BackendStore newSchemaStore(String store) {
37+
protected BackendStore newSchemaStore(HugeConfig config, String store) {
3738
return new TikvSchemaStore(this, this.namespace(), store);
3839
}
3940

4041
@Override
41-
protected BackendStore newGraphStore(String store) {
42+
protected BackendStore newGraphStore(HugeConfig config, String store) {
4243
return new TikvGraphStore(this, this.namespace(), store);
4344
}
4445

src/main/java/com/baidu/hugegraph/backend/store/tikv/TikvTable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import com.baidu.hugegraph.backend.store.BackendEntry;
4545
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn;
4646
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumnIterator;
47-
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumnIteratorWrapper;
47+
import com.baidu.hugegraph.backend.store.BackendEntry.BackendColumnIterator.BackendColumnIteratorWrapper;
4848
import com.baidu.hugegraph.backend.store.BackendEntryIterator;
4949
import com.baidu.hugegraph.backend.store.BackendTable;
5050
import com.baidu.hugegraph.backend.store.Shard;
@@ -210,7 +210,7 @@ protected BackendColumnIterator getById(Session session, Id id) {
210210
return BackendColumnIterator.empty();
211211
}
212212
BackendColumn col = BackendColumn.of(id.asBytes(), value);
213-
return new BackendEntry.BackendColumnIteratorWrapper(col);
213+
return BackendColumnIterator.iterator(col);
214214
}
215215

216216
protected BackendColumnIterator queryByPrefix(Session session,
@@ -259,7 +259,7 @@ protected BackendColumnIterator queryByRange(Session session, Shard shard,
259259
start = position;
260260
}
261261
if (start == null) {
262-
start = ShardSpliter.START_BYTES;
262+
start = ShardSplitter.START_BYTES;
263263
}
264264
int type = Session.SCAN_GTE_BEGIN;
265265
if (end != null) {
@@ -281,7 +281,7 @@ protected static final BackendEntryIterator newEntryIterator(
281281
});
282282
}
283283

284-
private static class TikvShardSpliter extends ShardSpliter<Session> {
284+
private static class TikvShardSpliter extends ShardSplitter<Session> {
285285

286286
public TikvShardSpliter(String table) {
287287
super(table);

src/main/java/com/baidu/hugegraph/tikv/TikvPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ public void register() {
3232

3333
@Override
3434
public String supportsMinVersion() {
35-
return "0.12.0";
35+
return "0.13.0";
3636
}
3737

3838
@Override
3939
public String supportsMaxVersion() {
40-
return "0.13";
40+
return "0.14";
4141
}
4242

4343
public static void main(String[] args) {

0 commit comments

Comments
 (0)