mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
Use GRCP and Bazel 1.0 (#6002)
This commit is contained in:
@@ -62,7 +62,7 @@ class ClientCallImpl : public ClientCall {
|
||||
ClientCallback<Reply> callback_;
|
||||
|
||||
/// The response reader.
|
||||
std::unique_ptr<grpc::ClientAsyncResponseReader<Reply>> response_reader_;
|
||||
std::unique_ptr<grpc_impl::ClientAsyncResponseReader<Reply>> response_reader_;
|
||||
|
||||
/// gRPC status of this request.
|
||||
grpc::Status status_;
|
||||
@@ -106,9 +106,9 @@ class ClientCallTag {
|
||||
/// \tparam Request Type of the request message.
|
||||
/// \tparam Reply Type of the reply message.
|
||||
template <class GrpcService, class Request, class Reply>
|
||||
using PrepareAsyncFunction = std::unique_ptr<grpc::ClientAsyncResponseReader<Reply>> (
|
||||
GrpcService::Stub::*)(grpc::ClientContext *context, const Request &request,
|
||||
grpc::CompletionQueue *cq);
|
||||
using PrepareAsyncFunction =
|
||||
std::unique_ptr<grpc_impl::ClientAsyncResponseReader<Reply>> (GrpcService::Stub::*)(
|
||||
grpc::ClientContext *context, const Request &request, grpc::CompletionQueue *cq);
|
||||
|
||||
/// `ClientCallManager` is used to manage outgoing gRPC requests and the lifecycles of
|
||||
/// `ClientCall` objects.
|
||||
|
||||
@@ -198,7 +198,7 @@ class ServerCallImpl : public ServerCall {
|
||||
grpc::ServerContext context_;
|
||||
|
||||
/// The response writer.
|
||||
grpc::ServerAsyncResponseWriter<Reply> response_writer_;
|
||||
grpc_impl::ServerAsyncResponseWriter<Reply> response_writer_;
|
||||
|
||||
/// The event loop.
|
||||
boost::asio::io_service &io_service_;
|
||||
@@ -226,7 +226,7 @@ class ServerCallImpl : public ServerCall {
|
||||
/// \tparam Reply Type of the reply message.
|
||||
template <class GrpcService, class Request, class Reply>
|
||||
using RequestCallFunction = void (GrpcService::AsyncService::*)(
|
||||
grpc::ServerContext *, Request *, grpc::ServerAsyncResponseWriter<Reply> *,
|
||||
grpc::ServerContext *, Request *, grpc_impl::ServerAsyncResponseWriter<Reply> *,
|
||||
grpc::CompletionQueue *, grpc::ServerCompletionQueue *, void *);
|
||||
|
||||
/// Implementation of `ServerCallFactory`
|
||||
|
||||
@@ -9,18 +9,10 @@ set -x
|
||||
bazel build "//:redis_gcs_client_test" "//:actor_state_accessor_test" "//:subscription_executor_test" "//:asio_test" "//:libray_redis_module.so"
|
||||
|
||||
# Start Redis.
|
||||
if [[ "${RAY_USE_NEW_GCS}" = "on" ]]; then
|
||||
./src/credis/redis/src/redis-server \
|
||||
--loglevel warning \
|
||||
--loadmodule ./src/credis/build/src/libmember.so \
|
||||
--loadmodule ./src/ray/gcs/redis_module/libray_redis_module.so \
|
||||
--port 6379 &
|
||||
else
|
||||
./bazel-genfiles/redis-server \
|
||||
--loglevel warning \
|
||||
--loadmodule ./bazel-bin/libray_redis_module.so \
|
||||
--port 6379 &
|
||||
fi
|
||||
./bazel-bin/redis-server \
|
||||
--loglevel warning \
|
||||
--loadmodule ./bazel-bin/libray_redis_module.so \
|
||||
--port 6379 &
|
||||
sleep 1s
|
||||
|
||||
./bazel-bin/redis_gcs_client_test
|
||||
@@ -28,5 +20,5 @@ sleep 1s
|
||||
./bazel-bin/subscription_executor_test
|
||||
./bazel-bin/asio_test
|
||||
|
||||
./bazel-genfiles/redis-cli -p 6379 shutdown
|
||||
./bazel-bin/redis-cli -p 6379 shutdown
|
||||
sleep 1s
|
||||
|
||||
Reference in New Issue
Block a user