// generation
int generation = Integer.parseInt(nexttok);
// version
nexttok = tokenStack.pop();
Version version = fmt.info.getVersion(nexttok);
if (!version.validate(nexttok))
throw new UnsupportedOperationException("SSTable " + name + " is too old to open. Upgrade to 2.0 first, and run upgradesstables");
// optional temporary marker
Type type = Descriptor.Type.FINAL;
nexttok = tokenStack.peek();
if (Descriptor.Type.TEMP.marker.equals(nexttok))
{
type = Descriptor.Type.TEMP;
tokenStack.pop();
}
else if (Descriptor.Type.TEMPLINK.marker.equals(nexttok))
{
type = Descriptor.Type.TEMPLINK;
tokenStack.pop();
}
// ks/cf names
String ksname, cfname;
if (version.hasNewFileName())
{
// for 2.1+ read ks and cf names from directory
File cfDirectory = parentDirectory;
// check if this is secondary index
String indexName = "";