Repository navigation
[chore](build) Add native MongoDB client dependencies #70249
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
Merged
Gabriel39
merged 2 commits into
apache:master
from
Gabriel39:dev/mongodb-native-dependencies
Nov 6, 2026
+473
−0
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,184 @@ | ||
| The MongoDB C Driver uses third-party code distributed under different licenses. | ||
|
|
||
| License notice for uthash | ||
| ------------------------------------------------------------------------------- | ||
|
|
||
| Copyright (c) 2003-2021, Troy D. Hanson http://troydhanson.github.com/uthash/ | ||
| All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
| TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
| PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | ||
| OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| License notice for common-b64.c | ||
| ------------------------------------------------------------------------------- | ||
|
|
||
| ISC License | ||
|
|
||
| Copyright: 1996, 1998 Internet Software Consortium | ||
| 1995 International Business Machines, Inc. | ||
|
|
||
| Permission to use, copy, modify, and/or distribute this software for any | ||
| purpose with or without fee is hereby granted, provided that the above | ||
| copyright notice and this permission notice appear in all copies. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
| REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
| FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
| INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
| OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
| PERFORMANCE OF THIS SOFTWARE. | ||
|
|
||
| Portions Copyright (c) 1995 by International Business Machines, Inc. | ||
|
|
||
| International Business Machines, Inc. (hereinafter called IBM) grants | ||
| permission under its copyrights to use, copy, modify, and distribute this | ||
| Software with or without fee, provided that the above copyright notice and | ||
| all paragraphs of this notice appear in all copies, and that the name of IBM | ||
| not be used in connection with the marketing of any product incorporating | ||
| the Software or modifications thereof, without specific, written prior | ||
| permission. | ||
|
|
||
| To the extent it has a right to do so, IBM grants an immunity from suit | ||
| under its patents, if any, for the use, sale or manufacture of products to | ||
| the extent that such products are used for performing Domain Name System | ||
| dynamic updates in TCP/IP networks by means of the Software. No immunity is | ||
| granted for any product per se or for any other function of any product. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, | ||
| INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
| PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, | ||
| DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING | ||
| OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN | ||
| IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
|
|
||
|
|
||
| License notice for mongoc.css_t | ||
| ------------------------------------------------------------------------------- | ||
|
|
||
| MIT License | ||
|
|
||
| Portions Copyright 2013 by Ignacy Sokolowski. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of this software and associated documentation files (the | ||
| "Software"), to deal in the Software without restriction, including | ||
| without limitation the rights to use, copy, modify, merge, publish, | ||
| distribute, sublicense, and/or sell copies of the Software, and to | ||
| permit persons to whom the Software is furnished to do so, subject to | ||
| the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be | ||
| included in all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
|
||
|
|
||
| License notice for zlib | ||
| ------------------------------------------------------------------------------- | ||
| /* zlib.h -- interface of the 'zlib' general purpose compression library | ||
| version 1.2.11, January 15th, 2017 | ||
|
|
||
| Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler | ||
|
|
||
| This software is provided 'as-is', without any express or implied | ||
| warranty. In no event will the authors be held liable for any damages | ||
| arising from the use of this software. | ||
|
|
||
| Permission is granted to anyone to use this software for any purpose, | ||
| including commercial applications, and to alter it and redistribute it | ||
| freely, subject to the following restrictions: | ||
|
|
||
| 1. The origin of this software must not be misrepresented; you must not | ||
| claim that you wrote the original software. If you use this software | ||
| in a product, an acknowledgment in the product documentation would be | ||
| appreciated but is not required. | ||
| 2. Altered source versions must be plainly marked as such, and must not be | ||
| misrepresented as being the original software. | ||
| 3. This notice may not be removed or altered from any source distribution. | ||
|
|
||
| Jean-loup Gailly Mark Adler | ||
| jloup@gzip.org madler@alumni.caltech.edu | ||
|
|
||
|
|
||
| The data format used by the zlib library is described by RFCs (Request for | ||
| Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 | ||
| (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). | ||
| */ | ||
|
|
||
| License notice for common-md5.c | ||
| ------------------------------------------------------------------------------- | ||
|
|
||
| ZLib License | ||
|
|
||
| Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. | ||
|
|
||
| This software is provided 'as-is', without any express or implied | ||
| warranty. In no event will the authors be held liable for any damages | ||
| arising from the use of this software. | ||
|
|
||
| Permission is granted to anyone to use this software for any purpose, | ||
| including commercial applications, and to alter it and redistribute it | ||
| freely, subject to the following restrictions: | ||
|
|
||
| 1. The origin of this software must not be misrepresented; you must not | ||
| claim that you wrote the original software. If you use this software | ||
| in a product, an acknowledgment in the product documentation would be | ||
| appreciated but is not required. | ||
| 2. Altered source versions must be plainly marked as such, and must not be | ||
| misrepresented as being the original software. | ||
| 3. This notice may not be removed or altered from any source distribution. | ||
|
|
||
| L. Peter Deutsch | ||
| ghost@aladdin.com | ||
|
|
||
| License notice for utf8proc | ||
| ------------------------------------------------------------------------------- | ||
|
|
||
| **utf8proc** is a software package originally developed | ||
| by Jan Behrens and the rest of the Public Software Group, who | ||
| deserve nearly all of the credit for this library, that is now maintained by the Julia-language developers. Like the original utf8proc, | ||
| whose copyright and license statements are reproduced below, all new | ||
| work on the utf8proc library is licensed under the [MIT "expat" | ||
| license](http://opensource.org/licenses/MIT): | ||
|
|
||
| *Copyright © 2014-2021 by Steven G. Johnson, Jiahao Chen, Tony Kelman, Jonas Fonseca, and other contributors listed in the git history.* | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a | ||
| copy of this software and associated documentation files (the "Software"), | ||
| to deal in the Software without restriction, including without limitation | ||
| the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| and/or sell copies of the Software, and to permit persons to whom the | ||
| Software is furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| DEALINGS IN THE SOFTWARE. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Native MongoDB client dependencies | ||
|
|
||
| This module prepares the Java dependencies for the native MongoDB connector. It | ||
| bundles the official synchronous driver, its core, BSON, and BSON record codec | ||
| at one version, using a module-local BOM so other connector plugins keep their | ||
| own dependencies. The archive also carries the Snappy and Zstandard Java providers | ||
| so FE metadata reads accept the same compression URI options as the native BE. | ||
| The FE host supplies logging APIs and bindings. | ||
|
|
||
| The dependency-only archive does not register a `ConnectorProvider` and cannot | ||
| create a MongoDB catalog. The FE build stages it as | ||
| `plugins/connector/mongodb.zip`, without unpacking it into an auto-loaded plugin | ||
| directory. A later connector implementation will add the provider and enable the | ||
| normal plugin deployment path. | ||
|
|
||
| The BE uses the MongoDB C Driver (`libmongoc` and `libbson`) built together by: | ||
|
|
||
| ```sh | ||
| bash thirdparty/build-thirdparty.sh mongo_c_driver | ||
| ``` | ||
|
|
||
| The native build produces PIC static archives with OpenSSL, Cyrus SASL, SRV DNS, | ||
| Snappy, zstd and zlib support. It reuses Doris-managed dependencies and the driver's | ||
| bundled utf8proc for SCRAM-SHA-256. It does not require the C++ driver, a BE JVM, | ||
| Reactive Streams, or client-side encryption libraries. The reader and BSON | ||
| `DataTypeSerDe` implementation are separate changes. The BE CMake targets `bson2` | ||
| and `mongoc2` expose the static headers, definitions and dependency closure; they | ||
| are not added to the common BE link set until a reader consumes them. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>org.apache.doris</groupId> | ||
| <artifactId>fe-connector</artifactId> | ||
| <version>${revision}</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
| <artifactId>fe-connector-mongodb</artifactId> | ||
| <packaging>jar</packaging> | ||
| <name>Doris FE Connector - MongoDB Dependencies</name> | ||
| <description>Client dependency bundle for the native MongoDB connector.</description> | ||
| <properties> | ||
| <mongodb.driver.version>5.14.0</mongodb.driver.version> | ||
| <!-- Override the older FE-wide pin to reject oversized Snappy allocations and fix stream handling. --> | ||
| <mongodb.snappy-java.version>1.1.10.10</mongodb.snappy-java.version> | ||
| <mongodb.zstd-jni.version>1.5.7-25</mongodb.zstd-jni.version> | ||
| </properties> | ||
| <dependencyManagement> | ||
| <dependencies> | ||
| <!-- Align the sync driver, core and BSON without changing other plugins' closures. --> | ||
| <dependency> | ||
| <groupId>org.mongodb</groupId> | ||
| <artifactId>mongodb-driver-bom</artifactId> | ||
| <version>${mongodb.driver.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.mongodb</groupId> | ||
| <artifactId>mongodb-driver-sync</artifactId> | ||
|
Gabriel39 marked this conversation as resolved.
Resolved
|
||
| </dependency> | ||
| <!-- URI compressors apply to FE metadata reads too; keep both client paths usable. --> | ||
| <dependency> | ||
| <groupId>org.xerial.snappy</groupId> | ||
| <artifactId>snappy-java</artifactId> | ||
| <version>${mongodb.snappy-java.version}</version> | ||
| <scope>runtime</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.github.luben</groupId> | ||
| <artifactId>zstd-jni</artifactId> | ||
| <version>${mongodb.zstd-jni.version}</version> | ||
| <scope>runtime</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| <build> | ||
| <finalName>doris-fe-connector-mongodb</finalName> | ||
| <plugins> | ||
| <plugin> | ||
| <artifactId>maven-assembly-plugin</artifactId> | ||
| <configuration> | ||
| <appendAssemblyId>false</appendAssemblyId> | ||
| <descriptors> | ||
| <descriptor>src/main/assembly/plugin-zip.xml</descriptor> | ||
| </descriptors> | ||
| </configuration> | ||
| <executions> | ||
| <execution> | ||
| <id>make-assembly</id> | ||
| <phase>package</phase> | ||
| <goals><goal>single</goal></goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.