def getCompressor(self, class_path=None): if not class_path: return DefaultCodec() codec_class = ReflectionUtils.hadoopClassFromName(class_path) return codec_class()