org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto Java Examples
The following examples show how to use
org.apache.hadoop.yarn.proto.YarnServerCommonProtos.VersionProto.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShuffleHandler.java From tez with Apache License 2.0 | 5 votes |
@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; }
Example #2
Source File: HistoryServerLeveldbStateStoreService.java From big-c with Apache License 2.0 | 5 votes |
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; }
Example #3
Source File: ShuffleHandler.java From big-c with Apache License 2.0 | 5 votes |
@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; }
Example #4
Source File: NMLeveldbStateStoreService.java From hadoop with Apache License 2.0 | 5 votes |
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; }
Example #5
Source File: ZKRMStateStore.java From hadoop with Apache License 2.0 | 5 votes |
@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; }
Example #6
Source File: FileSystemRMStateStore.java From hadoop with Apache License 2.0 | 5 votes |
@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; }
Example #7
Source File: LeveldbTimelineStore.java From hadoop with Apache License 2.0 | 5 votes |
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); } }
Example #8
Source File: ShuffleHandler.java From hadoop with Apache License 2.0 | 5 votes |
@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; }
Example #9
Source File: HistoryServerLeveldbStateStoreService.java From hadoop with Apache License 2.0 | 5 votes |
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; }
Example #10
Source File: LeveldbTimelineStore.java From big-c with Apache License 2.0 | 5 votes |
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); } }
Example #11
Source File: FileSystemRMStateStore.java From big-c with Apache License 2.0 | 5 votes |
@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; }
Example #12
Source File: ZKRMStateStore.java From big-c with Apache License 2.0 | 5 votes |
@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; }
Example #13
Source File: NMLeveldbStateStoreService.java From big-c with Apache License 2.0 | 5 votes |
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; }
Example #14
Source File: VersionPBImpl.java From big-c with Apache License 2.0 | 4 votes |
public VersionPBImpl() { builder = VersionProto.newBuilder(); }
Example #15
Source File: VersionPBImpl.java From big-c with Apache License 2.0 | 4 votes |
private void maybeInitBuilder() { if (viaProto || builder == null) { builder = VersionProto.newBuilder(proto); } viaProto = false; }
Example #16
Source File: VersionPBImpl.java From big-c with Apache License 2.0 | 4 votes |
public VersionProto getProto() { proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
Example #17
Source File: VersionPBImpl.java From big-c with Apache License 2.0 | 4 votes |
public VersionPBImpl(VersionProto proto) { this.proto = proto; viaProto = true; }
Example #18
Source File: VersionPBImpl.java From hadoop with Apache License 2.0 | 4 votes |
public VersionPBImpl() { builder = VersionProto.newBuilder(); }
Example #19
Source File: VersionPBImpl.java From hadoop with Apache License 2.0 | 4 votes |
private void maybeInitBuilder() { if (viaProto || builder == null) { builder = VersionProto.newBuilder(proto); } viaProto = false; }
Example #20
Source File: VersionPBImpl.java From hadoop with Apache License 2.0 | 4 votes |
public VersionProto getProto() { proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
Example #21
Source File: VersionPBImpl.java From hadoop with Apache License 2.0 | 4 votes |
public VersionPBImpl(VersionProto proto) { this.proto = proto; viaProto = true; }