hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3633) libhdfs: hdfsDelete should pass JNI_FALSE or JNI_TRUE
Date Wed, 11 Jul 2012 00:30:34 GMT

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

Colin Patrick McCabe commented on HDFS-3633:
--------------------------------------------

The code in question is here:

{code}
jboolean jRecursive = recursive;
  
if (invokeMethod(env, &jVal, &jExc, INSTANCE, jFS, HADOOP_FS,
"delete", "(Lorg/apache/hadoop/fs/Path;Z)Z", jPath, jRecursive) != 0)
{                                                                               
    errno = errnoFromException(jExc, env, "org.apache.hadoop.fs."
"FileSystem::delete");
   
    destroyLocalReference(env, jPath);
   
    return -1;
}                                                                                        
                                
{code}

jRecursive must get either JNI_FALSE or JNI_TRUE.
                
> libhdfs: hdfsDelete should pass JNI_FALSE or JNI_TRUE
> -----------------------------------------------------
>
>                 Key: HDFS-3633
>                 URL: https://issues.apache.org/jira/browse/HDFS-3633
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.0.1-alpha
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Minor
>
> In libhdfs in hdfsDelete, the header file says any non-zero argument to hdfsDelete will
be interpreted as true.  However, the hdfsDelete function does not translate these non-zero
values to JNI_FALSE and JNI_TRUE, potentially leading to undefined or JVM-specific behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message