MCPcopy Create free account
hub / github.com/apache/pig / getTmpFileStorage

Method getTmpFileStorage

src/org/apache/pig/impl/util/Utils.java:383–400  ·  view source on GitHub ↗
(Properties properties)

Source from the content-addressed store, hash-verified

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(

Callers 3

Calls 5

getPropertyMethod · 0.80
equalsMethod · 0.45
lowerNameMethod · 0.45
toStringMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected