hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-9802) Support Snappy codec on Windows.
Date Fri, 09 Aug 2013 22:16:48 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-9802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Nauroth updated HADOOP-9802:
----------------------------------

    Attachment: HADOOP-9802-trunk.3.patch

bq. I noticed that the DLL name is inaccurate in hadoop.cmd checknative (hadoop.dll instead
of snappy.dll).

Thanks for catching this!  It turns out that this is really easy to fix, so I might as well
do it in scope of this jira.  I just need to change the call to {{GetLibraryName}} to reference
{{dlsym_snappy_compress}}, which holds the address of the dynamically loaded function from
snappy.dll.  This is equivalent to the Unix version using {{dladdr}}.

Here is a new patch.  I also cleaned up the style issue that you saw.  Here is the incremental
diff since last time:

{code}
diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c
b
index ffa35f1..fe827f0 100644
--- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c
+++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c
@@ -163,15 +163,10 @@ Java_org_apache_hadoop_io_compress_snappy_SnappyCompressor_getLibraryName(JNIEnv
 
 #ifdef WINDOWS
   LPWSTR filename = NULL;
-  GetLibraryName(
-    Java_org_apache_hadoop_io_compress_snappy_SnappyCompressor_getLibraryName,
-    &filename);
-  if (filename != NULL)
-  {
+  GetLibraryName(dlsym_snappy_compress, &filename);
+  if (filename != NULL) {
     return (*env)->NewString(env, filename, (jsize) wcslen(filename));
-  }
-  else
-  {
+  } else {
     return (*env)->NewStringUTF(env, "Unavailable");
   }
 #endif
{code}

                
> 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,
HADOOP-9802-trunk.3.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

Mime
View raw message