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


Java ContainerIdProto类代码示例

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


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

示例1: addLocalContainerIdsToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addLocalContainerIdsToProto() {
  maybeInitBuilder();
  builder.clearContainerId();
  if (this.containerIds == null)
    return;
  List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
  for (ContainerId id : containerIds) {
    protoList.add(convertToProtoFormat(id));
  }
  builder.addAllContainerId(protoList);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:GetContainerStatusesRequestPBImpl.java

示例2: addSucceededRequestsToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addSucceededRequestsToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededRequests == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededRequests.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:34,代码来源:StopContainersResponsePBImpl.java

示例3: initSucceededRequests

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initSucceededRequests() {
  if (this.succeededRequests != null)
    return;
  StopContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededRequests = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededRequests.add(convertFromProtoFormat(c));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:StopContainersResponsePBImpl.java

示例4: initReleases

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initReleases() {
  if (this.release != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getReleaseList();
  this.release = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.release.add(convertFromProtoFormat(c));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:AllocateRequestPBImpl.java

示例5: addReleasesToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addReleasesToProto() {
  maybeInitBuilder();
  builder.clearRelease();
  if (release == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = release.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllRelease(iterable);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:34,代码来源:AllocateRequestPBImpl.java

示例6: addSucceededContainersToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addSucceededContainersToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededContainers == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededContainers.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:34,代码来源:StartContainersResponsePBImpl.java

示例7: initSucceededContainers

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initSucceededContainers() {
  if (this.succeededContainers != null)
    return;
  StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededContainers = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededContainers.add(convertFromProtoFormat(c));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:StartContainersResponsePBImpl.java

示例8: initContainersToCleanup

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initContainersToCleanup() {
  if (this.containersToCleanup != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToCleanupList();
  this.containersToCleanup = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToCleanup.add(convertFromProtoFormat(c));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:NodeHeartbeatResponsePBImpl.java

示例9: initContainersToBeRemovedFromNM

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initContainersToBeRemovedFromNM() {
  if (this.containersToBeRemovedFromNM != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToBeRemovedFromNmList();
  this.containersToBeRemovedFromNM = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToBeRemovedFromNM.add(convertFromProtoFormat(c));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:NodeHeartbeatResponsePBImpl.java

示例10: addContainersToCleanupToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addContainersToCleanupToProto() {
  maybeInitBuilder();
  builder.clearContainersToCleanup();
  if (containersToCleanup == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToCleanup.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToCleanup(iterable);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:35,代码来源:NodeHeartbeatResponsePBImpl.java

示例11: addContainersToBeRemovedFromNMToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addContainersToBeRemovedFromNMToProto() {
  maybeInitBuilder();
  builder.clearContainersToBeRemovedFromNm();
  if (containersToBeRemovedFromNM == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToBeRemovedFromNM.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToBeRemovedFromNm(iterable);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:35,代码来源:NodeHeartbeatResponsePBImpl.java

示例12: addSucceededRequestsToProto

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addSucceededRequestsToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededRequests == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {
        Iterator<ContainerId> iter = succeededRequests.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:32,代码来源:IncreaseContainersResourceResponsePBImpl.java

示例13: convertFromProtoFormat

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private ContainerIdPBImpl convertFromProtoFormat(ContainerIdProto p) {
  return new ContainerIdPBImpl(p);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:GetContainerStatusesRequestPBImpl.java

示例14: convertToProtoFormat

import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private ContainerIdProto convertToProtoFormat(ContainerId t) {
  return ((ContainerIdPBImpl) t).getProto();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:GetContainerStatusesRequestPBImpl.java


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