You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/11 22:15:13 UTC
[GitHub] [iceberg] kbendick opened a new pull request, #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
kbendick opened a new pull request, #4538:
URL: https://github.com/apache/iceberg/pull/4538
There's presently no serializer for `TableMetadata` in the set of serializers registered for the REST catalogs object mapper.
Given that we already have a `toJson` method that handles this without the need for any FileIO objects etc, this can be added in now.
Work on a deserializer that the REST catalog can use is on going.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] kbendick commented on pull request #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
Posted by GitBox <gi...@apache.org>.
kbendick commented on PR #4538:
URL: https://github.com/apache/iceberg/pull/4538#issuecomment-1115552155
This has been superseded by https://github.com/apache/iceberg/pull/4641
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] rdblue commented on a diff in pull request #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
Posted by GitBox <gi...@apache.org>.
rdblue commented on code in PR #4538:
URL: https://github.com/apache/iceberg/pull/4538#discussion_r848945759
##########
core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java:
##########
@@ -61,10 +63,19 @@ public static void registerAll(ObjectMapper mapper) {
.addSerializer(UnboundPartitionSpec.class, new UnboundPartitionSpecSerializer())
.addDeserializer(UnboundPartitionSpec.class, new UnboundPartitionSpecDeserializer())
.addSerializer(UnboundSortOrder.class, new UnboundSortOrderSerializer())
- .addDeserializer(UnboundSortOrder.class, new UnboundSortOrderDeserializer());
+ .addDeserializer(UnboundSortOrder.class, new UnboundSortOrderDeserializer())
+ .addSerializer(TableMetadata.class, new TableMetadataSerializer());
mapper.registerModule(module);
}
+ public static class TableMetadataSerializer extends JsonSerializer<TableMetadata> {
+ @Override
+ public void serialize(TableMetadata metadata, JsonGenerator gen, SerializerProvider serializers)
+ throws IOException {
+ gen.writeRawValue(TableMetadataParser.toJson(metadata));
Review Comment:
Can't this pass the generator into `TableMetadataParser` like the others do?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] kbendick closed pull request #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
Posted by GitBox <gi...@apache.org>.
kbendick closed pull request #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
URL: https://github.com/apache/iceberg/pull/4538
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] kbendick commented on a diff in pull request #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
Posted by GitBox <gi...@apache.org>.
kbendick commented on code in PR #4538:
URL: https://github.com/apache/iceberg/pull/4538#discussion_r849783150
##########
core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java:
##########
@@ -61,10 +63,19 @@ public static void registerAll(ObjectMapper mapper) {
.addSerializer(UnboundPartitionSpec.class, new UnboundPartitionSpecSerializer())
.addDeserializer(UnboundPartitionSpec.class, new UnboundPartitionSpecDeserializer())
.addSerializer(UnboundSortOrder.class, new UnboundSortOrderSerializer())
- .addDeserializer(UnboundSortOrder.class, new UnboundSortOrderDeserializer());
+ .addDeserializer(UnboundSortOrder.class, new UnboundSortOrderDeserializer())
+ .addSerializer(TableMetadata.class, new TableMetadataSerializer());
mapper.registerModule(module);
}
+ public static class TableMetadataSerializer extends JsonSerializer<TableMetadata> {
+ @Override
+ public void serialize(TableMetadata metadata, JsonGenerator gen, SerializerProvider serializers)
+ throws IOException {
+ gen.writeRawValue(TableMetadataParser.toJson(metadata));
Review Comment:
It _does_ require making a new signature `public`, but given that it matches the rest I think that's fine.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] kbendick commented on a diff in pull request #4538: Core: Add Serializer for TableMetadata to REST Catalogs Serializers
Posted by GitBox <gi...@apache.org>.
kbendick commented on code in PR #4538:
URL: https://github.com/apache/iceberg/pull/4538#discussion_r849780924
##########
core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java:
##########
@@ -61,10 +63,19 @@ public static void registerAll(ObjectMapper mapper) {
.addSerializer(UnboundPartitionSpec.class, new UnboundPartitionSpecSerializer())
.addDeserializer(UnboundPartitionSpec.class, new UnboundPartitionSpecDeserializer())
.addSerializer(UnboundSortOrder.class, new UnboundSortOrderSerializer())
- .addDeserializer(UnboundSortOrder.class, new UnboundSortOrderDeserializer());
+ .addDeserializer(UnboundSortOrder.class, new UnboundSortOrderDeserializer())
+ .addSerializer(TableMetadata.class, new TableMetadataSerializer());
mapper.registerModule(module);
}
+ public static class TableMetadataSerializer extends JsonSerializer<TableMetadata> {
+ @Override
+ public void serialize(TableMetadata metadata, JsonGenerator gen, SerializerProvider serializers)
+ throws IOException {
+ gen.writeRawValue(TableMetadataParser.toJson(metadata));
Review Comment:
Sure. That would be fine.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org