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


Java LogValue.getCurrentUpLoadedFilesPath方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogValue.getCurrentUpLoadedFilesPath方法的典型用法代码示例。如果您正苦于以下问题:Java LogValue.getCurrentUpLoadedFilesPath方法的具体用法?Java LogValue.getCurrentUpLoadedFilesPath怎么用?Java LogValue.getCurrentUpLoadedFilesPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogValue的用法示例。


在下文中一共展示了LogValue.getCurrentUpLoadedFilesPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doContainerLogAggregation

import org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogValue; //导入方法依赖的package包/类
public Set<Path> doContainerLogAggregation(LogWriter writer,
    boolean appFinished) {
  LOG.info("Uploading logs for container " + containerId
      + ". Current good log dirs are "
      + StringUtils.join(",", dirsHandler.getLogDirsForRead()));
  final LogKey logKey = new LogKey(containerId);
  final LogValue logValue =
      new LogValue(dirsHandler.getLogDirsForRead(), containerId,
        userUgi.getShortUserName(), logAggregationContext,
        this.uploadedFileMeta, appFinished);
  try {
    writer.append(logKey, logValue);
  } catch (Exception e) {
    LOG.error("Couldn't upload logs for " + containerId
        + ". Skipping this container.", e);
    return new HashSet<Path>();
  }
  this.uploadedFileMeta.addAll(logValue
    .getCurrentUpLoadedFileMeta());
  // if any of the previous uploaded logs have been deleted,
  // we need to remove them from alreadyUploadedLogs
  Iterable<String> mask =
      Iterables.filter(uploadedFileMeta, new Predicate<String>() {
        @Override
        public boolean apply(String next) {
          return logValue.getAllExistingFilesMeta().contains(next);
        }
      });

  this.uploadedFileMeta = Sets.newHashSet(mask);
  return logValue.getCurrentUpLoadedFilesPath();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:33,代码来源:AppLogAggregatorImpl.java

示例2: doContainerLogAggregation

import org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogValue; //导入方法依赖的package包/类
public Set<Path> doContainerLogAggregation(LogWriter writer) {
  LOG.info("Uploading logs for container " + containerId
      + ". Current good log dirs are "
      + StringUtils.join(",", dirsHandler.getLogDirs()));
  final LogKey logKey = new LogKey(containerId);
  final LogValue logValue =
      new LogValue(dirsHandler.getLogDirs(), containerId,
        userUgi.getShortUserName(), logAggregationContext,
        this.uploadedFileMeta);
  try {
    writer.append(logKey, logValue);
  } catch (Exception e) {
    LOG.error("Couldn't upload logs for " + containerId
        + ". Skipping this container.");
    return new HashSet<Path>();
  }
  this.uploadedFileMeta.addAll(logValue
    .getCurrentUpLoadedFileMeta());
  // if any of the previous uploaded logs have been deleted,
  // we need to remove them from alreadyUploadedLogs
  Iterable<String> mask =
      Iterables.filter(uploadedFileMeta, new Predicate<String>() {
        @Override
        public boolean apply(String next) {
          return logValue.getAllExistingFilesMeta().contains(next);
        }
      });

  this.uploadedFileMeta = Sets.newHashSet(mask);
  return logValue.getCurrentUpLoadedFilesPath();
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:32,代码来源:AppLogAggregatorImpl.java

示例3: doContainerLogAggregation

import org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogValue; //导入方法依赖的package包/类
public Set<Path> doContainerLogAggregation(LogWriter writer,
    boolean appFinished, boolean containerFinished) {
  LOG.info("Uploading logs for container " + containerId
      + ". Current good log dirs are "
      + StringUtils.join(",", dirsHandler.getLogDirsForRead()));
  final LogKey logKey = new LogKey(containerId);
  final LogValue logValue =
      new LogValue(dirsHandler.getLogDirsForRead(), containerId,
          userUgi.getShortUserName(), logAggregationContext,
          this.uploadedFileMeta, appFinished, containerFinished, userFolder);
  try {
    writer.append(logKey, logValue);
  } catch (Exception e) {
    LOG.error("Couldn't upload logs for " + containerId
        + ". Skipping this container.", e);
    return new HashSet<Path>();
  }
  this.uploadedFileMeta.addAll(logValue
    .getCurrentUpLoadedFileMeta());
  // if any of the previous uploaded logs have been deleted,
  // we need to remove them from alreadyUploadedLogs
  Iterable<String> mask =
      Iterables.filter(uploadedFileMeta, new Predicate<String>() {
        @Override
        public boolean apply(String next) {
          return logValue.getAllExistingFilesMeta().contains(next);
        }
      });

  this.uploadedFileMeta = Sets.newHashSet(mask);
  return logValue.getCurrentUpLoadedFilesPath();
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:33,代码来源:AppLogAggregatorImpl.java


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