-
Notifications
You must be signed in to change notification settings - Fork 87
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
Temperature-aware data partitioning #348
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Initialize Monitoring in Polypheny startup - Add event monitors in query processing
- Initialize Monitoring in Polypheny startup - Add event monitors in query processing
vogti
reviewed
Oct 17, 2021
core/src/main/java/org/polypheny/db/sql/ddl/altertable/SqlAlterTableAddPartitions.java
Outdated
Show resolved
Hide resolved
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
dbms/src/main/java/org/polypheny/db/partition/FrequencyMapImpl.java
Outdated
Show resolved
Hide resolved
vogti
reviewed
Oct 17, 2021
monitoring/src/main/java/org/polypheny/db/monitoring/ui/MonitoringServiceUiImpl.java
Outdated
Show resolved
Hide resolved
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
reviewed
Oct 17, 2021
vogti
approved these changes
Oct 18, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, @hennlo, for this PR!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an extension to horizontal partitioning in form of a new partition function: Temperature-aware as well as a change to the underlying representation of partitions in general.
All changes are accompanied by several new test cases to verify correctness.
Partition Representation
Summary
This internal change of structural representation was used as a prerequisite to enable Temperature-aware partitioning
as well as removing the currently existing constraints with horizontal partitioning: Worst-case routing and enforced full placements as fallback. Each Partition of a table is now represented as an individual physical table linked to the original table.
For simplicity reasons, each "unpartitioned table" contains now exactly one partition.
Changes
Partition concept
PartitionGroups
as a logical grouping for the user to place the groups as desiredPartitionGroup
Partitions are now physically created as independent physical tables on the underlying store and logically mapped to the table
Statements can now logically involve several physical partitions which eases the combination between vertical and horizontal partitioning
With the introductions of PhysicalTables for each partition each Table is now considered as being partitioned
and now has at least on PartitionGroup, Partition and PartitionPlacement, this unifies code handling and simplifies current limitations.
The routing has been adjusted to work with
PartitionPlacements
ColumnPlacement
for each requested partitionDataMigrator
is now able to copy from and to an arbitrary number of sub partitions of a table.New Features
CatalogPartitionGroup
CatalogPartition
CatalogPartitionPlacement
to uniquely identify each partition per adapterTests
Checks if correct number of CatalogPartitionPlacements are created
Check if physical tables are correctly created per partition
Checks if Batch Inserts are correctly executed and distributed to the right partitions
Temperature-Aware Partitioning
Summary
Temperature aware partitioning is a new functionality (provided as a unique partition manager) which is actually built on top of the existing partition managers HASH, LIST, RANGE. And utilizes these PartitionManagers to identify and retrieve partitions that have been accessed. Instead of a 1:1 binding between
PartitionGroup
&Partition
, TEMPERATURE has exactly two predefined groups: HOT & COLD.Additionally, TEMPERATURE creates a number of internal partitions which serve as data fragments to be able to analyze accesses frequencies based on READ, WRITE or TOTAL ACCESSES on these internal partitions.
After a centrally predefined time (configurable via ConfigurationManager) these access frequencies are analyzed and partitions are moved between PartitionGroups and consequently between stores where these groups have been placed. Triggering a create Table of new partitions on a store including a partitionwise
dataCopy
and the removal of swapped out partitions.New Features
PartitionProperty
to centrally attach essential partition information to each table.PartitionInformation
to attach parsed information to a single object without altering the constructor of utilizing classes for every new extensionTemperatureAwarePartitionManager
Tests
PartitionProperty
is correctly created and filled with all necessary informationAdditional Improvements