You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Sahil Takiar (JIRA)" <ji...@apache.org> on 2019/02/12 21:02:00 UTC

[jira] [Created] (HDFS-14267) Add test_libhdfs_ops to libhdfs tests, mark libhdfs_read/write.c as examples

Sahil Takiar created HDFS-14267:
-----------------------------------

             Summary: Add test_libhdfs_ops to libhdfs tests, mark libhdfs_read/write.c as examples
                 Key: HDFS-14267
                 URL: https://issues.apache.org/jira/browse/HDFS-14267
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: libhdfs, native, test
            Reporter: Sahil Takiar


{{test_libhdfs_ops.c}} provides test coverage for basic operations against libhdfs, but currently has to be run manually (e.g. {{mvn install}} does not run these tests). The goal of this patch is to add {{test_libhdfs_ops.c}} to the list of tests that are automatically run for libhdfs.

It looks like {{test_libhdfs_ops.c}} was used in conjunction with {{hadoop-hdfs-project/hadoop-hdfs/src/main/native/tests/test-libhdfs.sh}} to run some tests against a mini DFS cluster. Now that the {{NativeMiniDfsCluster}} exists, it makes more sense to use that rather than rely on an external bash script to start a mini DFS cluster.

The {{libhdfs-tests}} directory (which contains {{test_libhdfs_ops.c}}) contains two other files: {{test_libhdfs_read.c}} and {{test_libhdfs_write.c}}. At some point, these files might have been used in conjunction with {{test-libhdfs.sh}} to run some tests manually. However, they (1) largely overlap with the test coverage provided by {{test_libhdfs_ops.c}} and (2) are not designed to be run as unit tests. Thus I suggest we move these two files into a new folder called {{libhdfs-examples}} and use them to further document how users of libhdfs can use the API. We can move {{test-libhdfs.sh}} into the examples folder as well given that example files probably require the script to actually work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org