Recent changes (master)
The following changes since commit b7f5c00db0d450aff09b35301bedf16e26e25d3a:
verify: turn off numberio verification for meta and time_based (2014-08-07 15:27:31 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 1b10477b21157800f030c3ec91511a810e75e4c7:
Add support for HDFS IO engine (2014-08-13 13:36:52 -0600)
----------------------------------------------------------------
Jens Axboe (1):
Add missing IO engines to the HOWTO
Manish Mandlik (1):
Add support for HDFS IO engine
HOWTO | 30 +++++-- Makefile | 9 +- configure | 30 +++++++ engines/libhdfs.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++++ fio.1 | 3 + options.c | 6 +- 6 files changed, 309 insertions(+), 9 deletions(-) create mode 100644 engines/libhdfs.c
---
Diff of recent changes:
HOWTO +23 -7
@@ -670,15 +670,31 @@ ioengine=str Defines how the job issues io to the file. The following channel semantics (Send/Recv) for the InfiniBand, RoCE and iWARP protocols. - falloc IO engine that does regular fallocate to - simulate data transfer as fio ioengine. - DDIR_READ does fallocate(,mode = keep_size,) - DDIR_WRITE does fallocate(,mode = 0) - DDIR_TRIM does fallocate(,mode = punch_hole) + falloc IO engine that does regular fallocate to + simulate data transfer as fio ioengine. + DDIR_READ does fallocate(,mode = keep_size,) + DDIR_WRITE does fallocate(,mode = 0) + DDIR_TRIM does fallocate(,mode = punch_hole) e4defrag IO engine that does regular EXT4_IOC_MOVE_EXT - ioctls to simulate defragment activity in - request to DDIR_WRITE event + ioctls to simulate defragment activity in + request to DDIR_WRITE event + + rbd IO engine supporting direct access to Ceph + Rados Block Devices (RBD) via librbd without + the need to use the kernel rbd driver. This + ioengine defines engine specific options. + + gfapi Using Glusterfs libgfapi sync interface to + direct access to Glusterfs volumes without + options. + + gfapi_async Using Glusterfs libgfapi async interface + to direct access to Glusterfs volumes without + having to go through FUSE. This ioengine + defines engine specific options. + + hdfs Read and write through Hadoop (HDFS). external Prefix to specify loading an external IO engine object file. Append the engine
Makefile +8 -1
@@ -38,6 +38,13 @@ SOURCE := gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \ profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \ lib/tp.c +ifdef CONFIG_LIBHDFS + HDFSFLAGS= -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -I $(FIO_LIBHDFS_INCLUDE) + HDFSLIB= $(JAVA_HOME)/jre/lib/amd64/server/libjvm.so $(FIO_LIBHDFS_LIB)/liblibhdfs.a + CFLAGS += $(HDFSFLAGS) + SOURCE += engines/libhdfs.c +endif + ifdef CONFIG_64BIT_LLP64 CFLAGS += -DBITS_PER_LONG=32 endif
@@ -268,7 +275,7 @@ t/ieee754: $(T_IEEE_OBJS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_IEEE_OBJS) $(LIBS) fio: $(FIO_OBJS) - $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(FIO_OBJS) $(LIBS) + $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(FIO_OBJS) $(LIBS) $(HDFSLIB) gfio: $(GFIO_OBJS) $(QUIET_LINK)$(CC) $(LDFLAGS) -o gfio $(GFIO_OBJS) $(LIBS) $(GTK_LDFLAGS)
configure +30 -0
@@ -134,6 +134,7 @@ cpu="" show_help="no" exit_val=0 gfio="no" +libhdfs="no" # parse options for opt do
@@ -160,6 +161,8 @@ for opt do ;; --disable-gfapi) disable_gfapi="yes" ;; + --enable-libhdfs) libhdfs="yes" + ;; --help) show_help="yes" ;;
@@ -178,6 +181,7 @@ if test "$show_help" = "yes" ; then echo "--esx Configure build options for esx" echo "--enable-gfio Enable building of gtk gfio" echo "--disable-numa Disable libnuma even if found" + echo "--enable-libhdfs Enable hdfs support" exit $exit_val fi
@@ -1243,6 +1247,29 @@ if compile_prog "" "" "s390_z196_facilities"; then fi fi echo "s390_z196_facilities $s390_z196_facilities" + +########################################## +# Check if we have required environment variables configured for libhdfs +if test "$libhdfs" = "yes" ; then + hdfs_conf_error=0 + if test "$JAVA_HOME" = "" ; then + echo "configure: JAVA_HOME should be defined to jdk/jvm path" + hdfs_conf_error=1 + fi + if test "$FIO_LIBHDFS_INCLUDE" = "" ; then + echo "configure: FIO_LIBHDFS_INCLUDE should be defined to libhdfs inlude path" + hdfs_conf_error=1 + fi + if test "$FIO_LIBHDFS_LIB" = "" ; then + echo "configure: FIO_LIBHDFS_LIB should be defined to libhdfs library path" + hdfs_conf_error=1 + fi + if test "$hdfs_conf_error" = "1" ; then + exit 1 + fi +fi +echo "HDFS engine $libhdfs" + ############################################################################# if test "$wordsize" = "64" ; then
@@ -1384,6 +1411,9 @@ fi if test "$gf_fadvise" = "yes" ; then output_sym "CONFIG_GF_FADVISE" fi +if test "$libhdfs" = "yes" ; then + output_sym "CONFIG_LIBHDFS" +fi if test "$zlib" = "no" ; then echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."
engines/libhdfs.c new file +240 -0
240 lines not on this page · raw message
fio.1 +3 -0
@@ -612,6 +612,9 @@ options. Using Glusterfs libgfapi async interface to direct access to Glusterfs volumes without having to go through FUSE. This ioengine defines engine specific options. +.TP +.B hdfs +Read and write through Hadoop (HDFS) .RE .P .RE
options.c +5 -1
@@ -1541,7 +1541,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "Glusterfs libgfapi(async) based engine" },#endif - +#ifdef CONFIG_LIBHDFS + { .ival = "hdfs", + .help = "Hadoop Distributed Filesystem (HDFS) engine" + }, +#endif { .ival = "external", .help = "Load external engine (append name)", },