sig
type int32_t = int
and time_t = int
and int64_t = int
and uint16_t = int
and tObjectKind = KObjectKindFile | KObjectKindDirectory
and tSize = Hdfs.int32_t
and tTime = Hdfs.time_t
and tOffset = Hdfs.int64_t
and tPort = Hdfs.uint16_t
and open_flags = O_RDONLY | O_WRONLY | O_APPEND
and retcode = int
and hdfsFS
and hdfsFile
and struct_3 = {
mKind : Hdfs.tObjectKind;
mName : string;
mLastMod : Hdfs.tTime;
mSize : Hdfs.tOffset;
mReplication : int;
mBlockSize : Hdfs.tOffset;
mOwner : string;
mGroup : string;
mPermissions : int;
mLastAccess : Hdfs.tTime;
}
and hdfsFileInfo = Hdfs.struct_3
type params = {
force_new_instance : bool;
namenode : string option;
port : int option;
user : string option;
krb_ticket_cache : string option;
}
external hdfsConnect : Hdfs.params -> Hdfs.hdfsFS = "ml_hdfs_connect"
external hdfsGetWorkingDirectory : Hdfs.hdfsFS -> string = "ml_hdfs_getwd"
val default : Hdfs.params
external hdfsFileIsOpenForRead : Hdfs.hdfsFile -> bool
= "camlidl_hdfs_hdfsFileIsOpenForRead"
external hdfsFileIsOpenForWrite : Hdfs.hdfsFile -> bool
= "camlidl_hdfs_hdfsFileIsOpenForWrite"
external hdfsConfGetStr : string -> string option
= "camlidl_hdfs_hdfsConfGetStr"
external hdfsConfGetInt : string -> Hdfs.int32_t
= "camlidl_hdfs_hdfsConfGetInt"
external hdfsDisconnect : Hdfs.hdfsFS -> unit
= "camlidl_hdfs_hdfsDisconnect"
external hdfsOpenFile :
Hdfs.hdfsFS ->
string ->
Hdfs.open_flags list -> int -> int -> Hdfs.tSize -> Hdfs.hdfsFile
= "camlidl_hdfs_hdfsOpenFile_bytecode" "camlidl_hdfs_hdfsOpenFile"
external hdfsCloseFile : Hdfs.hdfsFS -> Hdfs.hdfsFile -> unit
= "camlidl_hdfs_hdfsCloseFile"
external hdfsExists : Hdfs.hdfsFS -> string -> bool
= "camlidl_hdfs_hdfsExists"
external hdfsSeek : Hdfs.hdfsFS -> Hdfs.hdfsFile -> Hdfs.tOffset -> unit
= "camlidl_hdfs_hdfsSeek"
external hdfsTell : Hdfs.hdfsFS -> Hdfs.hdfsFile -> Hdfs.tOffset
= "camlidl_hdfs_hdfsTell"
external hdfsRead : Hdfs.hdfsFS -> Hdfs.hdfsFile -> string -> int
= "camlidl_hdfs_hdfsRead"
val hdfsRead_n : Hdfs.hdfsFS -> Hdfs.hdfsFile -> int -> string
external hdfsPread :
Hdfs.hdfsFS -> Hdfs.hdfsFile -> Hdfs.tOffset -> string -> int
= "camlidl_hdfs_hdfsPread"
val hdfsPread_n :
Hdfs.hdfsFS -> Hdfs.hdfsFile -> pos:int -> size:int -> string
external hdfsWrite : Hdfs.hdfsFS -> Hdfs.hdfsFile -> string -> Hdfs.tSize
= "camlidl_hdfs_hdfsWrite"
external hdfsFlush : Hdfs.hdfsFS -> Hdfs.hdfsFile -> unit
= "camlidl_hdfs_hdfsFlush"
external hdfsHFlush : Hdfs.hdfsFS -> Hdfs.hdfsFile -> unit
= "camlidl_hdfs_hdfsHFlush"
external hdfsHSync : Hdfs.hdfsFS -> Hdfs.hdfsFile -> unit
= "camlidl_hdfs_hdfsHSync"
external hdfsAvailable : Hdfs.hdfsFS -> Hdfs.hdfsFile -> int
= "camlidl_hdfs_hdfsAvailable"
external hdfsCopy : Hdfs.hdfsFS -> string -> Hdfs.hdfsFS -> string -> unit
= "camlidl_hdfs_hdfsCopy"
external hdfsMove : Hdfs.hdfsFS -> string -> Hdfs.hdfsFS -> string -> unit
= "camlidl_hdfs_hdfsMove"
external hdfsDelete : Hdfs.hdfsFS -> string -> bool -> unit
= "camlidl_hdfs_hdfsDelete"
external hdfsRename : Hdfs.hdfsFS -> string -> string -> unit
= "camlidl_hdfs_hdfsRename"
external hdfsSetWorkingDirectory : Hdfs.hdfsFS -> string -> unit
= "camlidl_hdfs_hdfsSetWorkingDirectory"
external hdfsCreateDirectory : Hdfs.hdfsFS -> string -> unit
= "camlidl_hdfs_hdfsCreateDirectory"
external hdfsSetReplication : Hdfs.hdfsFS -> string -> int -> unit
= "camlidl_hdfs_hdfsSetReplication"
external hdfsListDirectory :
Hdfs.hdfsFS -> string -> Hdfs.hdfsFileInfo array
= "camlidl_hdfs_hdfsListDirectory"
external hdfsGetPathInfo : Hdfs.hdfsFS -> string -> Hdfs.hdfsFileInfo
= "camlidl_hdfs_hdfsGetPathInfo"
end