|
| 1 | +/* |
| 2 | + * SPDX-License-Identifier: Apache-2.0 |
| 3 | + * |
| 4 | + * The OpenSearch Contributors require contributions made to |
| 5 | + * this file be licensed under the Apache-2.0 license or a |
| 6 | + * compatible open source license. |
| 7 | + * |
| 8 | + * Modifications Copyright OpenSearch Contributors. See |
| 9 | + * GitHub history for details. |
| 10 | + */ |
| 11 | + |
| 12 | +apply plugin: 'opensearch.publish' |
| 13 | +apply plugin: 'opensearch.internal-cluster-test' |
| 14 | + |
| 15 | +opensearchplugin { |
| 16 | + description 'Arrow flight based Stream implementation' |
| 17 | + classname 'org.opensearch.arrow.flight.FlightStreamPlugin' |
| 18 | +} |
| 19 | + |
| 20 | +dependencies { |
| 21 | + implementation project(':libs:opensearch-arrow-spi') |
| 22 | + |
| 23 | + implementation "io.netty:netty-buffer:${versions.netty}" |
| 24 | + implementation "io.netty:netty-codec:${versions.netty}" |
| 25 | + implementation "io.netty:netty-codec-http:${versions.netty}" |
| 26 | + implementation "io.netty:netty-codec-http2:${versions.netty}" |
| 27 | + implementation "io.netty:netty-common:${versions.netty}" |
| 28 | + implementation "io.netty:netty-handler:${versions.netty}" |
| 29 | + implementation "io.netty:netty-resolver:${versions.netty}" |
| 30 | + implementation "io.netty:netty-transport:${versions.netty}" |
| 31 | + implementation "io.netty:netty-transport-native-unix-common:${versions.netty}" |
| 32 | + implementation "io.netty:netty-transport-classes-epoll:${versions.netty}" |
| 33 | + |
| 34 | + implementation 'org.checkerframework:checker-qual:3.44.0' |
| 35 | + implementation "org.apache.arrow:arrow-memory-core:${versions.arrow}" |
| 36 | + implementation "org.apache.arrow:arrow-memory-netty-buffer-patch:${versions.arrow}" |
| 37 | + implementation "org.apache.arrow:arrow-memory-netty:${versions.arrow}" |
| 38 | + |
| 39 | + runtimeOnly group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' |
| 40 | + compileOnly 'org.immutables:value:2.10.1' |
| 41 | + annotationProcessor 'org.immutables:value:2.10.1' |
| 42 | + implementation "org.apache.arrow:arrow-flight:${versions.arrow}" |
| 43 | + implementation "org.apache.arrow:flight-core:${versions.arrow}" |
| 44 | + implementation "io.grpc:grpc-api:${versions.grpc}" |
| 45 | + implementation "io.grpc:grpc-netty:${versions.grpc}" |
| 46 | + runtimeOnly "io.grpc:grpc-core:${versions.grpc}" |
| 47 | + implementation "io.grpc:grpc-stub:${versions.grpc}" |
| 48 | + runtimeOnly "io.grpc:grpc-all:${versions.grpc}" |
| 49 | + runtimeOnly "io.grpc:grpc-protobuf:${versions.grpc}" |
| 50 | + runtimeOnly "io.grpc:grpc-protobuf-lite:${versions.grpc}" |
| 51 | + runtimeOnly 'io.perfmark:perfmark-api:0.27.0' |
| 52 | + runtimeOnly "com.google.guava:failureaccess:1.0.1" |
| 53 | + compileOnly "com.google.errorprone:error_prone_annotations:2.31.0" |
| 54 | + runtimeOnly('com.google.guava:guava:33.3.1-jre') { |
| 55 | + attributes { |
| 56 | + attribute(Attribute.of('org.gradle.jvm.environment', String), 'standard-jvm') |
| 57 | + } |
| 58 | + } |
| 59 | + runtimeOnly 'org.apache.parquet:parquet-arrow:1.13.1' |
| 60 | +} |
| 61 | + |
| 62 | +tasks.named('test').configure { |
| 63 | + jacoco { |
| 64 | + excludes = ['org/apache/arrow/flight/**'] |
| 65 | + } |
| 66 | +} |
| 67 | + |
| 68 | +tasks.named('forbiddenApisMain').configure { |
| 69 | + replaceSignatureFiles 'jdk-signatures' |
| 70 | + |
| 71 | + excludes = [ |
| 72 | + 'org/apache/arrow/flight/OSFlightServer$Builder.class', |
| 73 | + 'org/apache/arrow/flight/OSFlightClient$Builder.class', |
| 74 | + 'org/opensearch/flight/bootstrap/server/ServerConfig$Netty4Configs.class', |
| 75 | + 'org/opensearch/flight/bootstrap/server/ServerConfig.class', |
| 76 | + 'org/opensearch/flight/bootstrap/tls/DefaultSslContextProvider.class', |
| 77 | + 'org/apache/arrow/flight/OpenSearchFlightClient$Builder.class' |
| 78 | + ] |
| 79 | +} |
| 80 | + |
| 81 | +tasks.named('thirdPartyAudit').configure { |
| 82 | + ignoreMissingClasses( |
| 83 | + 'com.google.gson.stream.JsonReader', |
| 84 | + 'com.google.gson.stream.JsonToken', |
| 85 | + 'com.google.protobuf.util.Timestamps', |
| 86 | + 'com.google.rpc.Status', |
| 87 | + 'com.google.rpc.Status$Builder', |
| 88 | + 'org.apache.parquet.schema.GroupType', |
| 89 | + // Parquet Schema classes |
| 90 | + 'org.apache.parquet.schema.LogicalTypeAnnotation', |
| 91 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$DateLogicalTypeAnnotation', |
| 92 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$DecimalLogicalTypeAnnotation', |
| 93 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$IntLogicalTypeAnnotation', |
| 94 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$IntervalLogicalTypeAnnotation', |
| 95 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$ListLogicalTypeAnnotation', |
| 96 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$LogicalTypeAnnotationVisitor', |
| 97 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$StringLogicalTypeAnnotation', |
| 98 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$TimeLogicalTypeAnnotation', |
| 99 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$TimeUnit', |
| 100 | + 'org.apache.parquet.schema.LogicalTypeAnnotation$TimestampLogicalTypeAnnotation', |
| 101 | + 'org.apache.parquet.schema.MessageType', |
| 102 | + 'org.apache.parquet.schema.OriginalType', |
| 103 | + 'org.apache.parquet.schema.PrimitiveType', |
| 104 | + 'org.apache.parquet.schema.PrimitiveType$PrimitiveTypeName', |
| 105 | + 'org.apache.parquet.schema.PrimitiveType$PrimitiveTypeNameConverter', |
| 106 | + 'org.apache.parquet.schema.Type', |
| 107 | + 'org.apache.parquet.schema.Type$Repetition', |
| 108 | + 'org.apache.parquet.schema.Types', |
| 109 | + 'org.apache.parquet.schema.Types$BaseListBuilder', |
| 110 | + 'org.apache.parquet.schema.Types$GroupBuilder', |
| 111 | + 'org.apache.parquet.schema.Types$ListBuilder', |
| 112 | + 'org.apache.parquet.schema.Types$PrimitiveBuilder', |
| 113 | + |
| 114 | + 'com.aayushatharva.brotli4j.Brotli4jLoader', |
| 115 | + 'com.aayushatharva.brotli4j.decoder.DecoderJNI$Status', |
| 116 | + 'com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper', |
| 117 | + 'com.aayushatharva.brotli4j.encoder.BrotliEncoderChannel', |
| 118 | + 'com.aayushatharva.brotli4j.encoder.Encoder$Mode', |
| 119 | + 'com.aayushatharva.brotli4j.encoder.Encoder$Parameters', |
| 120 | + // classes are missing |
| 121 | + |
| 122 | + // from io.netty.logging.CommonsLoggerFactory (netty) |
| 123 | + 'org.apache.commons.logging.Log', |
| 124 | + 'org.apache.commons.logging.LogFactory', |
| 125 | + |
| 126 | + // from Log4j (deliberate, Netty will fallback to Log4j 2) |
| 127 | + 'org.apache.log4j.Level', |
| 128 | + 'org.apache.log4j.Logger', |
| 129 | + |
| 130 | + // from io.netty.handler.ssl.OpenSslEngine (netty) |
| 131 | + 'io.netty.internal.tcnative.Buffer', |
| 132 | + 'io.netty.internal.tcnative.CertificateCompressionAlgo', |
| 133 | + 'io.netty.internal.tcnative.Library', |
| 134 | + 'io.netty.internal.tcnative.SSL', |
| 135 | + 'io.netty.internal.tcnative.SSLContext', |
| 136 | + 'io.netty.internal.tcnative.SSLPrivateKeyMethod', |
| 137 | + |
| 138 | + // from io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator (netty) |
| 139 | + 'org.bouncycastle.cert.X509v3CertificateBuilder', |
| 140 | + 'org.bouncycastle.cert.jcajce.JcaX509CertificateConverter', |
| 141 | + 'org.bouncycastle.operator.jcajce.JcaContentSignerBuilder', |
| 142 | + 'org.bouncycastle.openssl.PEMEncryptedKeyPair', |
| 143 | + 'org.bouncycastle.openssl.PEMParser', |
| 144 | + 'org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter', |
| 145 | + 'org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8DecryptorProviderBuilder', |
| 146 | + 'org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder', |
| 147 | + 'org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo', |
| 148 | + |
| 149 | + // from io.netty.handler.ssl.JettyNpnSslEngine (netty) |
| 150 | + 'org.eclipse.jetty.npn.NextProtoNego$ClientProvider', |
| 151 | + 'org.eclipse.jetty.npn.NextProtoNego$ServerProvider', |
| 152 | + 'org.eclipse.jetty.npn.NextProtoNego', |
| 153 | + |
| 154 | + // from io.netty.handler.codec.marshalling.ChannelBufferByteInput (netty) |
| 155 | + 'org.jboss.marshalling.ByteInput', |
| 156 | + |
| 157 | + // from io.netty.handler.codec.marshalling.ChannelBufferByteOutput (netty) |
| 158 | + 'org.jboss.marshalling.ByteOutput', |
| 159 | + |
| 160 | + // from io.netty.handler.codec.marshalling.CompatibleMarshallingEncoder (netty) |
| 161 | + 'org.jboss.marshalling.Marshaller', |
| 162 | + |
| 163 | + // from io.netty.handler.codec.marshalling.ContextBoundUnmarshallerProvider (netty) |
| 164 | + 'org.jboss.marshalling.MarshallerFactory', |
| 165 | + 'org.jboss.marshalling.MarshallingConfiguration', |
| 166 | + 'org.jboss.marshalling.Unmarshaller', |
| 167 | + |
| 168 | + 'com.google.protobuf.nano.CodedOutputByteBufferNano', |
| 169 | + 'com.google.protobuf.nano.MessageNano', |
| 170 | + 'com.ning.compress.BufferRecycler', |
| 171 | + 'com.ning.compress.lzf.ChunkDecoder', |
| 172 | + 'com.ning.compress.lzf.ChunkEncoder', |
| 173 | + 'com.ning.compress.lzf.LZFChunk', |
| 174 | + 'com.ning.compress.lzf.LZFEncoder', |
| 175 | + 'com.ning.compress.lzf.util.ChunkDecoderFactory', |
| 176 | + 'com.ning.compress.lzf.util.ChunkEncoderFactory', |
| 177 | + 'lzma.sdk.lzma.Encoder', |
| 178 | + 'net.jpountz.lz4.LZ4Compressor', |
| 179 | + 'net.jpountz.lz4.LZ4Factory', |
| 180 | + 'net.jpountz.lz4.LZ4FastDecompressor', |
| 181 | + 'net.jpountz.xxhash.XXHash32', |
| 182 | + 'net.jpountz.xxhash.XXHashFactory', |
| 183 | + 'io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod', |
| 184 | + 'io.netty.internal.tcnative.AsyncTask', |
| 185 | + 'io.netty.internal.tcnative.CertificateCallback', |
| 186 | + 'io.netty.internal.tcnative.CertificateVerifier', |
| 187 | + 'io.netty.internal.tcnative.ResultCallback', |
| 188 | + 'io.netty.internal.tcnative.SessionTicketKey', |
| 189 | + 'io.netty.internal.tcnative.SniHostNameMatcher', |
| 190 | + 'io.netty.internal.tcnative.SSL', |
| 191 | + 'io.netty.internal.tcnative.SSLSession', |
| 192 | + 'io.netty.internal.tcnative.SSLSessionCache', |
| 193 | + 'org.eclipse.jetty.alpn.ALPN$ClientProvider', |
| 194 | + 'org.eclipse.jetty.alpn.ALPN$ServerProvider', |
| 195 | + 'org.eclipse.jetty.alpn.ALPN', |
| 196 | + |
| 197 | + 'org.conscrypt.AllocatedBuffer', |
| 198 | + 'org.conscrypt.BufferAllocator', |
| 199 | + 'org.conscrypt.Conscrypt', |
| 200 | + 'org.conscrypt.HandshakeListener', |
| 201 | + |
| 202 | + 'reactor.blockhound.BlockHound$Builder', |
| 203 | + 'reactor.blockhound.integration.BlockHoundIntegration' |
| 204 | + ) |
| 205 | + ignoreViolations( |
| 206 | + // Guava internal classes |
| 207 | + 'com.google.common.cache.Striped64', |
| 208 | + 'com.google.common.cache.Striped64$1', |
| 209 | + 'com.google.common.cache.Striped64$Cell', |
| 210 | + 'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray', |
| 211 | + 'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1', |
| 212 | + 'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2', |
| 213 | + 'com.google.common.hash.Striped64', |
| 214 | + 'com.google.common.hash.Striped64$1', |
| 215 | + 'com.google.common.hash.Striped64$Cell', |
| 216 | + 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator', |
| 217 | + 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1', |
| 218 | + 'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper', |
| 219 | + 'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1', |
| 220 | + |
| 221 | + // Arrow memory classes |
| 222 | + 'org.apache.arrow.memory.util.MemoryUtil', |
| 223 | + 'org.apache.arrow.memory.util.MemoryUtil$1', |
| 224 | + |
| 225 | + 'io.netty.util.internal.PlatformDependent0', |
| 226 | + 'io.netty.util.internal.PlatformDependent0$1', |
| 227 | + 'io.netty.util.internal.PlatformDependent0$2', |
| 228 | + 'io.netty.util.internal.PlatformDependent0$3', |
| 229 | + 'io.netty.util.internal.PlatformDependent0$4', |
| 230 | + 'io.netty.util.internal.PlatformDependent0$6', |
| 231 | + 'io.netty.util.internal.shaded.org.jctools.queues.BaseLinkedQueueConsumerNodeRef', |
| 232 | + 'io.netty.util.internal.shaded.org.jctools.queues.BaseLinkedQueueProducerNodeRef', |
| 233 | + 'io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueColdProducerFields', |
| 234 | + 'io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields', |
| 235 | + 'io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields', |
| 236 | + 'io.netty.util.internal.shaded.org.jctools.queues.LinkedQueueNode', |
| 237 | + 'io.netty.util.internal.shaded.org.jctools.queues.MpmcArrayQueueConsumerIndexField', |
| 238 | + 'io.netty.util.internal.shaded.org.jctools.queues.MpmcArrayQueueProducerIndexField', |
| 239 | + 'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueConsumerIndexField', |
| 240 | + 'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerIndexField', |
| 241 | + 'io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerLimitField', |
| 242 | + 'io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueConsumerIndexField', |
| 243 | + 'io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerIndexField', |
| 244 | + 'io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerLimitField', |
| 245 | + 'io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess', |
| 246 | + 'io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess', |
| 247 | + 'io.netty.util.internal.shaded.org.jctools.util.UnsafeLongArrayAccess', |
| 248 | + 'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator', |
| 249 | + 'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$1', |
| 250 | + 'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$2', |
| 251 | + 'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$3', |
| 252 | + 'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$4', |
| 253 | + 'io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$5' |
| 254 | + ) |
| 255 | +} |
| 256 | + |
| 257 | +tasks.named("dependencyLicenses").configure { |
| 258 | + mapping from: /netty-.*/, to: 'netty' |
| 259 | +} |
0 commit comments