-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store checksum information as xattr on hdfs #25
Comments
Like @bbockelm mentioned -- you can't access xattr from the libhdfs C library, even in the latest trunk, so it will be difficult to access it from this plugin (see https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/include/hdfs/hdfs.h) |
While extended attributes are not available in libhdfs C library, XrootD allows now for drop-in checksum plugins. To try it out, you will need Python >=3.8: pip install xrdsum[hdfs] Usage example:/usr/bin/time -v xrdsum --verbose --debug get <HDFS path to file> --read-size 128 xrootd config
with #!/bin/sh
# from https://github.com/snafus/cephsum/blob/master/scripts/xrdcp-tpc.sh
#Original code
#/usr/bin/xrdcp --server -f $1 root://$XRDXROOTD_PROXY/$2
# Get the last two variables as SRC and DST, all others are assumed as additional arguments
OTHERARGS="${@:1:$#-2}"
DSTFILE="${@:$#:1}"
SRCFILE="${@:$#-1:1}"
/usr/bin/xrdcp $OTHERARGS --server -f $SRCFILE root://$XRDXROOTD_PROXY/$DSTFILE and with #!/usr/bin/env bash
RESULT=$(xrdsum get --store-result --chunk-size 64 --verbose --storage-catalog /etc/xrootd/storage.xml "$1")
ECODE=$?
# XRootD expects return on stdout - checksum followed by a new line
printf "%s\n" "$RESULT"
exit "$ECODE" |
Since 2.5.0 release, Hadoop supports xattr and it could set the checksum values as xattr and not files under /cksums dir as it is right now.
The text was updated successfully, but these errors were encountered: