Skip to content

Commit

Permalink
Spark: Use Spark's ANTLR version and exclude it from runtime jars (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
pan3793 authored Feb 20, 2022
1 parent 37c6c06 commit 8752e77
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 202 deletions.
6 changes: 1 addition & 5 deletions spark/v3.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ project(":iceberg-spark:iceberg-spark3-extensions") {
testImplementation "org.apache.avro:avro"

// Required because we remove antlr plugin dependencies from the compile configuration, see note above
// We shade this in Spark3 Runtime to avoid issues with Spark's Antlr Runtime
runtimeOnly "org.antlr:antlr4-runtime:4.7.1"
antlr "org.antlr:antlr4:4.7.1"
}
Expand Down Expand Up @@ -189,8 +188,7 @@ project(':iceberg-spark:iceberg-spark3-runtime') {
exclude group: 'com.ibm.icu'
exclude group: 'org.glassfish'
exclude group: 'org.abego.treelayout'
exclude group: 'org.antlr', module: 'ST4'
exclude group: 'org.antlr', module: 'antlr4'
exclude group: 'org.antlr'
}
}

Expand Down Expand Up @@ -250,8 +248,6 @@ project(':iceberg-spark:iceberg-spark3-runtime') {
relocate 'org.apache.arrow', 'org.apache.iceberg.shaded.org.apache.arrow'
relocate 'com.carrotsearch', 'org.apache.iceberg.shaded.com.carrotsearch'
relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
// relocate Antlr runtime and related deps to shade Iceberg specific version
relocate 'org.antlr.v4', 'org.apache.iceberg.shaded.org.antlr.v4'
relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'

classifier null
Expand Down
61 changes: 0 additions & 61 deletions spark/v3.0/spark-runtime/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -619,64 +619,3 @@ This binary includes code from Apache Commons.
Copyright: 2020 The Apache Software Foundation
Home page: https://commons.apache.org/
License: https://www.apache.org/licenses/LICENSE-2.0

--------------------------------------------------------------------------------

This binary artifact contains code from ANTLR.

Copyright: 2012-2017 The ANTLR Project
Home page: https://github.com/antlr/antlr4
License: https://github.com/antlr/antlr4/blob/master/LICENSE.txt (BSD 3-clause)

License text:

| [The "BSD 3-clause license"]
| Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions
| are met:
| 1. Redistributions of source code must retain the above copyright
| notice, this list of conditions and the following disclaimer.
| 2. Redistributions in binary form must reproduce the above copyright
| notice, this list of conditions and the following disclaimer in the
| documentation and/or other materials provided with the distribution.
| 3. Neither the name of the copyright holder nor the names of its contributors
| may be used to endorse or promote products derived from this software
| without specific prior written permission.

| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
| =====
|
| MIT License for codepointat.js from https://git.io/codepointat
| MIT License for fromcodepoint.js from https://git.io/vDW1m
|
| Copyright Mathias Bynens <https://mathiasbynens.be/>
|
| 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.
10 changes: 3 additions & 7 deletions spark/v3.1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ project(":iceberg-spark:iceberg-spark-extensions-3.1_2.12") {
testImplementation "org.apache.avro:avro"

// Required because we remove antlr plugin dependencies from the compile configuration, see note above
// We shade this in Spark3 Runtime to avoid issues with Spark's Antlr Runtime
runtimeOnly "org.antlr:antlr4-runtime:4.7.1"
antlr "org.antlr:antlr4:4.7.1"
runtimeOnly "org.antlr:antlr4-runtime:4.8"
antlr "org.antlr:antlr4:4.8"
}

generateGrammarSource {
Expand Down Expand Up @@ -189,8 +188,7 @@ project(':iceberg-spark:iceberg-spark-runtime-3.1_2.12') {
exclude group: 'com.ibm.icu'
exclude group: 'org.glassfish'
exclude group: 'org.abego.treelayout'
exclude group: 'org.antlr', module: 'ST4'
exclude group: 'org.antlr', module: 'antlr4'
exclude group: 'org.antlr'
}
}

Expand Down Expand Up @@ -250,8 +248,6 @@ project(':iceberg-spark:iceberg-spark-runtime-3.1_2.12') {
relocate 'org.apache.arrow', 'org.apache.iceberg.shaded.org.apache.arrow'
relocate 'com.carrotsearch', 'org.apache.iceberg.shaded.com.carrotsearch'
relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
// relocate Antlr runtime and related deps to shade Iceberg specific version
relocate 'org.antlr.v4', 'org.apache.iceberg.shaded.org.antlr.v4'
relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'

classifier null
Expand Down
61 changes: 0 additions & 61 deletions spark/v3.1/spark-runtime/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -619,64 +619,3 @@ This binary includes code from Apache Commons.
Copyright: 2020 The Apache Software Foundation
Home page: https://commons.apache.org/
License: https://www.apache.org/licenses/LICENSE-2.0

--------------------------------------------------------------------------------

This binary artifact contains code from ANTLR.

Copyright: 2012-2017 The ANTLR Project
Home page: https://github.com/antlr/antlr4
License: https://github.com/antlr/antlr4/blob/master/LICENSE.txt (BSD 3-clause)

License text:

| [The "BSD 3-clause license"]
| Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions
| are met:
| 1. Redistributions of source code must retain the above copyright
| notice, this list of conditions and the following disclaimer.
| 2. Redistributions in binary form must reproduce the above copyright
| notice, this list of conditions and the following disclaimer in the
| documentation and/or other materials provided with the distribution.
| 3. Neither the name of the copyright holder nor the names of its contributors
| may be used to endorse or promote products derived from this software
| without specific prior written permission.

| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
| =====
|
| MIT License for codepointat.js from https://git.io/codepointat
| MIT License for fromcodepoint.js from https://git.io/vDW1m
|
| Copyright Mathias Bynens <https://mathiasbynens.be/>
|
| 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.
10 changes: 3 additions & 7 deletions spark/v3.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ project(":iceberg-spark:iceberg-spark-extensions-${sparkMajorVersion}_${scalaVer
testImplementation "org.apache.avro:avro"

// Required because we remove antlr plugin dependencies from the compile configuration, see note above
// We shade this in Spark3 Runtime to avoid issues with Spark's Antlr Runtime
runtimeOnly "org.antlr:antlr4-runtime:4.7.1"
antlr "org.antlr:antlr4:4.7.1"
runtimeOnly "org.antlr:antlr4-runtime:4.8"
antlr "org.antlr:antlr4:4.8"
}

generateGrammarSource {
Expand Down Expand Up @@ -194,8 +193,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
exclude group: 'com.ibm.icu'
exclude group: 'org.glassfish'
exclude group: 'org.abego.treelayout'
exclude group: 'org.antlr', module: 'ST4'
exclude group: 'org.antlr', module: 'antlr4'
exclude group: 'org.antlr'
}
}

Expand Down Expand Up @@ -255,8 +253,6 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
relocate 'org.apache.arrow', 'org.apache.iceberg.shaded.org.apache.arrow'
relocate 'com.carrotsearch', 'org.apache.iceberg.shaded.com.carrotsearch'
relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
// relocate Antlr runtime and related deps to shade Iceberg specific version
relocate 'org.antlr.v4', 'org.apache.iceberg.shaded.org.antlr.v4'
relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'

classifier null
Expand Down
61 changes: 0 additions & 61 deletions spark/v3.2/spark-runtime/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -619,64 +619,3 @@ This binary includes code from Apache Commons.
Copyright: 2020 The Apache Software Foundation
Home page: https://commons.apache.org/
License: https://www.apache.org/licenses/LICENSE-2.0

--------------------------------------------------------------------------------

This binary artifact contains code from ANTLR.

Copyright: 2012-2017 The ANTLR Project
Home page: https://github.com/antlr/antlr4
License: https://github.com/antlr/antlr4/blob/master/LICENSE.txt (BSD 3-clause)

License text:

| [The "BSD 3-clause license"]
| Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions
| are met:
| 1. Redistributions of source code must retain the above copyright
| notice, this list of conditions and the following disclaimer.
| 2. Redistributions in binary form must reproduce the above copyright
| notice, this list of conditions and the following disclaimer in the
| documentation and/or other materials provided with the distribution.
| 3. Neither the name of the copyright holder nor the names of its contributors
| may be used to endorse or promote products derived from this software
| without specific prior written permission.

| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
| =====
|
| MIT License for codepointat.js from https://git.io/codepointat
| MIT License for fromcodepoint.js from https://git.io/vDW1m
|
| Copyright Mathias Bynens <https://mathiasbynens.be/>
|
| 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.

0 comments on commit 8752e77

Please sign in to comment.