IOR
Data Structures | Macros | Functions | Variables
aiori-HDFS.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <assert.h>
#include "ior.h"
#include "aiori.h"
#include "utilities.h"
#include "hdfs.h"
Include dependency graph for aiori-HDFS.c:

Go to the source code of this file.

Data Structures

struct  hdfs_options_t
 

Macros

#define open64   open /* unlikely, but may pose */
 
#define lseek64   lseek /* unlikely, but may pose */
 
#define O_BINARY   0
 
#define O_DIRECT   000000
 

Functions

static aiori_fd_tHDFS_Create (char *testFileName, int flags, aiori_mod_opt_t *param)
 
static aiori_fd_tHDFS_Open (char *testFileName, int flags, aiori_mod_opt_t *param)
 
static IOR_offset_t HDFS_Xfer (int access, aiori_fd_t *file, IOR_size_t *buffer, IOR_offset_t length, IOR_offset_t offset, aiori_mod_opt_t *param)
 
static void HDFS_Close (aiori_fd_t *, aiori_mod_opt_t *)
 
static void HDFS_Delete (char *testFileName, aiori_mod_opt_t *param)
 
static void HDFS_Fsync (aiori_fd_t *, aiori_mod_opt_t *)
 
static IOR_offset_t HDFS_GetFileSize (aiori_mod_opt_t *, char *)
 
static void hdfs_xfer_hints (aiori_xfer_hint_t *params)
 
static option_helpHDFS_options (aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values)
 
static int HDFS_mkdir (const char *path, mode_t mode, aiori_mod_opt_t *options)
 
static int HDFS_rmdir (const char *path, aiori_mod_opt_t *options)
 
static int HDFS_access (const char *path, int mode, aiori_mod_opt_t *options)
 
static int HDFS_stat (const char *path, struct stat *buf, aiori_mod_opt_t *options)
 
static int HDFS_statfs (const char *path, ior_aiori_statfs_t *stat, aiori_mod_opt_t *options)
 
static void hdfs_connect (hdfs_options_t *o)
 
void hdfs_set_o_direct_flag (int *fd)
 
static void hdfs_disconnect (hdfs_options_t *o)
 
static void * HDFS_Create_Or_Open (char *testFileName, int flags, aiori_mod_opt_t *param, unsigned char createFile)
 

Variables

static aiori_xfer_hint_thints = NULL
 
ior_aiori_t hdfs_aiori
 

Macro Definition Documentation

◆ lseek64

#define lseek64   lseek /* unlikely, but may pose */

Definition at line 93 of file aiori-HDFS.c.

◆ O_BINARY

#define O_BINARY   0

Definition at line 97 of file aiori-HDFS.c.

◆ O_DIRECT

#define O_DIRECT   000000

Referenced by hdfs_set_o_direct_flag().

◆ open64

#define open64   open /* unlikely, but may pose */

Definition at line 89 of file aiori-HDFS.c.

Function Documentation

◆ HDFS_access()

int HDFS_access ( const char *  path,
int  mode,
aiori_mod_opt_t options 
)
static

Definition at line 208 of file aiori-HDFS.c.

References hdfs_options_t::fs, hdfs_connect(), and o.

Here is the call graph for this function:

◆ HDFS_Close()

static void HDFS_Close ( aiori_fd_t fd,
aiori_mod_opt_t param 
)
static

Definition at line 610 of file aiori-HDFS.c.

References ERR, hdfs_options_t::fs, o, verbose, and VERBOSE_4.

◆ hdfs_connect()

void hdfs_connect ( hdfs_options_t o)
static

◆ HDFS_Create()

static aiori_fd_t * HDFS_Create ( char *  testFileName,
int  flags,
aiori_mod_opt_t param 
)
static

Definition at line 452 of file aiori-HDFS.c.

References HDFS_Create_Or_Open(), TRUE, verbose, and VERBOSE_4.

Here is the call graph for this function:

◆ HDFS_Create_Or_Open()

static void* HDFS_Create_Or_Open ( char *  testFileName,
int  flags,
aiori_mod_opt_t param,
unsigned char  createFile 
)
static

◆ HDFS_Delete()

static void HDFS_Delete ( char *  testFileName,
aiori_mod_opt_t param 
)
static

Definition at line 634 of file aiori-HDFS.c.

References ERR, EWARN, hdfs_options_t::fs, hdfs_connect(), o, rank, verbose, and VERBOSE_4.

Here is the call graph for this function:

◆ hdfs_disconnect()

static void hdfs_disconnect ( hdfs_options_t o)
static

Definition at line 313 of file aiori-HDFS.c.

References hdfs_options_t::fs, NULL, verbose, and VERBOSE_4.

◆ HDFS_Fsync()

static void HDFS_Fsync ( aiori_fd_t fd,
aiori_mod_opt_t param 
)
static

Definition at line 592 of file aiori-HDFS.c.

References EWARN, hdfs_options_t::fs, o, verbose, and VERBOSE_4.

Referenced by HDFS_Xfer().

Here is the caller graph for this function:

◆ HDFS_GetFileSize()

static IOR_offset_t HDFS_GetFileSize ( aiori_mod_opt_t param,
char *  testFileName 
)
static

Definition at line 665 of file aiori-HDFS.c.

References ERR, hdfs_options_t::fs, hdfs_connect(), o, verbose, and VERBOSE_4.

Here is the call graph for this function:

◆ HDFS_mkdir()

int HDFS_mkdir ( const char *  path,
mode_t  mode,
aiori_mod_opt_t options 
)
static

Definition at line 196 of file aiori-HDFS.c.

References hdfs_options_t::fs, hdfs_connect(), and o.

Here is the call graph for this function:

◆ HDFS_Open()

static aiori_fd_t * HDFS_Open ( char *  testFileName,
int  flags,
aiori_mod_opt_t param 
)
static

Definition at line 466 of file aiori-HDFS.c.

References FALSE, HDFS_Create_Or_Open(), IOR_CREAT, TRUE, verbose, and VERBOSE_4.

Here is the call graph for this function:

◆ HDFS_options()

option_help * HDFS_options ( aiori_mod_opt_t **  init_backend_options,
aiori_mod_opt_t init_values 
)
static

◆ HDFS_rmdir()

int HDFS_rmdir ( const char *  path,
aiori_mod_opt_t options 
)
static

Definition at line 202 of file aiori-HDFS.c.

References hdfs_options_t::fs, hdfs_connect(), and o.

Here is the call graph for this function:

◆ hdfs_set_o_direct_flag()

void hdfs_set_o_direct_flag ( int *  fd)

Definition at line 249 of file aiori-HDFS.c.

References O_DIRECT, and WARN.

Referenced by HDFS_Create_Or_Open().

Here is the caller graph for this function:

◆ HDFS_stat()

int HDFS_stat ( const char *  path,
struct stat *  buf,
aiori_mod_opt_t options 
)
static

Definition at line 214 of file aiori-HDFS.c.

References hdfs_options_t::fs, hdfs_connect(), NULL, and o.

Here is the call graph for this function:

◆ HDFS_statfs()

int HDFS_statfs ( const char *  path,
ior_aiori_statfs_t stat,
aiori_mod_opt_t options 
)
static

◆ HDFS_Xfer()

static IOR_offset_t HDFS_Xfer ( int  access,
aiori_fd_t file,
IOR_size_t buffer,
IOR_offset_t  length,
IOR_offset_t  offset,
aiori_mod_opt_t param 
)
static

Definition at line 489 of file aiori-HDFS.c.

References ERR, hdfs_options_t::fs, aiori_xfer_hint_t::fsyncPerWrite, HDFS_Fsync(), MAX_RETRY, MPI_CHECK, o, rank, rc, aiori_xfer_hint_t::singleXferAttempt, TRUE, verbose, VERBOSE_4, WARN, and WRITE.

Here is the call graph for this function:

◆ hdfs_xfer_hints()

void hdfs_xfer_hints ( aiori_xfer_hint_t params)
static

Definition at line 146 of file aiori-HDFS.c.

Variable Documentation

◆ hdfs_aiori

ior_aiori_t hdfs_aiori
Initial value:
= {
.name = "HDFS",
.name_legacy = NULL,
.create = HDFS_Create,
.open = HDFS_Open,
.xfer = HDFS_Xfer,
.close = HDFS_Close,
.delete = HDFS_Delete,
.get_options = HDFS_options,
.get_version = aiori_get_version,
.xfer_hints = hdfs_xfer_hints,
.fsync = HDFS_Fsync,
.get_file_size = HDFS_GetFileSize,
.statfs = HDFS_statfs,
.mkdir = HDFS_mkdir,
.rmdir = HDFS_rmdir,
.access = HDFS_access,
.stat = HDFS_stat,
.enable_mdtest = true
}
static int HDFS_access(const char *path, int mode, aiori_mod_opt_t *options)
Definition: aiori-HDFS.c:208
static int HDFS_stat(const char *path, struct stat *buf, aiori_mod_opt_t *options)
Definition: aiori-HDFS.c:214
static aiori_fd_t * HDFS_Create(char *testFileName, int flags, aiori_mod_opt_t *param)
Definition: aiori-HDFS.c:452
static int HDFS_rmdir(const char *path, aiori_mod_opt_t *options)
Definition: aiori-HDFS.c:202
static void HDFS_Delete(char *testFileName, aiori_mod_opt_t *param)
Definition: aiori-HDFS.c:634
static void HDFS_Fsync(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-HDFS.c:592
static IOR_offset_t HDFS_Xfer(int access, aiori_fd_t *file, IOR_size_t *buffer, IOR_offset_t length, IOR_offset_t offset, aiori_mod_opt_t *param)
Definition: aiori-HDFS.c:489
char * aiori_get_version()
Definition: aiori.c:232
static int HDFS_statfs(const char *path, ior_aiori_statfs_t *stat, aiori_mod_opt_t *options)
Definition: aiori-HDFS.c:232
static void hdfs_xfer_hints(aiori_xfer_hint_t *params)
Definition: aiori-HDFS.c:146
static int HDFS_mkdir(const char *path, mode_t mode, aiori_mod_opt_t *options)
Definition: aiori-HDFS.c:196
static option_help * HDFS_options(aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values)
Definition: aiori-HDFS.c:164
static void HDFS_Close(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-HDFS.c:610
static aiori_fd_t * HDFS_Open(char *testFileName, int flags, aiori_mod_opt_t *param)
Definition: aiori-HDFS.c:466
static IOR_offset_t HDFS_GetFileSize(aiori_mod_opt_t *, char *)
Definition: aiori-HDFS.c:665
#define NULL
Definition: iordef.h:70

Definition at line 123 of file aiori-HDFS.c.

◆ hints

aiori_xfer_hint_t* hints = NULL
static

Definition at line 119 of file aiori-HDFS.c.