Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Support: Hadoop fails to load Loaded Libraries #3

Closed
kadaan opened this issue Feb 10, 2015 · 9 comments
Closed

Windows Support: Hadoop fails to load Loaded Libraries #3

kadaan opened this issue Feb 10, 2015 · 9 comments

Comments

@kadaan
Copy link

kadaan commented Feb 10, 2015

Windows tries to load the native hadoop binaries which do not exist. It tries to load them from a wide range of folder because Windows returns Windows-<Version> from os.name. After changing this to use 'Windows' as the os.name for all Windows versions and the addition of the native libraries to /nativelib/Windows_amd64, HadoopNative correctly loads the libraries from the temp files that are created. Unfortunately, when loadAllCodecs runs it subsequently fails with the following error:

java.lang.RuntimeException: failed to load Hadoop native library
        at com.facebook.presto.hadoop.HadoopNative.requireHadoopNative(HadoopNative.java:60)
        at com.facebook.presto.hadoop.TestHadoopNative.testCodecRoundTrip(TestHadoopNative.java:51)
Caused by: java.lang.RuntimeException: native snappy library not available: SnappyCompressor has not been loaded.
        at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:68)
        at org.apache.hadoop.io.compress.SnappyCodec.getDecompressorType(SnappyCodec.java:189)
        at com.facebook.presto.hadoop.HadoopNative.loadAllCodecs(HadoopNative.java:73)
        at com.facebook.presto.hadoop.HadoopNative.requireHadoopNative(HadoopNative.java:55)

Changing HadoopNative.requireHadoopNative to create a temporary directory and making loadLibrary copy the embedded files with the original names into this directory allows the libraries to correctly loaded.

@electrum
Copy link
Contributor

Are Hadoop native libraries for Windows available anywhere? I did a quick search and couldn't find them.

@kadaan
Copy link
Author

kadaan commented Feb 12, 2015

For sure. Hadoop runs on Windows Azure (HDInight), is available to be installed on Windows machines (Hortonworks), and there are instructions for building Hadoop with native libraries for Windows (http://www.srccodes.com/m/p/article/38/build-install-configure-run-apache-hadoop-2.2.0-microsoft-windows-os).

@kadaan
Copy link
Author

kadaan commented Feb 20, 2015

Did this answer your question? I'm interested in getting Presto to work on Windows, but could use feedback so that the correct changes are made.

@electrum
Copy link
Contributor

Do you know if the pre-built native libraries are available from Hortonworks or another official source? None of us have a Windows machine.

@kadaan
Copy link
Author

kadaan commented Feb 20, 2015

Yes, there are prebuilt native libraries available. I'll send the link a little later.

@kadaan
Copy link
Author

kadaan commented Feb 20, 2015

It is available from Hortonworks at: http://hortonworks.com/products/releases/hdp-2-windows/

@kadaan kadaan closed this as completed Mar 6, 2015
@kadaan kadaan reopened this Mar 9, 2015
@kadaan
Copy link
Author

kadaan commented Mar 11, 2015

The pre-built binaries are missing bzip2 support which cause the NativeLibraryChecker to fail. They will need to be re-built to support bzip2 or the code that calls NativeLibraryChecker will need to take over the check and special case Windows.

@dain
Copy link

dain commented Mar 11, 2015

Either is fine. bzip2 isn't widely used anyway.

@kokosing
Copy link

kokosing commented Jul 5, 2018

Closing this as parent task prestodb/presto#2351 was also closed.

@kokosing kokosing closed this as completed Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants