com.clickzetta.platform.client.message.multi.MultiRequestMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.client.message.multi;
import com.clickzetta.platform.client.message.RequestMessage;
import cz.proto.ingestion.v2.IngestionV2;
public class MultiRequestMessage extends RequestMessage {
public MultiRequestMessage(IngestionV2.MultiMutateRequest request) {
super(request);
}
@Override
public long getRequestId() {
return t.getBatchId();
}
@Override
public long getTimestamp() {
return t.getWriteTimestamp();
}
@Override
public long getBatchCount() {
return t.getMutateRequestsList().stream()
.map(mutateRequest -> mutateRequest.getDataBlock().getNumRows())
.reduce(Integer::sum).orElse(0);
}
@Override
public long messageSize() {
return t.getMutateRequestsList().stream()
.map(mutateRequest -> mutateRequest.getDataBlock().getSerializedSize())
.reduce(Integer::sum).orElse(0);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy