[ 
https://issues.apache.org/jira/browse/HADOOP-9802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735291#comment-13735291
 ] 

Arpit Agarwal commented on HADOOP-9802:
---------------------------------------

Hi Chris,

The change looks good. I built a distribution with bundled Snappy on Windows. 
Verified that snappy.dll is present in the package and detected by checknative. 
I was not able to verify whether MapReduce jobs can use snappy due to some 
issue running jobs on my Windows machine but that is unrelated to your patch.

I am +1 for the patch with a minor update. In snappycompressor.c at Line 170, 
braces should be on the same line as the if to match the file's coding 
convention.

I noticed that the DLL name is inaccurate in {{hadoop.cmd checknative}} 
(hadoop.dll instead of snappy.dll). It is probably because the wrapper code to 
forward to the compressor resides in hadoop.dll
{code}
C:\hadoop-3.0.0-SNAPSHOT>bin\hadoop checknative
...
snappy: true C:\hadoop-3.0.0-SNAPSHOT\bin\hadoop.dll
{code}

I am guessing we should use something like this in {{GetLibrary()}} instead.
{code}
  HMODULE libsnappy = LoadLibrary(HADOOP_SNAPPY_LIBRARY);
  GetModuleFileNameW(libsnappy, filename, sizeof(filename)/sizeof(WCHAR));
  return (*env)->NewString(env, filename, (jsize) wcslen(filename));
{code}

However it is not worth spinning up another patch now and we can handle it in a 
new Jira.

                
> Support Snappy codec on Windows.
> --------------------------------
>
>                 Key: HADOOP-9802
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9802
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 3.0.0, 1-win, 2.1.1-beta
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HADOOP-9802-branch-1-win.1.patch, 
> HADOOP-9802-trunk.1.patch, HADOOP-9802-trunk.2.patch
>
>
> Build and test the existing Snappy codec on Windows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to