Crates.io | hdfs-sys |
lib.rs | hdfs-sys |
version | 0.3.0 |
source | src |
created_at | 2022-04-25 13:29:45.708441 |
updated_at | 2023-07-14 06:38:47.892648 |
description | Bindings to HDFS Native C API |
homepage | |
repository | https://github.com/Xuanwo/hdrs |
max_upload_size | |
id | 573861 |
size | 2,634,562 |
Bindings to HDFS
Native C API.
Work with these bindings directly is boring and error proven, please use hdrs instead if ever possible.
To target a version of libhdfs
, enable a Cargo features such as one of the following:
hdfs_2_2
: requires hdfs 2.2 or later releases.hdfs_2_3
: requires hdfs 2.3 or later releases.hdfs_2_4
: requires hdfs 2.4 or later releases.hdfs_2_5
: requires hdfs 2.5 or later releases.hdfs_2_6
: (default) requires hdfs 2.6 or later releases.hdfs_2_7
: requires hdfs 2.7 or later releases.hdfs_2_8
: requires hdfs 2.8 or later releases.hdfs_2_9
: requires hdfs 2.9 or later releases.hdfs_2_10
: requires hdfs 2.10 or later releases.hdfs_3_0
: requires hdfs 3.0 or later releases.hdfs_3_1
: requires hdfs 3.1 or later releases.hdfs_3_2
: requires hdfs 3.2 or later releases.hdfs_3_3
: requires hdfs 3.3 or later releases.Please note:
hdfs_2_6
will be available by default.hdfs_2_4
will also enable hdfs_2_3
and hdfs_2_2
.hdfs-sys
supports both dynamic link, static link and vendor:
vnedored
feature has been enabled, hdfs-sys
will compile and link libhdfs
in static.HDFS_LIB_DIR
to specify the path of libhdfs.so
or libhdfs.a
HDFS_STATIC=1
to choose to switch between dynamic link and static linkHDFS_LIB_DIR
is not set, we will try to find ${HADOOP_HOME}/lib/native
This crate will link to libjvm
dynamically.
To make this crate works correctly, please make sure the following env set correctly:
JAVA_HOME
: hdfs-sys
will search path like ${JAVA_HOME}/lib/server
to link libjvm
.NOTE: hdfs-sys
will ignore linking if DOCS_RS
is set to build docs.
hdfs-sys
uses JNI to call functions provided by jars that provided by hadoop releases. Please make sure CLASSPATH
is set correctly before calling any functions provided by hdfs-sys
:
export JAVA_HOME=/path/to/java
export HADOOP_HOME=/path/to/hadoop
export LD_LIBRARY_PATH=${JAVA_HOME}/lib/server
export CLASSPATH=$(find $HADOOP_HOME -iname "*.jar" | xargs echo | tr ' ' ':')
Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.
Submit issues for bug report or asking questions in discussion.
2.7.3
.This project is highly inspired by clang-sys