ex.clear().append(S_K_META_VERSION).fetch();
if(!ex.getValue().isDefined()) {
// Can only be empty if there is no data here
ex.clear();
if(ex.hasNext()) {
throw new AkibanInternalException("Unsupported data volume (no metadata version key)");
} else {
// No data in this volume at all.
return;
}
}
long metaVersion = ex.getValue().getLong();
if(CURRENT_META_VERSION != metaVersion) {
throw new AkibanInternalException(String.format("Unsupported data volume meta version %d, current %d",
metaVersion, CURRENT_META_VERSION));
}
ex.clear().append(S_K_DATA_VERSION).fetch();
assert ex.getValue().isDefined() : "No data version";
long dataVersion = ex.getValue().getLong();
if(CURRENT_DATA_VERSION != dataVersion) {
throw new AkibanInternalException(String.format("Unsupported data volume data version %d, current %d",
dataVersion, CURRENT_DATA_VERSION));
}
ex.clear().append(S_K_PROTOBUF);
loadProtobufChildren(ex, reader, skipSchemas);