ebyhr commented on code in PR #11690:
URL: https://github.com/apache/iceberg/pull/11690#discussion_r1869339309


##########
core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java:
##########
@@ -237,15 +237,15 @@ Path getMetadataFile(int metadataVersion) throws 
IOException {
     for (TableMetadataParser.Codec codec : TABLE_METADATA_PARSER_CODEC_VALUES) 
{
       Path metadataFile = metadataFilePath(metadataVersion, codec);
       FileSystem fs = getFileSystem(metadataFile, conf);
-      if (fs.exists(metadataFile)) {
+      if (fs.isFile(metadataFile)) {

Review Comment:
   `isFile` method isn't marked as a deprecated in this version, but [it will 
be deprecated in newer 
versions](https://hadoop.apache.org/docs/r3.4.0/api/org/apache/hadoop/fs/FileSystem.html#isFile-org.apache.hadoop.fs.Path-)
 and the javadoc says:
   ```
   Note: Avoid using this method. Instead reuse the FileStatus 
      * returned by getFileStatus() or listStatus() methods.
   ```



##########
core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java:
##########
@@ -237,15 +237,15 @@ Path getMetadataFile(int metadataVersion) throws 
IOException {
     for (TableMetadataParser.Codec codec : TABLE_METADATA_PARSER_CODEC_VALUES) 
{
       Path metadataFile = metadataFilePath(metadataVersion, codec);
       FileSystem fs = getFileSystem(metadataFile, conf);
-      if (fs.exists(metadataFile)) {
+      if (fs.isFile(metadataFile)) {

Review Comment:
   `isFile` method isn't marked as a deprecated in this version, but [it will 
be deprecated in newer 
versions](https://hadoop.apache.org/docs/r3.4.0/api/org/apache/hadoop/fs/FileSystem.html#isFile-org.apache.hadoop.fs.Path-)
 and the current javadoc says:
   ```
   Note: Avoid using this method. Instead reuse the FileStatus 
      * returned by getFileStatus() or listStatus() methods.
   ```



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to