rdblue commented on a change in pull request #1394:
URL: https://github.com/apache/iceberg/pull/1394#discussion_r479419375
##########
File path:
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java
##########
@@ -101,12 +109,25 @@ public void commit(TableMetadata base, TableMetadata
metadata) {
return;
}
- doCommit(base, metadata);
+ Stopwatch stopwatch = Stopwatch.createStarted();
+ String newMetadataLocation = doCommit(base, metadata);
deleteRemovedMetadataFiles(base, metadata);
requestRefresh();
+ stopwatch.stop();
+
+ LOG.info("Successfully committed to table: {} in: {} ms: {}",
+ fullName,
+ newMetadataLocation,
+ stopwatch.elapsed(TimeUnit.MILLISECONDS));
}
- protected void doCommit(TableMetadata base, TableMetadata metadata) {
+ /**
+ * Executes the commit in the Metastore
+ * @param base The base table metadata
+ * @param metadata The new table metadata
+ * @return The new metadata location
+ */
+ protected String doCommit(TableMetadata base, TableMetadata metadata) {
Review comment:
I don't think we should change the signature of this method, since there
are external implementations. This also highlights that there is not even a
requirement to store metadata in a file (this could be implemented with a
backing database). So we probably shouldn't log the metadata location from this
class.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]