草庐IT

DatabaseReader

全部标签

java - 如何从 Mapreduce 作业查询存储在 hdfs 中的嵌入式数据库?

我正在尝试从HadoopMapReduce映射器查询GeoLite数据库以解析IP地址的国家/地区。我尝试了两种方法:1.使用File仅适用于本地文件系统,我收到一个文件未找到异常Filedatabase=newFile("hdfs://localhost:9000/input/GeoLite2-City.mmdb");//2.使用流,但在运行时出现此错误Error:JavaHeapSpacePathpt=newPath("hdfs://localhost:9000/input/GeoLite2-City.mmdb");FileSystemfs=FileSystem.get(newCo