Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 15 additions & 100 deletions core/src/main/java/org/polypheny/db/config/RuntimeConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,67 +50,27 @@ public enum RuntimeConfig {
ConfigType.ENUM
),

APPROXIMATE_DISTINCT_COUNT(
"runtime/approximateDistinctCount",
"Whether approximate results from \"COUNT(DISTINCT ...)\" aggregate functions are acceptable.",
false,
ConfigType.BOOLEAN
), // Druid

APPROXIMATE_TOP_N(
"runtime/approximateTopN",
"Whether approximate results from \"Top N\" queries (\"ORDER BY aggFun DESC LIMIT n\") are acceptable.",
false,
ConfigType.BOOLEAN
), // Druid

APPROXIMATE_DECIMAL(
"runtime/approximateDecimal",
"Whether approximate results from aggregate functions on DECIMAL types are acceptable.",
false,
ConfigType.BOOLEAN
), // Druid

NULL_EQUAL_TO_EMPTY(
"runtime/nullEqualToEmpty",
"Whether to treat empty strings as null for Druid Adapter.",
true,
ConfigType.BOOLEAN
), // Druid

RELATIONAL_NAMESPACE_DEFAULT_CASE_SENSITIVE(
"runtime/relationalCaseSensitive",
"Whether a relational namespace is case-sensitive if not specified otherwise.",
false,
ConfigType.BOOLEAN
),

DOCUMENT_NAMESPACE_DEFAULT_CASE_SENSITIVE(
"runtime/documentCaseSensitive",
"Whether a document namespace is case-sensitive if not specified otherwise.",
false,
ConfigType.BOOLEAN
),

GRAPH_NAMESPACE_DEFAULT_CASE_SENSITIVE(
"runtime/graphCaseSensitive",
"Whether a graph (namespace) is case-sensitive if not specified otherwise.",
false,
ConfigType.BOOLEAN
),

CONFIG_SERVER_PORT(
"runtime/configServerPort",
"The port on which the config server should listen.",
8081,
ConfigType.INTEGER
),

INFORMATION_SERVER_PORT(
"runtime/informationServerPort",
"The port on which the information server should listen.",
8082,
ConfigType.INTEGER
),

WEBUI_SERVER_PORT(
"runtime/webuiServerPort",
"The port on which the web ui server should listen.",
Expand Down Expand Up @@ -220,36 +180,30 @@ public enum RuntimeConfig {
ConfigType.INTEGER,
"statisticSettingsGroup" ),

UNIQUE_VALUES(
"statistics/maxCharUniqueVal",
"Maximum character of unique values",
10,
STATISTIC_BATCH_SIZE(
"statistics/statisticBatchSize",
"Number of tuples to process in each iteration step.",
100,
ConfigType.INTEGER,
"statisticSettingsGroup" ),

STATISTIC_RATE(
"statistics/passiveTrackingRate",
"Rate of passive tracking of statistics.",
BackgroundTask.TaskSchedulingType.EVERY_THIRTY_SECONDS_FIXED,
ConfigType.ENUM ),
TaskSchedulingType.EVERY_THIRTY_SECONDS,
ConfigType.ENUM,
"statisticSettingsGroup" ),

MATERIALIZED_VIEW_LOOP(
"materializedView/freshnessLoopRate",
"Rate of freshness Loop for Materialized Views with update type interval.",
"Rate of freshness loop for Materialized Views with update type interval.",
TaskSchedulingType.EVERY_SECOND_FIXED,
ConfigType.ENUM ),

EXPLORE_BY_EXAMPLE_TO_SQL(
"exploreByExample/classificationToSQL",
"Build SQL query from classification.",
true,
ConfigType.BOOLEAN,
"uiSettings" ),

UI_PAGE_SIZE(
"ui/pageSize",
"Number of rows per page in the data view.",
10,
"Number of tuples (rows / documents) in query results and per page in the data view.",
25,
ConfigType.INTEGER,
"uiSettingsDataViewGroup" ),

Expand All @@ -268,29 +222,6 @@ public enum RuntimeConfig {
ConfigType.INTEGER,
"uiSettingsDataViewGroup" ),

UI_USE_HARDLINKS(
"ui/useHardlinks",
"Whether or not to use hardlinks for temporal files in the UI. If false, softlinks are used. This config has only an effect when one or multiple file stores are deployed. "
+ "With hardlinks, the data you see is the correct data that was selected during the transaction. "
+ "But with multiple file stores on different file systems, hardlinks won't work. "
+ "In this case you can use softlinks, but you might see data that is more recent.",
true,
ConfigType.BOOLEAN,
"uiSettingsDataViewGroup" ),

HUB_IMPORT_BATCH_SIZE(
"hub/hubImportBatchSize",
"Number of rows that should be inserted at a time when importing a dataset from Polypheny-Hub.",
1000,
ConfigType.INTEGER,
"uiSettingsDataViewGroup" ),

SCHEMA_CACHING(
"runtime/schemaCaching",
"Cache polypheny-db schema",
true,
ConfigType.BOOLEAN ),

QUERY_PLAN_CACHING(
"runtime/queryPlanCaching",
"Cache planned and optimized query plans.",
Expand Down Expand Up @@ -479,13 +410,6 @@ public enum RuntimeConfig {
ConfigType.ENUM,
"temperaturePartitionProcessingSettingsGroup" ),

CATALOG_DEBUG_MESSAGES(
"runtime/catalogDebugMessages",
"Enable output of catalog debug messages on the monitoring page.",
false,
ConfigType.BOOLEAN,
"monitoringGroup" ),

AVAILABLE_PLUGINS(
"runtime/availablePlugins",
"All plugins, which are available, be it active, only loaded or unloaded.",
Expand Down Expand Up @@ -530,7 +454,7 @@ public enum RuntimeConfig {

DOCKER_TIMEOUT(
"runtime/dockerTimeout",
"Connection and respones timeout for autodocker.",
"Connection and response timeout for auto-docker.",
45,
ConfigType.INTEGER
),
Expand All @@ -544,14 +468,8 @@ public enum RuntimeConfig {

SERIALIZATION_BUFFER_SIZE(
"runtime/serialization",
"How big the buffersize for catalog objects should be.",
"How big the buffer size for catalog objects should be.",
2_000_000,
ConfigType.INTEGER ),

LOCKING_MAX_TIMEOUT_SECONDS(
"runtime/maxTimeout",
"How long a transactions should wait for a lock until it is aborted",
90,
ConfigType.INTEGER );


Expand Down Expand Up @@ -611,7 +529,7 @@ public enum RuntimeConfig {
final WebUiPage queryStatisticsPage = new WebUiPage(
"statisticsPage",
"Statistics",
"Settings on the stored data." );
"Statistics on the stored data." );
//queryStatisticsPage.withIcon( "fa fa-percent" );
final WebUiGroup statisticSettingsGroup = new WebUiGroup( "statisticSettingsGroup", queryStatisticsPage.getId() );
statisticSettingsGroup.withTitle( "Statistics Settings" );
Expand Down Expand Up @@ -655,9 +573,6 @@ public enum RuntimeConfig {
final WebUiGroup uiSettingsDataViewGroup = new WebUiGroup( "uiSettingsDataViewGroup", uiSettingsPage.getId() );
uiSettingsDataViewGroup.withTitle( "Data View" );
configManager.registerWebUiGroup( uiSettingsDataViewGroup );
final WebUiGroup monitoringGroup = new WebUiGroup( "monitoringGroup", uiSettingsPage.getId() );
monitoringGroup.withTitle( "Monitoring" );
configManager.registerWebUiGroup( monitoringGroup );

// Workload Monitoring specific setting
final WebUiPage monitoringSettingsPage = new WebUiPage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ enum TaskSchedulingType {
}


/**
* FIXED: Every x amount of time, independent of the runtime of the task. There can be multiple instances of the task running in parallel.
*
* DELAYED: x amount of time between the executions of the task. It is ensured that there is only one instance of the task running at the same time.
*/
enum TaskDelayType {
FIXED, DELAYED
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private StatisticResult executeColStat( Statement statement, AlgNode node, Query

try {
implementation = statement.getQueryProcessor().prepareQuery( AlgRoot.of( node, Kind.SELECT ), node.getTupleType(), false );
ResultIterator iterator = implementation.execute( statement, getPageSize() );
ResultIterator iterator = implementation.execute( statement, getBatchSize() );
rows = iterator.getNextBatch();
iterator.close();
} catch ( Throwable t ) {
Expand All @@ -172,11 +172,8 @@ private StatisticResult executeColStat( Statement statement, AlgNode node, Query
}


/**
* Get the page
*/
private int getPageSize() {
return RuntimeConfig.UI_PAGE_SIZE.getInteger();
private int getBatchSize() {
return RuntimeConfig.STATISTIC_BATCH_SIZE.getInteger();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,8 @@ private synchronized void replaceStatistics( Map<Long, StatisticColumn> statisti
* Method to sort a column into the different kinds of column types and hands it to the specific reevaluation
*/
private StatisticColumn reevaluateField( QueryResult column ) {

if ( column.getColumn().type.getFamily() == PolyTypeFamily.ARRAY ) {
log.warn( "array not yet supported" );
log.warn( "arrays are not yet supported" );
return null;
}

Expand Down Expand Up @@ -340,7 +339,7 @@ private StatisticColumn reevaluateTemporalColumn( QueryResult column ) {


/**
* Helper method tho assign unique values or set isFull if too much exist
* Helper method tho assign unique values or set isFull if too much exists
*
* @param column the column in which the values should be inserted
*/
Expand Down
2 changes: 0 additions & 2 deletions webui/src/main/java/org/polypheny/db/webui/HttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,6 @@ private String streamToString( final InputStream stream ) {
try ( BufferedReader bufferedReader = new BufferedReader( new InputStreamReader( stream, Charset.defaultCharset() ) ) ) {
while ( (line = bufferedReader.readLine()) != null ) {
if ( line.contains( "//SPARK-REPLACE" ) ) {
stringBuilder.append( "\nlocalStorage.setItem('configServer.port', '" ).append( RuntimeConfig.CONFIG_SERVER_PORT.getInteger() ).append( "');" );
stringBuilder.append( "\nlocalStorage.setItem('informationServer.port', '" ).append( RuntimeConfig.INFORMATION_SERVER_PORT.getInteger() ).append( "');" );
stringBuilder.append( "\nlocalStorage.setItem('webUI.port', '" ).append( RuntimeConfig.WEBUI_SERVER_PORT.getInteger() ).append( "');" );
} else {
stringBuilder.append( line );
Expand Down
Loading