@Test public void testGetTableNameVariations() { assertEquals(TableNameBuilder.getTableNameVariations("tableAbc"), ImmutableSet.of("tableAbc", "tableAbc_REALTIME", "tableAbc_OFFLINE")); assertEquals(TableNameBuilder.getTableNameVariations("tableAbc_REALTIME"), ImmutableSet.of("tableAbc", "tableAbc_REALTIME", "tableAbc_OFFLINE")); assertEquals(TableNameBuilder.getTableNameVariations("tableAbc_OFFLINE"), ImmutableSet.of("tableAbc", "tableAbc_REALTIME", "tableAbc_OFFLINE")); }
public static Set<String> getTableNameVariations(String tableName) { String rawTableName = extractRawTableName(tableName); String offlineTableName = OFFLINE.tableNameWithType(rawTableName); String realtimeTableName = REALTIME.tableNameWithType(rawTableName); return ImmutableSet.of(rawTableName, offlineTableName, realtimeTableName); }
TableNameBuilder { public static Set<String> getTableNameVariations(String tableName) { String rawTableName = extractRawTableName(tableName); String offlineTableName = OFFLINE.tableNameWithType(rawTableName); String realtimeTableName = REALTIME.tableNameWithType(rawTableName); return ImmutableSet.of(rawTableName, offlineTableName, realtimeTableName); } }
TableNameBuilder { public static Set<String> getTableNameVariations(String tableName) { String rawTableName = extractRawTableName(tableName); String offlineTableName = OFFLINE.tableNameWithType(rawTableName); String realtimeTableName = REALTIME.tableNameWithType(rawTableName); return ImmutableSet.of(rawTableName, offlineTableName, realtimeTableName); } private  TableNameBuilder(TableType tableType); }
TableNameBuilder { public static Set<String> getTableNameVariations(String tableName) { String rawTableName = extractRawTableName(tableName); String offlineTableName = OFFLINE.tableNameWithType(rawTableName); String realtimeTableName = REALTIME.tableNameWithType(rawTableName); return ImmutableSet.of(rawTableName, offlineTableName, realtimeTableName); } private  TableNameBuilder(TableType tableType); static TableNameBuilder forType(TableType tableType); String tableNameWithType(String tableName); @Nullable static TableType getTableTypeFromTableName(String tableName); static String extractRawTableName(String tableName); static boolean isTableResource(String resourceName); static boolean isOfflineTableResource(String resourceName); static boolean isRealtimeTableResource(String resourceName); static Set<String> getTableNameVariations(String tableName); }
TableNameBuilder { public static Set<String> getTableNameVariations(String tableName) { String rawTableName = extractRawTableName(tableName); String offlineTableName = OFFLINE.tableNameWithType(rawTableName); String realtimeTableName = REALTIME.tableNameWithType(rawTableName); return ImmutableSet.of(rawTableName, offlineTableName, realtimeTableName); } private  TableNameBuilder(TableType tableType); static TableNameBuilder forType(TableType tableType); String tableNameWithType(String tableName); @Nullable static TableType getTableTypeFromTableName(String tableName); static String extractRawTableName(String tableName); static boolean isTableResource(String resourceName); static boolean isOfflineTableResource(String resourceName); static boolean isRealtimeTableResource(String resourceName); static Set<String> getTableNameVariations(String tableName); static final TableNameBuilder OFFLINE; static final TableNameBuilder REALTIME; }