manojpec commented on a change in pull request #4114:
URL: https://github.com/apache/hudi/pull/4114#discussion_r757656469
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/HoodieSparkTable.java
##########
@@ -112,25 +110,22 @@ protected HoodieIndex getIndex(HoodieWriteConfig config,
HoodieEngineContext con
* @return instance of {@link HoodieTableMetadataWriter}
*/
@Override
- public <T extends SpecificRecordBase> Option<HoodieTableMetadataWriter>
getMetadataWriter(Option<T> actionMetadata) {
- synchronized (this) {
- if (!isMetadataAvailabilityUpdated) {
- // This code assumes that if metadata availability is updated once it
will not change.
- // Please revisit this logic if that's not the case. This is done to
avoid repeated calls to fs.exists().
- try {
- isMetadataTableAvailable = config.isMetadataTableEnabled()
- && metaClient.getFs().exists(new
Path(HoodieTableMetadata.getMetadataTableBasePath(metaClient.getBasePath())));
- } catch (IOException e) {
- throw new HoodieMetadataException("Checking existence of metadata
table failed", e);
+ public <T extends SpecificRecordBase> Option<HoodieTableMetadataWriter>
getMetadataWriter(String inFlightInstantTimestamp,
+
Option<T> actionMetadata) {
+ if (config.isMetadataTableEnabled()) {
+ final HoodieTableMetadataWriter metadataWriter =
SparkHoodieBackedTableMetadataWriter.create(
Review comment:
added the comment.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]