HDFSCLI(1)

πŸ“¦ version 2.7.3, in fedora 43, fedora 44

πŸ’– 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 - as LOCAL_PATH and she'll stream it straight to standard out. obsessed. 😭
  • interactive β€” upload a file or folder to HDFS. - can be specified as LOCAL_PATH to read from standard in. then she starts the client and exposes it via the python interpreter (using ipython(1) if available). lowkey a whole experience.
  • upload β€” upload a file or folder to HDFS. - can be specified as LOCAL_PATH to 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. 0 allocates 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