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


Java VersionProto类代码示例

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


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

示例1: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
Version loadVersion() throws IOException {
  byte[] data = db.get(bytes(DB_SCHEMA_VERSION_KEY));
  // if version is not stored previously, treat it as CURRENT_VERSION_INFO.
  if (data == null || data.length == 0) {
    return getCurrentVersion();
  }
  Version version =
      new VersionPBImpl(VersionProto.parseFrom(data));
  return version;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:NMLeveldbStateStoreService.java

示例2: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@Override
protected synchronized Version loadVersion() throws Exception {
  String versionNodePath = getNodePath(zkRootNodePath, VERSION_NODE);

  if (existsWithRetries(versionNodePath, false) != null) {
    byte[] data = getDataWithRetries(versionNodePath, false);
    Version version =
        new VersionPBImpl(VersionProto.parseFrom(data));
    return version;
  }
  return null;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:ZKRMStateStore.java

示例3: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@Override
protected synchronized Version loadVersion() throws Exception {
  Path versionNodePath = getNodePath(rootDirPath, VERSION_NODE);
  FileStatus status = getFileStatusWithRetries(versionNodePath);
  if (status != null) {
    byte[] data = readFileWithRetries(versionNodePath, status.getLen());
    Version version =
        new VersionPBImpl(VersionProto.parseFrom(data));
    return version;
  }
  return null;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:FileSystemRMStateStore.java

示例4: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
Version loadVersion() throws IOException {
  try {
    byte[] data = db.get(bytes(TIMELINE_STORE_VERSION_KEY));
    // if version is not stored previously, treat it as CURRENT_VERSION_INFO.
    if (data == null || data.length == 0) {
      return getCurrentVersion();
    }
    Version version =
        new VersionPBImpl(VersionProto.parseFrom(data));
    return version;
  } catch(DBException e) {
    throw new IOException(e);    	
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:LeveldbTimelineStore.java

示例5: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@VisibleForTesting
Version loadVersion() throws IOException {
  byte[] data = stateDb.get(bytes(STATE_DB_SCHEMA_VERSION_KEY));
  // if version is not stored previously, treat it as CURRENT_VERSION_INFO.
  if (data == null || data.length == 0) {
    return getCurrentVersion();
  }
  Version version =
      new VersionPBImpl(VersionProto.parseFrom(data));
  return version;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:ShuffleHandler.java

示例6: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
Version loadVersion() throws IOException {
  byte[] data = db.get(bytes(DB_SCHEMA_VERSION_KEY));
  // if version is not stored previously, treat it as 1.0.
  if (data == null || data.length == 0) {
    return Version.newInstance(1, 0);
  }
  Version version =
      new VersionPBImpl(VersionProto.parseFrom(data));
  return version;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:HistoryServerLeveldbStateStoreService.java

示例7: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@Override
protected synchronized Version loadVersion() throws Exception {
  String versionNodePath = getNodePath(zkRootNodePath, VERSION_NODE);

  if (exists(versionNodePath)) {
    byte[] data = getData(versionNodePath);
    return new VersionPBImpl(VersionProto.parseFrom(data));
  }
  return null;
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:11,代码来源:ZKRMStateStore.java

示例8: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
Version loadVersion() throws IOException {
  byte[] data = starttimedb.get(bytes(TIMELINE_STORE_VERSION_KEY));
  // if version is not stored previously, treat it as 1.0.
  if (data == null || data.length == 0) {
    return Version.newInstance(1, 0);
  }
  Version version = new VersionPBImpl(VersionProto.parseFrom(data));
  return version;
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:10,代码来源:RollingLevelDBTimelineStore.java

示例9: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@Override
protected synchronized Version loadVersion() throws Exception {
  String versionNodePath = getNodePath(zkRootNodePath, VERSION_NODE);

  if (existsWithRetries(versionNodePath, true) != null) {
    byte[] data = getDataWithRetries(versionNodePath, true);
    Version version =
        new VersionPBImpl(VersionProto.parseFrom(data));
    return version;
  }
  return null;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:13,代码来源:ZKRMStateStore.java

示例10: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@Override
protected synchronized Version loadVersion() throws Exception {
  Path versionNodePath = getNodePath(rootDirPath, VERSION_NODE);
  if (fs.exists(versionNodePath)) {
    FileStatus status = fs.getFileStatus(versionNodePath);
    byte[] data = readFile(versionNodePath, status.getLen());
    Version version =
        new VersionPBImpl(VersionProto.parseFrom(data));
    return version;
  }
  return null;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:13,代码来源:FileSystemRMStateStore.java

示例11: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
Version loadVersion() throws IOException {
  byte[] data = db.get(bytes(TIMELINE_STORE_VERSION_KEY));
  // if version is not stored previously, treat it as 1.0.
  if (data == null || data.length == 0) {
    return Version.newInstance(1, 0);
  }
  Version version =
      new VersionPBImpl(VersionProto.parseFrom(data));
  return version;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:11,代码来源:LeveldbTimelineStore.java

示例12: loadVersion

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
@VisibleForTesting
Version loadVersion() throws IOException {
  byte[] data = stateDb.get(bytes(STATE_DB_SCHEMA_VERSION_KEY));
  // if version is not stored previously, treat it as 1.0.
  if (data == null || data.length == 0) {
    return Version.newInstance(1, 0);
  }
  Version version =
      new VersionPBImpl(VersionProto.parseFrom(data));
  return version;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:12,代码来源:ShuffleHandler.java

示例13: VersionPBImpl

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
public VersionPBImpl() {
  builder = VersionProto.newBuilder();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:VersionPBImpl.java

示例14: getProto

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
public VersionProto getProto() {
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:VersionPBImpl.java

示例15: maybeInitBuilder

import org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto; //导入依赖的package包/类
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = VersionProto.newBuilder(proto);
  }
  viaProto = false;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:VersionPBImpl.java


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