linxingyuan1102 opened a new issue #459: Consider replacing TableOperations 
parameter in TableMetadataParser::read
URL: https://github.com/apache/incubator-iceberg/issues/459
 
 
   When using `TableMetadataParser::read` to get a `TableMetadata` instance, we 
have to pass a `TableOperations` instance as an argument. I think it might make 
sense to refactor and replace the `TableOperations` parameter with `FileIO`.
   
   The rationale behind not using `TableOperations` is:
   1. It saves the need to construct a `TableOperations` instance when all you 
want to is to get a table's metadata by parsing its metadata file. Consider a 
distributed system with a coordinator-worker architecture and it uses a 
metastore for cataloging. Let's say the coordinator is responsible for getting 
the metadata file's location and sending it to workers; and workers are 
responsible for getting the metadata. After the refactoring, the worker doesn't 
need to talk to the metastore anymore.
   2. It's more intuitive because a `TableMetadata` instance reflects a table's 
state and is determined by only a set of metadata files. It's confusing to use 
a `TableOperations` instance to build it and have a `TableOperations` field 
inside the `TableMetadata` class.
   
   The refactoring will involve classes including `TableMetadataParser`, 
`TableMetadata`, `SnapshotParser`, `BaseSnapshot`, `ManifestGroup`, etc. It 
looks feasible to replace/remove `TableOperations` from them.
   
   Please LMK if anyone has comments. I can go ahead and try to refactor if 
this proposal is reasonable.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to