Example usage for org.apache.hadoop.yarn.server.records.impl.pb VersionPBImpl VersionPBImpl

List of usage examples for org.apache.hadoop.yarn.server.records.impl.pb VersionPBImpl VersionPBImpl

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.server.records.impl.pb VersionPBImpl VersionPBImpl.

Prototype

public VersionPBImpl(VersionProto proto) 

Source Link

Usage

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;
}