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

Method setCompression

src/org/apache/pig/builtin/PigStorage.java:482–493  ·  view source on GitHub ↗
(Path path, Job job)

Source from the content-addressed store, hash-verified

480 }
481
482 private void setCompression(Path path, Job job) {
483 String location=path.getName();
484 if (location.endsWith(".bz2") || location.endsWith(".bz")) {
485 FileOutputFormat.setCompressOutput(job, true);
486 FileOutputFormat.setOutputCompressorClass(job, BZip2Codec.class);
487 } else if (location.endsWith(".gz")) {
488 FileOutputFormat.setCompressOutput(job, true);
489 FileOutputFormat.setOutputCompressorClass(job, GzipCodec.class);
490 } else {
491 FileOutputFormat.setCompressOutput( job, false);
492 }
493 }
494
495 @Override
496 public void checkSchema(ResourceSchema s) throws IOException {

Callers 1

setStoreLocationMethod · 0.95

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected