All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hydrosphere.mist.utils.parquet.SimpleReadSupport.scala Maven / Gradle / Ivy

package io.hydrosphere.mist.utils.parquet

import java.util

import org.apache.hadoop.conf.Configuration
import parquet.hadoop.api.{InitContext, ReadSupport}
import parquet.hadoop.api.ReadSupport.ReadContext
import parquet.io.api.RecordMaterializer
import parquet.schema.MessageType

class SimpleReadSupport extends ReadSupport[SimpleRecord] {
  override def prepareForRead(configuration: Configuration, map: util.Map[String, String], messageType: MessageType, readContext: ReadContext): RecordMaterializer[SimpleRecord] = {
    new SimpleRecordMaterializer(messageType)
  }

  override def init(context: InitContext): ReadContext = {
    new ReadContext(context.getFileSchema)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy