Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal Query Routing #364

Merged
merged 271 commits into from
Dec 5, 2021
Merged
Show file tree
Hide file tree
Changes from 247 commits
Commits
Show all changes
271 commits
Select commit Hold shift + click to select a range
607d633
Merge remote-tracking branch 'origin/workload_monitoring' into worklo…
Apr 5, 2021
d1ee5f6
moved LogicalTable/Schema from dbms to core
hennlo Apr 5, 2021
d52a2ff
remove persistence from eventQueue
hennlo Apr 10, 2021
f923a1b
Merge branch 'master' into workload_monitoring
hennlo Apr 10, 2021
f1194e5
added table identification to monitor event
hennlo Apr 11, 2021
6de6569
chaged query information retireval to logicaltable
hennlo Apr 15, 2021
8d4134a
Added Event Subscription structure
hennlo Apr 16, 2021
e6facb1
added event brokerage
hennlo Apr 17, 2021
47478b4
extended Broker registritation
hennlo Apr 18, 2021
6ac17de
- Refactor MonitoringService.
Apr 22, 2021
3f985c0
- some refactoring and cleanup
Apr 23, 2021
8bff44f
- some bugfixed
Apr 23, 2021
168f80a
- refactor Transaction to use only MonitoringData and not whole Monit…
Apr 23, 2021
ee33001
- some classes moved to other packages
Apr 23, 2021
7d2ff42
Start Monitoring Service instantly
hennlo Apr 25, 2021
5bd8451
added comemnts and information
hennlo Apr 25, 2021
1755c9e
merge master
hennlo Apr 27, 2021
f7fa191
deactivate metric gathering
hennlo Apr 28, 2021
fc45776
- Change of concept to use metrics
Apr 28, 2021
fa0f4c3
initial structure of temp-awareness
hennlo Apr 29, 2021
5189b91
class cleanup
hennlo Apr 29, 2021
9dec4d7
fixed Event inheritance
hennlo Apr 30, 2021
2cb2464
added queue handling
hennlo May 1, 2021
a34e7bc
added DML event
hennlo May 1, 2021
4b2f9cf
some Feedback, discussion
May 3, 2021
7937eb4
- rename MonitoringMetric to MonitoringDataPoint
May 6, 2021
be54214
- add new UniversalRouter class
May 6, 2021
6db9080
improved event to transaction handling
hennlo May 8, 2021
929803b
added execution time to dml
hennlo May 8, 2021
a96c7e7
Merge branch 'workload_monitoring' into temp-aware_partitioning
hennlo May 8, 2021
ca45281
added initial modal for Temp-aprt
hennlo May 9, 2021
fe93550
added partition selection to monitor event
hennlo May 10, 2021
96355a4
extension to UI partition-creation for number of partitions
hennlo May 17, 2021
ea8b2df
refactorded monitoring module
hennlo May 17, 2021
37e5208
refactored partioning form core to dbms
hennlo May 17, 2021
83e3411
refactored partition to partitionGroup
hennlo May 17, 2021
ba01a25
fixed a major bug when partioned tables are reset when renamed
hennlo May 23, 2021
dfa4f9d
fixed bug when partitoned table ismerged, can't be dropped afterwards
hennlo May 23, 2021
0a3400c
fixed a bug when Unbound partGroup wouldn't create internal
hennlo May 24, 2021
61dcf99
modified retrieval of targetPartitionID to internal partition handling
hennlo May 24, 2021
dc8021d
added PartitionProperty for more sophisticated and variable partition…
hennlo May 24, 2021
0442c05
- WIP, make IcarusRouting working with mulitple placements
Jun 8, 2021
ef832c3
- WIP Adjust Icarus routing further to use monitoring service for exe…
Jun 9, 2021
b2ce3ce
- WIP rename to UnifiedRouting
Jun 14, 2021
9183985
fix data type use double instead of long
Jun 15, 2021
e0df093
refactored schema mapping and physical table creation
hennlo Jun 30, 2021
d55d951
Merge branch 'master' into workload_monitoring
Jul 2, 2021
02304f8
Merge branch 'workload_monitoring' into universal-routing
Jul 2, 2021
6a76b5a
WIP
Jul 2, 2021
ea206c9
adapted dataMigrator to physicaltables
hennlo Jul 5, 2021
ee38101
WIP
Jul 5, 2021
1ca8547
corrected physical execution with CCPs
hennlo Jul 5, 2021
3441b27
fixed bug with ambigious physical table create
hennlo Jul 6, 2021
f326761
switched to internal partition routing instead of partitionGroup
hennlo Jul 7, 2021
39e8e3e
querying on different physical partitions
hennlo Jul 8, 2021
e9799e2
removed most od worst case routing
hennlo Jul 9, 2021
d9f5e35
added frequency map for temp
hennlo Jul 11, 2021
25c4cfe
fixed a monitroing bug
hennlo Jul 11, 2021
e949566
added TEMPERATURE parsing & property generation
hennlo Jul 11, 2021
2ee9fba
WIP
Jul 12, 2021
2bca412
optimized freqeuncy check
hennlo Jul 13, 2021
94cbe96
implemented partitioning via webui
hennlo Jul 14, 2021
783d6d4
extended ferqeuncyMap
hennlo Jul 14, 2021
c637b3e
implemented automatic physical table create/drop with copyData when p…
hennlo Jul 15, 2021
9025c7a
fixed bug in physical table adjustment
hennlo Jul 15, 2021
78707a5
fixed smaller changes
hennlo Jul 16, 2021
130d3b3
fixed a bug with partition distribution constraints
hennlo Jul 16, 2021
9f2fbf4
Start rework query pipeline
Jul 16, 2021
8611619
added temperature data copy
hennlo Jul 16, 2021
43242ec
optimized update handling
hennlo Jul 17, 2021
afdda3b
optimized temperature frequency ALL
hennlo Jul 17, 2021
c2a06e3
Merge branch 'master' into workload_monitoring
hennlo Jul 18, 2021
7d079a8
fixed bug in REST monitor
hennlo Jul 18, 2021
579c5aa
removed unused test
hennlo Jul 18, 2021
1da18fe
added configuration
hennlo Jul 18, 2021
ffbcce0
merged workload monitoring
hennlo Jul 19, 2021
36a8e2a
fixed merge bugs
hennlo Jul 19, 2021
29b23b9
Finish rework and add MultipleRouterRouting
Jul 20, 2021
e28efe2
added batch insrt for partitioning
hennlo Jul 20, 2021
8094968
Fix order of parameters in REST request parser
vogti Jul 21, 2021
8edd3ca
merged master into feature
hennlo Jul 21, 2021
079015b
Merge branch 'temp-aware_partitioning' of https://github.com/polyphen…
hennlo Jul 21, 2021
2d88214
extended taskscheduling
hennlo Jul 21, 2021
47a80c9
fixed errors in partition merge
hennlo Jul 21, 2021
1870a2a
added addiitonal partitioning tests
hennlo Jul 22, 2021
982592b
fixed test bugs
hennlo Jul 22, 2021
4c1d43f
remove physicalTableName for CCP
hennlo Jul 22, 2021
2f6a0b2
fixed some failing tests
hennlo Jul 22, 2021
c8733b1
fixed a bug with prepared statements
hennlo Jul 25, 2021
1ff3565
- Added InfluxDB dependency to gradle
Mar 5, 2021
06e343e
- Support Read for InfluxDB
Mar 12, 2021
921a32a
added statistics backend abstraction layer
hennlo Mar 20, 2021
010fa33
added MonitoringEvent to track events
hennlo Mar 20, 2021
5dc607a
added backgroundjobs for monitoring
hennlo Mar 20, 2021
be29db4
added mapDB for persisting the monitoring queue
hennlo Mar 21, 2021
6c2f674
Added conenctrion to simple monitoring backend
hennlo Apr 1, 2021
d7e1ea3
added refreshable information page
hennlo Apr 2, 2021
3940428
fix merge
Jul 26, 2021
6d41696
fix merge
Jul 26, 2021
88c2147
Merge branch 'workload_monitoring' of https://github.com/polypheny/Po…
Jul 26, 2021
27bbefe
Merge branch 'workload_monitoring' into universal-routing
Jul 26, 2021
ce75891
fix merge of AbstractQueryProcessor
Jul 26, 2021
1494a5b
wip
Jul 26, 2021
8ff7d65
Merge branch 'master' into workload_monitoring
Jul 26, 2021
bfc9323
Merge branch 'workload_monitoring' into universal-routing
Jul 26, 2021
cc60a9a
added constraints on tests
hennlo Jul 26, 2021
72f7b65
add new config for routing
Jul 26, 2021
2977eef
Some cleanup
Jul 26, 2021
d2c52a4
add first UTs
Jul 26, 2021
524ce42
merged changes from monitoring
hennlo Jul 27, 2021
de7c4de
add integration test
Jul 27, 2021
7b21ec2
Merge remote-tracking branch 'origin/temp-aware_partitioning' into un…
Jul 27, 2021
f761ff0
Merge branch 'workload_monitoring' into universal-routing
Jul 27, 2021
6562f72
fix merge issues
Jul 27, 2021
297cad6
remove icarus factory and unified factory
Jul 27, 2021
8e15007
Refactoring of AbstractQueryProcessor
Jul 27, 2021
13a9f65
Update formatting and year in copyright
vogti Jul 28, 2021
24351d5
Remove statement counter in TransactionImpl
vogti Jul 28, 2021
ed313ba
Adjust AbstractRouter to allow to propose multiple plans
Jul 28, 2021
ecf91b3
Fix issue with tests on file store
vogti Jul 28, 2021
7a0364f
add new UnifiedHorizontalRouting
Jul 28, 2021
7c73fae
Minor code improvements
vogti Jul 28, 2021
aea9dc1
Add license of dependencies
vogti Jul 28, 2021
8e011a6
Minor code improvements
vogti Jul 28, 2021
202785f
Minor improvements to code formatting
vogti Jul 28, 2021
2744bad
Re-adding code region markers
vogti Jul 28, 2021
a21bbd6
fix bug in AbstractRouter and adjust Router architecture further
Jul 28, 2021
60e465f
fix NoneVerticalPartitioningRouter with vertical partitioned table
Jul 29, 2021
469b7b4
some cleanup
Jul 29, 2021
12d3d2a
some cleanup
Jul 29, 2021
1f8b25a
Merge remote-tracking branch 'origin/universal-routing' into universa…
Jul 29, 2021
ce93ec7
fixed minor
hennlo Jul 29, 2021
0cb27c7
Add TablePlacementStrategy and implement AllTablePlacementStrategy su…
Jul 29, 2021
bacb50e
Implement Partition Identifying and prepare for new Query Pipeline
Jul 30, 2021
7a259ed
Add queryId to monitoring and fix execution time partly
Jul 30, 2021
d077e3f
wip
Jul 30, 2021
6d691e4
implement router caching, so far builds up again all plans
Jul 31, 2021
e7d2a5f
cleanup routing new pipeline and create new DmlRouter interface
Jul 31, 2021
9b360f7
allow queries to not be monitored and add physicalQueryId to monitoring
Jul 31, 2021
d6d2308
Implement Icarus costs and some cleanup
Aug 1, 2021
294fd96
Add analyze ui output
Aug 2, 2021
225b87e
fix queries with multiple joins and other more complex ones
Aug 2, 2021
a82bdc0
implement selection strategies, fix bug in routing and implement Icar…
Aug 2, 2021
22b5dfd
remove duplicate plans
Aug 2, 2021
8a7f625
fix relBuilder copy
Aug 3, 2021
3c3dd28
some cleanup and add better debug output
Aug 3, 2021
c09ca97
fixed bug in table creation of mongo and cottontail
hennlo Aug 3, 2021
72c3936
fixed minor ddl adjustment
hennlo Aug 3, 2021
76155d9
fix icarus router and create LogicalQueryInformation
Aug 3, 2021
8f1f957
more cleanup amd some refactoring
Aug 4, 2021
0baba0a
forward integration monitoring branch
Aug 4, 2021
9f1c9b0
Merge branch 'temp-aware_partitioning' into universal-routing
Aug 4, 2021
a21bfe6
forward integration temperature aware partitioning branch
Aug 4, 2021
f578fb7
fix some merging issues and IcarusRouter cost calculations
Aug 4, 2021
117a82e
Aggregate post costs in learning phase
Aug 4, 2021
db60c69
add invalidate post cost functionality
Aug 4, 2021
0155f90
some renaming and performance debug output
Aug 12, 2021
7c91bd5
fix build and some performance fix
Aug 12, 2021
4c78840
fix physical id for columns
Aug 12, 2021
820e7ab
add full placement routing for horizontal partitioning
Aug 12, 2021
2b37bf3
Add debug info for post costs
Aug 13, 2021
624b5c4
some cleanup
Aug 14, 2021
c3a8b73
fixed issue with pushdown of joins
hennlo Aug 14, 2021
cba9c83
Merge branch 'master' into universal-routing
Aug 15, 2021
8196d71
Merge branch 'temp-aware_partitioning' into universal-routing
Aug 15, 2021
0c95459
merge fixes
Aug 15, 2021
9121b17
change namespace of routers
Aug 15, 2021
c373059
change router configuration
Aug 15, 2021
7c0cd83
allow only one router for chronos
Aug 15, 2021
7adc800
rename routing package to router for chronos
Aug 15, 2021
836892c
add list again
Aug 15, 2021
4cd9793
change config name again
Aug 15, 2021
7b7788e
Revert changes
Aug 15, 2021
bee5662
fixed a bug with insert lookup error
hennlo Aug 16, 2021
a687723
Merge branch 'temp-aware_partitioning' into universal-routing
Aug 16, 2021
c9518c8
Merge branch 'master' into universal-routing
Aug 18, 2021
699983d
merge fixed
Aug 18, 2021
f66cabf
Some cleanup and documentation
Aug 18, 2021
3a11212
fix some integration tests
Aug 22, 2021
da654ac
Some refactoring and documentation
Aug 22, 2021
25d0e30
Some cleanup for debug output
Aug 25, 2021
3112f04
Undo changes to REST auth
vogti Oct 5, 2021
b9d31aa
Merge branch 'master' into universal-routing
Oct 22, 2021
17bd934
resolve merge conflicts
Oct 22, 2021
86ad524
Merge remote-tracking branch 'origin/universal-routing' into universa…
Oct 22, 2021
27a80e0
fix merge error in AbstractQueryProcessor
Nov 6, 2021
97ea26a
fix tests
Nov 6, 2021
06349ef
Merge branch 'master' into universal-routing
Nov 6, 2021
90c8806
forward integration master
Nov 6, 2021
ce4fdd7
fixed merge conflicts with view changes
datomo Nov 11, 2021
c054f17
Fixed an error when DML events could not be persisted
hennlo Nov 13, 2021
1a617b1
Optimized routing information for partitioning
hennlo Nov 14, 2021
198115f
Fix issue that query analyzer ist not working
vogti Nov 15, 2021
988ca04
fixed cache invalidation for partitioned and merged entities
hennlo Nov 15, 2021
44f4c23
Bump avativa version
vogti Nov 18, 2021
055a45d
Bump polypheny jdbc driver version
vogti Nov 18, 2021
a1f01fc
Fix artifact group id
vogti Nov 18, 2021
dc885b8
Remove duplicate maven repositories
vogti Nov 18, 2021
a7e329c
implemented route caching for partitions
hennlo Nov 19, 2021
5cc53dc
remove ConcurrentModificationException in Catalog
hennlo Nov 22, 2021
ff07543
Increased MonitoringQueue processing
hennlo Nov 22, 2021
1b48454
Minor changes to code formatting
vogti Nov 23, 2021
5de409c
Minor code improvements and remove usage of val and var
vogti Nov 23, 2021
ad81a13
Minor code rearrangement
hennlo Nov 23, 2021
e891b7c
Improve code style and update year in copyright
vogti Nov 23, 2021
de69e9a
Enable tests
vogti Nov 23, 2021
a90d0ea
Fix test classes
vogti Nov 23, 2021
bcd478c
fixed bug with false caching during migration
hennlo Nov 26, 2021
1350003
fixed bug when retrieving usedColumns in monitoring
hennlo Nov 26, 2021
5aaa27b
fixed bug when retrieving usedColumns in monitoring
hennlo Nov 26, 2021
d85ba15
cleanup and formatting
hennlo Nov 26, 2021
a5baaca
cleanup and formatting
hennlo Nov 26, 2021
c4ffb79
fixed monitoring bug with queryanalyzer
hennlo Nov 29, 2021
c0e0b60
harmonized duration spelling
hennlo Nov 29, 2021
627199f
Rename DeepCopyShuttle and LogicalViewScan
vogti Nov 29, 2021
4931f40
Merge remote-tracking branch 'origin/universal-routing' into universa…
vogti Nov 29, 2021
2ee9fdd
Clean-up, remove optionals
vogti Nov 29, 2021
a5ea23f
Upgrade gradle
vogti Nov 29, 2021
a4b1920
Improve javadoc and undo changes to some files
vogti Nov 29, 2021
447d19a
Fix failing tests
vogti Nov 29, 2021
22460eb
Improve information in UI and fix a caching related issue
vogti Nov 29, 2021
075a3fa
Minor UI improvements
vogti Nov 29, 2021
8daad3d
Fix and optimize number of processed elements in monitoring
vogti Nov 30, 2021
1fdd40e
Improve monitoring of execution time
vogti Nov 30, 2021
2f22d32
Cache router instances and type factory
vogti Nov 30, 2021
4124e89
Minor changes and improvements
vogti Nov 30, 2021
4fb59a8
Reorganize config options
vogti Nov 30, 2021
092b5b1
Improve wording
vogti Nov 30, 2021
716c5ac
Fix issue with duplicate routing page in query analyzer
vogti Dec 1, 2021
509d01a
Only add generated code of the actually executed plan to the query an…
vogti Dec 1, 2021
80b3ae5
Improve routing page in query analyzer
vogti Dec 1, 2021
9f6e5ff
Rename physicalQueryId to physicalQueryClass
vogti Dec 1, 2021
6b11bed
Revamped comment
hennlo Dec 1, 2021
2b5398a
fixed missing parsing of document
datomo Dec 2, 2021
7935105
Optimize catalog
vogti Dec 3, 2021
2b44450
Fix order of groups on execution time page
vogti Dec 3, 2021
6530a8e
Fix potential concurrency issue with routers
vogti Dec 3, 2021
9d0406d
Add commit status to transaction page
vogti Dec 3, 2021
6a7b821
Adjust which queries are monitored
vogti Dec 3, 2021
6b942b9
Merge branch 'master' into universal-routing
vogti Dec 3, 2021
4ffed28
added resetRepository of monitoring events when catalog is reset
hennlo Dec 3, 2021
cc82644
Merge remote-tracking branch 'origin/universal-routing' into universa…
hennlo Dec 3, 2021
cd5db20
Adjust parameter value validation and remove null check
vogti Dec 3, 2021
4ef45e3
Merge remote-tracking branch 'origin/universal-routing' into universa…
vogti Dec 3, 2021
017b5f4
added new testcase for column handling in partitioned entities
hennlo Dec 3, 2021
abf9e11
Merge remote-tracking branch 'origin/universal-routing' into universa…
hennlo Dec 3, 2021
d825772
Adjust parameter value validation and added skip on null
hennlo Dec 3, 2021
a3875f9
Merge branch 'fix-nondoc-mongomigration' into universal-routing
vogti Dec 5, 2021
0d033ec
Added tolerance against concurrent mod. exception in catalog
hennlo Dec 5, 2021
60b0d00
Improve documentation
vogti Dec 5, 2021
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
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,16 @@ _Polypheny-DB_ is a self-adaptive Polystore that provides cost- and workload awa

If you want to learn more about Polypheny-DB, we recommend having a look on our [vision paper](https://ieeexplore.ieee.org/document/8622353).


## Getting Started ##
The easiest way to setup Polypheny-DB is to use [Polypheny Control](https://github.com/polypheny/Polypheny-Control).

The easiest way to setup Polypheny-DB is to use [Polypheny Control](https://github.com/polypheny/Polypheny-Control).

## Roadmap ##
See the [open issues](https://github.com/polypheny/Polypheny-DB/issues) for a list of proposed features (and known issues).


## Contributing ##
We highly welcome your contributions to Polypheny-DB. If you would like to contribute, please fork the repository and submit your changes as a pull request. Please consult our [Admin Repository](https://github.com/polypheny/Admin) for guidelines and additional information.

Please note that we have a [code of conduct](https://github.com/polypheny/Admin/blob/master/CODE_OF_CONDUCT.md). Please follow it in all your interactions with the project.

Please note that we have a [code of conduct](https://github.com/polypheny/Admin/blob/master/CODE_OF_CONDUCT.md). Please follow it in all your interactions with the project.

## Credits ##
_Polypheny-DB_ builds upon the great work of several other projects:
Expand All @@ -35,10 +31,8 @@ _Polypheny-DB_ builds upon the great work of several other projects:

Except for the first two, those projects are used "as is" and integrated as a library. _Apache Avatica_ we [forked](https://github.com/polypheny/Avatica) and made some Polypheny-DB specific adjustments. From _Apache Calcite_ we use parts of the code as foundation for Polypheny-DB.


## Acknowledgements
The Polypheny-DB project is supported by the Swiss National Science Foundation (SNSF) under the contract no. 200021_172763.


## License ##
The Apache 2.0 License
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ allprojects {
// DBIS Nexus
url "https://dbis-nexus.dmi.unibas.ch/repository/maven2/"
}
maven {
url "https://clojars.org/repo/"
}
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
Expand Down Expand Up @@ -129,6 +125,9 @@ allprojects {
logLevel 'lifecycle'
}

lombok.config['lombok.val.flagUsage'] = 'error'
lombok.config['lombok.var.flagUsage'] = 'error'

idea {
module {
downloadJavadoc = true
Expand Down
2 changes: 2 additions & 0 deletions cassandra-adapter/lombok.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This file is generated by the 'io.freefair.lombok' Gradle plugin
config.stopBubbling = true
lombok.val.flagUsage = error
lombok.var.flagUsage = error
2 changes: 2 additions & 0 deletions catalog/lombok.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This file is generated by the 'io.freefair.lombok' Gradle plugin
config.stopBubbling = true
lombok.val.flagUsage = error
lombok.var.flagUsage = error
154 changes: 88 additions & 66 deletions catalog/src/main/java/org/polypheny/db/catalog/CatalogImpl.java

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions config/lombok.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This file is generated by the 'io.freefair.lombok' Gradle plugin
config.stopBubbling = true
lombok.val.flagUsage = error
lombok.var.flagUsage = error
20 changes: 15 additions & 5 deletions config/src/main/java/org/polypheny/db/config/ConfigClazzList.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 The Polypheny Project
* Copyright 2019-2021 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@
public class ConfigClazzList extends Config {

@JsonAdapter(ClassesAdapter.class)
@SerializedName( "values" )
@SerializedName("values")
private final Set<Class> classes;
@JsonAdapter(ValueAdapter.class)
private final List<Class> value;
Expand All @@ -56,6 +56,14 @@ public ConfigClazzList( final String key, final Class superClass ) {
}


public ConfigClazzList( final String key, final Class superClass, boolean activateAll ) {
this( key, superClass );
if ( activateAll ) {
setClazzList( new ArrayList<>( this.classes ) );
}
}


public ConfigClazzList( final String key, final Class superClass, final List<Class> defaultValue ) {
this( key, superClass );
setClazzList( defaultValue );
Expand Down Expand Up @@ -139,9 +147,9 @@ public boolean parseStringAndSetValue( String value ) {
Gson gson = new Gson();
ArrayList<String> val = gson.fromJson( value, ArrayList.class );
List<Class> toAdd = new ArrayList<>();
for( Class c: classes ) {
if( val.contains( c.getName() )){
toAdd.add(c);
for ( Class c : classes ) {
if ( val.contains( c.getName() ) ) {
toAdd.add( c );
}
}
return this.setClazzList( toAdd );
Expand Down Expand Up @@ -173,6 +181,7 @@ public void write( final JsonWriter out, final List<Class> classes ) throws IOEx
out.endArray();
}


@Override
public List<Class> read( final JsonReader in ) throws IOException {
List<Class> list = new ArrayList<>();
Expand All @@ -189,6 +198,7 @@ public List<Class> read( final JsonReader in ) throws IOException {
in.endArray();
return ImmutableList.copyOf( list );
}

}


Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
implementation group: 'com.j256.simplemagic', name: 'simplemagic', version: simplemagic_version // ISC

api (group: "org.apache.calcite", name: "calcite-linq4j", version: calcite_linq4j_version) { exclude(module: "guava") } // Apache 2.0
api (group: "org.apache.calcite.avatica", name: "avatica-core", version: avatica_core_version) { exclude(module: "protobuf-java") } // Apache 2.0
api (group: "org.polypheny.avatica", name: "avatica-core", version: avatica_core_version) { exclude(module: "protobuf-java") } // Apache 2.0

implementation group: "com.drewnoakes", name: "metadata-extractor", version: metadata_extractor_version // Apache 2.0

Expand All @@ -67,7 +67,7 @@ dependencies {
testImplementation group: "junit", name: "junit", version: junit_version
testImplementation group: "org.hamcrest", name: "hamcrest-core", version: hamcrest_core_version // BSD 3-clause

testImplementation group: "org.apache.calcite.avatica", name: "avatica-server", version: avatica_server_version // Apache 2.0
testImplementation group: "org.polypheny.avatica", name: "avatica-server", version: avatica_server_version // Apache 2.0
testImplementation group: "org.incava", name: "java-diff", version: java_diff_version // Apache 2.0
testImplementation group: "org.apache.commons", name: "commons-pool2", version: commons_pool2_version // Apache 2.0

Expand Down
2 changes: 2 additions & 0 deletions core/lombok.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# This file is generated by the 'io.freefair.lombok' Gradle plugin
config.stopBubbling = true
lombok.val.flagUsage = error
lombok.var.flagUsage = error
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void rebuild( final Transaction transaction ) {
.project( cols.stream().map( builder::field ).collect( Collectors.toList() ) )
.build();
final QueryProcessor processor = statement.getQueryProcessor();
final PolyphenyDbSignature signature = processor.prepareQuery( RelRoot.of( scan, SqlKind.SELECT ) );
final PolyphenyDbSignature signature = processor.prepareQuery( RelRoot.of( scan, SqlKind.SELECT ), false );
// Execute query
final Iterable<Object> enumerable = signature.enumerable( statement.getDataContext() );
final Iterator<Object> iterator = enumerable.iterator();
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/java/org/polypheny/db/catalog/Catalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ protected final boolean isValidIdentifier( final String str ) {
public abstract List<CatalogColumnPlacement> getColumnPlacement( long columnId );

/**
* Get column placements of a specific table on a specific adapter
* Get column placements of a specific table on a specific adapter on column detail level.
* Only returns one ColumnPlacement per column on adapter. Ignores multiplicity due to different partitionsIds
*
* @param adapterId The id of the adapter
* @return List of column placements of the table on the specified adapter
Expand All @@ -533,7 +534,8 @@ protected final boolean isValidIdentifier( final String str ) {
public abstract List<CatalogColumnPlacement> getColumnPlacementsOnAdapterSortedByPhysicalPosition( int storeId, long tableId );

/**
* Get column placements on a adapter
* Get column placements on a adapter. On column detail level
* Only returns one ColumnPlacement per column on adapter. Ignores multiplicity due to different partitionsIds
*
* @param adapterId The id of the adapter
* @return List of column placements on the specified adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.polypheny.db.rel.RelCollation;
import org.polypheny.db.rel.RelNode;
import org.polypheny.db.rel.SingleRel;
import org.polypheny.db.rel.logical.LogicalViewTableScan;
import org.polypheny.db.rel.logical.LogicalViewScan;
import org.polypheny.db.view.ViewManager.ViewVisitor;

public class CatalogView extends CatalogTable {
Expand Down Expand Up @@ -199,8 +199,8 @@ public void prepareView( RelNode viewLogicalRoot, RelOptCluster relOptCluster )
} else if ( viewLogicalRoot instanceof SingleRel ) {
prepareView( ((SingleRel) viewLogicalRoot).getInput(), relOptCluster );
}
if ( viewLogicalRoot instanceof LogicalViewTableScan ) {
prepareView( ((LogicalViewTableScan) viewLogicalRoot).getRelNode(), relOptCluster );
if ( viewLogicalRoot instanceof LogicalViewScan ) {
prepareView( ((LogicalViewScan) viewLogicalRoot).getRelNode(), relOptCluster );
}
}

Expand Down
20 changes: 15 additions & 5 deletions core/src/main/java/org/polypheny/db/config/RuntimeConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ public enum RuntimeConfig {
ConfigType.INTEGER,
"implementationCachingGroup" ),

ROUTING_PLAN_CACHING( "runtime/routingPlanCaching",
"Cache routing plans.",
true,
ConfigType.BOOLEAN,
"routingPlanCachingGroup" ),

ROUTING_PLAN_CACHING_SIZE( "runtime/routingPlanCachingSize",
"Size of the routing plan cache. If the limit is reached, the least recently used entry is removed.",
1000,
ConfigType.INTEGER,
"routingPlanCachingGroup" ),

PARAMETERIZE_DML( "runtime/parameterizeDML",
"Whether DML queries should be parameterized.",
true,
Expand Down Expand Up @@ -327,29 +339,27 @@ public enum RuntimeConfig {
ConfigType.INSTANCE_LIST,
"dockerGroup" ),


FILE_HANDLE_CACHE_SIZE( "runtime/fileHandleCacheSize",
"Size (in Bytes) up to which media files are cached in-memory instead of creating a temporary file. Needs to be >= 0 and smaller than Integer.MAX_SIZE. Setting to zero disables caching of media files.",
0,
ConfigType.INTEGER,
"runtimeExecutionGroup" ),


QUEUE_PROCESSING_INTERVAL( "runtime/queueProcessingInterval",
"Rate of passive tracking of statistics.",
BackgroundTask.TaskSchedulingType.EVERY_TEN_SECONDS_FIXED,
TaskSchedulingType.EVERY_SECOND,
ConfigType.ENUM,
"monitoringSettingsQueueGroup" ),

QUEUE_PROCESSING_ELEMENTS( "runtime/queueProcessingElements",
"Number of elements in workload queue to process per time.",
50,
5000,
ConfigType.INTEGER,
"monitoringSettingsQueueGroup" ),

TEMPERATURE_FREQUENCY_PROCESSING_INTERVAL( "runtime/partitionFrequencyProcessingInterval",
"Time interval in seconds, how often the access frequency of all TEMPERATURE-partitioned tables is analyzed and redistributed",
BackgroundTask.TaskSchedulingType.EVERY_MINUTE_FIXED,
BackgroundTask.TaskSchedulingType.EVERY_MINUTE,
ConfigType.ENUM,
"temperaturePartitionProcessingSettingsGroup" );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

import java.sql.Timestamp;
import java.util.List;
import lombok.NonNull;
import org.polypheny.db.monitoring.events.MonitoringDataPoint;
import org.polypheny.db.monitoring.events.MonitoringEvent;
import org.polypheny.db.monitoring.events.QueryPostCost;


/**
Expand All @@ -44,6 +46,14 @@ public interface MonitoringService {
*/
<T extends MonitoringDataPoint> List<T> getAllDataPoints( Class<T> dataPointClass );

/**
* Get number of data points for given monitoring persistent type.
*
* @param dataPointClass DatapointClass of interest
* @return Returns number of data points
*/
<T extends MonitoringDataPoint> long getNumberOfDataPoints( @NonNull Class<T> dataPointClass );

/**
* Get data before specified timestamp for given monitoring persistent type.
*
Expand All @@ -62,4 +72,26 @@ public interface MonitoringService {
*/
<T extends MonitoringDataPoint> List<T> getDataPointsAfter( Class<T> dataPointClass, Timestamp timestamp );

/**
* @param physicalQueryClass the physical query class string to identify aggregated post costs.
* @return The aggregated query post costs.
*/
QueryPostCost getQueryPostCosts( @NonNull String physicalQueryClass );

/**
* @return All query post costs for printing in ui.
*/
List<QueryPostCost> getAllQueryPostCosts();

/**
* @param physicalQueryClass the physical query class string to identify aggregated post costs.
* @param executionTime the measured execution time.
*/
void updateQueryPostCosts( @NonNull String physicalQueryClass, long executionTime );

/**
* Removes all aggregates post costs from cache.
*/
void resetQueryPostCosts();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2019-2021 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.polypheny.db.monitoring.events;

public interface QueryDataPoint extends MonitoringDataPoint {

long getExecutionTime();

String getQueryId();

String getPhysicalQueryId();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright 2019-2021 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.polypheny.db.monitoring.events;

/**
* Aggregation for routing post costs.
*/
public interface QueryPostCost {

/**
* @return physical query class name as string.
*/
String getPhysicalQueryClass();

/**
* @return average execution time in nano seconds.
*/
long getExecutionTime();

/**
* @return number of samples.
*/
int getNumberOfSamples();

}
Loading