当前位置: 首页>>代码示例>>Java>>正文


Java StoreFunc类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:34,代码来源:PigHadoopLogger.java

示例2: cleanupOnFailure

import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public void cleanupOnFailure(String location, Job job) throws IOException {
    StoreFunc.cleanupOnFailureImpl(location, job);
}
 
开发者ID:linkedin,项目名称:Cubert,代码行数:5,代码来源:AvroStorage.java

示例3: cleanupOnFailure

import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public void cleanupOnFailure(String location, Job job)
throws IOException {
    StoreFunc.cleanupOnFailureImpl(location, job);
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:6,代码来源:PigStorage.java

示例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);
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:6,代码来源:AvroStorage.java

示例5: cleanupOnFailure

import org.apache.pig.StoreFunc; //导入依赖的package包/类
@Override
public void cleanupOnFailure(String location, Job job) throws IOException {
    StoreFunc.cleanupOnFailureImpl(location, job);

}
 
开发者ID:sigmoidanalytics,项目名称:spork,代码行数:6,代码来源:SequenceFileInterStorage.java


注:本文中的org.apache.pig.StoreFunc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。