/** * Lists all the tables in a fiji instance. * * @param fiji Fiji instance to list the tables of. * @return A program exit code (zero on success). * @throws IOException If there is an error. */ private int listTables(Fiji fiji) throws IOException { for (String name : fiji.getTableNames()) { getPrintStream().println(fiji.getURI() + name); } return SUCCESS; }
for (String tableName : fiji.getTableNames()) { LOG.info("Deleting Fiji table {}.", tableName); fiji.deleteTable(tableName);
try { getPrintStream().println("WARNING: This instance contains the table(s):"); for (String name : fiji.getTableNames()) { getPrintStream().println(name);
/** * Deletes an entire Fiji instance. * * @param instanceURI The Fiji instance to delete. * @return tool exit code. * @throws Exception on error. */ private int deleteInstance(FijiURI instanceURI) throws Exception { final Fiji fiji = Fiji.Factory.open(instanceURI); try { getPrintStream().println("WARNING: This instance contains the table(s):"); for (String name : fiji.getTableNames()) { getPrintStream().println(name); } if (isInteractive() && !inputConfirmation( String.format("Are you sure you want to delete Fiji instance '%s'?", instanceURI), instanceURI.getInstance())) { getPrintStream().println("Delete aborted."); return FAILURE; } } finally { fiji.release(); } FijiInstaller.get().uninstall(fiji.getURI(), getConf()); getPrintStream().println(String.format("Fiji instance '%s' deleted.", fiji.getURI())); return SUCCESS; }
/** * Install the job history table into a Fiji instance. This should be called only * via open, because we might want to update the layout of the job history table. * * @param fiji The Fiji instance to install this table in. * @throws IOException If there is an error. */ private static void install(Fiji fiji) throws IOException { if (!fiji.getTableNames().contains(TABLE_NAME)) { // Try to install the job history table if necessary. fiji.createTable( FijiTableLayout.createFromEffectiveJsonResource(TABLE_LAYOUT_RESOURCE).getDesc()); } // At this point, we either have an existing table or we just installed a new // one. Check if the table is using the old layout, and update it if it is. if (fiji.getMetaTable().getTableLayout(TABLE_NAME).getDesc().getLayoutId() .equals(PREV_TABLE_LAYOUT_VERSION)) { FijiTableLayout ktl = FijiTableLayout .createFromEffectiveJsonResource(TABLE_LAYOUT_V2); fiji.modifyTableLayout(ktl.getDesc()); } // If there are further updates to the job history layout, they should probably be added here. }
for (String tableName : fiji.getTableNames()) { LOG.debug("Deleting fiji table " + tableName + "..."); fiji.deleteTable(tableName);
for (String fijiTableName : mFiji.getTableNames()) { byte[] fijiHTableNameBytes = FijiManagedHBaseTableName.getFijiTableName(
for (String fijiTableName : fiji.getTableNames()) { byte[] fijiHTableNameBytes = FijiManagedHBaseTableName.getFijiTableName(