Skip to content

Commit 0a803d7

Browse files
authored
chore: add IsReady of MapStream (#147)
Signed-off-by: Yashash H L <[email protected]>
1 parent 707c5bf commit 0a803d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/io/numaproj/numaflow/mapstreamer/Service.java

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.numaproj.numaflow.mapstreamer;
22

3+
import com.google.protobuf.Empty;
34
import io.grpc.Status;
45
import io.grpc.stub.StreamObserver;
56
import io.numaproj.numaflow.map.v1.MapGrpc;
@@ -89,6 +90,17 @@ public void onCompleted() {
8990
};
9091
}
9192

93+
/**
94+
* IsReady is the heartbeat endpoint for gRPC.
95+
*/
96+
@Override
97+
public void isReady(
98+
Empty request,
99+
StreamObserver<MapOuterClass.ReadyResponse> responseObserver) {
100+
responseObserver.onNext(MapOuterClass.ReadyResponse.newBuilder().setReady(true).build());
101+
responseObserver.onCompleted();
102+
}
103+
92104
// Construct a HandlerDatum from a MapRequest
93105
private HandlerDatum constructHandlerDatum(MapOuterClass.MapRequest d) {
94106
return new HandlerDatum(

0 commit comments

Comments
 (0)