use of org.apache.hadoop.yarn.server.records.impl.pb.VersionPBImpl in project hadoop by apache.
the class HistoryServerLeveldbStateStoreService method loadVersion.
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;
}
use of org.apache.hadoop.yarn.server.records.impl.pb.VersionPBImpl in project hadoop by apache.
the class ShuffleHandler method loadVersion.
@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;
}
use of org.apache.hadoop.yarn.server.records.impl.pb.VersionPBImpl in project tez by apache.
the class ShuffleHandler method loadVersion.
@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;
}
Aggregations