Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade drpc to resolve CI errors #345

Merged
merged 3 commits into from
Dec 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.distkv.dst.core.operatorImpl;

import com.distkv.dst.core.operatorset.DstSet;
import com.google.common.collect.ImmutableSet;
import com.distkv.dst.core.DstMapInterface;
import com.distkv.dst.core.DstConcurrentHashMapImpl;
import com.distkv.dst.common.exception.KeyNotFoundException;
Expand Down Expand Up @@ -36,7 +35,7 @@ public void putItem(String key, String itemValue) {
throw new KeyNotFoundException(key);
}

setMap.put(key, ImmutableSet.of(itemValue));
setMap.get(key).add(itemValue);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -x

# Install drpc.
DRPC_REPOSITORY_URL=https://github.com/dst-project/drpc.git
DRPC_COMMIT_ID=dbc184dd8a892cc485bfc5aae5f6a21884350c9d
DRPC_COMMIT_ID=c9bfaa54db11af01df0645beaca560f74fbf93d2

git clone ${DRPC_REPOSITORY_URL} drpc_tmp
pushd drpc_tmp
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_dependencies_win.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:: Install drpc.

SET DRPC_REPOSITORY_URL="https://github.com/dst-project/drpc.git"
SET DRPC_COMMIT_ID="dbc184dd8a892cc485bfc5aae5f6a21884350c9d"
SET DRPC_COMMIT_ID="c9bfaa54db11af01df0645beaca560f74fbf93d2"

git clone %DRPC_REPOSITORY_URL% drpc_tmp
pushd drpc_tmp
Expand Down
19 changes: 9 additions & 10 deletions server/src/main/java/com/distkv/dst/server/service/DstServer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.distkv.dst.server.service;

import com.distkv.drpc.Exporter;
import com.distkv.drpc.DrpcServer;
import com.distkv.drpc.config.ServerConfig;
import com.distkv.dst.core.KVStore;
import com.distkv.dst.core.KVStoreImpl;
Expand Down Expand Up @@ -71,20 +71,19 @@ public static void main(String[] args) {
.port(listeningPort)
.build();

// TODO(qwang): Rename exporter to DrcpServer.
Exporter exporter = new Exporter(serverConfig);
exporter.registerService(
DrpcServer drpcServer = new DrpcServer(serverConfig);
drpcServer.registerService(
DstStringService.class, new DstStringServiceImpl(server.runtime));
exporter.registerService(
drpcServer.registerService(
DstListService.class, new DstListServiceImpl(server.getKvStore()));
exporter.registerService(
drpcServer.registerService(
DstSetService.class, new DstSetServiceImpl(server.runtime));
exporter.registerService(
drpcServer.registerService(
DstDictService.class, new DstDictServiceImpl(server.getKvStore()));
exporter.registerService(
drpcServer.registerService(
DstSortedListService.class, new DstSortedListServiceImpl(server.getKvStore()));
// TODO(qwang): Rename this to drpcServer.run();
exporter.export();

drpcServer.run();

LOGGER.info("Succeeded to start dst server on port {}.", listeningPort);

Expand Down