The DataMap.getRowsList() should return a java.util.List<Row> already. Did
you mean to convert java.util.List<Row> to java.util.List<Map<String,
Object>>? I'm afraid there is no better way than iterating over the data.
On Tuesday, April 6, 2021 at 10:27:03 PM UTC-7 SHEFALI SINGH wrote:
> Hi,
> I am trying to implement a gRPC connection between two microservices, The
> proto message looks something like this:
>
> message DataMap {
> message Row {
> map<string, google.protobuf.Any> map = 1;
> }
> map<string, string> headers = 1;
> repeated Row rows = 2;
> }
>
> The server microservice accepts this structure of data from the client
> microservice and internally uses a library that requires the data to be in
> the form of java util Lists and not protobuf lists. Due to the process of
> conversion of this protobuf list to the util list, I have to iterate over
> the data set and the server takes extra time due to which the performance
> of the connection decreases. Is there any way in which I can get the java
> util list from the protobuf list without iterating over the entire data set?
>
> Thank you!
> Shefali
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/127fe461-b148-411f-9dc9-4ac8fa031912n%40googlegroups.com.