14 #include "int_sizes.h"
16 #ifndef HDFS_EINTERNAL
17 #define HDFS_EINTERNAL 255
20 typedef INT32_T tSize;
22 typedef INT64_T tOffset;
23 typedef UINT16_T tPort;
25 typedef enum tObjectKind {
26 kObjectKindFile =
'F',
27 kObjectKindDirectory =
'D'
31 typedef void *hdfsFile;
49 hdfsFS (*connect) (
const char *, tPort);
50 hdfsFS (*connect_as_user) (
const char *, tPort,
const char *,
const char *[], int);
51 int (*disconnect) (hdfsFS);
53 hdfsFile (*open) (hdfsFS,
const char *, int, int, short, tSize);
54 int (*close) (hdfsFS, hdfsFile);
55 int (*flush) (hdfsFS, hdfsFile);
56 tSize (*read) (hdfsFS, hdfsFile,
void *, tSize);
57 tSize (*pread) (hdfsFS, hdfsFile, tOffset,
void *, tSize);
58 tSize (*write) (hdfsFS, hdfsFile,
const void *, tSize);
59 int (*exists) (hdfsFS,
const char *);
60 int (*mkdir) (hdfsFS,
const char *);
61 int (*unlink) (hdfsFS,
const char *,
int recursive);
62 int (*rename) (hdfsFS,
const char *,
const char *);
65 char ***(*get_hosts) (hdfsFS,
const char *, tOffset, tOffset);
66 void (*free_hosts) (
char ***);
67 tOffset (*get_default_block_size) (hdfsFS);
68 tOffset (*get_capacity) (hdfsFS);
69 tOffset (*get_used) (hdfsFS);
70 int (*chmod) (hdfsFS,
const char *, short);
71 int (*utime) (hdfsFS,
const char *, tTime, tTime);
72 int (*chdir) (hdfsFS,
const char *);
73 tOffset (*tell) (hdfsFS, hdfsFile);
74 int (*setrep) (hdfsFS fs,
const char *path, UINT16_T nreps );
75 int (*copy) (hdfsFS srcFS,
const char* src, hdfsFS dstFS,
const char* dst);
78 int hdfs_library_envinit(
void);
Definition: hdfs_library.h:33
Definition: hdfs_library.h:46