我正在尝试在Hadoop中运行图像处理示例。
Hadoop版本: Hadoop 2.0.0-cdh4.2.1
Hipi版本: hipi-2.1.0
OpenCV版本: opencv-2.4.11
opencv-2411.jar和hipi-2.1.0.jar在hadoop-classpath中
我已将“libopencv_java2411.so”放在目录/ etc / opencv / lib中。 在/usr/lib/hadoop/libexec/hadoop-config.sh文件中设置JAVA_LIBRARY_PATH,指向OpenCV本机库,如下所示:
JAVA_LIBRARY_PATH = $ {JAVA_LIBRARY_PATH}:在/ etc / OpenCV的/ lib中
当我提交作业时,我收到以下错误消息。
attempt_201804241646_0001_m_000000_0: Native code library failed to load. attempt_201804241646_0001_m_000000_0: java.lang.UnsatisfiedLinkError: no opencv_java2411 in java.library.pathopencv_java2411 18/04/24 17:05:05 INFO mapred.JobClient: Task Id : attempt_201804241646_0001_m_000000_1, Status : FAILED java.lang.Throwable: Child Error at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:250) Caused by: java.io.IOException: Task process exit with nonzero status of 1. at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:237)
为什么无法加载本机库?请帮忙。