mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 05:34:49 +08:00
[Streaming] Streaming data transfer supports cross language. (#7961)
* add init parameters for java * fix bug * cython * fix compile * fix test_direct_tranfer * comment * ChannelCreationParameter * fix comment * builder * lint and fix tests * fix single process test * fix checkstyle and lint * checkstyle * lint python Co-authored-by: wanxing <wanxing@B-458DMD6M-1753.local>
This commit is contained in:
@@ -12,11 +12,6 @@ std::shared_ptr<UpstreamQueueMessageHandler>
|
||||
std::shared_ptr<DownstreamQueueMessageHandler>
|
||||
DownstreamQueueMessageHandler::downstream_handler_ = nullptr;
|
||||
|
||||
RayFunction UpstreamQueueMessageHandler::peer_sync_function_;
|
||||
RayFunction UpstreamQueueMessageHandler::peer_async_function_;
|
||||
RayFunction DownstreamQueueMessageHandler::peer_sync_function_;
|
||||
RayFunction DownstreamQueueMessageHandler::peer_async_function_;
|
||||
|
||||
std::shared_ptr<Message> QueueMessageHandler::ParseMessage(
|
||||
std::shared_ptr<LocalMemoryBuffer> buffer) {
|
||||
uint8_t *bytes = buffer->Data();
|
||||
@@ -83,10 +78,11 @@ std::shared_ptr<Transport> QueueMessageHandler::GetOutTransport(
|
||||
}
|
||||
|
||||
void QueueMessageHandler::SetPeerActorID(const ObjectID &queue_id,
|
||||
const ActorID &actor_id) {
|
||||
const ActorID &actor_id, RayFunction &async_func,
|
||||
RayFunction &sync_func) {
|
||||
actors_.emplace(queue_id, actor_id);
|
||||
out_transports_.emplace(queue_id,
|
||||
std::make_shared<ray::streaming::Transport>(actor_id));
|
||||
out_transports_.emplace(queue_id, std::make_shared<ray::streaming::Transport>(
|
||||
actor_id, async_func, sync_func));
|
||||
}
|
||||
|
||||
ActorID QueueMessageHandler::GetPeerActorID(const ObjectID &queue_id) {
|
||||
@@ -164,8 +160,7 @@ bool UpstreamQueueMessageHandler::CheckQueueSync(const ObjectID &queue_id) {
|
||||
auto transport_it = GetOutTransport(queue_id);
|
||||
STREAMING_CHECK(transport_it != nullptr);
|
||||
std::shared_ptr<LocalMemoryBuffer> result_buffer = transport_it->SendForResultWithRetry(
|
||||
std::move(buffer), DownstreamQueueMessageHandler::peer_sync_function_, 10,
|
||||
COMMON_SYNC_CALL_TIMEOUTT_MS);
|
||||
std::move(buffer), 10, COMMON_SYNC_CALL_TIMEOUTT_MS);
|
||||
if (result_buffer == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user