Package parquet.hadoop

Examples of parquet.hadoop.ParquetReader


  @Override
  @SuppressWarnings("unchecked")
  public Iterator<T> read(FileSystem fs, Path path) {
    Path p = fs.makeQualified(path);
    final ParquetReader reader;
    try {
      reader = new ParquetReader(p, new CrunchAvroReadSupport(avroType));
    } catch (IOException e) {
      throw new CrunchRuntimeException(e);
    }
    return new AutoClosingIterator<T>(reader, new UnmodifiableIterator<T>() {

      private T next;

      @Override
      public boolean hasNext() {
        if (next != null) {
          return true;
        }
        try {
          next = (T) reader.read();
        } catch (IOException e) {
          throw new CrunchRuntimeException(e);
        }
        return next != null;
      }
View Full Code Here

TOP

Related Classes of parquet.hadoop.ParquetReader

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.