Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 89512 invoked from network); 26 Aug 2009 19:28:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 19:28:21 -0000 Received: (qmail 65857 invoked by uid 500); 26 Aug 2009 19:28:21 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 65800 invoked by uid 500); 26 Aug 2009 19:28:21 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 65789 invoked by uid 99); 26 Aug 2009 19:28:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 19:28:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 19:28:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4958F234C044 for ; Wed, 26 Aug 2009 12:27:59 -0700 (PDT) Message-ID: <437957241.1251314879286.JavaMail.jira@brutus> Date: Wed, 26 Aug 2009 12:27:59 -0700 (PDT) From: "Ziliang Guo (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-573) Porting libhdfs to Windows In-Reply-To: <249532881.1251312599275.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HDFS-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748099#action_12748099 ] Ziliang Guo commented on HDFS-573: ---------------------------------- I should have been more explicit. That is exactly what I have done for hcreate/hsearch. The header with the functions is only included if WIN32 is defined. I also modified the locking macros in a similar #ifdef statement to the appropriate Windows locks. The current code should continue to work on Linux, barring a screwup in my moving the variable declarations to the top of the function as required in C89. However, there was a lot of moving things around. > Porting libhdfs to Windows > -------------------------- > > Key: HDFS-573 > URL: https://issues.apache.org/jira/browse/HDFS-573 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs client > Environment: Windows, Visual Studio 2008 > Reporter: Ziliang Guo > Original Estimate: 336h > Remaining Estimate: 336h > > The current C code in libhdfs is written using C99 conventions and also uses a few POSIX specific functions such as hcreate, hsearch, and pthread mutex locks. To compile it using Visual Studio would require a conversion of the code in hdfsJniHelper.c and hdfs.c to C89 and replacement/reimplementation of the POSIX functions. The code also uses the stdint.h header, which is not part of the original C89, but there exists what appears to be a BSD licensed reimplementation written to be compatible with MSVC floating around. I have already done the other necessary conversions, as well as created a simplistic hash bucket for use with hcreate and hsearch and successfully built a DLL of libhdfs. Further testing is needed to see if it is usable by other programs to actually access hdfs, which will likely happen in the next few weeks as the Condor Project continues with its file transfer work. > In the process, I've removed a few what I believe are extraneous consts and also fixed an incorrect array initialization where someone was attempting to initialize with something like this: JavaVMOption options[noArgs]; where noArgs was being incremented in the code above. This was in the hdfsJniHelper.c file, in the getJNIEnv function. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.