Deprecated API in Pig 0.16.0

The following interfaces, classes, fields, and methods have been deprecated in Pig 0.16.0.

Deprecated Interfaces

Deprecated Classes

Instead of this deprecated class... Use...
org.apache.pig.piggybank.evaluation.math.ABS ABS
org.apache.pig.piggybank.evaluation.math.ACOS ACOS
org.apache.pig.builtin.ARITY SIZE
org.apache.pig.piggybank.evaluation.math.ASIN ASIN
org.apache.pig.piggybank.evaluation.math.ATAN ATAN
org.apache.pig.piggybank.evaluation.math.Base Base
org.apache.pig.piggybank.evaluation.math.CBRT CBRT
org.apache.pig.piggybank.evaluation.math.CEIL CEIL
org.apache.pig.ComparisonFunc N/A
org.apache.pig.piggybank.evaluation.stats.COR COR
org.apache.pig.piggybank.evaluation.math.COS COS
org.apache.pig.piggybank.evaluation.math.COSH COSH
org.apache.pig.piggybank.evaluation.stats.COV COV
org.apache.pig.data.DefaultTupleFactory TupleFactory
org.apache.pig.piggybank.evaluation.math.DoubleAbs DoubleAbs
org.apache.pig.piggybank.evaluation.math.DoubleBase DoubleBase
org.apache.pig.piggybank.evaluation.math.DoubleRound DoubleRound
org.apache.pig.piggybank.evaluation.math.EXP EXP
org.apache.pig.piggybank.evaluation.math.FloatAbs FloatAbs
org.apache.pig.piggybank.evaluation.math.FloatRound FloatRound
org.apache.pig.piggybank.evaluation.math.FLOOR FLOOR
org.apache.pig.piggybank.evaluation.string.INDEXOF INDEXOF
org.apache.pig.piggybank.evaluation.math.IntAbs IntAbs
org.apache.pig.piggybank.storage.JsonMetadata N/A
org.apache.pig.piggybank.evaluation.string.LASTINDEXOF LAST_INDEX_OF
org.apache.pig.piggybank.evaluation.string.LcFirst LCFIRST
org.apache.pig.piggybank.evaluation.math.LOG LOG
org.apache.pig.piggybank.evaluation.math.LOG10 LOG10
org.apache.pig.piggybank.evaluation.math.LongAbs LongAbs
org.apache.pig.piggybank.evaluation.string.LOWER LOWER
org.apache.pig.piggybank.storage.PigStorageSchema PigStorage with -schema option
org.apache.pig.piggybank.evaluation.string.RegexExtract REGEX_EXTRACT
org.apache.pig.piggybank.evaluation.string.RegexExtractAll REGEX_EXTRACT_ALL
org.apache.pig.piggybank.evaluation.string.REPLACE REPLACE
org.apache.pig.piggybank.evaluation.math.ROUND ROUND
org.apache.pig.piggybank.evaluation.math.SIN SIN
org.apache.pig.piggybank.evaluation.math.SINH SINH
org.apache.pig.piggybank.evaluation.string.Split STRSPLIT
org.apache.pig.piggybank.evaluation.math.SQRT SQRT
org.apache.pig.piggybank.evaluation.string.SUBSTRING SUBSTRING
org.apache.pig.piggybank.evaluation.math.TAN TAN
org.apache.pig.piggybank.evaluation.math.TANH TANH
org.apache.pig.piggybank.evaluation.util.ToBag TOBAG
org.apache.pig.piggybank.evaluation.util.Top TOP
org.apache.pig.piggybank.evaluation.util.ToTuple TOTUPLE
org.apache.pig.piggybank.evaluation.string.Trim TRIM
org.apache.pig.piggybank.evaluation.string.UcFirst UCFIRST
org.apache.pig.piggybank.evaluation.string.UPPER UPPER
org.apache.pig.impl.util.WrappedIOException
Note: This class was introduced to overcome the limitation that before Java 1.6, IOException did not have a constructor which took a Throwable argument. Since Pig code is now compiled with Java 1.6 and EvalFunc and LoadFunc user implementations should also use Java 1.6, they can use IOException instead. From Java 1.6, IOException has constructors which take a Throwable argument.

Deprecated Fields

Instead of this deprecated field... Use...
org.apache.pig.tools.pigstats.PigStatsUtil.FS_COUNTER_GROUP MRPigStatsUtil.FS_COUNTER_GROUP
org.apache.pig.PigConfiguration.INSERT_ENABLED
Note: Will be removed in Pig 0.16
PigConfiguration.PIG_SCRIPT_INFO_ENABLED.
org.apache.pig.PigConfiguration.MAX_SCRIPT_SIZE
Note: Will be removed in Pig 0.16.
PigConfiguration.PIG_SCRIPT_MAX_SIZE
org.apache.pig.PigConfiguration.OPT_FETCH
Note: Will be removed in Pig 0.16.
PigConfiguration.PIG_OPT_FETCH
org.apache.pig.PigConfiguration.PARTAGG_MINREDUCTION
Note: Will be removed in Pig 0.16.
PigConfiguration.PIG_EXEC_MAP_PARTAGG_MINREDUCTION
org.apache.pig.PigConfiguration.PROP_CACHEDBAG_MEMUSAGE
Note: Will be removed in Pig 0.16.
PigConfiguration.PIG_CACHEDBAG_MEMUSAGE
org.apache.pig.PigConfiguration.PROP_EXEC_MAP_PARTAGG
Note: Will be removed in Pig 0.16.
PigConfiguration.PIG_EXEC_MAP_PARTAGG
org.apache.pig.PigConfiguration.PROP_NO_COMBINER
Note: Will be removed in Pig 0.16.
#PROP_NO_COMBINER1
org.apache.pig.PigConfiguration.SCHEMA_TUPLE_SHOULD_ALLOW_FORCE N/A
org.apache.pig.PigConfiguration.SCHEMA_TUPLE_SHOULD_USE_IN_FOREACH N/A
org.apache.pig.PigConfiguration.SCHEMA_TUPLE_SHOULD_USE_IN_FRJOIN N/A
org.apache.pig.PigConfiguration.SCHEMA_TUPLE_SHOULD_USE_IN_MERGEJOIN N/A
org.apache.pig.PigConfiguration.SCHEMA_TUPLE_SHOULD_USE_IN_UDF N/A
org.apache.pig.impl.PigContext.scriptFiles N/A
org.apache.pig.PigConfiguration.SHOULD_USE_SCHEMA_TUPLE N/A
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.sJob UDFContext in the following way to get the job's Configuration: UdfContext.getUdfContext().getJobConf()
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce.sJobConf UDFContext in the following way to get the job's Configuration: UdfContext.getUdfContext().getJobConf()
org.apache.pig.tools.pigstats.PigStatsUtil.TASK_COUNTER_GROUP MRPigStatsUtil.TASK_COUNTER_GROUP

Deprecated Methods

Instead of this deprecated method... Use...
org.apache.pig.PigStreamingBase.deserialize(byte[]) N/A
org.apache.pig.impl.io.FileLocalizer.fileExists(String, DataStorage) FileLocalizer.fileExists(String, PigContext)
org.apache.pig.impl.io.FileLocalizer.fullPath(String, DataStorage) FileLocalizer.fullPath(String, PigContext)
org.apache.pig.tools.pigstats.JobStats.getAvgMapTime() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getAvgMapTime()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getAvgMapTime() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getAvgMapTime() N/A
org.apache.pig.tools.pigstats.JobStats.getAvgREduceTime() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getAvgREduceTime()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getAvgREduceTime() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getAvgREduceTime() N/A
org.apache.pig.impl.PigContext.getConf() PigContext.getProperties()
org.apache.pig.tools.pigstats.PigStatusReporter.getCounter(Enum) PigStatusReporter.incrCounter(java.lang.Enum<?>, long)

This method returns MR counter which is not compatible with Tez mode. Use incrCounter() that is compatible with both MR and Tez mode.

org.apache.pig.tools.pigstats.PigStatusReporter.getCounter(String, String) PigStatusReporter.incrCounter(java.lang.Enum<?>, long)

This method returns MR counter which is not compatible with Tez mode. Use incrCounter() that is compatible with both MR and Tez mode.

org.apache.pig.tools.pigstats.PigStatsUtil.getEmptyPigStats() N/A
org.apache.pig.tools.pigstats.JobStats.getHadoopCounters() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getHadoopCounters()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getHadoopCounters() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getHadoopCounters() N/A
org.apache.pig.tools.pigstats.PigStats.getJobClient() N/A
org.apache.pig.tools.pigstats.mapreduce.SimplePigStats.getJobClient() N/A
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.getJobConf() N/A
org.apache.pig.tools.pigstats.JobStats.getMapInputRecords() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMapInputRecords()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMapInputRecords() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMapInputRecords() N/A
org.apache.pig.tools.pigstats.JobStats.getMapOutputRecords() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMapOutputRecords()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMapOutputRecords() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMapOutputRecords() N/A
org.apache.pig.tools.pigstats.JobStats.getMaxMapTime() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMaxMapTime()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMaxMapTime() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMaxMapTime() N/A
org.apache.pig.tools.pigstats.JobStats.getMaxReduceTime() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMaxReduceTime()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMaxReduceTime() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMaxReduceTime() N/A
org.apache.pig.tools.pigstats.JobStats.getMinMapTime() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMinMapTime()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMinMapTime() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMinMapTime() N/A
org.apache.pig.tools.pigstats.JobStats.getMinReduceTime() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMinReduceTime()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMinReduceTime() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMinReduceTime() N/A
org.apache.pig.tools.pigstats.JobStats.getMultiInputCounters() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMultiInputCounters()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMultiInputCounters() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMultiInputCounters() N/A
org.apache.pig.tools.pigstats.JobStats.getMultiStoreCounters() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getMultiStoreCounters()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getMultiStoreCounters() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getMultiStoreCounters() N/A
org.apache.pig.tools.pigstats.JobStats.getNumberMaps() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getNumberMaps()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getNumberMaps() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getNumberMaps() N/A
org.apache.pig.tools.pigstats.JobStats.getNumberReduces() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getNumberReduces()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getNumberReduces() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getNumberReduces() N/A
org.apache.pig.tools.pigstats.JobStats.getProactiveSpillCountObjects() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getProactiveSpillCountObjects()
org.apache.pig.tools.pigstats.JobStats.getProactiveSpillCountRecs() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getProactiveSpillCountRecs()
org.apache.pig.tools.pigstats.JobStats.getReduceInputRecords() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getReduceInputRecords()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getReduceInputRecords() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getReduceInputRecords() N/A
org.apache.pig.tools.pigstats.JobStats.getReduceOutputRecords() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getReduceOutputRecords()
org.apache.pig.tools.pigstats.tez.TezVertexStats.getReduceOutputRecords() N/A
org.apache.pig.tools.pigstats.tez.TezDAGStats.getReduceOutputRecords() N/A
org.apache.pig.tools.pigstats.JobStats.getSMMSpillCount() If you are using mapreduce, please cast JobStats to org.apache.pig.tools.pigstats.mapreduce.MRJobStats, then use MRJobStats.getSMMSpillCount()
org.apache.pig.EvalFunc.isAsynchronous() N/A
org.apache.pig.impl.io.FileLocalizer.isDirectory(String, DataStorage) FileLocalizer.isDirectory(String, PigContext)
org.apache.pig.impl.io.FileLocalizer.isFile(String, DataStorage) FileLocalizer.isFile(String, PigContext)

org.apache.pig.impl.logicalLayer.schema.Schema.isTwoLevelAccessRequired()

Note: twoLevelAccess is no longer needed.
N/A
org.apache.pig.impl.io.FileLocalizer.open(String, ExecType, DataStorage) FileLocalizer.open(String, PigContext)
org.apache.pig.data.Tuple.reference(Tuple) N/A
org.apache.pig.data.BagFactory.registerBag(DataBag) As of Pig 0.11, bags register with the SpillableMemoryManager themselves. Register a bag with the SpillableMemoryManager. If the bags created by an implementation of BagFactory are managed by the SpillableMemoryManager then this method should be called each time a new bag is created.
org.apache.pig.PigStreamingBase.serialize(Tuple) N/A
org.apache.pig.ResourceStatistics.setmBytes(Long) ResourceStatistics.setSizeInBytes(Long)

org.apache.pig.impl.logicalLayer.schema.Schema.setTwoLevelAccessRequired(boolean)

twoLevelAccess is no longer needed.

N/A
org.apache.pig.tools.pigstats.ScriptState.start(String, PigContext) ScriptState.start(ScriptState)