Search in sources :

Example 6 with RawClient

use of io.pravega.client.netty.impl.RawClient in project pravega by pravega.

the class SegmentMetadataClientImpl method getStreamSegmentInfo.

private CompletableFuture<StreamSegmentInfo> getStreamSegmentInfo(String delegationToken) {
    long requestId = requestIdGenerator.get();
    log.debug("Getting segment info for segment: {}", segmentId);
    RawClient connection = getConnection();
    return connection.sendRequest(requestId, new GetStreamSegmentInfo(requestId, segmentId.getScopedName(), delegationToken)).thenApply(r -> transformReply(r, StreamSegmentInfo.class));
}
Also used : GetStreamSegmentInfo(io.pravega.shared.protocol.netty.WireCommands.GetStreamSegmentInfo) GetStreamSegmentInfo(io.pravega.shared.protocol.netty.WireCommands.GetStreamSegmentInfo) StreamSegmentInfo(io.pravega.shared.protocol.netty.WireCommands.StreamSegmentInfo) RawClient(io.pravega.client.netty.impl.RawClient)

Aggregations

RawClient (io.pravega.client.netty.impl.RawClient)6 ConnectionClosedException (io.pravega.client.stream.impl.ConnectionClosedException)2 ConnectionFailedException (io.pravega.shared.protocol.netty.ConnectionFailedException)2 UpdateSegmentAttribute (io.pravega.shared.protocol.netty.WireCommands.UpdateSegmentAttribute)2 GetSegmentAttribute (io.pravega.shared.protocol.netty.WireCommands.GetSegmentAttribute)1 GetStreamSegmentInfo (io.pravega.shared.protocol.netty.WireCommands.GetStreamSegmentInfo)1 SegmentAttributeUpdated (io.pravega.shared.protocol.netty.WireCommands.SegmentAttributeUpdated)1 SegmentTruncated (io.pravega.shared.protocol.netty.WireCommands.SegmentTruncated)1 StreamSegmentInfo (io.pravega.shared.protocol.netty.WireCommands.StreamSegmentInfo)1 TruncateSegment (io.pravega.shared.protocol.netty.WireCommands.TruncateSegment)1