HDFSCLI(1)
π HDFSCLI(1) β the manual, but make it cute π
okay bestie, welcome to HDFSCLI(1), section 1, User Commands π«Ά this is the manual page for hdfscli-avro β an Avro extension for HdfsCLI. yep. that's the whole vibe. let's get into it β¨
π NAME π
hdfscli-avro β an Avro extension for HdfsCLI. that's it, that's the name, no notes π
β¨ SYNOPSIS β¨
here's the shape of it, fr fr. copy these exactly, they're load-bearing:
hdfscli-avro schema [-a ALIAS] [-v...] HDFS_PATH
hdfscli-avro read [-a ALIAS] [-v...] [-F FREQ | -n NUM] [-p PARTS]
HDFS_PATH
hdfscli write [-fa ALIAS] [-v...] [-C CODEC] [-S SCHEMA] HDFS_PATH
hdfscli-avro -L | -h
π«Ά not me pointing out that the third one literally says hdfscli write β yes, that's what it says, so that's what you get. character for character, bestie, i don't make the rules π
π DESCRIPTION π
hdfscli-avro is the Avro glow-up for HdfsCLI. it lets you peek at schemas, read Avro files straight off HDFS and spit out JSON, and write JSON back in as one single Avro file. three commands, main character energy, no cap π
π OPTIONS π
πΈ COMMANDS πΈ
schemaβ pretty print the schema. like, it makes the schema look nice. iconic.readβ read an Avro file off of HDFS and output the records as JSON to standard out. yes, straight to stdout, streaming behavior π¦writeβ read JSON records from standard in and serialize them into a single Avro file on HDFS. in goes the JSON, out goes the Avro π₯
π§ ARGUMENTS π§
HDFS_PATHβ the remote path to an Avro file, or a directory that's holding Avro part-files. either works, she's flexible π«
π OPTIONS π
-C CODEC,--codec=CODECβ compression codec, babes. available values are among:null,deflate,snappy. and the default?deflateπΈ [default:deflate]-F FREQ,--freq=FREQβ probability of sampling a record. so you get a lil random subset, lowkey iconic for big files β¨-L,--logβ show the path to the current log file and exit. that's it, that's all she does π-S SCHEMA,--schema=SCHEMAβ the schema used for serializing records. if you don't pass it, it gets inferred from the first record. no schema? she'll figure it out π-a ALIAS,--alias=ALIASβ the alias of the namenode you want to connect to π«Ά-f,--forceβ overwrite any existing file. any. be brave, be careful β οΈ-h,--helpβ show a usage message and exit. the classic escape hatch π-n NUM,--num=NUMβ cap the number of records to output. a lil ceiling on your output π-p PARTS,--parts=PARTSβ which part-files to read. give it a number and she'll randomly select that many, or give it a comma-separated list of numbers and she'll read only those. use a number followed by a comma (e.g.1,) to get a unique part-file. the default is to read all part-files π-v,--verboseβ enable log output. can be specified up to three times, and each time it gets more verbose. stack 'em up:-vvvπ
π₯ EXAMPLES π₯
these go hard, ngl:
hdfscli-avro schema /data/impressions.avro
hdfscli-avro read -a dev snapshot.avro >snapshot.jsonl
hdfscli-avro read -F 0.1 -p 2,3 clicks.avro
hdfscli-avro write -f positives.avro <positives.jsonl -S "$(cat schema.avsc)"
see how read pipes right into a .jsonl file? and write slurps up stdin and pushes it into Avro with a schema you cat'd in? obsessed. that's the whole workflow, bestie π¦β¨
π SEE ALSO π
hdfscli(1)β the main one. go read her too π
and that's the page!! π written for section User Commands, in October 2021, and the version tag on it is HDFSCLI(1) β that's the source and date, folded in all cute like you asked. periodt. go read some Avro files, you got this πππ
π¦ where this page comes from
- fedora 43: python3-hdfs+avro 2.7.3-11.fc43 Β· MIT
- fedora 44: python3-hdfs+avro 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