Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 632 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 632 Bytes

top-n

Find the largest N numbers in a file where each line of the file contains a single integer.

Building

mvn package

Usage

usage: java -jar top-n-1.0-jar-with-dependencies.jar [OPTIONS]
 -b,--blocksize <arg>   File slice size in bytes. Defaults to 10MB
 -i,--input <arg>       Input file
 -n <arg>               Number of elements to find
 -o,--output <arg>      Output file

Output

<truncated log information>
INFO: Top 10 numbers in data/200million.txt: [2147483523, 2147481965, 2147481237, 2147478830, 2147475382, 2147475365, 2147474242, 2147473532, 2147473046, 2147472921]