minihippo commented on code in PR #5064: URL: https://github.com/apache/hudi/pull/5064#discussion_r1060528770
########## hudi-platform-service/hudi-metaserver/src/main/java/org/apache/hudi/metaserver/client/HoodieMetaserverClientImp.java: ########## @@ -108,35 +108,42 @@ public void createTable(Table table) { } } + @Override public List<HoodieInstant> listInstants(String db, String tb, int commitNum) { return exceptionWrapper(() -> this.client.listInstants(db, tb, commitNum).stream() - .map(EntityConvertor::fromTHoodieInstant) + .map(EntityConversions::fromTHoodieInstant) .collect(Collectors.toList())).get(); } + @Override public Option<byte[]> getInstantMeta(String db, String tb, HoodieInstant instant) { - ByteBuffer bytes = exceptionWrapper(() -> this.client.getInstantMeta(db, tb, EntityConvertor.toTHoodieInstant(instant))).get(); - Option<byte[]> res = bytes.capacity() == 0 ? Option.empty() : Option.of(bytes.array()); - return res; + ByteBuffer byteBuffer = exceptionWrapper(() -> this.client.getInstantMeta(db, tb, EntityConversions.toTHoodieInstant(instant))).get(); + byte[] bytes = new byte[byteBuffer.remaining()]; + byteBuffer.get(bytes); + return byteBuffer.hasRemaining() ? Option.empty() : Option.of(bytes); Review Comment: There is the basic api which provides commit an empty instant meta ![image](https://user-images.githubusercontent.com/17903481/210355049-cc304ae1-495c-4c8a-b9ef-6228204aa0a6.png) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org