(Properties properties)
| 381 | } |
| 382 | |
| 383 | private static TEMPFILE_STORAGE getTmpFileStorage(Properties properties) { |
| 384 | boolean tmpFileCompression = properties.getProperty( |
| 385 | PigConfiguration.PIG_ENABLE_TEMP_FILE_COMPRESSION, "false").equals("true"); |
| 386 | String tmpFileCompressionStorage = |
| 387 | properties.getProperty(PigConfiguration.PIG_TEMP_FILE_COMPRESSION_STORAGE, |
| 388 | TEMPFILE_STORAGE.TFILE.lowerName()); |
| 389 | |
| 390 | if (!tmpFileCompression) { |
| 391 | return TEMPFILE_STORAGE.INTER; |
| 392 | } else if (TEMPFILE_STORAGE.SEQFILE.lowerName().equals(tmpFileCompressionStorage)) { |
| 393 | return TEMPFILE_STORAGE.SEQFILE; |
| 394 | } else if (TEMPFILE_STORAGE.TFILE.lowerName().equals(tmpFileCompressionStorage)) { |
| 395 | return TEMPFILE_STORAGE.TFILE; |
| 396 | } else { |
| 397 | throw new IllegalArgumentException("Unsupported storage format " + tmpFileCompressionStorage + |
| 398 | ". Should be one of " + Arrays.toString(TEMPFILE_STORAGE.values())); |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | public static void setMapredCompressionCodecProps(Configuration conf) { |
| 403 | String codec = conf.get( |
no test coverage detected