Bạn có chắc chắn muốn xóa bài viết này không ?
Bạn có chắc chắn muốn xóa bình luận này không ?
Khắc phục lỗi Mkdirs failed khi chạy hadoop trên local mac os
Gần đây mình có thử chạy hadoop trên aerospike database theo tutorial
https://github.com/aerospike/aerospike-hadoop
Khi build xong jar file của sample, thử chạy thì xuất hiện lỗi:
hadoop \
jar \
./examples/aggregate_int_input/build/libs/aggregate_int_input.jar \
-D aerospike.input.namespace=test \
-D aerospike.input.setname=integers \
-D aerospike.input.binnames=bin1,bin2 \
-D aerospike.input.operation=numrange \
-D aerospike.input.numrange.bin=bin1 \
-D aerospike.input.numrange.begin=100 \
-D aerospike.input.numrange.end=200 \
/tmp/output
Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/4_/4hb8bb8d5kv5dxt8cz8tyrgmj8k1d1/T/hadoop-unjar6207484306051085671/META-INF/license
Mọi quyền của thư mục /var/folders đều ổn, ACL của hdfs cũng ok với user hiện tại là superuser.
Sau khi google một lúc thì lý do là do mình sử dụng MacOSX, và hệ thống file system của Mac OSX là case sensitive
Để giải quyết mình đã làm theo hướng tìm được ở đây:
http://stackoverflow.com/questions/10522835/hadoop-java-io-ioexception-mkdirs-failed-to-create-some-path
Cách làm:
- Delete folder MANIFEST/LICENSE hiện tại:
zip -d aggregate_int_input.jar META-INF/LICENSE
- Validate lại package để tạo lại thư mục license
jar tvf aggregate_int_input.jar | grep -i license
Output
11358 Mon Mar 16 00:31:16 JST 2009 META-INF/LICENSE.txt 11560 Wed Oct 05 10:34:46 JST 2011 META-INF/maven/org.xerial.snappy/snappy-java/LICENSE 11358 Tue Oct 25 06:32:32 JST 2011 LICENSE.txt 0 Wed Jan 16 12:42:58 JST 2013 META-INF/license/ 1592 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.base64.txt 10174 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.commons-logging.txt 10174 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.felix.txt 26441 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.jboss-logging.txt 1592 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.jsr166y.txt 1465 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.jzlib.txt 10174 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.log4j.txt 1732 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.protobuf.txt 1203 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.slf4j.txt 1598 Wed Jan 16 12:42:10 JST 2013 META-INF/license/LICENSE.webbit.txt 4197 Mon Aug 22 09:58:26 JST 2011 Grizzly_THIRDPARTYLICENSEREADME.txt
Sau đấy chạy lại thì job đã submit thành công lên YARN.







