【Flink 系列二十三】hudi 消失的 HIVE_CONF_DIR,HIVE 读不到 hive-site.xml 读不到
问题现象
Unable to find config file hive-site.xml
Unable to find config file hivemetastore-site.xml
Unable to find config file metastore-site.xml
本文记录这个问题是如何导致的,并记录如何向 Hive、Hudi 提供 hive-site.xml 以便正确加载。
问题分析: HiveMetaStore 是如何查找配置文件路径的
位置:org.apache.hadoop.hive.metastore.conf.MetastoreConf#findConfigFile
显然是因为 classpath 没有,METASTORE_CONF_DIR、METASTORE_HOME、HIVE_CONF_DIR、HIVE_HOME, 这些位置相应的都没有
并且甚至 MetastoreConf 类所在的 jar 包内也没有
寻找原因:为什么所有的位置都没有读取到 hive-site.xml
- classloader.getName("hive-site.xml") 不能加载 lib/hive-site.xml
- FLINK-36594
完整内容参见
Github Gist

浙公网安备 33010602011771号