Apache storm 风暴未从HDFS读取(HDFSSpoot未识别)
我正在使用storm 1.0.x,但是当我尝试使用下面的Apache storm 风暴未从HDFS读取(HDFSSpoot未识别),apache-storm,Apache Storm,我正在使用storm 1.0.x,但是当我尝试使用下面的 // Instantiate spout to read text files HdfsSpout textReaderSpout = newHdfsSpout().setReaderType("text") .withOutputFields(TextFileReader.defaultFields)
// Instantiate spout to read text files
HdfsSpout textReaderSpout = newHdfsSpout().setReaderType("text")
.withOutputFields(TextFileReader.defaultFields)
.setHdfsUri("hdfs://localhost:54310") // reqd
.setSourceDir("/data/in") // reqd
.setArchiveDir("/data/done") // reqd
.setBadFilesDir("/data/badfiles"); // required
I getHdfsSpout无法解析为类型
此功能在特定版本中可用吗?或者可能存在什么问题?我猜您的类路径上没有storm hdfs。检查您的pom(或您使用的任何依赖项管理系统的等效文件),并确保storm hdfs声明为依赖项。如何使用hdfs使用多种文件格式,这意味着。。。我必须设置withOutputFields(字符串),如果我有多个文件具有多种文件格式,该怎么办??