Skip to content

Commit f653605

Browse files
committed
Spark: Log failed catalog load in Spark3Util::catalogAndIdentifier
1 parent 317ebe5 commit f653605

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,16 @@
9292
import org.apache.spark.sql.types.LongType;
9393
import org.apache.spark.sql.types.StructType;
9494
import org.apache.spark.sql.util.CaseInsensitiveStringMap;
95+
import org.slf4j.Logger;
96+
import org.slf4j.LoggerFactory;
9597
import scala.Option;
9698
import scala.collection.JavaConverters;
9799
import scala.collection.immutable.Seq;
98100

99101
public class Spark3Util {
100102

103+
private static final Logger LOG = LoggerFactory.getLogger(Spark3Util.class);
104+
101105
private static final Set<String> RESERVED_PROPERTIES =
102106
ImmutableSet.of(TableCatalog.PROP_LOCATION, TableCatalog.PROP_PROVIDER);
103107
private static final Joiner DOT = Joiner.on(".");
@@ -810,6 +814,7 @@ public static CatalogAndIdentifier catalogAndIdentifier(
810814
try {
811815
return catalogManager.catalog(catalogName);
812816
} catch (Exception e) {
817+
LOG.info("Failed to load catalog", e);
813818
return null;
814819
}
815820
},

0 commit comments

Comments
 (0)