HDFSCLI(1)
π HDFSCLI β like, the manual, but make it make sense π
okay bestie, gather round, because this is HdfsCLI β a command line interface for HDFS β and honestly? she's iconic. no cap. let's get into it. π¦
β¨ NAME β¨
hdfscli β a command line interface for HDFS. yes, that's the whole name. short, sweet, main character energy. π
πΈ SYNOPSIS πΈ
here's the vibe check on how you actually call her:
hdfscli [interactive] [-a ALIAS] [-v...]
hdfscli download [-fsa ALIAS] [-v...] [-t THREADS] HDFS_PATH LOCAL_PATH
hdfscli upload [-sa ALIAS] [-v...] [-A | -f] [-t THREADS] LOCAL_PATH
HDFS_PATH
hdfscli -L | -v | -h
notice how upload and download get their own lil argument lists? yeah. that's on purpose. also notice the combined short flags (-fsa, -sa) β they're fr fr in there, not a typo. π
π OPTIONS π
COMMANDS
downloadβ pull a file or folder down from HDFS. and if it's just a single file you're grabbing? you can pass-asLOCAL_PATHand she'll stream it straight to standard out. obsessed. πinteractiveβ upload a file or folder to HDFS.-can be specified asLOCAL_PATHto read from standard in. then she starts the client and exposes it via the python interpreter (usingipython(1)if available). lowkey a whole experience.uploadβ upload a file or folder to HDFS.-can be specified asLOCAL_PATHto read from standard in. yeah, same trick, different direction. π
ARGUMENTS
HDFS_PATHβ remote HDFS path. that's the far-away one. the cloud one. the β¨ remote β¨ one.LOCAL_PATHβ path to local file or directory. that's the one on your actual laptop, bestie.
OPTIONS
-A,--appendβ append data to an existing file. only supported if uploading a single file or from standard in. so like, know the rules before you try it. π-L,--logβ show path to current log file and exit. bye.-V,--versionβ show version and exit. also bye, but make it fashion.-a ALIAS,--alias=ALIASβ alias of namenode to connect to. it's giving "which one though".-f,--forceβ allow overwriting any existing files. careful, she will not hesitate. π-s,--silentβ don't display progress status. for when you want peace and quiet. π§-t THREADS,--threads=THREADSβ number of threads to use for parallelization.0allocates a thread per file.[default: 0]. parallelism slay. π₯-v,--verboseβ enable log output. can be specified up to three times (increasing verbosity each time). so-v,-v -v,-v -v -v. the more v's, the more she tells you. π
β EXIT STATUS β
HdfsCLI exits with return status 1 if an error occurred and 0 otherwise. so like, 0 = we ate, 1 = something went wrong, bestie. that's it, that's the whole story. π
π EXAMPLES π
steal these, they're yours now:
hdfscli -a prod /user/foo
hdfscli download features.avro dat/
hdfscli download logs/1987-03-23 - >>logs
hdfscli upload -f - data/weights.tsv <weights.tsv
see how the last two pipe through -? streamy. iconic. π
π SEE ALSO π
go read those too, iykyk. π«Ά
this page is from October 2021, and it's all about HdfsCLI. mwah. take care of her, she's doing her best. πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- fedora 43: python3-hdfs 2.7.3-11.fc43 Β· MIT
- fedora 44: python3-hdfs 2.7.3-13.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms