Package org.anarres.lzo.hadoop.codec

Examples of org.anarres.lzo.hadoop.codec.LzopInputStream


    public void testInputFile() throws Exception {
        try {
            File dir = LzopFileTest.getDataDirectory();
            File file = new File(dir, "input.txt.lzo");
            FileInputStream fi = new FileInputStream(file);
            LzopInputStream ci = new LzopInputStream(fi);
            ByteArrayOutputStream bo = new ByteArrayOutputStream((int) (file.length() * 2));
            bo.reset();
            long start = System.currentTimeMillis();
            IOUtils.copy(ci, bo);
            long end = System.currentTimeMillis();
View Full Code Here


    public void testLineReader() throws Exception {
        try {
            File dir = LzopFileTest.getDataDirectory();
            File file = new File(dir, "input.txt.lzo");
            FileInputStream fi = new FileInputStream(file);
            LzopInputStream ci = new LzopInputStream(fi);
            LineRecordReader reader = new LineRecordReader(ci, 0L, 9999L, 9999);
            LongWritable key = new LongWritable();
            Text value = new Text();
            while (reader.next(key, value)) {
                LOG.info("key=" + key + "; value=" + value);
View Full Code Here

TOP

Related Classes of org.anarres.lzo.hadoop.codec.LzopInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.