Class CodecConfig

    • Constructor Detail

      • CodecConfig

        public CodecConfig()
    • Method Detail

      • isHadoopCompressionSet

        public abstract boolean isHadoopCompressionSet()
        Returns:
        if a compress flag is set from hadoop
      • getHadoopOutputCompressorClass

        public abstract Class getHadoopOutputCompressorClass​(Class defaultCodec)
        Parameters:
        defaultCodec - the codec to use when codec is not set in conf
        Returns:
        codec specified in hadoop config
      • getConfiguration

        public abstract org.apache.hadoop.conf.Configuration getConfiguration()
        Returns:
        configuration of the job
      • from

        public static CodecConfig from​(org.apache.hadoop.mapred.JobConf jobConf)
        use mapred api to read codec config
        Parameters:
        jobConf - a mapred job configuration
        Returns:
        MapredCodecConfig
      • from

        public static CodecConfig from​(org.apache.hadoop.mapreduce.TaskAttemptContext context)
        use mapreduce api to read codec config
        Parameters:
        context - a mapreduce task attempt context
        Returns:
        MapreduceCodecConfig
      • isParquetCompressionSet

        public static boolean isParquetCompressionSet​(org.apache.hadoop.conf.Configuration conf)
      • getParquetCompressionCodec

        public static org.apache.parquet.hadoop.metadata.CompressionCodecName getParquetCompressionCodec​(org.apache.hadoop.conf.Configuration configuration)
      • getCodec

        public org.apache.parquet.hadoop.metadata.CompressionCodecName getCodec()