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

Prepare for release #376

Merged
merged 24 commits into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
517f89c
Adjust monitoring build file
vogti Jan 10, 2022
114dded
Set version number to 0.7.0
vogti Jan 10, 2022
57e81bb
Add license check plugins and prepare for release
vogti Jan 10, 2022
f30c4ba
Allow cottontail version
vogti Jan 10, 2022
0c4588c
Bring about window to foreground
vogti Jan 10, 2022
b65ef54
About window always on top
vogti Jan 13, 2022
18d19eb
Fix typos
vogti Feb 4, 2022
eed18d7
Merge branch 'master' into prepare-for-release
vogti Feb 4, 2022
68e4563
Fix potential memory leak in information manager
vogti Feb 7, 2022
7aee5c9
Fix CSV source exported columns
vogti Feb 7, 2022
6cf6d1e
Fix add and drop columns on source tables
vogti Feb 7, 2022
d279f3e
Also reset implementation cache when resetting plan cache
vogti Feb 7, 2022
5bd9408
Improve getAvailableSourceColumns method
vogti Feb 8, 2022
68f5f74
added missing return, rename of exported columns route
datomo Feb 8, 2022
3fea1e7
re-added missing physicalName in DbColumn
datomo Feb 8, 2022
2b2b501
reverted ExportedColumns
datomo Feb 8, 2022
aec7057
Fix issue with jdbc data sources
vogti Feb 14, 2022
3749b5d
Fix deployment mode
vogti Feb 14, 2022
8aed6ea
Merge branch 'master' into prepare-for-release
vogti Feb 19, 2022
97a552f
Ignore dependencies that are removed on release branches
vogti Feb 19, 2022
fb6502a
Adjust workflow timeouts
vogti Feb 19, 2022
7b3ff81
Update readme
vogti Feb 19, 2022
98764df
Update log level for "config is equal to default value. Omitting."
vogti Feb 19, 2022
5afb3aa
Improve handling of unknown config keys
vogti Feb 19, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ jobs:
- name: Execute integration tests for ${{ matrix.adapter }}
uses: nick-invision/retry@v2
with:
max_attempts: 2
timeout_minutes: 60
max_attempts: 3
timeout_minutes: 30
command: ./gradlew integrationTests -Dstore.default=${{ matrix.adapter }}
4 changes: 2 additions & 2 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ jobs:
- name: Execute tests
uses: nick-invision/retry@v2
with:
max_attempts: 2
timeout_minutes: 60
max_attempts: 3
timeout_minutes: 30
command: ./gradlew check
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright 2017-2021 The Polypheny Project
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This product contains code from the Apache Calcite
This product contains code forked from the Apache Calcite
project which is based on source code originally developed
by DynamoBI Corporation, LucidEra Inc., SQLstream Inc. and others
under the auspices of the Eigenbase Foundation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _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 a [release](https://github.com/polypheny/Polypheny-DB/releases/latest). Alternatively, you can use [Polypheny Control](https://github.com/polypheny/Polypheny-Control) to automatically build Polypheny-DB.

## Roadmap ##
See the [open issues](https://github.com/polypheny/Polypheny-DB/issues) for a list of proposed features (and known issues).
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ buildscript {
plugins {
id "org.jetbrains.kotlin.jvm" version "1.5.31"
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.1"
id "com.github.johnrengelman.shadow" version "7.0.0"
}


Expand All @@ -43,13 +42,14 @@ allprojects {
compileTestJava.options.encoding = "UTF-8"
javadoc.options.encoding = "UTF-8"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.11
targetCompatibility = 1.11

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}


repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -94,7 +94,7 @@ allprojects {
}
dockerTests.dependsOn(testClasses)

String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : "hsqldb"
String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : 'hsqldb'

task integrationTests(type: Test) {
description = 'Runs integration tests.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ public void persistConfigValue( String configKey, Object updatedValue ) {
// If so, the value will be omitted since there is no need to write it to file
if ( configs.get( configKey ).isDefault() ) {
//if ( updatedValue.toString().equals( configs.get( configKey ).getDefaultValue().toString() ) ) {
log.warn( "Updated value: '{}' for key: '{}' is equal to default value. Omitting.", updatedValue, configKey );
if ( log.isDebugEnabled() ) {
log.debug( "Updated value: '{}' for key: '{}' is equal to default value. Omitting.", updatedValue, configKey );
}
newConfig = configFile.withoutPath( configKey );
} else {
newConfig = parseConfigObject( configKey, updatedValue );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void addWebUiGroup( final WebUiGroup g ) {
@Override
public String toString() {

TypeAdapter<Enum<?>> enumTypeAdapter = new TypeAdapter<Enum<?>>() {
TypeAdapter<Enum<?>> enumTypeAdapter = new TypeAdapter<>() {
@Override
public void write( JsonWriter out, Enum value ) throws IOException {
out.beginObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.polypheny.db.adapter.Adapter.AdapterProperties;
Expand All @@ -22,11 +21,11 @@
import org.polypheny.db.adapter.DataSource;
import org.polypheny.db.adapter.DeployMode;
import org.polypheny.db.adapter.csv.CsvTable.Flavor;
import org.polypheny.db.catalog.Catalog;
import org.polypheny.db.catalog.entity.CatalogColumnPlacement;
import org.polypheny.db.catalog.entity.CatalogPartitionPlacement;
import org.polypheny.db.catalog.entity.CatalogTable;
import org.polypheny.db.information.InformationGroup;
import org.polypheny.db.information.InformationManager;
import org.polypheny.db.information.InformationTable;
import org.polypheny.db.prepare.Context;
import org.polypheny.db.schema.Schema;
Expand All @@ -36,8 +35,6 @@
import org.polypheny.db.type.PolyType;
import org.polypheny.db.util.Source;
import org.polypheny.db.util.Sources;
import org.reflections.Reflections;
import org.reflections.scanners.ResourcesScanner;


@Slf4j
Expand All @@ -50,10 +47,10 @@
description = "Which length (number of characters including whitespace) should be used for the varchar columns. Make sure this is equal or larger than the longest string in any of the columns.")
public class CsvSource extends DataSource {


private URL csvDir;
private CsvSchema currentSchema;
private final int maxStringLength;
private Map<String, List<ExportedColumn>> exportedColumnCache;


public CsvSource( final int storeId, final String uniqueName, final Map<String, String> settings ) {
Expand All @@ -66,7 +63,7 @@ public CsvSource( final int storeId, final String uniqueName, final Map<String,
}

setCsvDir( settings );
registerInformationPage( uniqueName );
addInformationExportedColumns();
enableInformationPage();
}

Expand Down Expand Up @@ -111,15 +108,18 @@ public void truncate( Context context, CatalogTable table ) {

@Override
public Map<String, List<ExportedColumn>> getExportedColumns() {
Map<String, List<ExportedColumn>> map = new HashMap<>();
if ( exportedColumnCache != null ) {
return exportedColumnCache;
}
Map<String, List<ExportedColumn>> exportedColumnCache = new HashMap<>();
Set<String> fileNames;
if ( csvDir.getProtocol().equals( "jar" ) ) {
Reflections reflections = new Reflections( "hr", new ResourcesScanner() );
Set<String> fileNamesSet = reflections.getResources( Pattern.compile( ".*\\.(csv|csv\\.gz)$" ) );
List<CatalogColumnPlacement> ccps = Catalog
.getInstance()
.getColumnPlacementsOnAdapter( getAdapterId() );
fileNames = new HashSet<>();
for ( String fileName : fileNamesSet ) {
String[] fileNameSplit = fileName.split( "/" );
fileNames.add( fileNameSplit[fileNameSplit.length - 1] );
for ( CatalogColumnPlacement ccp : ccps ) {
fileNames.add( ccp.physicalSchemaName );
}
} else {
File[] files = Sources.of( csvDir )
Expand Down Expand Up @@ -214,9 +214,9 @@ public Map<String, List<ExportedColumn>> getExportedColumns() {
throw new RuntimeException( e );
}

map.put( physicalTableName, list );
exportedColumnCache.put( physicalTableName, list );
}
return map;
return exportedColumnCache;
}


Expand Down Expand Up @@ -253,13 +253,10 @@ protected void reloadSettings( List<String> updatedSettings ) {
}


protected void registerInformationPage( String uniqueName ) {
InformationManager im = InformationManager.getInstance();
/*informationPage = new InformationPage( uniqueName, "CSV Data Source" ).setLabel( "Sources" );
im.addPage( informationPage );*/

private void addInformationExportedColumns() {
for ( Map.Entry<String, List<ExportedColumn>> entry : getExportedColumns().entrySet() ) {
InformationGroup group = new InformationGroup( informationPage, entry.getValue().get( 0 ).physicalSchemaName );
informationGroups.add( group );

InformationTable table = new InformationTable(
group,
Expand All @@ -275,7 +272,6 @@ protected void registerInformationPage( String uniqueName ) {
);
}
informationElements.add( table );
informationGroups.add( group );
}
}

Expand Down
157 changes: 146 additions & 11 deletions dbms/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
import java.text.SimpleDateFormat

group "org.polypheny"


version = versionMajor + "." + versionMinor + versionQualifier


buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
google()
}
dependencies {
// Shadowing; used to make a fat jar (https://github.com/johnrengelman/shadow)
classpath group: "com.github.jengelman.gradle.plugins", name: "shadow", version: shadow_plugin_version
classpath group: "app.cash.licensee", name: "licensee-gradle-plugin", version: licensee_version
classpath group: "com.jaredsburrows", name: "gradle-license-plugin", version: license_report_version
}
}

plugins {
id "application"
id "com.github.johnrengelman.shadow" version "$shadow_plugin_version"
}

apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "app.cash.licensee"
apply plugin: "com.jaredsburrows.license"

group "org.polypheny"

version = versionMajor + "." + versionMinor + versionQualifier


dependencies {
Expand Down Expand Up @@ -99,6 +108,113 @@ sourceSets {
}
}

licenseReport {
generateCsvReport = true
generateHtmlReport = true
generateJsonReport = true
}


licensee {
//
// Ignore these dependencies, remove on release branches!
// START
ignoreDependencies('nz.ac.waikato.cms.weka') {
transitive = true
because "removed on release branches"
}
ignoreDependencies('com.datastax.oss') {
transitive = true
because "removed on release branches"
}
ignoreDependencies('com.github.nosan') {
transitive = true
because "removed on release branches"
}
ignoreDependencies('org.mariadb.jdbc') {
transitive = true
because "removed on release branches"
}
ignoreDependencies('org.apache.cassandra') {
transitive = true
because "removed on release branches"
}
allowDependency('com.github.jnr', 'jnr-posix', '3.0.50') { because 'removed on release branches' }
allowDependency('org.ow2.asm', 'asm', '7.1') { because 'removed on release branches' }
allowDependency('org.ow2.asm', 'asm-analysis', '7.1') { because 'removed on release branches' }
allowDependency('org.ow2.asm', 'asm-commons', '7.1') { because 'removed on release branches' }
allowDependency('org.ow2.asm', 'asm-tree', '7.1') { because 'removed on release branches' }
allowDependency('org.ow2.asm', 'asm-util', '7.1') { because 'removed on release branches' }
// END

allow('Apache-2.0')
allow('MIT')
allow('BSD-2-Clause')
allow('BSD-3-Clause')
allow('CC0-1.0')
allowUrl('http://opensource.org/licenses/BSD-3-Clause')
allowUrl('http://www.wtfpl.net/')
allowUrl('https://creativecommons.org/publicdomain/zero/1.0/')
allowUrl('http://www.opensource.org/licenses/bsd-license.php') // BSD 2-Clause
allowUrl('https://www.eclipse.org/licenses/edl-v10.html') // EDL 1.0
allowUrl('http://www.eclipse.org/org/documents/edl-v10.php') // EDL 1.0

allowDependency('com.j256.simplemagic', 'simplemagic', '1.16') { because 'ISC license' }
allowDependency('com.adobe.xmp', 'xmpcore', '6.0.6') { because 'BSD 3-Clause' }
allowDependency('org.bouncycastle', 'bcpkix-jdk15on', '1.67') { because 'MIT license' }
allowDependency('org.bouncycastle', 'bcprov-jdk15on', '1.67') { because 'MIT license' }
allowDependency('org.vitrivr', 'cottontaildb', '0.13.3') { because 'MIT license' }
allowDependency('org.vitrivr', 'cottontaildb-proto', '0.13.0') { because 'MIT license' }
allowDependency('org.javassist', 'javassist', '3.28.0-GA') { because 'Apache 2.0 license' }
allowDependency('org.awaitility', 'awaitility', '4.0.1') { because 'Apache 2.0 license' }
allowDependency('net.java.dev.jna', 'jna', '5.9.0') { because 'Apache 2.0 license' }
allowDependency('net.java.dev.jna', 'jna-platform', '5.8.0') { because 'Apache 2.0 license' }
allowDependency('jakarta.xml.bind', 'jakarta.xml.bind-api', '2.3.2') { because 'Eclipse Distribution License 1.0' }
allowDependency('org.postgresql', 'postgresql', '42.2.19') { because 'BSD 2-Clause' }
allowDependency('org.ow2.asm', 'asm', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-analysis', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-commons', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-tree', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.ow2.asm', 'asm-util', '5.0.3') { because 'BSD 3-Clause' }
allowDependency('org.codehaus.janino', 'janino', '3.0.11') { because 'BSD 3-Clause' }
allowDependency('org.codehaus.janino', 'commons-compiler', '3.0.11') { because 'BSD 3-Clause' }
allowDependency('com.google.re2j', 're2j', '1.5') { because 'BSD 3-Clause' }
allowDependency('org.java-websocket', 'Java-WebSocket', '1.3.8') { because 'MIT license' }
allowDependency('org.hsqldb', 'hsqldb', '2.6.1') { because 'BSD 3-Clause' }


// Category B
allow('EPL-1.0')
allow('MPL-1.1')
allow('MPL-2.0')
allowUrl('http://www.eclipse.org/legal/epl-2.0') // EPL 2.0
allowUrl('https://www.eclipse.org/legal/epl-2.0/') // EPL 2.0
allowUrl('https://www.eclipse.org/org/documents/epl-v10.php') // EPL 1.0
allowUrl('https://www.eclipse.org/legal/epl-v20.html') // EPL 2.0
allowUrl('https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt') // EPL 2.0

allowDependency('jakarta.annotation', 'jakarta.annotation-api', '1.3.5') { because 'Eclipse Public License v. 2.0' }
allowDependency('jakarta.ws.rs', 'jakarta.ws.rs-api', '2.1.6') { because 'Eclipse Public License v. 2.0' }
allowDependency('com.github.jnr', 'jnr-posix', '3.0.47') { because 'Eclipse Public License v. 2.0' }
allowDependency('jakarta.activation', 'jakarta.activation-api', '1.2.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('javax.annotation', 'javax.annotation-api', '1.3.2') { because 'CDDL license' }
allowDependency('javax.servlet', 'javax.servlet-api', '4.0.1') {
because 'Servlet-api.jar and javax.servlet-*.jar are under the CDDL license, the original source code for this can be found at http://www.eclipse.org/jetty/downloads.php'
}

// Glassfish
allowDependency('org.glassfish.jersey.core', 'jersey-common', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.jersey.core', 'jersey-client', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.jersey.inject', 'jersey-hk2', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.jersey.connectors', 'jersey-apache-connector', '2.30.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2.external', 'jakarta.inject', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2.external', 'aopalliance-repackaged', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'osgi-resource-locator', '1.0.3') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'hk2-api', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'hk2-locator', '2.6.1') { because 'Eclipse Public License v. 2.0' }
allowDependency('org.glassfish.hk2', 'hk2-utils', '2.6.1') { because 'Eclipse Public License v. 2.0' }
}


/**
* JARs
Expand All @@ -112,6 +228,12 @@ jar {
attributes "Build-Date": "${buildTime()}"
attributes "Main-Class": "org.polypheny.db.PolyphenyDb"
}
metaInf {
from(rootProject.rootDir, {
include "LICENSE"
include "NOTICE"
})
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier "sources"
Expand All @@ -133,8 +255,21 @@ assemble.dependsOn shadowJar
artifacts {
//archives jar // regular jar containing only the compiled source
archives shadowJar // fat jar which additionally contains all dependencies
archives sourcesJar // jar file containing the java doc files
archives javadocJar // jar file containing the source files
//archives sourcesJar // jar file containing the java doc files
//archives javadocJar // jar file containing the source files
}


/**
* Release
*/
application {
mainClassName = 'org.polypheny.db.PolyphenyDb'
applicationName = 'Polypheny-DB'
//applicationDefaultJvmArgs = ["-Dlog4j.configuration=config/log4j.properties"]
}
startScripts {
defaultJvmOpts += ['-Xmx6g', '-XX:+HeapDumpOnOutOfMemoryError', '-Dfile.encoding=UTF-8']
}

static def buildTime() {
Expand Down
Loading