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

Method addHadoopProperties

src/org/apache/pig/PigServer.java:298–315  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

296 }
297
298 private void addHadoopProperties() throws ExecException {
299 // For BZip input on hadoop 0.23/2.X
300 // with PIG_BZIP_USE_HADOOP_INPUTFORMAT turned on,
301 // PigTextInputFormat depends on hadoop's TextInputFormat
302 // for handling bzip2 input. One problem is it only recognize 'bz2'
303 // as extension and not 'bz'.
304 // Adding custom BZip2 codec that returns 'bz' as extension
305 // for backward compatibility.
306 String codecs =
307 pigContext.getProperties().getProperty("io.compression.codecs");
308
309 if( codecs != null
310 && codecs.contains(BZip2Codec.class.getCanonicalName() ) ) {
311 pigContext.getProperties().setProperty("io.compression.codecs",
312 codecs + ","
313 + BZip2CodecWithExtensionBZ.class.getCanonicalName() );
314 }
315 }
316
317 private void addJarsFromProperties() throws ExecException {
318 //add jars from properties to extraJars

Callers 1

PigServerMethod · 0.95

Calls 4

getPropertyMethod · 0.80
setPropertyMethod · 0.65
getPropertiesMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected