public class JDBCStatsUtils extends Object
Constructor and Description |
---|
JDBCStatsUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getAlterIdColumn()
Prepares ALTER TABLE query
|
static String |
getBasicStat()
Returns the basic type of the supported statistics.
|
static String |
getCreate(String comment)
Prepares CREATE TABLE query
|
static String |
getDeleteAggr(String rowID,
String comment)
Prepares DELETE statement for cleanup.
|
static String |
getIdColumnName()
Returns the name of the column storing the key for statistics.
|
static String |
getInsert(String comment)
Prepares INSERT statement for statistic publishing.
|
static String |
getSelectAggr(String statType,
String comment)
Prepares SELECT query for statistics aggregation.
|
static String |
getStatColumnName(String statType)
Returns the column where the statistics for the given type are stored.
|
static String |
getStatTableName() |
static List<String> |
getSupportedStatistics()
Returns the set of supported statistics
|
static String |
getTimestampColumnName() |
static String |
getUpdate(String comment)
Prepares UPDATE statement issued when updating existing statistics
|
static boolean |
isValidStatistic(String statType)
Check if a particular statistic type is supported
|
static boolean |
isValidStatisticSet(Collection<String> stats)
Check if the set to be published is within the supported statistics.
|
static void |
validateRowId(String rowId)
Make sure the row ID fits into the row ID column in the table.
|
public static List<String> getSupportedStatistics()
public static boolean isValidStatisticSet(Collection<String> stats)
stats
- - stats to be publishedpublic static boolean isValidStatistic(String statType)
statType
- - statistic to be publishedpublic static String getIdColumnName()
public static String getTimestampColumnName()
public static String getStatTableName()
public static String getStatColumnName(String statType)
statType
- - supported statistic.public static String getBasicStat()
public static String getAlterIdColumn()
public static String getUpdate(String comment)
public static String getInsert(String comment)
public static String getSelectAggr(String statType, String comment)
statType
- - statistic type to be aggregated.comment
- public static String getDeleteAggr(String rowID, String comment)
public static void validateRowId(String rowId)
Copyright © 2017 The Apache Software Foundation. All rights reserved.