@Override protected Version loadVersion() throws Exception { Version version = null; try { byte[] data = db.get(bytes(VERSION_NODE)); if (data != null) { version = new VersionPBImpl(VersionProto.parseFrom(data)); } } catch (DBException e) { throw new IOException(e); } return version; }
@Override protected Version loadVersion() throws Exception { Version version = null; try { byte[] data = db.get(bytes(VERSION_NODE)); if (data != null) { version = new VersionPBImpl(VersionProto.parseFrom(data)); } } catch (DBException e) { throw new IOException(e); } return version; }
@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; }
@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; }
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; }
@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; }
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; }
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; }
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; }
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; }
@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; }
@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; }
@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; }
@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; }
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; }
@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; }
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; }
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; }
@Override public Version getConfStoreVersion() throws Exception { if (zkManager.exists(zkVersionPath)) { byte[] data = zkManager.getData(zkVersionPath); return new VersionPBImpl(YarnServerCommonProtos.VersionProto .parseFrom(data)); } return null; }
@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; }