/** {@inheritDoc} */ @Override public void createTable(TableLayoutDesc tableLayout) throws IOException { createTable(tableLayout, 1); }
/** {@inheritDoc} */ @Deprecated @Override public void createTable(String tableName, FijiTableLayout tableLayout) throws IOException { if (!tableName.equals(tableLayout.getName())) { throw new RuntimeException(String.format( "Table name from layout descriptor '%s' does match table name '%s'.", tableLayout.getName(), tableName)); } createTable(tableLayout.getDesc()); }
/** {@inheritDoc} */ @Deprecated @Override public void createTable(String tableName, FijiTableLayout tableLayout, int numRegions) throws IOException { if (!tableName.equals(tableLayout.getName())) { throw new RuntimeException(String.format( "Table name from layout descriptor '%s' does match table name '%s'.", tableLayout.getName(), tableName)); } createTable(tableLayout.getDesc(), numRegions); }
/** {@inheritDoc} */ @Override public void createTable(TableLayoutDesc tableLayout, int numRegions) throws IOException { Preconditions.checkArgument((numRegions >= 1), "numRegions must be positive: " + numRegions); if (numRegions > 1) { if (FijiTableLayout.getEncoding(tableLayout.getKeysFormat()) == RowKeyEncoding.RAW) { throw new IllegalArgumentException( "May not use numRegions > 1 if row key hashing is disabled in the layout"); } createTable(tableLayout, FijiRowKeySplitter.get().getSplitKeys(numRegions, FijiRowKeySplitter.getRowKeyResolution(tableLayout))); } else { createTable(tableLayout, null); } }
/** {@inheritDoc} */ @Deprecated @Override public void createTable(String tableName, FijiTableLayout tableLayout, byte[][] splitKeys) throws IOException { if (getMetaTable().tableExists(tableName)) { final FijiURI tableURI = FijiURI.newBuilder(mURI).withTableName(tableName).build(); throw new FijiAlreadyExistsException(String.format( "Fiji table '%s' already exists.", tableURI), tableURI); } if (!tableName.equals(tableLayout.getName())) { throw new RuntimeException(String.format( "Table name from layout descriptor '%s' does match table name '%s'.", tableLayout.getName(), tableName)); } createTable(tableLayout.getDesc(), splitKeys); }