Skip to content
Draft
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
190 changes: 190 additions & 0 deletions plugins/iceberg-metadata-catalog/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

apply plugin: 'opensearch.opensearchplugin'

opensearchplugin {
description = 'Apache Iceberg metadata catalog plugin: publishes OpenSearch index data to S3 Tables'
classname = 'org.opensearch.plugin.catalog.iceberg.IcebergCatalogPlugin'
}

dependencies {

// Iceberg
api "org.apache.iceberg:iceberg-api:1.6.1"
api "org.apache.iceberg:iceberg-core:1.6.1"
api("org.apache.iceberg:iceberg-aws:1.6.1") {
exclude group: 'org.apache.iceberg', module: 'iceberg-bundled-guava'
}

// Avro is required by iceberg-core's PartitionData (implements org.apache.avro.generic.IndexedRecord).
// Any code path that constructs a partitioned DataFile triggers Avro class loading. We pull it in
// explicitly so partitioned table writes work; we do not use Avro as a serialization format.
// commons-compress is declared as a compile-scope transitive by avro itself.
runtimeOnly "org.apache.avro:avro:1.11.1"
runtimeOnly "org.apache.commons:commons-compress:${versions.commonscompress}"

// AWS SDK v2 — core + S3 + Apache HTTP client
api "software.amazon.awssdk:s3:${versions.aws}"
api "software.amazon.awssdk:apache-client:${versions.aws}"
api "software.amazon.awssdk:sdk-core:${versions.aws}"
api "software.amazon.awssdk:aws-core:${versions.aws}"
api "software.amazon.awssdk:auth:${versions.aws}"
api "software.amazon.awssdk:identity-spi:${versions.aws}"
api "software.amazon.awssdk:http-client-spi:${versions.aws}"
api "software.amazon.awssdk:regions:${versions.aws}"
api "software.amazon.awssdk:utils:${versions.aws}"
api "software.amazon.awssdk:annotations:${versions.aws}"
api "software.amazon.awssdk:endpoints-spi:${versions.aws}"
api "software.amazon.awssdk:metrics-spi:${versions.aws}"

// STS is used from main code by CredentialsBuilder (IRSA + assume-role paths).
api "software.amazon.awssdk:sts:${versions.aws}"

// ============================================================================
// Runtime-only
// ============================================================================

// AWS SDK v2 runtime modules — signing, retries, protocols, checksums, auth wiring.
runtimeOnly "software.amazon.awssdk:http-auth:${versions.aws}"
runtimeOnly "software.amazon.awssdk:http-auth-aws:${versions.aws}"
runtimeOnly "software.amazon.awssdk:http-auth-spi:${versions.aws}"
runtimeOnly "software.amazon.awssdk:retries:${versions.aws}"
runtimeOnly "software.amazon.awssdk:retries-spi:${versions.aws}"
runtimeOnly "software.amazon.awssdk:checksums:${versions.aws}"
runtimeOnly "software.amazon.awssdk:checksums-spi:${versions.aws}"
runtimeOnly "software.amazon.awssdk:profiles:${versions.aws}"
runtimeOnly "software.amazon.awssdk:json-utils:${versions.aws}"
runtimeOnly "software.amazon.awssdk:protocol-core:${versions.aws}"
runtimeOnly "software.amazon.awssdk:aws-json-protocol:${versions.aws}"
runtimeOnly "software.amazon.awssdk:aws-xml-protocol:${versions.aws}"
runtimeOnly "software.amazon.awssdk:aws-query-protocol:${versions.aws}"
runtimeOnly "software.amazon.awssdk:signer:${versions.aws}"
runtimeOnly "software.amazon.awssdk:third-party-jackson-core:${versions.aws}"

// Apache HTTP transitives used by apache-client at runtime.
runtimeOnly "org.apache.httpcomponents:httpclient:${versions.httpclient}"
runtimeOnly "org.apache.httpcomponents:httpcore:${versions.httpcore}"
runtimeOnly "commons-codec:commons-codec:${versions.commonscodec}"
runtimeOnly "commons-logging:commons-logging:${versions.commonslogging}"

// Jackson (iceberg-core and SDK both use it at runtime).
runtimeOnly "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
runtimeOnly "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}"
runtimeOnly "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson_annotations}"

// slf4j (iceberg uses slf4j for logging at runtime).
runtimeOnly "org.slf4j:slf4j-api:${versions.slf4j}"

// Iceberg runtime modules.
runtimeOnly "org.apache.iceberg:iceberg-common:1.6.1"
runtimeOnly("org.apache.iceberg:iceberg-bundled-guava:1.6.1") {
exclude group: 'org.apache.hadoop'
exclude group: 'org.slf4j'
}
runtimeOnly "com.github.ben-manes.caffeine:caffeine:2.9.3"
}

tasks.named("dependencyLicenses").configure {
// Iceberg artifacts share a common LICENSE/NOTICE.
mapping from: /iceberg-.*/, to: 'iceberg'

// Jackson artifacts share a common LICENSE/NOTICE.
mapping from: /jackson-.*/, to: 'jackson'
}
tasks.named("thirdPartyAudit").configure {
ignoreMissingClasses()
ignoreViolations(
// Caffeine uses sun.misc.Unsafe for atomic field updates and array access.
'com.github.benmanes.caffeine.base.UnsafeAccess',
'com.github.benmanes.caffeine.cache.BaseMpscLinkedArrayQueue',
'com.github.benmanes.caffeine.cache.BBHeader$ReadAndWriteCounterRef',
'com.github.benmanes.caffeine.cache.BBHeader$ReadCounterRef',
'com.github.benmanes.caffeine.cache.BLCHeader$DrainStatusRef',
'com.github.benmanes.caffeine.cache.FD',
'com.github.benmanes.caffeine.cache.FDA',
'com.github.benmanes.caffeine.cache.FDAR',
'com.github.benmanes.caffeine.cache.FDAW',
'com.github.benmanes.caffeine.cache.FDAWR',
'com.github.benmanes.caffeine.cache.FDR',
'com.github.benmanes.caffeine.cache.FDW',
'com.github.benmanes.caffeine.cache.FDWR',
'com.github.benmanes.caffeine.cache.FS',
'com.github.benmanes.caffeine.cache.FSA',
'com.github.benmanes.caffeine.cache.FSAR',
'com.github.benmanes.caffeine.cache.FSAW',
'com.github.benmanes.caffeine.cache.FSAWR',
'com.github.benmanes.caffeine.cache.FSR',
'com.github.benmanes.caffeine.cache.FSW',
'com.github.benmanes.caffeine.cache.FSWR',
'com.github.benmanes.caffeine.cache.FW',
'com.github.benmanes.caffeine.cache.FWA',
'com.github.benmanes.caffeine.cache.FWAR',
'com.github.benmanes.caffeine.cache.FWAW',
'com.github.benmanes.caffeine.cache.FWAWR',
'com.github.benmanes.caffeine.cache.FWR',
'com.github.benmanes.caffeine.cache.FWW',
'com.github.benmanes.caffeine.cache.FWWR',
'com.github.benmanes.caffeine.cache.PD',
'com.github.benmanes.caffeine.cache.PDA',
'com.github.benmanes.caffeine.cache.PDAR',
'com.github.benmanes.caffeine.cache.PDAW',
'com.github.benmanes.caffeine.cache.PDAWR',
'com.github.benmanes.caffeine.cache.PDR',
'com.github.benmanes.caffeine.cache.PDW',
'com.github.benmanes.caffeine.cache.PDWR',
'com.github.benmanes.caffeine.cache.PS',
'com.github.benmanes.caffeine.cache.PSA',
'com.github.benmanes.caffeine.cache.PSAR',
'com.github.benmanes.caffeine.cache.PSAW',
'com.github.benmanes.caffeine.cache.PSAWR',
'com.github.benmanes.caffeine.cache.PSR',
'com.github.benmanes.caffeine.cache.PSW',
'com.github.benmanes.caffeine.cache.PSWR',
'com.github.benmanes.caffeine.cache.PW',
'com.github.benmanes.caffeine.cache.PWA',
'com.github.benmanes.caffeine.cache.PWAR',
'com.github.benmanes.caffeine.cache.PWAW',
'com.github.benmanes.caffeine.cache.PWAWR',
'com.github.benmanes.caffeine.cache.PWR',
'com.github.benmanes.caffeine.cache.PWW',
'com.github.benmanes.caffeine.cache.PWWR',
'com.github.benmanes.caffeine.cache.StripedBuffer',
'com.github.benmanes.caffeine.cache.UnsafeAccess',
'com.github.benmanes.caffeine.cache.UnsafeRefArrayAccess',
'com.github.benmanes.caffeine.SCQHeader$HeadAndTailRef',
'com.github.benmanes.caffeine.SingleConsumerQueue',
'com.github.benmanes.caffeine.SingleConsumerQueue$Node',

// Iceberg's relocated Guava uses sun.misc.Unsafe for atomics and byte array access.
'org.apache.iceberg.relocated.com.google.common.hash.LittleEndianByteArray$UnsafeByteArray',
'org.apache.iceberg.relocated.com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1',
'org.apache.iceberg.relocated.com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2',
'org.apache.iceberg.relocated.com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator',
'org.apache.iceberg.relocated.com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1',
'org.apache.iceberg.relocated.com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper',
'org.apache.iceberg.relocated.com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1',

// Avro uses sun.misc.Unsafe for reflective field access in its specific-record path.
// We don't use Avro as a serialization format; we need it on the classpath only because
// iceberg-core's PartitionData implements org.apache.avro.generic.IndexedRecord. None of
// the FieldAccessUnsafe paths are exercised by our code.
'org.apache.avro.reflect.FieldAccessUnsafe',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeBooleanField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeByteField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeCachedField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeCharField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeCustomEncodedField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeDoubleField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeFloatField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeIntField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeLongField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeObjectField',
'org.apache.avro.reflect.FieldAccessUnsafe$UnsafeShortField'
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d70dcb2d74df899972ac888f1b306ddd7e83bee3
Loading
Loading