[][src]Crate rust_hdfs

Re-exports

pub use hdfs_fs::*;

Modules

hdfs_fs

Structs

__fsid_t
__locale_data
__locale_struct
flock
hadoopRzBuffer
hadoopRzOptions
hdfsBuilder

Some utility decls used in libhdfs.

hdfsFileInfo

hdfsFileInfo - Information about a file/directory.

hdfsFile_internal
hdfsHedgedReadMetrics
hdfsReadStatistics
hdfsStreamBuilder
hdfs_internal

The C reflection of org.apache.org.hadoop.FileSystem .

itimerspec
sigevent
stat
timespec
tm

Constants

AT_EACCESS
AT_FDCWD
AT_REMOVEDIR
AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW
CLOCK_BOOTTIME
CLOCK_BOOTTIME_ALARM
CLOCK_MONOTONIC
CLOCK_MONOTONIC_COARSE
CLOCK_MONOTONIC_RAW
CLOCK_PROCESS_CPUTIME_ID
CLOCK_REALTIME
CLOCK_REALTIME_ALARM
CLOCK_REALTIME_COARSE
CLOCK_TAI
CLOCK_THREAD_CPUTIME_ID
E2BIG
EACCES
EADDRINUSE
EADDRNOTAVAIL
EADV
EAFNOSUPPORT
EAGAIN
EALREADY
EBADE
EBADF
EBADFD
EBADMSG
EBADR
EBADRQC
EBADSLT
EBFONT
EBUSY
ECANCELED
ECHILD
ECHRNG
ECOMM
ECONNABORTED
ECONNREFUSED
ECONNRESET
EDEADLK
EDEADLOCK
EDESTADDRREQ
EDOM
EDOTDOT
EDQUOT
EEXIST
EFAULT
EFBIG
EHOSTDOWN
EHOSTUNREACH
EHWPOISON
EIDRM
EILSEQ
EINPROGRESS
EINTERNAL
EINTR
EINVAL
EIO
EISCONN
EISDIR
EISNAM
EKEYEXPIRED
EKEYREJECTED
EKEYREVOKED
EL2NSYNC
EL2HLT
EL3HLT
EL3RST
ELASTIC_BYTE_BUFFER_POOL_CLASS
ELIBACC
ELIBBAD
ELIBEXEC
ELIBMAX
ELIBSCN
ELNRNG
ELOOP
EMEDIUMTYPE
EMFILE
EMLINK
EMSGSIZE
EMULTIHOP
ENAMETOOLONG
ENAVAIL
ENETDOWN
ENETRESET
ENETUNREACH
ENFILE
ENOANO
ENOBUFS
ENOCSI
ENODATA
ENODEV
ENOENT
ENOEXEC
ENOKEY
ENOLCK
ENOLINK
ENOMEDIUM
ENOMEM
ENOMSG
ENONET
ENOPKG
ENOPROTOOPT
ENOSPC
ENOSR
ENOSTR
ENOSYS
ENOTBLK
ENOTCONN
ENOTDIR
ENOTEMPTY
ENOTNAM
ENOTRECOVERABLE
ENOTSOCK
ENOTSUP
ENOTTY
ENOTUNIQ
ENXIO
EOPNOTSUPP
EOVERFLOW
EOWNERDEAD
EPERM
EPFNOSUPPORT
EPIPE
EPROTO
EPROTONOSUPPORT
EPROTOTYPE
ERANGE
EREMCHG
EREMOTE
EREMOTEIO
ERESTART
ERFKILL
EROFS
ESHUTDOWN
ESOCKTNOSUPPORT
ESPIPE
ESRCH
ESRMNT
ESTALE
ESTRPIPE
ETIME
ETIMEDOUT
ETOOMANYREFS
ETXTBSY
EUCLEAN
EUNATCH
EUSERS
EWOULDBLOCK
EXDEV
EXFULL
FAPPEND
FASYNC
FD_CLOEXEC
FFSYNC
FNDELAY
FNONBLOCK
F_DUPFD
F_DUPFD_CLOEXEC
F_EXLCK
F_GETFD
F_GETFL
F_GETLK
F_GETLK64
F_GETOWN
F_LOCK
F_OK
F_RDLCK
F_SETFD
F_SETFL
F_SETLK
F_SETLK64
F_SETLKW
F_SETLKW64
F_SETOWN
F_SHLCK
F_TEST
F_TLOCK
F_ULOCK
F_UNLCK
F_WRLCK
INT8_MIN
INT8_MAX
INT16_MIN
INT16_MAX
INT32_MIN
INT32_MAX
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MIN
INT_FAST8_MAX
INT_FAST16_MIN
INT_FAST16_MAX
INT_FAST32_MIN
INT_FAST32_MAX
INT_LEAST8_MIN
INT_LEAST8_MAX
INT_LEAST16_MIN
INT_LEAST16_MAX
INT_LEAST32_MIN
INT_LEAST32_MAX
LOCK_EX
LOCK_NB
LOCK_SH
LOCK_UN
O_ACCMODE
O_APPEND
O_ASYNC
O_CLOEXEC
O_CREAT
O_DIRECTORY
O_DSYNC
O_EXCL
O_FSYNC
O_NDELAY
O_NOCTTY
O_NOFOLLOW
O_NONBLOCK
O_RDONLY
O_RDWR
O_RSYNC
O_SYNC
O_TRUNC
O_WRONLY
POSIX_FADV_DONTNEED
POSIX_FADV_NOREUSE
POSIX_FADV_NORMAL
POSIX_FADV_RANDOM
POSIX_FADV_SEQUENTIAL
POSIX_FADV_WILLNEED
PTRDIFF_MAX
PTRDIFF_MIN
R_OK
SEEK_CUR
SEEK_END
SEEK_SET
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
S_IFBLK
S_IFCHR
S_IFDIR
S_IFIFO
S_IFLNK
S_IFMT
S_IFREG
S_IFSOCK
S_IRGRP
S_IROTH
S_IRUSR
S_IRWXG
S_IRWXO
S_IRWXU
S_ISGID
S_ISUID
S_ISVTX
S_IWGRP
S_IWOTH
S_IWUSR
S_IXGRP
S_IXOTH
S_IXUSR
TIMER_ABSTIME
TIME_UTC
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
UTIME_NOW
UTIME_OMIT
WINT_MAX
WINT_MIN
W_OK
X_OK
_ATFILE_SOURCE
_BITS_ERRNO_H
_BITS_STAT_H
_BITS_STDINT_INTN_H
_BITS_STDINT_UINTN_H
_BITS_TIME_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_TYPES_LOCALE_T_H
_BITS_TYPES___LOCALE_T_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_ERRNO_H
_FCNTL_H
_FEATURES_H
_MKNOD_VER_LINUX
_POSIX_C_SOURCE
_POSIX_SOURCE
_STAT_VER
_STAT_VER_KERNEL
_STAT_VER_LINUX
_STDC_PREDEF_H
_STDINT_H
_SYS_CDEFS_H
_TIME_H
__FD_SETSIZE
__F_GETOWN
__F_GETOWN_EX
__F_GETSIG
__F_SETOWN
__F_SETOWN_EX
__F_SETSIG
__GLIBC_MINOR__
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_GENERIC_SELECTION
__INO_T_MATCHES_INO64_T
__OFF_T_MATCHES_OFF64_T
__O_CLOEXEC
__O_DIRECT
__O_DIRECTORY
__O_DSYNC
__O_LARGEFILE
__O_NOATIME
__O_NOFOLLOW
__O_PATH
__O_TMPFILE
__POSIX_FADV_DONTNEED
__POSIX_FADV_NOREUSE
__RLIM_T_MATCHES_RLIM64_T
__STDC_IEC_559__
__STDC_IEC_559_COMPLEX__
__STDC_ISO_10646__
__STDC_NO_THREADS__
__SYSCALL_WORDSIZE
__S_IEXEC
__S_IFBLK
__S_IFCHR
__S_IFDIR
__S_IFIFO
__S_IFLNK
__S_IFMT
__S_IFREG
__S_IFSOCK
__S_IREAD
__S_ISGID
__S_ISUID
__S_ISVTX
__S_IWRITE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_XOPEN2K
__USE_XOPEN2K8
__WORDSIZE
__WORDSIZE_TIME64_COMPAT32
__clock_t_defined
__clockid_t_defined
__glibc_c99_flexarr_available
__itimerspec_defined
__struct_tm_defined
__time_t_defined
__timer_t_defined
__timespec_defined
tObjectKind_kObjectKindDirectory
tObjectKind_kObjectKindFile

Statics

__daylight
__timezone
__tzname
daylight
timezone
tzname

Functions

__errno_location
asctime
asctime_r
clock
clock_getcpuclockid
clock_getres
clock_gettime
clock_nanosleep
clock_settime
creat
ctime
ctime_r
difftime
dysize
fcntl
gmtime
gmtime_r
hadoopReadZero

Perform a byte buffer read. If possible, this will be a zero-copy (mmap) read.

hadoopRzBufferFree

Release a buffer obtained through readZero.

hadoopRzBufferGet

Get a pointer to the raw buffer returned from readZero.

hadoopRzBufferLength

Determine the length of the buffer returned from readZero.

hadoopRzOptionsAlloc

Allocate a zero-copy options structure.

hadoopRzOptionsFree

Free a hadoopRzOptionsFree structure.

hadoopRzOptionsSetByteBufferPool

Set the ByteBufferPool to use with read0.

hadoopRzOptionsSetSkipChecksum

Determine whether we should skip checksums in read0.

hdfsAvailable

hdfsAvailable - Number of bytes that can be read from this input stream without blocking. @param fs The configured filesystem handle. @param file The file handle. @return Returns available bytes; -1 on error.

hdfsBuilderConfSetStr

Set a configuration string for an HdfsBuilder.

hdfsBuilderConnect

Connect to HDFS using the parameters defined by the builder.

hdfsBuilderSetForceNewInstance

Force the builder to always create a new instance of the FileSystem, rather than possibly finding one in the cache.

hdfsBuilderSetKerbTicketCachePath

Set the path to the Kerberos ticket cache to use when connecting to the HDFS cluster.

hdfsBuilderSetNameNode

Set the HDFS NameNode to connect to.

hdfsBuilderSetNameNodePort

Set the port of the HDFS NameNode to connect to.

hdfsBuilderSetUserName

Set the username to use when connecting to the HDFS cluster.

hdfsChmod

hdfsChmod @param fs The configured filesystem handle. @param path the path to the file or directory @param mode the bitmask to set it to @return 0 on success else -1

hdfsChown

Change the user and/or group of a file or directory.

hdfsCloseFile

hdfsCloseFile - Close an open file. @param fs The configured filesystem handle. @param file The file handle. @return Returns 0 on success, -1 on error. On error, errno will be set appropriately. If the hdfs file was valid, the memory associated with it will be freed at the end of this call, even if there was an I/O error.

hdfsConfGetInt

Get a configuration integer.

hdfsConfGetStr

Get a configuration string.

hdfsConfStrFree

Free a configuration string found with hdfsConfGetStr.

hdfsConnect

hdfsConnect - Connect to a hdfs file system. Connect to the hdfs. @param nn The NameNode. See hdfsBuilderSetNameNode for details. @param port The port on which the server is listening. @return Returns a handle to the filesystem or NULL on error. @deprecated Use hdfsBuilderConnect instead.

hdfsConnectAsUser

hdfsConnectAsUser - Connect to a hdfs file system as a specific user Connect to the hdfs. @param nn The NameNode. See hdfsBuilderSetNameNode for details. @param port The port on which the server is listening. @param user the user name (this is hadoop domain user). Or NULL is equivelant to hhdfsConnect(host, port) @return Returns a handle to the filesystem or NULL on error. @deprecated Use hdfsBuilderConnect instead.

hdfsConnectAsUserNewInstance

hdfsConnect - Connect to an hdfs file system.

hdfsConnectNewInstance

hdfsConnect - Connect to an hdfs file system.

hdfsCopy

hdfsCopy - Copy file from one filesystem to another. @param srcFS The handle to source filesystem. @param src The path of source file. @param dstFS The handle to destination filesystem. @param dst The path of destination file. @return Returns 0 on success, -1 on error.

hdfsCreateDirectory

hdfsCreateDirectory - Make the given file and all non-existent parents into directories. @param fs The configured filesystem handle. @param path The path of the directory. @return Returns 0 on success, -1 on error.

hdfsDelete

hdfsDelete - Delete file. @param fs The configured filesystem handle. @param path The path of the file. @param recursive if path is a directory and set to non-zero, the directory is deleted else throws an exception. In case of a file the recursive argument is irrelevant. @return Returns 0 on success, -1 on error.

hdfsDisconnect

hdfsDisconnect - Disconnect from the hdfs file system. Disconnect from hdfs. @param fs The configured filesystem handle. @return Returns 0 on success, -1 on error. Even if there is an error, the resources associated with the hdfsFS will be freed.

hdfsExists

hdfsExists - Checks if a given path exsits on the filesystem @param fs The configured filesystem handle. @param path The path to look for @return Returns 0 on success, -1 on error.

hdfsFileClearReadStatistics

Clear the read statistics for a file.

hdfsFileFreeReadStatistics

Free some HDFS read statistics.

hdfsFileGetReadStatistics

Get read statistics about a file. This is only applicable to files opened for reading.

hdfsFileIsEncrypted

hdfsFileIsEncrypted: determine if a file is encrypted based on its hdfsFileInfo. @return -1 if there was an error (errno will be set), 0 if the file is not encrypted, 1 if the file is encrypted.

hdfsFileIsOpenForRead

Determine if a file is open for read.

hdfsFileIsOpenForWrite

Determine if a file is open for write.

hdfsFlush

hdfsWrite - Flush the data. @param fs The configured filesystem handle. @param file The file handle. @return Returns 0 on success, -1 on error.

hdfsFreeBuilder

Free an HDFS builder.

hdfsFreeFileInfo

hdfsFreeFileInfo - Free up the hdfsFileInfo array (including fields) @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo objects. @param numEntries The size of the array.

hdfsFreeHedgedReadMetrics

Free HDFS Hedged read metrics.

hdfsFreeHosts

hdfsFreeHosts - Free up the structure returned by hdfsGetHosts @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo objects. @param numEntries The size of the array.

hdfsGetCapacity

hdfsGetCapacity - Return the raw capacity of the filesystem. @param fs The configured filesystem handle. @return Returns the raw-capacity; -1 on error.

hdfsGetDefaultBlockSize

hdfsGetDefaultBlockSize - Get the default blocksize.

hdfsGetDefaultBlockSizeAtPath

hdfsGetDefaultBlockSizeAtPath - Get the default blocksize at the filesystem indicated by a given path.

hdfsGetHedgedReadMetrics

Get cluster wide hedged read metrics.

hdfsGetHosts

hdfsGetHosts - Get hostnames where a particular block (determined by pos & blocksize) of a file is stored. The last element in the array is NULL. Due to replication, a single block could be present on multiple hosts. @param fs The configured filesystem handle. @param path The path of the file. @param start The start of the block. @param length The length of the block. @return Returns a dynamically-allocated 2-d array of blocks-hosts; NULL on error.

hdfsGetLastExceptionRootCause

Get the last exception root cause that happened in the context of the current thread, i.e. the thread that called into libHDFS.

hdfsGetLastExceptionStackTrace

Get the last exception stack trace that happened in the context of the current thread, i.e. the thread that called into libHDFS.

hdfsGetPathInfo

hdfsGetPathInfo - Get information about a path as a (dynamically allocated) single hdfsFileInfo struct. hdfsFreeFileInfo should be called when the pointer is no longer needed. @param fs The configured filesystem handle. @param path The path of the file. @return Returns a dynamically-allocated hdfsFileInfo object; NULL on error.

hdfsGetUsed

hdfsGetUsed - Return the total raw size of all files in the filesystem. @param fs The configured filesystem handle. @return Returns the total-size; -1 on error.

hdfsGetWorkingDirectory

hdfsGetWorkingDirectory - Get the current working directory for the given filesystem. @param fs The configured filesystem handle. @param buffer The user-buffer to copy path of cwd into. @param bufferSize The length of user-buffer. @return Returns buffer, NULL on error.

hdfsHFlush

hdfsHFlush - Flush out the data in client's user buffer. After the return of this call, new readers will see the data. @param fs configured filesystem handle @param file file handle @return 0 on success, -1 on error and sets errno

hdfsHSync

hdfsHSync - Similar to posix fsync, Flush out the data in client's user buffer. all the way to the disk device (but the disk may have it in its cache). @param fs configured filesystem handle @param file file handle @return 0 on success, -1 on error and sets errno

hdfsListDirectory

hdfsListDirectory - Get list of files/directories for a given directory-path. hdfsFreeFileInfo should be called to deallocate memory. @param fs The configured filesystem handle. @param path The path of the directory. @param numEntries Set to the number of files/directories in path. @return Returns a dynamically-allocated array of hdfsFileInfo objects; NULL on error or empty directory. errno is set to non-zero on error or zero on success.

hdfsMove

hdfsMove - Move file from one filesystem to another. @param srcFS The handle to source filesystem. @param src The path of source file. @param dstFS The handle to destination filesystem. @param dst The path of destination file. @return Returns 0 on success, -1 on error.

hdfsNewBuilder

Create an HDFS builder.

hdfsOpenFile

hdfsOpenFile - Open a hdfs file in given mode. @deprecated Use the hdfsStreamBuilder functions instead. This function does not support setting block sizes bigger than 2 GB.

hdfsPread

hdfsPread - Positional read of data from an open file. @param fs The configured filesystem handle. @param file The file handle. @param position Position from which to read @param buffer The buffer to copy read bytes into. @param length The length of the buffer. @return See hdfsRead

hdfsRead

hdfsRead - Read data from an open file. @param fs The configured filesystem handle. @param file The file handle. @param buffer The buffer to copy read bytes into. @param length The length of the buffer. @return On success, a positive number indicating how many bytes were read. On end-of-file, 0. On error, -1. Errno will be set to the error code. Just like the POSIX read function, hdfsRead will return -1 and set errno to EINTR if data is temporarily unavailable, but we are not yet at the end of the file.

hdfsReadStatisticsGetRemoteBytesRead

@param stats HDFS read statistics for a file.

hdfsRename

hdfsRename - Rename file. @param fs The configured filesystem handle. @param oldPath The path of the source file. @param newPath The path of the destination file. @return Returns 0 on success, -1 on error.

hdfsSeek

hdfsSeek - Seek to given offset in file. This works only for files opened in read-only mode. @param fs The configured filesystem handle. @param file The file handle. @param desiredPos Offset into the file to seek into. @return Returns 0 on success, -1 on error.

hdfsSetReplication

hdfsSetReplication - Set the replication of the specified file to the supplied value @param fs The configured filesystem handle. @param path The path of the file. @return Returns 0 on success, -1 on error.

hdfsSetWorkingDirectory

hdfsSetWorkingDirectory - Set the working directory. All relative paths will be resolved relative to it. @param fs The configured filesystem handle. @param path The path of the new 'cwd'. @return Returns 0 on success, -1 on error.

hdfsStreamBuilderAlloc

hdfsStreamBuilderAlloc - Allocate an HDFS stream builder.

hdfsStreamBuilderBuild

hdfsStreamBuilderBuild - Build the stream by calling open or create.

hdfsStreamBuilderFree

hdfsStreamBuilderFree - Free an HDFS file builder.

hdfsStreamBuilderSetBufferSize

hdfsStreamBuilderSetBufferSize - Set the stream buffer size.

hdfsStreamBuilderSetDefaultBlockSize

hdfsStreamBuilderSetDefaultBlockSize - Set the default block size for the stream. This is only relevant for output streams, which will create new blocks.

hdfsStreamBuilderSetReplication

hdfsStreamBuilderSetReplication - Set the replication for the stream. This is only relevant for output streams, which will create new blocks.

hdfsTell

hdfsTell - Get the current offset in the file, in bytes. @param fs The configured filesystem handle. @param file The file handle. @return Current offset, -1 on error.

hdfsTruncateFile

hdfsTruncateFile - Truncate a hdfs file to given lenght. @param fs The configured filesystem handle. @param path The full path to the file. @param newlength The size the file is to be truncated to @return 1 if the file has been truncated to the desired newlength and is immediately available to be reused for write operations such as append. 0 if a background process of adjusting the length of the last block has been started, and clients should wait for it to complete before proceeding with further file updates. -1 on error.

hdfsUnbufferFile

hdfsUnbufferFile - Reduce the buffering done on a file.

hdfsUtime

hdfsUtime @param fs The configured filesystem handle. @param path the path to the file or directory @param mtime new modification time or -1 for no change @param atime new access time or -1 for no change @return 0 on success else -1

hdfsWrite

hdfsWrite - Write data into an open file. @param fs The configured filesystem handle. @param file The file handle. @param buffer The data. @param length The no. of bytes to write. @return Returns the number of bytes written, -1 on error.

localtime
localtime_r
lockf
mktime
nanosleep
open
openat
posix_fadvise
posix_fallocate
stime
strftime
strftime_l
time
timegm
timelocal
timer_create
timer_delete
timer_getoverrun
timer_gettime
timer_settime
timespec_get
tzset

Type Definitions

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__intmax_t
__intptr_t
__key_t
__locale_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uintmax_t
__useconds_t
clock_t
clockid_t
hdfsFS
hdfsFile
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
locale_t
mode_t
off_t
pid_t
size_t
tObjectKind

port

tOffset

time type in seconds

tPort

offset within the file

tSize
tTime

size of data for read/write io ops

time_t
timer_t
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t