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


Java ProcessSmapMemoryInfo类代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessSmapMemoryInfo的典型用法代码示例。如果您正苦于以下问题:Java ProcessSmapMemoryInfo类的具体用法?Java ProcessSmapMemoryInfo怎么用?Java ProcessSmapMemoryInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ProcessSmapMemoryInfo类属于org.apache.hadoop.yarn.util.ProcfsBasedProcessTree包,在下文中一共展示了ProcessSmapMemoryInfo类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: constructMemoryMappingInfo

import org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessSmapMemoryInfo; //导入依赖的package包/类
public ProcessSmapMemoryInfo constructMemoryMappingInfo(String address,
    String[] entries) {
  ProcessSmapMemoryInfo info = new ProcessSmapMemoryInfo(address);
  info.setMemInfo(MemInfo.SIZE.name(), entries[0]);
  info.setMemInfo(MemInfo.RSS.name(), entries[1]);
  info.setMemInfo(MemInfo.PSS.name(), entries[2]);
  info.setMemInfo(MemInfo.SHARED_CLEAN.name(), entries[3]);
  info.setMemInfo(MemInfo.SHARED_DIRTY.name(), entries[4]);
  info.setMemInfo(MemInfo.PRIVATE_CLEAN.name(), entries[5]);
  info.setMemInfo(MemInfo.PRIVATE_DIRTY.name(), entries[6]);
  info.setMemInfo(MemInfo.REFERENCED.name(), entries[7]);
  info.setMemInfo(MemInfo.ANONYMOUS.name(), entries[8]);
  info.setMemInfo(MemInfo.ANON_HUGE_PAGES.name(), entries[9]);
  info.setMemInfo(MemInfo.SWAP.name(), entries[10]);
  info.setMemInfo(MemInfo.KERNEL_PAGE_SIZE.name(), entries[11]);
  info.setMemInfo(MemInfo.MMU_PAGE_SIZE.name(), entries[12]);
  return info;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:19,代码来源:TestProcfsBasedProcessTree.java

示例2: createMemoryMappingInfo

import org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessSmapMemoryInfo; //导入依赖的package包/类
public void createMemoryMappingInfo(ProcessTreeSmapMemInfo[] procMemInfo) {
  for (int i = 0; i < procMemInfo.length; i++) {
    // Construct 4 memory mappings per process.
    // As per min(Shared_Dirty, Pss) + Private_Clean + Private_Dirty
    // and not including r--s, r-xs, we should get 100 KB per process
    List<ProcessSmapMemoryInfo> memoryMappingList =
        procMemInfo[i].getMemoryInfoList();
    memoryMappingList.add(constructMemoryMappingInfo(
      "7f56c177c000-7f56c177d000 "
          + "rw-p 00010000 08:02 40371558                   "
          + "/grid/0/jdk1.7.0_25/jre/lib/amd64/libnio.so",
      new String[] { "4", "4", "25", "4", "25", "15", "10", "4", "0", "0",
          "0", "4", "4" }));
    memoryMappingList.add(constructMemoryMappingInfo(
      "7fb09382e000-7fb09382f000 r--s 00003000 " + "08:02 25953545",
      new String[] { "4", "4", "25", "4", "0", "15", "10", "4", "0", "0",
          "0", "4", "4" }));
    memoryMappingList.add(constructMemoryMappingInfo(
      "7e8790000-7e8b80000 r-xs 00000000 00:00 0", new String[] { "4", "4",
          "25", "4", "0", "15", "10", "4", "0", "0", "0", "4", "4" }));
    memoryMappingList.add(constructMemoryMappingInfo(
      "7da677000-7e0dcf000 rw-p 00000000 00:00 0", new String[] { "4", "4",
          "25", "4", "50", "15", "10", "4", "0", "0", "0", "4", "4" }));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:TestProcfsBasedProcessTree.java


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