我正在使用dfsinotifyeventinputstream监视hdfs中的事件。
我有一个Maven项目 hadoop-hdfs 和 hadoop-common .
hadoop-hdfs
hadoop-common
如果我在两个依赖项上都使用版本2.7.1,则 DFSInotifyEventInputStream 正确找到。但是,在最新版本的hadoop(3.1.0)中,缺少这个类。
DFSInotifyEventInputStream
为什么会这样?
看:
HDFS-8053 -将dfsin/outputstream和相关类移动到hadoop hdfs客户端
你应该导入 hadoop-hdfs-client . jira还指出,这一改变在2.8.0和3.0.0-alpha版本中生效,这就是为什么它也在3.1.0版本中。
hadoop-hdfs-client