Class TableNameBuilder
- java.lang.Object
-
- org.apache.pinot.spi.utils.builder.TableNameBuilder
-
public class TableNameBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static TableNameBuilderOFFLINEstatic TableNameBuilderREALTIME
-
Method Summary
Modifier and Type Method Description static StringextractRawTableName(String tableName)Extract the raw table name from the given table name with type suffix.static TableNameBuilderforType(TableType tableType)Get the table name builder for the given table type.static Set<String>getTableNameVariations(String tableName)static TableTypegetTableTypeFromTableName(String tableName)Get the table type based on the given table name with type suffix.static booleanisOfflineTableResource(String resourceName)Return whether the given resource name represents an offline table resource.static booleanisRealtimeTableResource(String resourceName)Return whether the given resource name represents a realtime table resource.static booleanisTableResource(String resourceName)Return whether the given resource name represents a table resource.StringtableNameWithType(String tableName)Get the table name with type suffix.
-
-
-
Field Detail
-
OFFLINE
public static final TableNameBuilder OFFLINE
-
REALTIME
public static final TableNameBuilder REALTIME
-
-
Method Detail
-
forType
public static TableNameBuilder forType(TableType tableType)
Get the table name builder for the given table type.- Parameters:
tableType- Table type- Returns:
- Table name builder for the given table type
-
tableNameWithType
public String tableNameWithType(String tableName)
Get the table name with type suffix.- Parameters:
tableName- Table name with or without type suffix- Returns:
- Table name with type suffix
-
getTableTypeFromTableName
@Nullable public static TableType getTableTypeFromTableName(String tableName)
Get the table type based on the given table name with type suffix.- Parameters:
tableName- Table name with or without type suffix- Returns:
- Table type for the given table name, null if cannot be determined by table name
-
extractRawTableName
public static String extractRawTableName(String tableName)
Extract the raw table name from the given table name with type suffix.- Parameters:
tableName- Table name with or without type suffix- Returns:
- Table name without type suffix
-
isTableResource
public static boolean isTableResource(String resourceName)
Return whether the given resource name represents a table resource.- Parameters:
resourceName- Resource name- Returns:
- Whether the resource name represents a table resource
-
isOfflineTableResource
public static boolean isOfflineTableResource(String resourceName)
Return whether the given resource name represents an offline table resource.
-
isRealtimeTableResource
public static boolean isRealtimeTableResource(String resourceName)
Return whether the given resource name represents a realtime table resource.
-
-