From a60e978774d124f573b31cca7656c64dec5d54c5 Mon Sep 17 00:00:00 2001 From: Ralph Gasser Date: Mon, 26 Aug 2024 10:27:49 +0200 Subject: [PATCH] Cleans and updates dependencies. --- build.gradle | 4 +- gradle.properties | 37 ++++++------- vitrivr-engine-core/build.gradle | 2 +- .../engine/plugin/cottontaildb/Sandbox.kt | 52 ------------------- .../descriptors/AbstractDescriptorReader.kt | 7 +-- .../descriptors/CottontailDescriptorWriter.kt | 2 +- .../retrievable/RetrievableReader.kt | 10 ++-- .../retrievable/RetrievableWriter.kt | 3 +- vitrivr-engine-module-fes/build.gradle | 9 +--- vitrivr-engine-server/build.gradle | 4 +- 10 files changed, 36 insertions(+), 94 deletions(-) delete mode 100644 vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Sandbox.kt diff --git a/build.gradle b/build.gradle index e1d102112..31bcb8c51 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id 'org.jetbrains.kotlin.jvm' version "$version_kotlin" id 'org.jetbrains.kotlin.plugin.serialization' version "$version_kotlin" - id 'org.openapi.generator' version '7.4.0' - id "de.undercouch.download" version "5.4.0" + id 'org.openapi.generator' version '7.8.0' + id 'de.undercouch.download' version "5.6.0" id 'java-library' id 'idea' } diff --git a/gradle.properties b/gradle.properties index 90b5f8205..a66a1f5ec 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,29 +1,26 @@ version_boofcv=1.1.5 version_caffeine=3.1.8 -version_clikt=4.2.0 +version_clikt=4.2.2 version_commonsmath3=3.6.1 -version_cottontaildb=0.16.1 -version_javacv=1.5.9 -version_javalin=6.1.3 -version_javalinopenapi=6.1.3 -version_javalinssl=6.1.3 -version_jdbc_postgres=42.7.3 -version_jline=3.23.0 -version_junit=5.10.1 -version_junit_platform=1.10.1 -version_grpc=1.60.0 -version_kotlin=1.9.21 +version_cottontaildb=0.16.7 +version_javacv=1.5.10 +version_javalin=6.3.0 +version_jdbc_postgres=42.7.4 +version_jline=3.26.3 +version_junit=5.11.0 +version_junit_platform=1.11.0 +version_grpc=1.66.0 +version_kotlin=1.9.25 version_kotlinx_coroutines=1.7.3 version_kotlinx_serialization=1.6.2 -version_kotlinx_datetime=0.4.1 -version_kotlinlogging = 5.1.0 -version_log4j2=2.20.0 +version_kotlinx_datetime=0.6.1 +version_kotlinlogging = 7.0.0 +version_log4j2=2.23.1 version_metadataextractor=2.19.0 -version_okhttp3=4.12.0 version_picnic=0.7.0 -version_protobuf=3.25.1 -version_scrimage=4.1.1 -version_slf4j=2.0.9 +version_protobuf=4.27.3 +version_scrimage=4.2.0 +version_slf4j=2.0.16 version_jogl=2.3.2 version_joml=1.9.25 -version_ktor=2.3.6 +version_ktor=2.3.12 diff --git a/vitrivr-engine-core/build.gradle b/vitrivr-engine-core/build.gradle index c8093c8e9..a456d15fc 100755 --- a/vitrivr-engine-core/build.gradle +++ b/vitrivr-engine-core/build.gradle @@ -10,7 +10,7 @@ dependencies { /** dependencies for exif metadata extraction. */ implementation group: 'com.drewnoakes', name: 'metadata-extractor', version: version_metadataextractor - implementation group: 'io.javalin.community.openapi', name: 'javalin-openapi-plugin', version: version_javalinopenapi + implementation group: 'io.javalin.community.openapi', name: 'javalin-openapi-plugin', version: version_javalin /* Test Fixtures from Cottontail DB core. .*/ testFixturesImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: version_junit diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Sandbox.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Sandbox.kt deleted file mode 100644 index 2e7c6604a..000000000 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/Sandbox.kt +++ /dev/null @@ -1,52 +0,0 @@ -package org.vitrivr.engine.plugin.cottontaildb - -import io.grpc.ManagedChannel -import io.grpc.ManagedChannelBuilder -import org.vitrivr.cottontail.client.SimpleClient -import org.vitrivr.cottontail.client.language.basics.Direction -import org.vitrivr.cottontail.client.language.basics.Distances -import org.vitrivr.cottontail.client.language.basics.expression.Column -import org.vitrivr.cottontail.client.language.basics.expression.Literal -import org.vitrivr.cottontail.client.language.basics.predicate.Compare -import org.vitrivr.cottontail.client.language.dql.Query -import org.vitrivr.cottontail.core.database.Name -import org.vitrivr.cottontail.core.values.StringValue -import org.vitrivr.cottontail.core.values.UuidValue -import java.util.* - -object Sandbox { - - @JvmStatic - fun main(args: Array) { - - val channel: ManagedChannel = ManagedChannelBuilder.forAddress("127.0.0.1", 1865) - .enableFullStreamDecompression() - .usePlaintext() - .build() - - val client = SimpleClient(channel) - - - val query = Query(Name.EntityName.create("mvk", "descriptor_file")) - .select("*") - .where(Compare( - Column(Name.ColumnName.create("mvk", "descriptor_file", "path")), - Compare.Operator.EQUAL, - Literal(StringValue("Z:\\Datasets\\MarineVideoKit\\videos-optimized\\Tulamben2_Jun2022_0016.mp4"))), - ).limit(1000) - - - val query1 = Query(Name.EntityName.create("mvk-2", "retrievable")) - .select("*") - .where(Compare( - Column(Name.ColumnName.create("mvk-2", "retrievable", "retrievableid")), - Compare.Operator.EQUAL, - Literal(UuidValue(UUID.fromString("8ce4920f-a230-4a6d-8186-20dc029a03af")))), - ).limit(1000) - - val results = client.query(query1).forEach { - println(it) - } - } - -} diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/AbstractDescriptorReader.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/AbstractDescriptorReader.kt index 6f4b36ffc..1358fc5df 100644 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/AbstractDescriptorReader.kt +++ b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/AbstractDescriptorReader.kt @@ -3,6 +3,7 @@ package org.vitrivr.engine.plugin.cottontaildb.descriptors import io.grpc.StatusRuntimeException import org.vitrivr.cottontail.client.language.basics.expression.Column import org.vitrivr.cottontail.client.language.basics.expression.Literal +import org.vitrivr.cottontail.client.language.basics.expression.ValueList import org.vitrivr.cottontail.client.language.basics.predicate.Compare import org.vitrivr.cottontail.core.database.Name import org.vitrivr.cottontail.core.tuple.Tuple @@ -111,7 +112,7 @@ abstract class AbstractDescriptorReader>(final override val fi */ override fun getAll(descriptorIds: Iterable): Sequence { val query = org.vitrivr.cottontail.client.language.dql.Query(this.entityName) - .where(Compare(Column(this.entityName.column(DESCRIPTOR_ID_COLUMN_NAME)), Compare.Operator.IN, org.vitrivr.cottontail.client.language.basics.expression.List(descriptorIds.map { UuidValue(it) }.toTypedArray()))) + .where(Compare(Column(this.entityName.column(DESCRIPTOR_ID_COLUMN_NAME)), Compare.Operator.IN, ValueList(descriptorIds.map { UuidValue(it) }.toTypedArray()))) return try { val result = this.connection.client.query(query) result.asSequence().map { this.tupleToDescriptor(it) } @@ -129,7 +130,7 @@ abstract class AbstractDescriptorReader>(final override val fi */ override fun getAllForRetrievable(retrievableIds: Iterable): Sequence { val query = org.vitrivr.cottontail.client.language.dql.Query(this.entityName) - .where(Compare(Column(this.entityName.column(RETRIEVABLE_ID_COLUMN_NAME)), Compare.Operator.IN, org.vitrivr.cottontail.client.language.basics.expression.List(retrievableIds.map { UuidValue(it) }.toTypedArray()))) + .where(Compare(Column(this.entityName.column(RETRIEVABLE_ID_COLUMN_NAME)), Compare.Operator.IN, ValueList(retrievableIds.map { UuidValue(it) }.toTypedArray()))) return try { val result = this.connection.client.query(query) result.asSequence().map { this.tupleToDescriptor(it) } @@ -199,7 +200,7 @@ abstract class AbstractDescriptorReader>(final override val fi Compare( Column(entityName.column(RETRIEVABLE_ID_COLUMN_NAME)), Compare.Operator.IN, - org.vitrivr.cottontail.client.language.basics.expression.List(ids.map { UuidValue(it) }.toTypedArray()) + ValueList(ids.map { UuidValue(it) }.toTypedArray()) ) ) diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/CottontailDescriptorWriter.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/CottontailDescriptorWriter.kt index e7527e181..9b065ca86 100644 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/CottontailDescriptorWriter.kt +++ b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/descriptors/CottontailDescriptorWriter.kt @@ -167,7 +167,7 @@ open class CottontailDescriptorWriter>(final override val fiel Compare( Column(this.entityName.column(DESCRIPTOR_ID_COLUMN_NAME)), Compare.Operator.IN, - org.vitrivr.cottontail.client.language.basics.expression.List(ids.toTypedArray()) + org.vitrivr.cottontail.client.language.basics.expression.ValueList(ids.toTypedArray()) ) ) diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableReader.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableReader.kt index 45bba8690..b67e02394 100644 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableReader.kt +++ b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableReader.kt @@ -4,8 +4,8 @@ import io.github.oshai.kotlinlogging.KLogger import io.github.oshai.kotlinlogging.KotlinLogging import io.grpc.StatusRuntimeException import org.vitrivr.cottontail.client.language.basics.expression.Column -import org.vitrivr.cottontail.client.language.basics.expression.List import org.vitrivr.cottontail.client.language.basics.expression.Literal +import org.vitrivr.cottontail.client.language.basics.expression.ValueList import org.vitrivr.cottontail.client.language.basics.predicate.And import org.vitrivr.cottontail.client.language.basics.predicate.Compare import org.vitrivr.cottontail.client.language.dql.Query @@ -103,7 +103,7 @@ internal class RetrievableReader(override val connection: CottontailConnection) Compare( Column(this.entityName.column(RETRIEVABLE_ID_COLUMN_NAME)), Compare.Operator.IN, - List(ids.map { UuidValue(it) }.toTypedArray()) + ValueList(ids.map { UuidValue(it) }.toTypedArray()) ) ) return try { @@ -160,7 +160,7 @@ internal class RetrievableReader(override val connection: CottontailConnection) Compare( Column(Name.ColumnName.create(SUBJECT_ID_COLUMN_NAME)), Compare.Operator.IN, - List(subjectIds.map { UuidValue(it) }.toTypedArray()) + ValueList(subjectIds.map { UuidValue(it) }.toTypedArray()) ) } else { null @@ -169,7 +169,7 @@ internal class RetrievableReader(override val connection: CottontailConnection) Compare( Column(Name.ColumnName.create(PREDICATE_COLUMN_NAME)), Compare.Operator.IN, - List(predicates.map { StringValue(it) }.toTypedArray()) + ValueList(predicates.map { StringValue(it) }.toTypedArray()) ) } else { null @@ -178,7 +178,7 @@ internal class RetrievableReader(override val connection: CottontailConnection) Compare( Column(Name.ColumnName.create(OBJECT_ID_COLUMN_NAME)), Compare.Operator.IN, - List(objectIds.map { UuidValue(it) }.toTypedArray()) + ValueList(objectIds.map { UuidValue(it) }.toTypedArray()) ) } else { null diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableWriter.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableWriter.kt index c8145ab17..4ea6a9858 100644 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableWriter.kt +++ b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/retrievable/RetrievableWriter.kt @@ -5,6 +5,7 @@ import io.github.oshai.kotlinlogging.KotlinLogging import io.grpc.StatusRuntimeException import org.vitrivr.cottontail.client.language.basics.expression.Column import org.vitrivr.cottontail.client.language.basics.expression.Literal +import org.vitrivr.cottontail.client.language.basics.expression.ValueList import org.vitrivr.cottontail.client.language.basics.predicate.And import org.vitrivr.cottontail.client.language.basics.predicate.Compare import org.vitrivr.cottontail.client.language.dml.BatchInsert @@ -142,7 +143,7 @@ internal class RetrievableWriter(override val connection: CottontailConnection) Compare( Column(this.entityName.column(RETRIEVABLE_ID_COLUMN_NAME)), Compare.Operator.IN, - org.vitrivr.cottontail.client.language.basics.expression.List(ids.toTypedArray()) + ValueList(ids.toTypedArray()) ) ) diff --git a/vitrivr-engine-module-fes/build.gradle b/vitrivr-engine-module-fes/build.gradle index 2fb0683e1..2d37166c5 100644 --- a/vitrivr-engine-module-fes/build.gradle +++ b/vitrivr-engine-module-fes/build.gradle @@ -50,17 +50,12 @@ dependencies { /* vitrivr engine features dependency. */ implementation project(path: ':vitrivr-engine-core') - /** OKHttp3 Client */ - implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: version_okhttp3 - implementation group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: version_okhttp3 - - implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: version_kotlinx_coroutines - implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-serialization-json', version: version_kotlinx_serialization - + /* Ktor client. */ implementation group: 'io.ktor', name: 'ktor-client-content-negotiation', version: version_ktor implementation group: 'io.ktor', name: 'ktor-serialization-kotlinx-json', version: version_ktor implementation group: 'io.ktor', name: 'ktor-client-core', version: version_ktor implementation group: 'io.ktor', name: 'ktor-client-okhttp', version: version_ktor + /* Kotlinx */ implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-datetime', version: version_kotlinx_datetime } diff --git a/vitrivr-engine-server/build.gradle b/vitrivr-engine-server/build.gradle index 007186c30..654a8ca13 100644 --- a/vitrivr-engine-server/build.gradle +++ b/vitrivr-engine-server/build.gradle @@ -21,8 +21,8 @@ dependencies { /** Javalin */ implementation group: 'io.javalin', name: 'javalin', version: version_javalin - implementation group: 'io.javalin.community.openapi', name: 'javalin-openapi-plugin', version: version_javalinopenapi - implementation group: 'io.javalin.community.openapi', name: 'javalin-swagger-plugin', version: version_javalinssl + implementation group: 'io.javalin.community.openapi', name: 'javalin-openapi-plugin', version: version_javalin + implementation group: 'io.javalin.community.openapi', name: 'javalin-swagger-plugin', version: version_javalin implementation group: 'io.javalin.community.ssl', name: 'ssl-plugin', version: version_javalin /* Kapt. */