本文整理汇总了Java中org.apache.pig.impl.util.UDFContext.addJobConf方法的典型用法代码示例。如果您正苦于以下问题:Java UDFContext.addJobConf方法的具体用法?Java UDFContext.addJobConf怎么用?Java UDFContext.addJobConf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.pig.impl.util.UDFContext
的用法示例。
在下文中一共展示了UDFContext.addJobConf方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupUDFContext
import org.apache.pig.impl.util.UDFContext; //导入方法依赖的package包/类
public static void setupUDFContext(Configuration job) throws IOException {
UDFContext udfc = UDFContext.getUDFContext();
udfc.addJobConf(job);
// don't deserialize in front-end
if (udfc.isUDFConfEmpty()) {
udfc.deserialize();
}
}
示例2: init
import org.apache.pig.impl.util.UDFContext; //导入方法依赖的package包/类
private void init(PhysicalPlan pp, POStore poStore) throws IOException {
poStore.setStoreImpl(new FetchPOStoreImpl(pigContext));
poStore.setUp();
TaskAttemptID taskAttemptID = HadoopShims.getNewTaskAttemptID();
HadoopShims.setTaskAttemptId(conf, taskAttemptID);
if (!PlanHelper.getPhysicalOperators(pp, POStream.class).isEmpty()) {
MapRedUtil.setupStreamingDirsConfSingle(poStore, pigContext, conf);
}
String currentTime = Long.toString(System.currentTimeMillis());
conf.set("pig.script.submitted.timestamp", currentTime);
conf.set("pig.job.submitted.timestamp", currentTime);
PhysicalOperator.setReporter(new FetchProgressableReporter());
SchemaTupleBackend.initialize(conf, pigContext);
UDFContext udfContext = UDFContext.getUDFContext();
udfContext.addJobConf(conf);
udfContext.setClientSystemProps(pigContext.getProperties());
udfContext.serialize(conf);
PigMapReduce.sJobConfInternal.set(conf);
Utils.setDefaultTimeZone(conf);
boolean aggregateWarning = "true".equalsIgnoreCase(conf.get("aggregate.warning"));
PigStatusReporter pigStatusReporter = PigStatusReporter.getInstance();
pigStatusReporter.setContext(new FetchTaskContext(new FetchContext()));
PigHadoopLogger pigHadoopLogger = PigHadoopLogger.getInstance();
pigHadoopLogger.setReporter(pigStatusReporter);
pigHadoopLogger.setAggregate(aggregateWarning);
PhysicalOperator.setPigLogger(pigHadoopLogger);
}
示例3: setupUDFContext
import org.apache.pig.impl.util.UDFContext; //导入方法依赖的package包/类
public static void setupUDFContext(Configuration job) throws IOException {
UDFContext udfc = UDFContext.getUDFContext();
udfc.addJobConf(job);
// don't deserialize in front-end
if (udfc.isUDFConfEmpty()) {
udfc.deserialize();
}
}