@Test public void testNoTableName() { expectedException.expect(IllegalStateException.class); bigtableInstanceName.toTableId(instanceName + BigtableInstanceName.TABLE_SEPARATOR); }
public String toTableId(String tableName) { Preconditions.checkNotNull(tableName, "Table name cannot be null"); String tablesPrefix = instanceName + TABLE_SEPARATOR; Preconditions.checkState( tableName.startsWith(tablesPrefix), "'%s' does not start with '%s'", tableName, tablesPrefix); String tableId = tableName.substring(tablesPrefix.length()).trim(); Preconditions.checkState(!tableId.isEmpty(), "Table id is blank"); return tableId; }
BigtableInstanceName implements Serializable { public String toTableId(String tableName) { Preconditions.checkNotNull(tableName, "Table name cannot be null"); String tablesPrefix = instanceName + TABLE_SEPARATOR; Preconditions.checkState( tableName.startsWith(tablesPrefix), "'%s' does not start with '%s'", tableName, tablesPrefix); String tableId = tableName.substring(tablesPrefix.length()).trim(); Preconditions.checkState(!tableId.isEmpty(), "Table id is blank"); return tableId; } }
BigtableInstanceName implements Serializable { public String toTableId(String tableName) { Preconditions.checkNotNull(tableName, "Table name cannot be null"); String tablesPrefix = instanceName + TABLE_SEPARATOR; Preconditions.checkState( tableName.startsWith(tablesPrefix), "'%s' does not start with '%s'", tableName, tablesPrefix); String tableId = tableName.substring(tablesPrefix.length()).trim(); Preconditions.checkState(!tableId.isEmpty(), "Table id is blank"); return tableId; } @InternalApi("For internal usage only")  BigtableInstanceName(String projectId, String instanceId); }
BigtableInstanceName implements Serializable { public String toTableId(String tableName) { Preconditions.checkNotNull(tableName, "Table name cannot be null"); String tablesPrefix = instanceName + TABLE_SEPARATOR; Preconditions.checkState( tableName.startsWith(tablesPrefix), "'%s' does not start with '%s'", tableName, tablesPrefix); String tableId = tableName.substring(tablesPrefix.length()).trim(); Preconditions.checkState(!tableId.isEmpty(), "Table id is blank"); return tableId; } @InternalApi("For internal usage only")  BigtableInstanceName(String projectId, String instanceId); @Override String toString(); String toTableId(String tableName); String toTableNameStr(String tableId); BigtableTableName toTableName(String tableId); String getProjectId(); String getInstanceId(); String getInstanceName(); BigtableClusterName toClusterName(String clusterId); }
BigtableInstanceName implements Serializable { public String toTableId(String tableName) { Preconditions.checkNotNull(tableName, "Table name cannot be null"); String tablesPrefix = instanceName + TABLE_SEPARATOR; Preconditions.checkState( tableName.startsWith(tablesPrefix), "'%s' does not start with '%s'", tableName, tablesPrefix); String tableId = tableName.substring(tablesPrefix.length()).trim(); Preconditions.checkState(!tableId.isEmpty(), "Table id is blank"); return tableId; } @InternalApi("For internal usage only")  BigtableInstanceName(String projectId, String instanceId); @Override String toString(); String toTableId(String tableName); String toTableNameStr(String tableId); BigtableTableName toTableName(String tableId); String getProjectId(); String getInstanceId(); String getInstanceName(); BigtableClusterName toClusterName(String clusterId); static final String BIGTABLE_V2_INSTANCE_FMT; static final String TABLE_SEPARATOR; }