连接到Apache Nifi中使用Azure Blob作为存储的HDFS



我正在尝试连接到HDFS并添加使用Azure Blob作为存储的文件。在Apache Nifi中,我使用HDFS -site.xml和core-site.xml文件配置了HDFS连接。

Apache Nifi中的PutHDFS组件抛出以下错误。

10:01:39 UTC ERROR
PutHDFS. Failed to properly initialize Processor. If still scheduled to run, NiFi will attempt to initialize and run the Processor again after the 'Administrative Yield Duration' has elapsed. Failure is due to java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.azure.NativeAzureFileSystem not found: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.azure.NativeAzureFileSystem not found ↳ causes: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.azure.NativeAzureFileSystem not found

10:01:39 UTC ERROR
PutHDFS HDFS Configuration error - java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.azure.NativeAzureFileSystem not found: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.azure.NativeAzureFileSystem not found ↳ causes: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.azure.NativeAzureFileSystem not found

10:01:39 UTC ERROR
PutHDFS org.apache.hadoop.fs.azure.NativeAzureFileSystem: java.lang.ClassNotFoundException: org.apache.hadoop.fs.azure.NativeAzureFileSystem

在建立HDFS连接时是否需要添加其他属性?

如果有其他方式连接到HDFS使用Azure Blob存储将是受欢迎的。

似乎你的Nifi JVM类路径没有hadoop-azureJAR文件。

选择与您的hadoop安装相匹配的版本https://search.maven.org/artifact/org.apache.hadoop/hadoop-azure

或者,不要使用PutHDFS;使用PutAzureBlobStorage