Chapel team,

I've been working with the HDFS and Sys modules in Chapel. Think I've found
a couple issues that probably need a second set of eyes to review.

$CHPL_HOME/runtime/src/qio/auxFilesys/hdfs/qio_plugin_hdfs.c, line 299

(current line of code)
- // We cannot seek unless we are in read mode! (HDFS restriction)
- if (to_hdfs_file(fl)->file->type != INPUT)

(a possible fix)
+ // We cannot seek unless we are in read mode! (HDFS restriction)
+ if (hdfsFileIsOpenForRead(to_hdfs_file(fl)->file))

The Apache hadoop team moved around type definitions in libhdfs/hdfs.h and
to_hdfs_file(fl)->file->type isn't accessible at the moment. The possible
fix listed could resolve this issue.

$CHPL_HOME/modules/standard/IO.chpl, line 2246

(current line of code)
- new_str = new_str.substring(hostidx_end+1..new_str.length);

(possible fix)
+ new_str = new_str.substring(hostidx_end..new_str.length);

The +1 is cutting off the initial "/" in an hdfs path string and is causing
the call to qio_file_open_access_usr on line 2278 to break.

$CHPL_HOME/modules/standard/HDFS.chpl, line 504 - there is a missing a
.c_str() call on a chapel string being passed to a function expecting
c_strings (there might be one more of these small things in that file not
100% sure)

$CHPL_HOME/modules/standard/Sys.chpl, line 245 is a duplicate of line 244.

$CHPL_HOME/modules/standard/Sys.chpl, line 264 can be called, but I get a
runtime crash because the underlying C implementation that starts on
$CHPL_HOME/runtime/src/qio/sys.c, line 1407 is commented out (an undefined
error).

Apologies for the large info dump! Love the language and the runtime's
layout (along with the design/development comments) made the debugging
process very intuitive. Having no experience looking at the runtime code, I
as able to sort out these issues really quickly (less than a day)!

Cheers!

--
ct
------------------------------------------------------------------------------
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs

Reply via email to