Сжатие LZO для Hbase

Я пытаюсь настроить сжатие LZO для Hbase. Но у меня возникла проблема при создании build.xml. Журналы следующие ниже:

anonymouse@hbase:~/omalley-hadoop-gpl-compression-d9deaa2$ sudo ant compile-nativeBuildfile: build.xml

ivy-download:
      [get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.0.0-rc2/ivy-2.0.0-rc2.jar
      [get] To: /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/ivy/ivy-2.0.0-rc2.jar
      [get] Not modified - so not downloaded

ivy-init-dirs:

ivy-probe-antlib:

ivy-init-antlib:

ivy-init:
[ivy:configure] :: Ivy 2.0.0-rc2 - 20081028224207 :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/ivy/ivysettings.xml

ivy-resolve-common:
[ivy:resolve] :: resolving dependencies :: com.hadoop.gplcompression#Hadoop-GPL-Compression;[email protected]
[ivy:resolve]     confs: [common]
[ivy:resolve]     found commons-logging#commons-logging;1.0.4 in maven2
[ivy:resolve]     found commons-httpclient#commons-httpclient;3.0.1 in maven2
[ivy:resolve]     found commons-codec#commons-codec;1.3 in maven2
[ivy:resolve]     found org.mortbay.jetty#jetty;6.1.14 in maven2
[ivy:resolve]     found org.mortbay.jetty#jetty-util;6.1.14 in maven2
[ivy:resolve]     found org.mortbay.jetty#servlet-api-2.5;6.1.14 in maven2
[ivy:resolve]     found tomcat#jasper-runtime;5.5.12 in maven2
[ivy:resolve]     found tomcat#jasper-compiler;5.5.12 in maven2
[ivy:resolve]     found tomcat#jsp-api;5.5.12 in maven2
[ivy:resolve]     found log4j#log4j;1.2.15 in maven2
[ivy:resolve]     found junit#junit;3.8.1 in maven2
[ivy:resolve]     found commons-logging#commons-logging-api;1.0.4 in maven2
[ivy:resolve] :: resolution report :: resolve 1006ms :: artifacts dl 25ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      common      |   12  |   0   |   0   |   0   ||   12  |   0   |
    ---------------------------------------------------------------------

ivy-retrieve-common:
[ivy:retrieve] :: retrieving :: com.hadoop.gplcompression#Hadoop-GPL-Compression
[ivy:retrieve]     confs: [common]
[ivy:retrieve]     0 artifacts copied, 12 already retrieved (0kB/36ms)
No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
:: loading settings :: file = /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/ivy/ivysettings.xml

init:

compile-java:

compile-native:
    [javah] [ Search Path: /usr/lib/jvm/java-6-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/charsets.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/netx.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/plugin.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/modules/jdk.boot.jar:/usr/lib/jvm/java-6-openjdk/jre/classes//home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes ]
    [javah] [Forcefully writing file /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/native/Linux-i386-32/src/com/hadoop/compression/lzo/com_hadoop_compression_lzo_LzoCompressor.h]
    [javah] [Forcefully writing file /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/native/Linux-i386-32/src/com/hadoop/compression/lzo/com_hadoop_compression_lzo_LzoCompressor_CompressionStrategy.h]
    [javah] [Forcefully writing file /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/native/Linux-i386-32/src/com/hadoop/compression/lzo/com_hadoop_compression_lzo_LzoDecompressor.h]
    [javah] [Forcefully writing file /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/native/Linux-i386-32/src/com/hadoop/compression/lzo/com_hadoop_compression_lzo_LzoDecompressor_CompressionStrategy.h]
    [javah] [search path for source files: /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes]
    [javah] [search path for class files: /usr/lib/jvm/java-6-openjdk/jre/lib/resources.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/sunrsasign.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/jce.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/charsets.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/netx.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/plugin.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/modules/jdk.boot.jar,/usr/lib/jvm/java-6-openjdk/jre/classes,/usr/lib/jvm/java-6-openjdk/jre/lib/ext/gnome-java-bridge.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/ext/dnsns.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunpkcs11.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunjce_provider.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar,/usr/lib/jvm/java-6-openjdk/jre/lib/ext/localedata.jar,/home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes]
    [javah] [loading /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes/com/hadoop/compression/lzo/LzoCompressor.class]
    [javah] [loading /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes/com/hadoop/compression/lzo/LzoDecompressor.class]
    [javah] [loading /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes/com/hadoop/compression/lzo/LzoCompressor$CompressionStrategy.class]
    [javah] [loading /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build/classes/com/hadoop/compression/lzo/LzoDecompressor$CompressionStrategy.class]
    [javah] [loading java/lang/Object.class(java/lang:Object.class)]
    [javah] [loading java/lang/Throwable.class(java/lang:Throwable.class)]
    [javah] [loading java/lang/Class.class(java/lang:Class.class)]
    [javah] [loading java/lang/Enum.class(java/lang:Enum.class)]
    [javah] [done in 948 ms]
     [exec] checking for a BSD-compatible install... /usr/bin/install -c
     [exec] checking whether build environment is sane... yes
     [exec] checking for a thread-safe mkdir -p... /bin/mkdir -p
     [exec] checking for gawk... gawk
     [exec] checking whether make sets $(MAKE)... yes
     [exec] checking for gcc... gcc
     [exec] checking for C compiler default output file name... a.out
     [exec] checking whether the C compiler works... yes
     [exec] checking whether we are cross compiling... no
     [exec] checking for suffix of executables... 
     [exec] checking for suffix of object files... o
     [exec] checking whether we are using the GNU C compiler... yes
     [exec] checking whether gcc accepts -g... yes
     [exec] checking for gcc option to accept ISO C89... none needed
     [exec] checking for style of include used by make... GNU
     [exec] checking dependency style of gcc... gcc3
     [exec] checking build system type... i686-pc-linux-gnu
     [exec] checking host system type... i686-pc-linux-gnu
     [exec] checking for a sed that does not truncate output... /bin/sed
     [exec] checking for grep that handles long lines and -e... /bin/grep
     [exec] checking for egrep... /bin/grep -E
     [exec] checking for ld used by gcc... /usr/bin/ld
     [exec] checking if the linker (/usr/bin/ld) is GNU ld... yes
     [exec] checking for /usr/bin/ld option to reload object files... -r
     [exec] checking for BSD-compatible nm... /usr/bin/nm -B
     [exec] checking whether ln -s works... yes
     [exec] checking how to recognize dependent libraries... pass_all
     [exec] checking how to run the C preprocessor... gcc -E
     [exec] checking for ANSI C header files... yes
     [exec] checking for sys/types.h... yes
     [exec] checking for sys/stat.h... yes
     [exec] checking for stdlib.h... yes
     [exec] checking for string.h... yes
     [exec] checking for memory.h... yes
     [exec] checking for strings.h... yes
     [exec] checking for inttypes.h... yes
     [exec] checking for stdint.h... yes
     [exec] checking for unistd.h... yes
     [exec] checking dlfcn.h usability... yes
     [exec] checking dlfcn.h presence... yes
     [exec] checking for dlfcn.h... yes
     [exec] checking for g++... g++
     [exec] checking whether we are using the GNU C++ compiler... yes
     [exec] checking whether g++ accepts -g... yes
     [exec] checking dependency style of g++... gcc3
     [exec] checking how to run the C++ preprocessor... g++ -E
     [exec] checking for g77... no
     [exec] checking for xlf... no
     [exec] checking for f77... no
     [exec] checking for frt... no
     [exec] checking for pgf77... no
     [exec] checking for cf77... no
     [exec] checking for fort77... no
     [exec] checking for fl32... no
     [exec] checking for af77... no
     [exec] checking for xlf90... no
     [exec] checking for f90... no
     [exec] checking for pgf90... no
     [exec] checking for pghpf... no
     [exec] checking for epcf90... no
     [exec] checking for gfortran... no
     [exec] checking for g95... no
     [exec] checking for xlf95... no
     [exec] checking for f95... no
     [exec] checking for fort... no
     [exec] checking for ifort... no
     [exec] checking for ifc... no
     [exec] checking for efc... no
     [exec] checking for pgf95... no
     [exec] checking for lf95... no
     [exec] checking for ftn... no
     [exec] checking whether we are using the GNU Fortran 77 compiler... no
     [exec] checking whether  accepts -g... no
     [exec] checking the maximum length of command line arguments... 1572864
     [exec] checking command to parse /usr/bin/nm -B output from gcc object... ok
     [exec] checking for objdir... .libs
     [exec] checking for ar... ar
     [exec] checking for ranlib... ranlib
     [exec] checking for strip... strip
     [exec] checking if gcc supports -fno-rtti -fno-exceptions... no
     [exec] checking for gcc option to produce PIC... -fPIC
     [exec] checking if gcc PIC flag -fPIC works... yes
     [exec] checking if gcc static flag -static works... yes
     [exec] checking if gcc supports -c -o file.o... yes
     [exec] checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
     [exec] checking whether -lc should be explicitly linked in... no
     [exec] checking dynamic linker characteristics... GNU/Linux ld.so
     [exec] checking how to hardcode library paths into programs... immediate
     [exec] checking whether stripping libraries is possible... yes
     [exec] checking if libtool supports shared libraries... yes
     [exec] checking whether to build shared libraries... yes
     [exec] checking whether to build static libraries... yes
     [exec] configure: creating libtool
     [exec] appending configuration tag "CXX" to libtool
     [exec] checking for ld used by g++... /usr/bin/ld
     [exec] checking if the linker (/usr/bin/ld) is GNU ld... yes
     [exec] checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
     [exec] checking for g++ option to produce PIC... -fPIC
     [exec] checking if g++ PIC flag -fPIC works... yes
     [exec] checking if g++ static flag -static works... yes
     [exec] checking if g++ supports -c -o file.o... yes
     [exec] checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
     [exec] checking dynamic linker characteristics... GNU/Linux ld.so
     [exec] (cached) (cached) checking how to hardcode library paths into programs... immediate
     [exec] appending configuration tag "F77" to libtool
     [exec] checking for dlopen in -ldl... yes
     [exec] checking for unistd.h... (cached) yes
     [exec] checking stdio.h usability... yes
     [exec] checking stdio.h presence... yes
     [exec] checking for stdio.h... yes
     [exec] checking stddef.h usability... yes
     [exec] checking stddef.h presence... yes
     [exec] checking for stddef.h... yes
     [exec] checking lzo/lzo2a.h usability... yes
     [exec] checking lzo/lzo2a.h presence... yes
     [exec] checking for lzo/lzo2a.h... yes
     [exec] checking Checking for the 'actual' dynamic-library for '-llzo2'... "liblzo2.so.2"
     [exec] checking for special C compiler options needed for large files... no
     [exec] checking for _FILE_OFFSET_BITS value needed for large files... 64
     [exec] checking for stdbool.h that conforms to C99... yes
     [exec] checking for _Bool... yes
     [exec] checking for an ANSI C-conforming const... yes
     [exec] checking for off_t... yes
     [exec] checking for size_t... yes
     [exec] checking whether strerror_r is declared... yes
     [exec] checking for strerror_r... yes
     [exec] checking whether strerror_r returns char *... yes
     [exec] checking for mkdir... yes
     [exec] checking for uname... yes
     [exec] checking for memset... yes
     [exec] /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/src/native/configure: line 21357: test: !=: unary operator expected
     [exec] checking for JNI_GetCreatedJavaVMs in -ljvm... no
     [exec] /home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/src/native/configure: line 21438: test: !=: unary operator expected
     [exec] checking jni.h usability... no
     [exec] checking jni.h presence... no
     [exec] checking for jni.h... no
     [exec] configure: error: Native java headers not found. Is $JAVA_HOME set correctly?

BUILD FAILED
/home/ifkaar/omalley-hadoop-gpl-compression-d9deaa2/build.xml:215: exec returned: 1

Total time: 17 seconds

Даже несмотря на то, что я правильно устанавливаю JAVA_HOME, но все же для некоторых странных это дает эту ошибку.


person Ali Raza    schedule 28.02.2012    source источник
comment
где вы можете решить эту проблему?   -  person sulabhc    schedule 24.05.2012


Ответы (1)


Добавьте следующее к цели <exec> в build.xml:

<env key="JAVA_HOME" value="/path/to/jdk"/>

Это сработало для меня.

person jeffreyveon    schedule 11.07.2012