List of usage examples for org.apache.hadoop.yarn.server.records.impl.pb VersionPBImpl VersionPBImpl
public VersionPBImpl(VersionProto proto)
From source file:org.apache.tez.auxservices.ShuffleHandler.java
License:Apache License
@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(); }/*from ww w. j av a2s . co m*/ Version version = new VersionPBImpl(VersionProto.parseFrom(data)); return version; }