rdblue commented on a change in pull request #1979: URL: https://github.com/apache/iceberg/pull/1979#discussion_r553052634
########## File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java ########## @@ -158,6 +167,44 @@ public String name() { return catalogName; } + private boolean shouldSuppressIOException(IOException ioException) { + String name = ioException.getClass().getName(); + return suppressIOException && name.startsWith("org.apache.hadoop.fs.azurebfs"); + } + + private boolean isTableDir(Path path) { + Path metadataPath = new Path(path, "metadata"); + // Only the path which contains metadata is the path for table, otherwise it could be + // still a namespace. + try { + return fs.listStatus(metadataPath, TABLE_FILTER).length >= 1; + } catch (FileNotFoundException e) { + return false; + } catch (IOException e) { + if (shouldSuppressIOException(e)) { + LOG.warn("Unalbe to metadata directory {}: {}", metadataPath, e); Review comment: Typo: Unalbe -> Unable ########## File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java ########## @@ -158,6 +167,44 @@ public String name() { return catalogName; } + private boolean shouldSuppressIOException(IOException ioException) { + String name = ioException.getClass().getName(); + return suppressIOException && name.startsWith("org.apache.hadoop.fs.azurebfs"); + } + + private boolean isTableDir(Path path) { + Path metadataPath = new Path(path, "metadata"); + // Only the path which contains metadata is the path for table, otherwise it could be + // still a namespace. + try { + return fs.listStatus(metadataPath, TABLE_FILTER).length >= 1; + } catch (FileNotFoundException e) { + return false; + } catch (IOException e) { + if (shouldSuppressIOException(e)) { + LOG.warn("Unalbe to metadata directory {}: {}", metadataPath, e); + return false; + } else { + throw new UncheckedIOException(e); + } + } + } + + private boolean isDirectory(Path path) { + try { + return fs.getFileStatus(path).isDirectory(); + } catch (FileNotFoundException e) { + return false; + } catch (IOException e) { + if (shouldSuppressIOException(e)) { + LOG.warn("Unalbe to list directory {}: {}", path, e); Review comment: Same typo. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org