| 354 | } |
| 355 | |
| 356 | public static String getTmpFileCompressorName(PigContext pigContext) { |
| 357 | if (pigContext == null) |
| 358 | return InterStorage.class.getName(); |
| 359 | |
| 360 | String codec = pigContext.getProperties().getProperty(PigConfiguration.PIG_TEMP_FILE_COMPRESSION_CODEC, ""); |
| 361 | if (codec.equals(TEMPFILE_CODEC.LZO.lowerName())) { |
| 362 | pigContext.getProperties().setProperty("io.compression.codec.lzo.class", "com.hadoop.compression.lzo.LzoCodec"); |
| 363 | } |
| 364 | |
| 365 | return getTmpFileStorage(pigContext.getProperties()).getStorageClass().getName(); |
| 366 | } |
| 367 | |
| 368 | public static FileInputLoadFunc getTmpFileStorageObject(Configuration conf) throws IOException { |
| 369 | Class<? extends FileInputLoadFunc> storageClass = getTmpFileStorageClass(ConfigurationUtil.toProperties(conf)); |