@Test public void mapToShortTableNamesThrowsOnInvalidShortTableName() { insertInvalidShortTableNameIntoKvs(); assertThatThrownBy(() -> tableMapping.mapToShortTableNames(ImmutableMap.of(FQ_TABLE2, 22L))) .as("Invalid short table name in KVS") .isInstanceOf(IllegalArgumentException.class); }
@Override public <T> Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap) throws TableMappingNotFoundException { Map<TableReference, T> newMap = Maps.newHashMap(); for (Map.Entry<TableReference, T> e : toMap.entrySet()) { newMap.put(getMappedTableName(e.getKey()), e.getValue()); } return newMap; }
KvTableMappingService implements TableMappingService { @Override public <T> Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap) throws TableMappingNotFoundException { Map<TableReference, T> newMap = Maps.newHashMap(); for (Map.Entry<TableReference, T> e : toMap.entrySet()) { newMap.put(getMappedTableName(e.getKey()), e.getValue()); } return newMap; } }
KvTableMappingService implements TableMappingService { @Override public <T> Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap) throws TableMappingNotFoundException { Map<TableReference, T> newMap = Maps.newHashMap(); for (Map.Entry<TableReference, T> e : toMap.entrySet()) { newMap.put(getMappedTableName(e.getKey()), e.getValue()); } return newMap; } protected  KvTableMappingService(KeyValueService kvs, LongSupplier uniqueLongSupplier, Pattern namespaceValidation); }
KvTableMappingService implements TableMappingService { @Override public <T> Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap) throws TableMappingNotFoundException { Map<TableReference, T> newMap = Maps.newHashMap(); for (Map.Entry<TableReference, T> e : toMap.entrySet()) { newMap.put(getMappedTableName(e.getKey()), e.getValue()); } return newMap; } protected  KvTableMappingService(KeyValueService kvs, LongSupplier uniqueLongSupplier, Pattern namespaceValidation); static KvTableMappingService create(KeyValueService kvs, LongSupplier uniqueLongSupplier); static KvTableMappingService createWithCustomNamespaceValidation(
            KeyValueService kvs,
            LongSupplier uniqueLongSupplier,
            Pattern namespaceValidation); static void createNamespaceTable(KeyValueService keyValueService); @Override TableReference addTable(TableReference tableRef); static byte[] getBytesForTableRef(TableReference tableRef); @Override void removeTable(TableReference tableRef); @Override void removeTables(Set<TableReference> tableRefs); @Override TableReference getMappedTableName(TableReference tableRef); @Override Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap); @Override Map<TableReference, TableReference> generateMapToFullTableNames(Set<TableReference> tableRefs); }
KvTableMappingService implements TableMappingService { @Override public <T> Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap) throws TableMappingNotFoundException { Map<TableReference, T> newMap = Maps.newHashMap(); for (Map.Entry<TableReference, T> e : toMap.entrySet()) { newMap.put(getMappedTableName(e.getKey()), e.getValue()); } return newMap; } protected  KvTableMappingService(KeyValueService kvs, LongSupplier uniqueLongSupplier, Pattern namespaceValidation); static KvTableMappingService create(KeyValueService kvs, LongSupplier uniqueLongSupplier); static KvTableMappingService createWithCustomNamespaceValidation(
            KeyValueService kvs,
            LongSupplier uniqueLongSupplier,
            Pattern namespaceValidation); static void createNamespaceTable(KeyValueService keyValueService); @Override TableReference addTable(TableReference tableRef); static byte[] getBytesForTableRef(TableReference tableRef); @Override void removeTable(TableReference tableRef); @Override void removeTables(Set<TableReference> tableRefs); @Override TableReference getMappedTableName(TableReference tableRef); @Override Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap); @Override Map<TableReference, TableReference> generateMapToFullTableNames(Set<TableReference> tableRefs); static final TableMetadata NAMESPACE_TABLE_METADATA; }