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


Java ProtoUtils.convertToProtoFormat方法代码示例

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


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

示例1: mergeLocalToBuilder

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private void mergeLocalToBuilder() {
  if (this.states != null) {
    maybeInitBuilder();
    builder.clearNodeStates();
    Iterable<NodeStateProto> iterable = new Iterable<NodeStateProto>() {
      @Override
      public Iterator<NodeStateProto> iterator() {
        return new Iterator<NodeStateProto>() {

          Iterator<NodeState> iter = states.iterator();

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

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

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

          }
        };

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

示例2: getUpdateErrorsIterable

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private synchronized Iterable<YarnServiceProtos.UpdateContainerErrorProto>
    getUpdateErrorsIterable(
    final List<UpdateContainerError> updateErrorsList) {
  maybeInitBuilder();
  return new Iterable<YarnServiceProtos.UpdateContainerErrorProto>() {
    @Override
    public synchronized Iterator<YarnServiceProtos
        .UpdateContainerErrorProto> iterator() {
      return new Iterator<YarnServiceProtos.UpdateContainerErrorProto>() {

        private Iterator<UpdateContainerError> iter =
            updateErrorsList.iterator();

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

        @Override
        public synchronized YarnServiceProtos.UpdateContainerErrorProto
            next() {
          return ProtoUtils.convertToProtoFormat(iter.next());
        }

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

    }
  };
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:34,代码来源:AllocateResponsePBImpl.java

示例3: mergeLocalToBuilder

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private void mergeLocalToBuilder() {
  if (this.applicationTypes != null) {
    addLocalApplicationTypesToProto();
  }
  if (this.applicationStates != null) {
    maybeInitBuilder();
    builder.clearApplicationStates();
    Iterable<YarnApplicationStateProto> iterable =
        new Iterable<YarnApplicationStateProto>() {

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

              Iterator<YarnApplicationState> iter = applicationStates
                  .iterator();

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

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

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

              }
            };

          }
        };
    builder.addAllApplicationStates(iterable);
  }
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:40,代码来源:GetApplicationsRequestPBImpl.java

示例4: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private FinalApplicationStatusProto convertToProtoFormat(FinalApplicationStatus s) {
  return ProtoUtils.convertToProtoFormat(s);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:FinishApplicationMasterRequestPBImpl.java

示例5: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
protected final ByteString convertToProtoFormat(ByteBuffer byteBuffer) {
  return ProtoUtils.convertToProtoFormat(byteBuffer);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:StartContainersResponsePBImpl.java

示例6: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ContainerStateProto
    convertToProtoFormat(ContainerState containerState) {
  return ProtoUtils.convertToProtoFormat(containerState);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:NMContainerStatusPBImpl.java

示例7: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ContainerStateProto convertToProtoFormat(ContainerState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:ContainerFinishDataPBImpl.java

示例8: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private FinalApplicationStatusProto convertToProtoFormat(
    FinalApplicationStatus finalApplicationStatus) {
  return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:ApplicationFinishDataPBImpl.java

示例9: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ContainerTypeProto convertToProtoFormat(ContainerType containerType) {
  return ProtoUtils.convertToProtoFormat(containerType);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:4,代码来源:ContainerTokenIdentifier.java

示例10: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private LogAggregationStatusProto
    convertToProtoFormat(LogAggregationStatus s) {
  return ProtoUtils.convertToProtoFormat(s);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:5,代码来源:LogAggregationReportPBImpl.java

示例11: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private YarnApplicationStateProto convertToProtoFormat(
    YarnApplicationState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:5,代码来源:ApplicationFinishDataPBImpl.java

示例12: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private YarnApplicationAttemptStateProto convertToProtoFormat(
    YarnApplicationAttemptState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:5,代码来源:ApplicationAttemptFinishDataPBImpl.java

示例13: convertToProtoFormat

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ByteString convertToProtoFormat(ByteBuffer byteBuffer) {
  return ProtoUtils.convertToProtoFormat(byteBuffer);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:4,代码来源:StartContainersRequestPBImpl.java

示例14: mergeLocalToBuilder

import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private void mergeLocalToBuilder() {
  if (this.applicationTypes != null) {
    addLocalApplicationTypesToProto();
  }
  if (this.applicationStates != null) {
    maybeInitBuilder();
    builder.clearApplicationStates();
    Iterable<YarnApplicationStateProto> iterable =
        new Iterable<YarnApplicationStateProto>() {

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

              Iterator<YarnApplicationState> iter = applicationStates
                  .iterator();

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

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

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

              }
            };

          }
        };
    builder.addAllApplicationStates(iterable);
  }
  if (this.applicationTags != null && !this.applicationTags.isEmpty()) {
    builder.addAllApplicationTags(this.applicationTags);
  }
  if (this.scope != null) {
    builder.setScope(ProtoUtils.convertToProtoFormat(scope));
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:46,代码来源:GetApplicationsRequestPBImpl.java


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