Search in sources :

Example 1 with Builder

use of com.hazelcast.jet.python.impl.grpc.InputMessage.Builder in project hazelcast by hazelcast.

the class PythonService method sendRequest.

CompletableFuture<List<String>> sendRequest(List<String> inputBatch) {
    checkForServerError();
    Builder requestBuilder = InputMessage.newBuilder();
    for (String item : inputBatch) {
        requestBuilder.addInputValue(item);
    }
    CompletableFuture<List<String>> future = new CompletableFuture<>();
    futureQueue.add(future);
    sink.onNext(requestBuilder.build());
    return future;
}
Also used : CompletableFuture(java.util.concurrent.CompletableFuture) Builder(com.hazelcast.jet.python.impl.grpc.InputMessage.Builder) NettyChannelBuilder(io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder) List(java.util.List)

Aggregations

Builder (com.hazelcast.jet.python.impl.grpc.InputMessage.Builder)1 NettyChannelBuilder (io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder)1 List (java.util.List)1 CompletableFuture (java.util.concurrent.CompletableFuture)1