/** * Gets the version of the Fiji instance format installed on the HBase cluster. * * <p>The instance format describes the layout of the global metadata state of * a Fiji instance.</p> * * @param fiji An open fiji instance. * @return A parsed version of the storage format protocol version string. * @throws IOException on I/O error. */ public static ProtocolVersion getClusterDataVersion(Fiji fiji) throws IOException { return getClusterDataVersion(fiji.getSystemTable()); }
/** * Validates that the client instance format version is compatible with the instance * format version installed on a Fiji instance. * Throws IncompatibleFijiVersionException if not. * * <p>For the definition of compatibility used in this method, see {@link * #isFijiVersionCompatible}</p> * * @param fiji An open fiji instance. * @throws IOException on I/O error reading the data version from the cluster, * or throws IncompatibleFijiVersionException if the installed instance format version * is incompatible with the version supported by the client. */ public static void validateVersion(Fiji fiji) throws IOException { validateVersion(fiji.getSystemTable()); }
/** * Restores all SystemTable entries from the backup. * * @param backup the deserialized backup of the metadata. * @param fiji the connected Fiji instance. * @throws IOException if there is an error communicating with HBase. */ public void restoreSystemVars(MetadataBackup backup, Fiji fiji) throws IOException { // Restore all System table entries from the file. final FijiSystemTable systemTable = fiji.getSystemTable(); LOG.info("Restoring system table entries..."); systemTable.fromBackup(backup.getSystemTable()); LOG.info(String.format("Restored %d entries.", backup.getSystemTable().getEntries().size())); } }
/** * Restores all SystemTable entries from the backup. * * @param backup the deserialized backup of the metadata. * @param fiji the connected Fiji instance. * @throws java.io.IOException if there is an error communicating with HBase. */ public void restoreSystemVars(MetadataBackup backup, Fiji fiji) throws IOException { // Restore all System table entries from the file. final FijiSystemTable systemTable = fiji.getSystemTable(); LOG.info("Restoring system table entries..."); systemTable.fromBackup(backup.getSystemTable()); LOG.info(String.format("Restored %d entries.", backup.getSystemTable().getEntries().size())); } }
final FijiSystemTable statusTable = fiji.getSystemTable(); final ProtocolVersion curDataVersion = statusTable.getDataVersion(); LOG.debug("Metadata backup data version: " + backup.getLayoutVersion());
mFiji = Fiji.Factory.open(mFijiURI, getConf()); try { mTable = mFiji.getSystemTable(); switch (mDoMode) { case GET: {
.setLayoutVersion(fiji.getSystemTable().getDataVersion().toString()) .setSystemTable(fiji.getSystemTable().toBackup()) .setSchemaTable(fiji.getSchemaTable().toBackup()) .setMetaTable(fiji.getMetaTable().toBackup())
.setLayoutVersion(fiji.getSystemTable().getDataVersion().toString()) .setSystemTable(fiji.getSystemTable().toBackup()) .setSchemaTable(fiji.getSchemaTable().toBackup()) .setMetaTable(fiji.getMetaTable().toBackup())
mInstanceUri = instanceUri; mFiji = Fiji.Factory.get().open(mInstanceUri); mSystemTable = mFiji.getSystemTable();