if (mNumRegions >= 1) { mFiji.createTable(tableLayout, mNumRegions); mFiji.createTable(tableLayout, splitKeys.toArray(new byte[splitKeys.size()][])); mFiji.createTable(tableLayout);
fiji.createTable(initialEntry.getLayout()); } catch (FijiAlreadyExistsException kaee) { LOG.info("Table already exists in HBase. Continuing with restore operation.");
fiji.createTable(initialEntry.getLayout()); } catch (FijiAlreadyExistsException kaee) { LOG.info("Table already exists in HBase. Continuing with restore operation.");
/** * 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. }