本文整理汇总了Java中org.apache.pig.StoreFunc类的典型用法代码示例。如果您正苦于以下问题:Java StoreFunc类的具体用法?Java StoreFunc怎么用?Java StoreFunc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StoreFunc类属于org.apache.pig包,在下文中一共展示了StoreFunc类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: warn
import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes")
public void warn(Object o, String msg, Enum warningEnum) {
String className = o.getClass().getName();
String displayMessage = className + "(" + warningEnum + "): " + msg;
if (getAggregate()) {
if (reporter != null) {
// log at least once
if (msgMap.get(o) == null || !msgMap.get(o).equals(displayMessage)) {
log.warn(displayMessage);
msgMap.put(o, displayMessage);
}
if (o instanceof EvalFunc || o instanceof LoadFunc || o instanceof StoreFunc) {
reporter.incrCounter(className, warningEnum.name(), 1);
}
// For backwards compatibility, always report with warningEnum, see PIG-3739
reporter.incrCounter(warningEnum, 1);
} else {
//TODO:
//in local mode of execution if the PigHadoopLogger is used initially,
//then aggregation cannot be performed as the reporter will be null.
//The reference to a reporter is given by Hadoop at run time.
//In local mode, due to the absence of Hadoop there will be no reporter
//Just print the warning message as is.
//If a warning message is printed in map reduce mode when aggregation
//is turned on then we have a problem, its a bug.
log.warn(displayMessage);
}
} else {
log.warn(displayMessage);
}
}
示例2: cleanupOnFailure
import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public void cleanupOnFailure(String location, Job job) throws IOException {
StoreFunc.cleanupOnFailureImpl(location, job);
}
示例3: cleanupOnFailure
import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public void cleanupOnFailure(String location, Job job)
throws IOException {
StoreFunc.cleanupOnFailureImpl(location, job);
}
示例4: cleanupOnFailure
import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public final void cleanupOnFailure(final String location,
final Job job) throws IOException {
StoreFunc.cleanupOnFailureImpl(location, job);
}
示例5: cleanupOnFailure
import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public void cleanupOnFailure(String location, Job job) throws IOException {
StoreFunc.cleanupOnFailureImpl(location, job);
}