nsivabalan commented on a change in pull request #2927:
URL: https://github.com/apache/hudi/pull/2927#discussion_r649606286
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/TableSchemaResolver.java
##########
@@ -62,11 +65,16 @@ public TableSchemaResolver(HoodieTableMetaClient
metaClient) {
}
/**
- * Gets the schema for a hoodie table. Depending on the type of table, read
from any file written in the latest
- * commit. We will assume that the schema has not changed within a single
atomic write.
+ * @return {@code true} if any commits are found, else {@code false}.
+ */
+ private boolean isTimelineNonEmpty() {
Review comment:
I initially thought of adding it to metaClient. but tableSchemaResolver
is the only caller. and hence I added it as a private method to
TableSchemaResolver. I have moved it to MetaClient.
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
##########
@@ -110,6 +110,20 @@ public static FileSystem getFs(String path, Configuration
conf, boolean localByD
return getFs(path, conf);
}
+ /**
+ * Check if table already exists in the given path.
+ * @param path base path of the table.
+ * @param fs instance of {@link FileSystem}.
+ * @return {@code true} if table exists. {@code false} otherwise.
+ */
+ public static boolean isTableExists(String path, FileSystem fs) {
Review comment:
yes, there isn't any in metaclient nor FSUtils.
--
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]