From 5486c2abf8fea839d2ae62fc2bc55dd002cadd7b Mon Sep 17 00:00:00 2001 From: Jonathan Wei Date: Mon, 4 Mar 2019 18:45:22 -0800 Subject: [PATCH 01/19] Update LICENSE and NOTICE files (#7026) * Update LICENSE and NOTICE files * Update react-table version --- .gitignore | 1 + LABELS.md | 106 + LICENSE | 96 + LICENSE.BINARY | 1258 ++++++++ NOTICE | 147 +- NOTICE.BINARY | 2747 +++++++++++++++++ README.md | 1 + aws-common/pom.xml | 2 +- distribution/pom.xml | 21 + distribution/src/assembly/assembly.xml | 23 +- distribution/src/assembly/source-assembly.xml | 4 + .../generate-license-dependency-reports.py | 77 + docs/_bin/jar-notice-lister.py | 105 + docs/_bin/npm-license-helper.py | 73 + docs/_bin/web-console-dep-lister.py | 37 + .../quickstart/tutorial/hadoop/docker/LICENSE | 1331 -------- licenses/bin/@babel-runtime.MIT | 22 + licenses/bin/aether-connector-okhttp.EPL1 | 87 + licenses/bin/antlr-stringtemplate.BSD3 | 26 + licenses/bin/antlr.BSD3 | 9 + licenses/bin/antlr4-runtime.BSD3 | 26 + licenses/bin/array-includes.MIT | 21 + licenses/bin/asap.MIT | 21 + licenses/bin/asm.BSD3 | 27 + licenses/bin/axios.MIT | 19 + licenses/bin/bootstrap.MIT | 21 + licenses/bin/brace.MIT | 23 + licenses/bin/chain-function.MIT | 9 + licenses/bin/checkerframework-annotations.MIT | 1 + licenses/bin/classnames.MIT | 21 + licenses/bin/creative-commons-2.5.LICENSE | 60 + licenses/bin/css-loader.MIT | 20 + licenses/bin/d3-array.BSD3 | 27 + licenses/bin/define-properties.MIT | 21 + licenses/bin/dom-helpers.MIT | 21 + licenses/bin/dom4.MIT | 19 + licenses/bin/druid-console.MIT | 21 + licenses/bin/encoding.MIT | 16 + licenses/bin/es-abstract.MIT | 21 + licenses/bin/es-to-primitive.MIT | 22 + licenses/bin/es6-shim.MIT | 26 + licenses/bin/es7-shim.MIT | 22 + licenses/bin/fbjs.MIT | 20 + licenses/bin/font-awesome.MIT | 9 + licenses/bin/font-awesome.SIL-OFL | 94 + licenses/bin/function-bind.MIT | 20 + licenses/bin/has-symbols.MIT | 21 + licenses/bin/has.MIT | 22 + licenses/bin/history.MIT | 21 + licenses/bin/hjson.MIT | 21 + licenses/bin/hoist-non-react-statics.BSD3 | 29 + licenses/bin/icu4j.ICU | 385 +++ licenses/bin/invariant.MIT | 21 + licenses/bin/is-buffer.MIT | 21 + licenses/bin/is-callable.MIT | 22 + licenses/bin/is-date-object.MIT | 22 + licenses/bin/is-regex.MIT | 20 + licenses/bin/is-symbol.MIT | 22 + licenses/bin/isarray.MIT | 21 + licenses/bin/janino.BSD3 | 31 + licenses/bin/javax-el.CDDL11 | 362 +++ licenses/bin/javax.CDDL11 | 362 +++ licenses/bin/javax.activation.CDDL11 | 362 +++ licenses/bin/javax.el-api.CDDL11 | 362 +++ licenses/bin/javax.servlet-api.CDDL11 | 362 +++ licenses/bin/jcl-over-slf4j.IMT | 21 + licenses/bin/jcodings.MIT | 17 + licenses/bin/jersey.CDDL11 | 362 +++ licenses/bin/jline.BSD3 | 32 + licenses/bin/joni.MIT | 21 + licenses/bin/jopt-simple.MIT | 24 + licenses/bin/jsch.BSD3 | 30 + licenses/bin/jsr305.BSD3 | 8 + licenses/bin/jsr311-api.CDDL11 | 362 +++ licenses/bin/leveldbjni.BSD3 | 27 + licenses/bin/numeral.MIT | 22 + licenses/bin/object-assign.MIT | 21 + licenses/bin/object-keys.MIT | 21 + licenses/bin/os-browserify.MIT | 0 licenses/bin/paranamer.BSD3 | 29 + licenses/bin/path-to-regexp.MIT | 21 + licenses/bin/postgresql.BSD3 | 26 + licenses/bin/process.MIT | 22 + licenses/bin/promise.MIT | 19 + licenses/bin/prop-types.MIT | 21 + licenses/bin/protobuf-java.BSD3 | 42 + licenses/bin/pure-render-decorator.MIT | 21 + licenses/bin/react-ace.MIT | 22 + .../bin/react-addons-css-transition-group.MIT | 21 + licenses/bin/react-dom.MIT | 21 + licenses/bin/react-is.MIT | 21 + licenses/bin/react-router-dom.MIT | 37 + licenses/bin/react-router.MIT | 40 + licenses/bin/react-table.MIT | 21 + licenses/bin/react-transition-group.BSD3 | 30 + licenses/bin/react.MIT | 21 + licenses/bin/reactive-streams.CC0 | 8 + licenses/bin/resolve-pathname.MIT | 21 + licenses/bin/rhino.MPL2 | 375 +++ licenses/bin/scala-lang.BSD3 | 12 + licenses/bin/scheduler.MIT | 21 + licenses/bin/slf4j.MIT | 21 + licenses/bin/string-at.MIT | 22 + licenses/bin/style-loader.MIT | 20 + licenses/bin/tesla-aether.EPL1 | 87 + licenses/bin/tether.MIT | 8 + licenses/bin/ua-parser-js.MIT | 21 + licenses/bin/value-equal.MIT | 21 + licenses/bin/warning.MIT | 21 + licenses/bin/webpack.MIT | 20 + licenses/bin/xmlenc.BSD3 | 27 + licenses/bin/zstandard.BSD3 | 30 + licenses/bin/zstd-jni.BSD2 | 26 + licenses/src/datatables.BSD3 | 10 + licenses/src/jquery-ui.MIT | 26 + licenses/src/jquery.MIT | 10 + licenses/src/underscore.MIT | 22 + pom.xml | 6 + processing/pom.xml | 2 +- 119 files changed, 10104 insertions(+), 1426 deletions(-) create mode 100644 LABELS.md create mode 100644 LICENSE.BINARY create mode 100644 NOTICE.BINARY create mode 100755 docs/_bin/generate-license-dependency-reports.py create mode 100755 docs/_bin/jar-notice-lister.py create mode 100755 docs/_bin/npm-license-helper.py create mode 100755 docs/_bin/web-console-dep-lister.py delete mode 100644 examples/quickstart/tutorial/hadoop/docker/LICENSE create mode 100644 licenses/bin/@babel-runtime.MIT create mode 100644 licenses/bin/aether-connector-okhttp.EPL1 create mode 100644 licenses/bin/antlr-stringtemplate.BSD3 create mode 100644 licenses/bin/antlr.BSD3 create mode 100644 licenses/bin/antlr4-runtime.BSD3 create mode 100644 licenses/bin/array-includes.MIT create mode 100644 licenses/bin/asap.MIT create mode 100644 licenses/bin/asm.BSD3 create mode 100644 licenses/bin/axios.MIT create mode 100644 licenses/bin/bootstrap.MIT create mode 100644 licenses/bin/brace.MIT create mode 100644 licenses/bin/chain-function.MIT create mode 100644 licenses/bin/checkerframework-annotations.MIT create mode 100644 licenses/bin/classnames.MIT create mode 100644 licenses/bin/creative-commons-2.5.LICENSE create mode 100644 licenses/bin/css-loader.MIT create mode 100644 licenses/bin/d3-array.BSD3 create mode 100644 licenses/bin/define-properties.MIT create mode 100644 licenses/bin/dom-helpers.MIT create mode 100644 licenses/bin/dom4.MIT create mode 100644 licenses/bin/druid-console.MIT create mode 100644 licenses/bin/encoding.MIT create mode 100644 licenses/bin/es-abstract.MIT create mode 100644 licenses/bin/es-to-primitive.MIT create mode 100644 licenses/bin/es6-shim.MIT create mode 100644 licenses/bin/es7-shim.MIT create mode 100644 licenses/bin/fbjs.MIT create mode 100644 licenses/bin/font-awesome.MIT create mode 100644 licenses/bin/font-awesome.SIL-OFL create mode 100644 licenses/bin/function-bind.MIT create mode 100644 licenses/bin/has-symbols.MIT create mode 100644 licenses/bin/has.MIT create mode 100644 licenses/bin/history.MIT create mode 100644 licenses/bin/hjson.MIT create mode 100644 licenses/bin/hoist-non-react-statics.BSD3 create mode 100644 licenses/bin/icu4j.ICU create mode 100644 licenses/bin/invariant.MIT create mode 100644 licenses/bin/is-buffer.MIT create mode 100644 licenses/bin/is-callable.MIT create mode 100644 licenses/bin/is-date-object.MIT create mode 100644 licenses/bin/is-regex.MIT create mode 100644 licenses/bin/is-symbol.MIT create mode 100644 licenses/bin/isarray.MIT create mode 100644 licenses/bin/janino.BSD3 create mode 100644 licenses/bin/javax-el.CDDL11 create mode 100644 licenses/bin/javax.CDDL11 create mode 100644 licenses/bin/javax.activation.CDDL11 create mode 100644 licenses/bin/javax.el-api.CDDL11 create mode 100644 licenses/bin/javax.servlet-api.CDDL11 create mode 100644 licenses/bin/jcl-over-slf4j.IMT create mode 100644 licenses/bin/jcodings.MIT create mode 100644 licenses/bin/jersey.CDDL11 create mode 100644 licenses/bin/jline.BSD3 create mode 100644 licenses/bin/joni.MIT create mode 100644 licenses/bin/jopt-simple.MIT create mode 100644 licenses/bin/jsch.BSD3 create mode 100644 licenses/bin/jsr305.BSD3 create mode 100644 licenses/bin/jsr311-api.CDDL11 create mode 100644 licenses/bin/leveldbjni.BSD3 create mode 100644 licenses/bin/numeral.MIT create mode 100644 licenses/bin/object-assign.MIT create mode 100644 licenses/bin/object-keys.MIT create mode 100644 licenses/bin/os-browserify.MIT create mode 100644 licenses/bin/paranamer.BSD3 create mode 100644 licenses/bin/path-to-regexp.MIT create mode 100644 licenses/bin/postgresql.BSD3 create mode 100644 licenses/bin/process.MIT create mode 100644 licenses/bin/promise.MIT create mode 100644 licenses/bin/prop-types.MIT create mode 100644 licenses/bin/protobuf-java.BSD3 create mode 100644 licenses/bin/pure-render-decorator.MIT create mode 100644 licenses/bin/react-ace.MIT create mode 100644 licenses/bin/react-addons-css-transition-group.MIT create mode 100644 licenses/bin/react-dom.MIT create mode 100644 licenses/bin/react-is.MIT create mode 100644 licenses/bin/react-router-dom.MIT create mode 100644 licenses/bin/react-router.MIT create mode 100644 licenses/bin/react-table.MIT create mode 100644 licenses/bin/react-transition-group.BSD3 create mode 100644 licenses/bin/react.MIT create mode 100644 licenses/bin/reactive-streams.CC0 create mode 100644 licenses/bin/resolve-pathname.MIT create mode 100644 licenses/bin/rhino.MPL2 create mode 100644 licenses/bin/scala-lang.BSD3 create mode 100644 licenses/bin/scheduler.MIT create mode 100644 licenses/bin/slf4j.MIT create mode 100644 licenses/bin/string-at.MIT create mode 100644 licenses/bin/style-loader.MIT create mode 100644 licenses/bin/tesla-aether.EPL1 create mode 100644 licenses/bin/tether.MIT create mode 100644 licenses/bin/ua-parser-js.MIT create mode 100644 licenses/bin/value-equal.MIT create mode 100644 licenses/bin/warning.MIT create mode 100644 licenses/bin/webpack.MIT create mode 100644 licenses/bin/xmlenc.BSD3 create mode 100644 licenses/bin/zstandard.BSD3 create mode 100644 licenses/bin/zstd-jni.BSD2 create mode 100644 licenses/src/datatables.BSD3 create mode 100644 licenses/src/jquery-ui.MIT create mode 100644 licenses/src/jquery.MIT create mode 100644 licenses/src/underscore.MIT diff --git a/.gitignore b/.gitignore index df8a58abf2c..da1117c38d9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ target *.DS_Store _site dependency-reduced-pom.xml +README.BINARY diff --git a/LABELS.md b/LABELS.md new file mode 100644 index 00000000000..26866c4e7eb --- /dev/null +++ b/LABELS.md @@ -0,0 +1,106 @@ + +### Licensing Labels + +#### Binary-only + + This product bundles fonts from Font Awesome Free version 4.2.0, copyright Font Awesome, + which is available under the SIL OFL 1.1. For details, see licenses/bin/font-awesome.silofl + * https://fontawesome.com/ + + This product bundles JavaBeans Activation Framework version 1.2.0, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.activation.CDDL11 + * https://github.com/javaee/activation + * com.sun.activation:javax.activation + + This product bundles Jersey version 1.19.3, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jersey.CDDL11 + * https://jersey.github.io/ + * com.sun.jersey:jersey-core + * com.sun.jersey:jersey-server + * com.sun.jersey:jersey-servlet + * com.sun.jersey:contribs + + This product bundles Expression Language 3.0 API version 3.0.0., copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/el-spec + * javax.el:javax.el-api + + This product bundles Java Servlet API version 3.1.0, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/servlet-spec + * javax.servlet:javax.servlet-api + + This product bundles JSR311 API version 1.1.1, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jsr311-api.CDDL11 + * https://github.com/javaee/jsr311 + * javax.ws.rs:jsr311-api + + This product bundles Expression Language 3.0 version 3.0.0., copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/el-spec + * org.glassfish:javax.el + + This product bundles Jersey version 1.9, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jersey.CDDL11 + * https://jersey.github.io/ + * com.sun.jersey:jersey-client + * com.sun.jersey:jersey-core + + This product bundles JavaBeans Activation Framework version 1.1, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javaxCDDL11 + * https://github.com/javaee/activation + * javax.activation:activation + + This product bundles Java Servlet API version 2.5, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/servlet-spec + * javax.servlet:javax.servlet-api + + This product bundles JAXB version 2.2.2, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/jaxb-v2 + * javax.xml.bind:jaxb-api + + This product bundles stax-api version 1.0-2, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/ + * javax.xml.stream:stax-api + + This product bundles jsp-api version 2.1, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/javaee-jsp-api + * javax.servlet.jsp:jsp-api + + This product bundles Jersey version 1.15, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jersey.CDDL11 + * https://jersey.github.io/ + * com.sun.jersey:jersey-client + + This product bundles OkHttp Aether Connector version 0.0.9, copyright to original author or authors, + which is available under the Eclipse Public License 1.0. For details, see licenses/bin/aether-connector-okhttp.EPL1. + * https://github.com/takari/aether-connector-okhttp + * io.tesla.aether:aether-connector-okhttp + + This product bundles Tesla Aether version 0.0.5, copyright to original author or authors, + which is available under the Eclipse Public License 1.0. For details, see licenses/bin/tesla-aether.EPL1. + * https://github.com/tesla/tesla-aether + * io.tesla.aether:tesla-aether + + This product bundles Eclipse Aether libraries version 0.9.0.M2, copyright Sonatype, Inc., + which is available under the Eclipse Public License 1.0. For details, see licenses/bin/aether-core.EPL1. + * https://github.com/eclipse/aether-core + * org.eclipse.aether:aether-api + * org.eclipse.aether:aether-connector-file + * org.eclipse.aether:aether-impl + * org.eclipse.aether:aether-spi + * org.eclipse.aether:aether-util + + This product bundles Rhino version 1.7R5, copyright Mozilla and individual contributors., + which is available under the Mozilla Public License Version 2.0. For details, see licenses/bin/rhino.MPL2. + * https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino + * org.mozilla:rhino + + This product bundles "Java Concurrency In Practice" Book Annotations, copyright Brian Goetz and Tim Peierls, + which is available under the Creative Commons Attribution 2.5 license. For details, see licenses/bin/creative-commons-2.5.LICENSE. + * http://jcip.net/ + * net.jcip:jcip-annotations diff --git a/LICENSE b/LICENSE index d6456956733..db495eac299 100644 --- a/LICENSE +++ b/LICENSE @@ -200,3 +200,99 @@ 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. + + APACHE DRUID (INCUBATING) SUBCOMPONENTS: + + Apache Druid (incubating) includes a number of subcomponents with + separate copyright notices and license terms. Your use of the source + code for these subcomponents is subject to the terms and + conditions of the following licenses. + + +Apache License version 2.0 +================================ + +SOURCE/JAVA-CORE + This product contains conjunctive normal form conversion code, a variance aggregator algorithm, and Bloom filter + adapted from Apache Hive. + * processing/src/main/java/org/apache/druid/segment/filter/Filters.java + * extensions-core/stats/src/main/java/io/druid/query/aggregation/variance/VarianceAggregatorCollector.java + * extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/BloomKFilter.java + + This product contains variable length long deserialization code adapted from Apache Lucene. + * processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java + + This product contains SQL query planning code adapted from Apache Calcite. + * sql/src/main/java/org/apache/druid/sql/calcite/ + + This product contains Kerberos authentication code adapted from Apache Hadoop. + * extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/ + + This product contains a modified version of the java-alphanum library, + copyright Andrew Duffy (https://github.com/amjjd/java-alphanum). + * processing/src/main/java/org/apache/druid/query/ordering/StringComparators.java + + This product contains a modified version of the Metamarkets java-util library, + copyright Metamarkets Group Inc. (https://github.com/metamx/java-util). + * java-util/ + + This product contains a modified version of the Metamarkets bytebuffer-collections library, + copyright Metamarkets Group Inc. (https://github.com/metamx/bytebuffer-collections) + * processing/src/main/java/org/apache/druid/collections/ + + This product contains a modified version of the Metamarkets extendedset library, + copyright Metamarkets Group Inc. (https://github.com/metamx/extendedset) + * extendedset/ + + This product contains a modified version of the CONCISE (COmpressed 'N' Composable Integer SEt) library, + copyright Alessandro Colantonio (https://sourceforge.net/projects/concise/), extending the functionality of + ConciseSet to use IntBuffers. + * extendedset/src/main/java/org/apache/druid/extendedset/intset/ + + This product contains modified portions of the Guava library, + copyright The Guava Authors (https://github.com/google/guava). + Closer class: + * core/src/main/java/org/apache/druid/java/util/common/io/Closer.java + Splitter.splitToList() method: + * core/src/main/java/org/apache/druid/java/util/common/parsers/DelimitedParser.java + DirectExecutorService class: + * core/src/main/java/org/apache/druid/java/util/common/concurrent/DirectExecutorService.java + + This product contains modified versions of the Dockerfile and related configuration files + from SequenceIQ's Hadoop Docker image, copyright SequenceIQ, Inc. (https://github.com/sequenceiq/hadoop-docker/) + * examples/quickstart/tutorial/hadoop/docker/ + + This product contains fixed bins histogram percentile computation code adapted from Netflix Spectator, + copyright Netflix, Inc. (https://github.com/Netflix/spectator) + * extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java + + +MIT License +================================ + +SOURCE/WEB-CONSOLE + This product bundles jQuery version 1.11.0, copyright jQuery Foundation, Inc., + which is available under an MIT license. For details, see licenses/src/jquery.MIT. + + This product bundles jQuery UI version 1.9.2, copyright jQuery Foundation and other contributors, + which is available under an MIT license. For details, see licenses/src/jquery-ui.MIT. + + This product bundles underscore version 1.2.2, copyright Jeremy Ashkenas, DocumentCloud, + which is available under an MIT license. For details, see licenses/src/underscore.MIT. + + +BSD-3-Clause License +================================ + +SOURCE/WEB-CONSOLE + This product bundles demo_table.css and jquery.dataTables.js from DataTables version 1.8.2, copyright Allan Jardine., + which is available under a BSD-3-Clause License. For details, see licenses/src/datatables.BSD3. + + +Public Domain +================================ + +SOURCE/JAVA-CORE + This product uses a smear function adapted from MurmurHash3, written by Austin Appleby who has placed + MurmurHash3 in the public domain (https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp). + * processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/Groupers.java diff --git a/LICENSE.BINARY b/LICENSE.BINARY new file mode 100644 index 00000000000..a46a66a1802 --- /dev/null +++ b/LICENSE.BINARY @@ -0,0 +1,1258 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/bin/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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/bin/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. + + APACHE DRUID (INCUBATING) SUBCOMPONENTS: + + Apache Druid (incubating) includes a number of subcomponents with + separate copyright notices and license terms. Your use of the source + code for these subcomponents is subject to the terms and + conditions of the following licenses. + + +Apache License version 2.0 +================================ + +SOURCE/JAVA-CORE + This product contains conjunctive normal form conversion code, a variance aggregator algorithm, and Bloom filter + adapted from Apache Hive. + * processing/src/main/java/org/apache/druid/segment/filter/Filters.java + * extensions-core/stats/src/main/java/io/druid/query/aggregation/variance/VarianceAggregatorCollector.java + * extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/BloomKFilter.java + + This product contains variable length long deserialization code adapted from Apache Lucene. + * processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java + + This product contains SQL query planning code adapted from Apache Calcite. + * sql/src/main/java/org/apache/druid/sql/calcite/ + + This product contains Kerberos authentication code adapted from Apache Hadoop. + * extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/ + + This product contains a modified version of the java-alphanum library, + copyright Andrew Duffy (https://github.com/amjjd/java-alphanum). + * processing/src/main/java/org/apache/druid/query/ordering/StringComparators.java + + This product contains a modified version of the Metamarkets java-util library, + copyright Metamarkets Group Inc. (https://github.com/metamx/java-util). + * java-util/ + + This product contains a modified version of the Metamarkets bytebuffer-collections library, + copyright Metamarkets Group Inc. (https://github.com/metamx/bytebuffer-collections) + * processing/src/main/java/org/apache/druid/collections/ + + This product contains a modified version of the Metamarkets extendedset library, + copyright Metamarkets Group Inc. (https://github.com/metamx/extendedset) + * extendedset/ + + This product contains a modified version of the CONCISE (COmpressed 'N' Composable Integer SEt) library, + copyright Alessandro Colantonio (https://sourceforge.net/projects/concise/), extending the functionality of + ConciseSet to use IntBuffers. + * extendedset/src/main/java/org/apache/druid/extendedset/intset/ + + This product contains modified portions of the Guava library, + copyright The Guava Authors (https://github.com/google/guava). + Closer class: + * core/src/main/java/org/apache/druid/java/util/common/io/Closer.java + Splitter.splitToList() method: + * core/src/main/java/org/apache/druid/java/util/common/parsers/DelimitedParser.java + DirectExecutorService class: + * core/src/main/java/org/apache/druid/java/util/common/concurrent/DirectExecutorService.java + + This product contains modified versions of the Dockerfile and related configuration files + from SequenceIQ's Hadoop Docker image, copyright SequenceIQ, Inc. (https://github.com/sequenceiq/hadoop-docker/) + * examples/quickstart/tutorial/hadoop/docker/ + + This product contains fixed bins histogram percentile computation code adapted from Netflix Spectator, + copyright Netflix, Inc. (https://github.com/Netflix/spectator) + * extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java + + +BINARY/WEB-CONSOLE + This product bundles Microsoft tslib version 1.9.3. + + This product bundles diff-match-patch version 1.0.4. + + This product bundles @blueprintjs/core version 1.0.1. + + +BINARY/JAVA-CORE + This product bundles AWS SDK for Java version 1.11.199. + * com.amazonaws:aws-java-sdk-core + * com.amazonaws:aws-java-sdk-ec2 + * com.amazonaws:aws-java-sdk-kms + * com.amazonaws:aws-java-sdk-s3 + * com.amazonaws:jmespath-java + + This product bundles Esri Geometry API for Java version 2.0.0. + * com.esri.geometry:esri-geometry-api + + This product bundles ClassMate version 1.0.0. + * com.fasterxml:classmate + + This product bundles Jackson version 2.6.7. + * com.fasterxml.jackson.core:jackson-annotations + * com.fasterxml.jackson.core:jackson-core + * com.fasterxml.jackson.core:jackson-databind + * com.fasterxml.jackson.dataformat:jackson-dataformat-cbor + * com.fasterxml.jackson.dataformat:jackson-dataformat-smile + * com.fasterxml.jackson.datatype:jackson-datatype-guava + * com.fasterxml.jackson.datatype:jackson-datatype-joda + * com.fasterxml.jackson.jaxrs:jackson-jaxrs-base + * com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider + * com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider + * com.fasterxml.jackson.module:jackson-module-jaxb-annotations + + This product bundles Caffeine version 2.5.5. + * com.github.ben-manes.caffeine:caffeine + + This product bundles Error Prone Annotations version 2.3.2. + * com.google.errorprone:error_prone_annotations + + This product bundles Guava version 16.0.1. + * com.google.guava:guava + + This product bundles Guice version 4.1.0. + * com.google.inject:guice + * com.google.inject.extensions:guice-multibindings + * com.google.inject.extensions:guice-servlet + + This product bundles JsonPath version 2.3.0. + * com.jayway.jsonpath:json-path + + This product bundles LMAX Disruptor version 3.3.6. + * com.lmax:disruptor + + This product bundles LZF Compressor version 1.0.4. + * com.ning:compress-lzf + + This product bundles OpenCSV version 4.2. + * com.opencsv:opencsv + + This product bundles OkHttp version 1.0.2, + * com.squareup.okhttp:okhttp + + This product bundles Netty Reactive Streams version 2.0.0. + * com.typesafe.netty:netty-reactive-streams + + This product bundles the following Apache Commons libraries: + * commons-beanutils 1.9.3 + * commons-cli 1.2 + * commons-codec 1.7 + * commons-collections 3.2.2 + * commons-io 2.5 + * commons-lang 2.6 + * commons-logging 1.1.1 + * commons-pool 1.6 + * commons-collections4 4.1 + * commons-compress 1.16 + * commons-dbcp2 2.0.1 + * commons-lang3 3.7 + * commons-math3 3.6.1 + * commons-pool2 2.2 + * commons-text 1.3 + + This product bundles Airline version 0.7. + * io.airlift:airline + + This product bundles DropWizard Metrics Core version 4.0.0. + * io.dropwizard.metrics:metrics-core + + This product bundles Netty version 3.10.6.Final. + * io.netty:netty + + This product bundles Netty version 4.1.30.Final. + * io.netty:netty-all + + This product bundles Netty version 4.1.29.Final. + * io.netty:netty-buffer + * io.netty:netty-codec + * io.netty:netty-codec-dns + * io.netty:netty-codec-http + * io.netty:netty-codec-socks + * io.netty:netty-common + * io.netty:netty-handler + * io.netty:netty-handler-proxy + * io.netty:netty-resolver + * io.netty:netty-resolver-dns + * io.netty:netty-transport + * io.netty:netty-transport-native-epoll + * io.netty:netty-transport-native-unix-common + + This product bundles fastutil version 8.1.0. + * it.unimi.dsi:fastutil + + This product bundles Javax Inject version 1. + * javax.inject.javax:inject + + This product bundles Bean Validation API version 1.1.0.Final. + * javax.validation:validation-api + + This product bundles Joda-Time version 2.9.9. + * joda-time:joda-time + + This product bundles Aggregate Designer Algorithm version 6.0. + * net.hydromatic:aggdesigner-algorithm + + This product bundles Java Native Access (JNA) version 4.5.1. + * net.java.dev.jna:jna + + This product bundles ASM Based Accessors Helper Used By JSON Smart version 1.2. + * net.minidev:accessors-smart + + This product bundles JSON Small and Fast Parser version 2.3. + * net.minidev:json-smart + + This product bundles Spymemcached version 2.12.3. + * net.spy:spymemcached + + This product bundles jackson-jq version 0.0.7. + * net.thisptr:jackson-jq + + This product bundles Apache Calcite version 1.17.0. + * org.apache.calcite:calcite-core + * org.apache.calcite:calcite-linq4j + + This product bundles Apache Calcite Avatica version 1.10.0. + * org.apache.calcite:avatica.avatica-core + * org.apache.calcite:avatica.avatica-metrics + * org.apache.calcite:avatica.avatica-server + + This product bundles Apache Curator version 4.1.0. + * org.apache.curator:curator-client + * org.apache.curator:curator-framework + * org.apache.curator:curator-recipes + * org.apache.curator:curator-x-discovery + + This product bundles Apache Derby version 10.11.1.1. + * org.apache.derby:derby + * org.apache.derby:derbyclient + * org.apache.derby:derbynet + + This product bundles Apache HttpClient version 4.5.3. + * org.apache.httpcomponents:httpclient + + This product bundles Apache HttpCore version 4.4.4. + * org.apache.httpcomponents:httpcore + + This product bundles Apache Log4j version 2.5. + * org.apache.logging.log4j:log4j-1.2-api + * org.apache.logging.log4j:log4j-api + * org.apache.logging.log4j:log4j-core + * org.apache.logging.log4j:log4j-jul + * org.apache.logging.log4j:log4j-slf4j-impl + + This product bundles Apache Maven version 3.1.1. + * org.apache.maven:maven-aether-provider + * org.apache.maven:maven-model + * org.apache.maven:maven-model-builder + * org.apache.maven:maven-repository-metadata + * org.apache.maven:maven-settings + * org.apache.maven:maven-settings-builder + + This product bundles Apache Maven Artifact version 3.6.0. + * org.apache.maven:maven-artifact + + This product bundles Apache Maven Wagon API version 2.4. + * org.apache.maven.wagon:wagon-provider-api + + This product bundles Apache Yetus Audience Annotations Component version 0.5.0. + * org.apache.yetus:audience-annotations + + This product bundles Apache Zookeeper version 3.4.11. + * org.apache.zookeeper:zookeeper + + This product bundles AsyncHttpClient asynchttpclient version 2.5.3. + * org.asynchttpclient:async-http-client + * org.asynchttpclient:async-http-client-netty-utils + + This product bundles components from Jackson version 1.9.13. + * org.codehaus.jackson:jackson-core-asl + * org.codehaus.jackson:jackson-mapper-asl + + This product bundles Plexus Interpolation API 1.19. + * org.codehaus.plexus:plexus-interpolation + + This product bundles Plexus Common Utilities 3.0.15. + * org.codehaus.plexus:plexus-utils + + This product bundles Jetty version 9.4.10.v20180503. + * org.eclipse.jetty:jetty-client + * org.eclipse.jetty:jetty-continuation + * org.eclipse.jetty:jetty-http + * org.eclipse.jetty:jetty-io + * org.eclipse.jetty:jetty-proxy + * org.eclipse.jetty:jetty-security + * org.eclipse.jetty:jetty-server + * org.eclipse.jetty:jetty-servlet + * org.eclipse.jetty:jetty-servlets + * org.eclipse.jetty:jetty-util + + This product bundles JVM Attach API version 1.2. + * org.gridkit.lab:jvm-attach-api + + This product bundles Hibernate Validator Engine version 5.1.3.Final. + * org.hibernate:hibernate-validator + + This product bundles SIGAR version 1.6.5.132. + * org.hyperic:sigar + + This product bundles JBoss Logging 3 version 3.1.3.GA. + * org.jboss.logging:jboss-logging + + This product bundles JDBI version 2.63.1. + * org.jdbi:jdbi + + This product bundles LZ4 Java version 1.5.0. + * org.lz4:lz4-java + + This product bundles MapDB version 1.0.8. + * org.mapdb:mapdb + + This product bundles Objenesis version 2.6. + * org.objenesis:objenesis + + This product bundles RoaringBitmap version 0.7.36. + * org.roaringbitmap:RoaringBitmap + * org.roaringbitmap:shims + + This product bundles Config Magic version 0.9. + * org.skife.config:config-magic + + This product bundles Ion Java version 1.0.2. + * software.amazon.ion:ion-java + + +BINARY/HADOOP-CLIENT + This product bundles Apache Hadoop version 2.8.3. + * org.apache.hadoop:hadoop-annotations + * org.apache.hadoop:hadoop-auth + * org.apache.hadoop:hadoop-client + * org.apache.hadoop:hadoop-common + * org.apache.hadoop:hadoop-hdfs-client + * org.apache.hadoop:hadoop-mapreduce-client-app + * org.apache.hadoop:hadoop-mapreduce-client-common + * org.apache.hadoop:hadoop-mapreduce-client-core + * org.apache.hadoop:hadoop-mapreduce-client-jobclient + * org.apache.hadoop:hadoop-mapreduce-client-shuffle + * org.apache.hadoop:hadoop-yarn-api + * org.apache.hadoop:hadoop-yarn-client + * org.apache.hadoop:hadoop-yarn-common + * org.apache.hadoop:hadoop-yarn-server-common + + This product bundles Gson version 2.2.4. + * com.google.code.gson:gson + + This product bundles Guava version 11.0.2. + * com.google.guava:guava + + This product bundles Nimbus JOSE+JWT version 3.9. + * com.nimbusds:nimbus-jose-jwt + + This product bundles OkHttp version 2.4.0, + * com.squareup.okhttp:okhttp + + This product bundles Okio version 1.4.0, + * com.squareup.okio:okio + + This product bundles the following Apache Commons libraries: + * commons-beanutils 1.7.0 + * commons-beanutils-core 1.8.0 + * commons-codec 1.4 + * commons-configuration 1.6 + * commons-digester 1.8 + * commons-io commons-io 2.4 + * commons-logging 1.1.3 + * commons-net 3.1 + * commons-compress 1.4.1 + * commons-math3 3.1.1 + + This product bundles Netty version 3.6.2.Final. + * io.netty:netty + + This product bundles Apache Log4j version 1.2.17. + * log4j:log4j + + This product bundles JSON Small and Fast Parser version 1.1.1. + * net.minidev:json-smart + + This product bundles Apache Avro version 1.7.4. + * org.apache.avro:avro + + This product bundles Apache Directory version 1.0.0-M20. + * org.apache.directory.api:api-asn1-api + * org.apache.directory.api:api-util + + This product bundles Apache Directory Server version 2.0.0-M15. + * org.apache.directory.server:apacheds-i18n + * org.apache.directory.server:apacheds-kerberos-codec + + This product bundles Apache HTrace version 4.0.1-incubating. + * org.apache.htrace:htrace-core4 + + This product bundles Apache HttpClient version 4.5.2. + * org.apache.httpcomponents:httpclient + + This product bundles Apache Zookeeper version 3.4.6. + * org.apache.zookeeper:zookeeper + + This product bundles components from Jackson version 1.9.13. + * org.codehaus.jackson:jackson-jaxrs + * org.codehaus.jackson:jackson-xc + + This product bundles Jetty version 6.1.26. + * org.mortbay.jetty:jetty-sslengine + * org.mortbay.jetty:jetty-util + + This product bundles snappy-java version 1.0.4.1. + * org.xerial.snappy:snappy-java + + +BINARY/EXTENSIONS/druid-avro-extensions + This product bundles Kafka Schema Registry Client version 3.0.1. + * io.confluent:kafka-schema-registry-client + + This product bundles Apache Avro version 1.8.2. + * org.apache.avro:avro + * org.apache.avro:avro-mapred + * org.apache.avro:avro-ipc + + This product bundles Schema Repository version 0.1.3. + * org.schemarepo:schema-repo-api + * org.schemarepo:schema-repo-avro + * org.schemarepo:schema-repo-client + * org.schemarepo:schema-repo-common + + This product bundles Gson version 2.3.1. + * com.google.code.gson:gson + + This product bundles Apache Velocity version 1.7. + * org.apache.velocity:velocity + + This product bundles Jetty version 6.1.26. + * org.mortbay.jetty:jetty + + This product bundles Jetty version 2.5-20081211. + * org.mortbay.jetty:servlet-api + + This product bundles Objenesis version 2.6. + * org.objenesis:objenesis + + This product bundles snappy-java version 1.1.1.3. + * org.xerial.snappy:snappy-java + + +BINARY/EXTENSIONS/druid-bloom-filter + + This product bundles Apache Hive version 2.7.0. + * org.apache.hive:hive-storage-api + + +BINARY/EXTENSIONS/druid-datasketches + + This product bundles DataSketches version 0.12.0. + * com.yahoo.datasketches:datasketches-core + * com.yahoo.datasketches:memory + + +BINARY/EXTENSIONS/druid-examples + + This product bundles IRC API version 1.0-0014. + * com.ircclouds.irc:irc-api + + This product bundles MaxMind GeoIP2 API version 0.4.0. + * com.maxmind.geoip2:geoip2 + + This product bundles the following Apache Commons libraries: + * commons-beanutils 1.8.3 + * commons-validator 1.4.0 + + This product bundles Twitter4J version 3.0.3. + * org.twitter4j:twitter4j-async + * org.twitter4j:twitter4j-core + * org.twitter4j:twitter4j-stream + + +BINARY/EXTENSIONS/druid-kafka-eight + + This product bundles Apache Kafka version 0.8.2.1. + * org.apache.kafka:kafka_2.10 + * org.apache.kafka:kafka-clients + + This product bundles ZkClient version 0.3. + * com.101tec:zkclient + + This product bundles Yammer Metrics version 2.2.0. + * com.yammer.metrics:metrics-core + + This product bundles snappy-java version 1.1.1.6. + * org.xerial.snappy:snappy-java + + +BINARY/EXTENSIONS/druid-kafka-indexing-service + This product bundles Apache Kafka version 0.10.2.2. + * org.apache.kafka:kafka-clients + + This product bundles snappy-java version 1.1.2.6. + * org.xerial.snappy:snappy-java + + +BINARY/EXTENSIONS/druid-kerberos + + This product bundles XML Builder version 0.4. + * com.jamesmurty.utils:java-xmlbuilder + + This product bundles Jettison version 1.1. + * org.codehaus.jettison:jettison + + This product bundles Jets3t version 0.9.0. + * net.java.dev.jets3t:jets3t + + +BINARY/EXTENSIONS/druid-kinesis-indexing-service + This product bundles AWS SDK for Java version 1.11.199. + * com.amazonaws:aws-java-sdk-kinesis + * com.amazonaws:aws-java-sdk-sts + + +BINARY/EXTENSIONS/druid-parquet-extensions + This product bundles Apache Parquet version 1.10.0. + * org.apache.parquet:parquet-avro + * org.apache.parquet:parquet-column + * org.apache.parquet:parquet-common + * org.apache.parquet:parquet-encoding + * org.apache.parquet:parquet-hadoop + * org.apache.parquet:parquet-jackson + + This product bundles Apache Parquet Format version 2.4.0. + * org.apache.parquet:parquet-format + + This product bundles snappy-java version 1.1.7.2. + * org.xerial.snappy:snappy-java + + +BINARY/EXTENSIONS/protobuf-extensions + This product bundles Protocol Buffers Dynamic Schema version 0.9.3. + * com.github.os72:protobuf-dynamic + + This product bundles Gson version 2.7. + * com.google.code.gson:gson + + + +MIT License +================================ + +SOURCE/WEB-CONSOLE + This product bundles jQuery version 1.11.0, copyright jQuery Foundation, Inc., + which is available under an MIT license. For details, see licenses/src/jquery.MIT. + + This product bundles jQuery UI version 1.9.2, copyright jQuery Foundation and other contributors, + which is available under an MIT license. For details, see licenses/src/jquery-ui.MIT. + + This product bundles underscore version 1.2.2, copyright Jeremy Ashkenas, DocumentCloud, + which is available under an MIT license. For details, see licenses/src/underscore.MIT. + + +BINARY/JAVA-CORE + This product bundles Checker Qual version 2.5.7, copyright the Checker Framework developers, + which is available under an MIT license. For details, see licenses/bin/checker-qual.MIT. + * org.checkerframework:checker-qual + + This product bundles JCodings version 1.0.13, copyright JRuby Team, + which is available under an MIT license. For details, see licenses/bin/jcodings.MIT. + * org.jruby.jcodings:jcodings + + This product bundles Joni version 2.1.11, copyright JRuby Team, + which is available under an MIT license. For details, see licenses/bin/joni.MIT. + * org.jruby.joni:joni + + This product bundles JCL 1.2 Implemented Over SLF4J version 1.7.12, copyright QOS.ch, + which is available under an MIT license. For details, see licenses/bin/jcl-over-slf4j.MIT. + * org.slf4j:jcl-over-slf4j + + This product bundles SLF4J API version 1.6.4, copyright QOS.ch, + which is available under an MIT license. For details, see licenses/bin/slf4j.MIT. + * org.slf4j:slf4j-api + + +BINARY/HADOOP-CLIENT + This product bundles SLF4J API version 1.7.10, copyright QOS.ch, + which is available under an MIT license. For details, see licenses/bin/slf4j.MIT. + * org.slf4j:slf4j-api + * org.slf4j:slf4j-log4j12 + + +BINARY/EXTENSIONS/druid-kafka-eight + This product bundles JOpt Simple version 3.2., copyright Paul R. Holser, Jr., + which is available under an MIT license. For details, see licenses/bin/jopt-simple.MIT. + * net.sf.jopt-simple:jopt-simple + + +BINARY/WEB-CONSOLE +The following dependency names are NPM package names (https://www.npmjs.com). + + This product bundles @babel/runtime version 7.3.4, copyright Sebastian McKenzie and other contributors, + which is available under an MIT license. For details, see licenses/bin/@babel-runtime.MIT. + + This product bundles array-includes version 3.0.3, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/array-includes.MIT. + + This product bundles asap version 2.0.6, copyright Contributors, + which is available under an MIT license. For details, see licenses/bin/asap.MIT. + + This product bundles axios version 0.18.0, copyright Matt Zabriskie, + which is available under an MIT license. For details, see licenses/bin/axios.MIT. + + This product bundles brace version 0.11.1, copyright Thorsten Lorenz, + which is available under an MIT license. For details, see licenses/brace.MIT. + + This product bundles chain-function version 1.0.1, copyright jquense, + which is available under an MIT license. For details, see licenses/chain-function.MIT. + + This product bundles classnames version 2.2.6, copyright Jed Watson, + which is available under an MIT license. For details, see licenses/bin/classnames.MIT. + + This product bundles define-properties version 1.1.3, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/define-properties.MIT. + + This product bundles dom-helpers version 3.4.0, copyright Jason Quense, + which is available under an MIT license. For details, see licenses/bin/dom-helpers.MIT. + + This product bundles dom4 version 1.8.5, copyright Andrea Giammarchi, + which is available under an MIT license. For details, see licenses/bin/dom4.MIT. + + This product bundles encoding version 0.1.12, copyright Andris Reinman, + which is available under an MIT license. For details, see licenses/bin/encoding.MIT. + + This product bundles es-abstract version 1.13.0, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/es-abstract.MIT. + + This product bundles es-to-primitive version 1.2.0, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/es-to-primitive.MIT. + + This product bundles es6-shim version 0.35.4, copyright Paul Miller and contributors, + which is available under an MIT license. For details, see licenses/bin/es6-shim.MIT. + + This product bundles es7-shim version 6.0.0, copyright Jordan Harband and contributors, + which is available under an MIT license. For details, see licenses/bin/es7-shim.MIT. + + This product bundles fbjs version 0.8.17, copyright Facebook, Inc., + which is available under an MIT license. For details, see licenses/bin/fbjs.MIT. + + This product bundles function-bind version 1.1.1, copyright Raynos, + which is available under an MIT license. For details, see licenses/bin/function-bind.MIT. + + This product bundles has-symbols version 1.0.0, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/has-symbols.MIT. + + This product bundles has version 1.0.3, copyright Thiago de Arruda, + which is available under an MIT license. For details, see licenses/bin/has.MIT. + + This product bundles history version 4.7.2, copyright Michael Jackson, + which is available under an MIT license. For details, see licenses/bin/history.MIT. + + This product bundles hjson version 3.1.2, copyright Christian Zangl, + which is available under an MIT license. For details, see licenses/bin/hjson.MIT. + + This product bundles invariant version 2.2.4, copyright Facebook, Inc., + which is available under an MIT license. For details, see licenses/bin/invariant.MIT. + + This product bundles is-buffer version 1.1.6, copyright Feross Aboukhadijeh, + which is available under an MIT license. For details, see licenses/bin/is-buffer.MIT. + + This product bundles is-callable version 1.1.4, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/is-callable.MIT. + + This product bundles is-date-object version 1.0.1, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/is-date-object.MIT. + + This product bundles is-regex version 1.0.4, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/is-regex.MIT. + + This product bundles is-symbol version 1.0.2, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/is-symbol.MIT. + + This product bundles isarray version 0.0.1, copyright Julian Gruber, + which is available under an MIT license. For details, see licenses/bin/isarray.MIT. + + This product bundles numeral version 2.0.6, copyright Adam Draper, + which is available under an MIT license. For details, see licenses/bin/numeral.MIT. + + This product bundles object-assign version 4.1.1, copyright Sindre Sorhus, + which is available under an MIT license. For details, see licenses/bin/object-assign.MIT. + + This product bundles object-keys version 1.1.0, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/object-keys.MIT. + + This product bundles path-to-regexp version 1.7.0, copyright Blake Embrey (hello@blakeembrey.com), + which is available under an MIT license. For details, see licenses/bin/path-to-regexp.MIT. + + This product bundles prop-types version 15.7.2, copyright Facebook, Inc., + which is available under an MIT license. For details, see licenses/bin/prop-types.MIT. + + This product bundles pure-render-decorator version 1.1.1, copyright Félix Girault, + which is available under an MIT license. For details, see licenses/pure-render-decorator.MIT. + + This product bundles react-ace version 6.4.0, copyright James Hrisho, + which is available under an MIT license. For details, see licenses/react-ace.MIT. + + This product bundles react-addons-css-transition-group version 15.6.2, copyright , + which is available under an MIT license. For details, see licenses/react-addons-css-transition-group.MIT. + + This product bundles react-dom version 16.8.3, copyright Facebook, Inc. and its affiliates., + which is available under an MIT license. For details, see licenses/bin/react-dom.MIT. + + This product bundles react-is version 16.8.3, copyright , + which is available under an MIT license. For details, see licenses/react-is.MIT. + + This product bundles react-router-dom version 4.3.1, copyright React Training, + which is available under an MIT license. For details, see licenses/bin/react-router-dom.MIT. + + This product bundles react-router version 4.3.1, copyright React Training, + which is available under an MIT license. For details, see licenses/bin/react-router.MIT. + + This product bundles react-table version 6.8.6, copyright Tanner Linsley, + which is available under an MIT license. For details, see licenses/bin/react-table.MIT. + + This product bundles react version 16.8.3, copyright Facebook, Inc. and its affiliates., + which is available under an MIT license. For details, see licenses/bin/react.MIT. + + This product bundles resolve-pathname version 2.2.0, copyright Michael Jackson, + which is available under an MIT license. For details, see licenses/bin/resolve-pathname.MIT. + + This product bundles scheduler version 0.13.3, copyright Facebook, Inc. and its affiliates., + which is available under an MIT license. For details, see licenses/bin/scheduler.MIT. + + This product bundles string-at version 1.0.1, copyright Jordan Harband, + which is available under an MIT license. For details, see licenses/bin/string-at.MIT. + + This product bundles tether version 1.4.5, copyright , + which is available under an MIT license. For details, see licenses/tether.MIT. + + This product bundles value-equal version 0.4.0, copyright Michael Jackson, + which is available under an MIT license. For details, see licenses/bin/value-equal.MIT. + + This product bundles warning version 4.0.3, copyright Facebook, Inc., + which is available under an MIT license. For details, see licenses/bin/warning.MIT. + + This product bundles ua-parser-js version 0.7.19, copyright Faisal Salman, + which is available under an MIT license. For details, see licenses/bin/ua-parser-js.MIT. + + This product bundles druid-console version 0.0.2, copyright Metamarkets, + which is available under an MIT license. For details, see licenses/bin/druid-console.MIT. + + This product bundles CSS from Font Awesome Free version 4.2.0, copyright Font Awesome, + which is availble under an MIT license. For details, see licenses/bin/font-awesome.MIT. + + This product bundles webpack version 4.29.0, copyright JS Foundation and other contributors, + which is available under an MIT license. For details, see licenses/bin/webpack.MIT. + + This product bundles style-loader version 0.23.1, copyright JS Foundation and other contributors, + which is available under an MIT license. For details, see licenses/bin/style-loader.MIT. + + This product bundles os-browserify version 0.3.0, copyright CoderPuppy, + which is available under an MIT license. For details, see licenses/bin/os-browserify.MIT. + + This product bundles process version 0.11.10, copyright Roman Shtylman, + which is available under an MIT license. For details, see licenses/bin/process.MIT. + + This product bundles css-loader version 2.1.0, copyright JS Foundation and other contributors, + which is available under an MIT license. For details, see licenses/bin/css-loader.MIT. + + This product bundles bootstrap version 3.1.1, copyright Twitter Inc, + which is available under an MIT license. For details, see licenses/bin/bootstrap.MIT. + + +BSD-2-Clause License +================================ + +BINARY/JAVA-CORE + This product bundles JNI binding for Zstd version 1.3.3-1, copyright Luben Karavelov, + which is available under a BSD-2-Clause License. For details, see licenses/bin/zstd-jni.BSD2. + * com.github.luben:zstd-jni + + +BSD-3-Clause License +================================ + +SOURCE/WEB-CONSOLE + This product bundles demo_table.css and jquery.dataTables.js from DataTables version 1.8.2, copyright Allan Jardine., + which is available under a BSD-3-Clause License. For details, see licenses/src/datatables.BSD3. + + +BINARY/JAVA-CORE + This product bundles Zstandard version 1.3.3, copyright Facebook, Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/zstandard.BSD3. + + This product bundles FindBugs JSR305 version 2.0.1, copyright FindBugs, + which is available under a BSD-3-Clause License. For details, see licenses/bin/jsr305.BSD3. + * com.google.code.findbugs:jsr305 + + This product bundles Protocol Buffers version 3.1.0, copyright Google, Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/protobuf-java.BSD3. + * com.google.protobuf:protobuf-java + + This product bundles JLine version 0.9.94, copyright Marc Prud'hommeaux, + which is available under a BSD-3-Clause License. For details, see licenses/bin/jline.BSD3. + * jline:jline + + This product bundles ANTLR 4 Runtime version 4.5.1, copyright The ANTLR Project, + which is available under a BSD-3-Clause License. For details, see licenses/bin/antlr4-runtime.BSD3. + * org.antlr:antlr4-runtime + + This product bundles Janino and Commons Compiler version 2.7.6, copyright Arno Unkrig and TIBCO Software Inc., + which are available under a BSD-3-Clause License. For details, see licenses/bin/janino.BSD3. + * org.codehaus.janino:janino + * org.codehaus.janino:commons-compiler + + This product bundles ASM version 5.2, copyright INRIA, France Telecom, + which is available under a BSD-3-Clause License. For details, see licenses/bin/asm.BSD3. + * org.ow2.asm:asm + * org.ow2.asm:asm-commons + * org.ow2.asm:asm-tree + + +BINARY/HADOOP-CLIENT + This product bundles FindBugs JSR305 version 3.0.0, copyright FindBugs, + which is available under a BSD-3-Clause License. For details, see licenses/bin/jsr305.BSD3. + * com.google.code.findbugs:jsr305 + + This product bundles Protocol Buffers version 2.5.0, copyright Google, Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/protobuf-java.BSD3. + * com.google.protobuf:protobuf-java + + This product bundles Paranamer version 2.3, copyright Paul Hammant & ThoughtWorks Inc, + which is available under a BSD-3-Clause License. For details, see licenses/bin/paranamer.BSD3. + * com.thoughtworks.paranamer:paranamer + + This product bundles LevelDB JNI version 1.8, copyright FuseSource Corp., + which is available under a BSD-3-Clause License. For details, see licenses/bin/leveldb-jni.BSD3. + * org.fusesource.leveldbjni:leveldbjni-all + + This product bundles xmlenc version 0.5.2, copyright Ernst de Haan, + which is available under a BSD-3-Clause License. For details, see licenses/bin/xmlenc.BSD3. + * xmlenc:xmlenc + + +BINARY/EXTENSIONS/druid-avro-extensions + This product bundles Paranamer version 2.7, copyright Paul Hammant & ThoughtWorks Inc, + which is available under a BSD-3-Clause License. For details, see licenses/bin/paranamer.BSD3. + * com.thoughtworks.paranamer:paranamer + + +BINARY/EXTENSIONS/druid-kerberos + This product bundles JSch - Java Secure Channel version 0.1.54, copyright Atsuhiko Yamanaka, JCraft,Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/jsch.BSD3. + * com.jcraft:jsch + + +BINARY/EXTENSIONS/druid-kafka-eight + This product bundles Scala Library version 2.10.4, copyright EPFL, Lightbend Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/scala-lang.BSD3. + * org.scala-lang:scala-library + + +BINARY/EXTENSIONS/druid-lookups-cached-single + This product bundles StringTemplate version 3.2, copyright Terrence Parr, + which is available under a BSD-3-Clause License. For details, see licenses/bin/antlr-stringtemplate.BSD3. + * org.antlr:stringtemplate + + This product bundles ANTLR version 2.7.7, copyright The ANTLR Project, + which is available under a BSD-3-Clause License. For details, see licenses/bin/antlr.BSD3. + * antlr:antlr + + +BINARY/EXTENSIONS/postgresql-metadata-storage + This product bundles PostgreSQL JDBC Driver version 9.4.1208.jre7, copyright PostgreSQL Global Development Group, + which is available under a BSD-3-Clause License. For details, see licenses/bin/postgresql.BSD3. + * org.postgresql:postgresql + + +BINARY/EXTENSIONS/druid-protobuf-extensions + This product bundles Protocol Buffers version 3.1.0, copyright Google, Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/protobuf-java.BSD3. + * com.google.protobuf:protobuf-java-util + + +BINARY/WEB-CONSOLE + This product bundles d3-array version 2.0.3, copyright Mike Bostock, + which is available under a BSD-3-Clause License. For details, see licenses/bin/d3-array.BSD3. + + This product bundles hoist-non-react-statics version 2.5.5, copyright Yahoo! Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/hoist-non-react-statics.BSD3. + + This product bundles react-transition-group version 1.2.1, copyright 2016, React Community, + forked from React (https://github.com/facebook/react), copyright 2013-present, Facebook, Inc. + which is available under a BSD-3-Clause License. For details, see licenses/bin/react-transition-group.BSD3. + + This product bundles warning version 3.0.0, copyright Facebook, Inc., + which is available under a BSD-3-Clause License. For details, see licenses/bin/warning.BSD3. + + +ICU License +================================ + +BINARY/JAVA-CORE + This product bundles ICU4J version 54.1.1, copyright International Business Machines Corporation and others, + which is available under the ICU License. For details, see licenses/bin/icu4j.ICU. + * com.ibm.icu:icu4j + + +SIL Open Font License 1.1 +================================ + +BINARY/WEB-CONSOLE + This product bundles fonts from Font Awesome Free version 4.2.0, copyright Font Awesome, + which is available under the SIL OFL 1.1. For details, see licenses/bin/font-awesome.silofl + * https://fontawesome.com/ + + +CDDL 1.1 +================================ + +BINARY/JAVA-CORE + This product bundles JavaBeans Activation Framework version 1.2.0, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.activation.CDDL11 + * https://github.com/javaee/activation + * com.sun.activation:javax.activation + + This product bundles Jersey version 1.19.3, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jersey.CDDL11 + * https://jersey.github.io/ + * com.sun.jersey:jersey-core + * com.sun.jersey:jersey-server + * com.sun.jersey:jersey-servlet + * com.sun.jersey:contribs + + This product bundles Expression Language 3.0 API version 3.0.0., copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/el-spec + * javax.el:javax.el-api + + This product bundles Java Servlet API version 3.1.0, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/servlet-spec + * javax.servlet:javax.servlet-api + + This product bundles JSR311 API version 1.1.1, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jsr311-api.CDDL11 + * https://github.com/javaee/jsr311 + * javax.ws.rs:jsr311-api + + This product bundles Expression Language 3.0 version 3.0.0., copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/el-spec + * org.glassfish:javax.el + + +BINARY/HADOOP-CLIENT + This product bundles Jersey version 1.9, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jersey.CDDL11 + * https://jersey.github.io/ + * com.sun.jersey:jersey-client + * com.sun.jersey:jersey-core + + This product bundles JavaBeans Activation Framework version 1.1, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javaxCDDL11 + * https://github.com/javaee/activation + * javax.activation:activation + + This product bundles Java Servlet API version 2.5, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/servlet-spec + * javax.servlet:javax.servlet-api + + This product bundles JAXB version 2.2.2, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/jaxb-v2 + * javax.xml.bind:jaxb-api + + This product bundles stax-api version 1.0-2, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/ + * javax.xml.stream:stax-api + + This product bundles jsp-api version 2.1, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/javax.CDDL11 + * https://github.com/javaee/javaee-jsp-api + * javax.servlet.jsp:jsp-api + + +BINARY/EXTENSIONS/druid-avro-extensions + This product bundles Jersey version 1.15, copyright Oracle and/or its affiliates., + which is available under the CDDL 1.1. For details, see licenses/bin/jersey.CDDL11 + * https://jersey.github.io/ + * com.sun.jersey:jersey-client + + +Eclipse Public License 1.0 +================================ + +BINARY/JAVA-CORE + This product bundles OkHttp Aether Connector version 0.0.9, copyright to original author or authors, + which is available under the Eclipse Public License 1.0. For details, see licenses/bin/aether-connector-okhttp.EPL1. + * https://github.com/takari/aether-connector-okhttp + * io.tesla.aether:aether-connector-okhttp + + This product bundles Tesla Aether version 0.0.5, copyright to original author or authors, + which is available under the Eclipse Public License 1.0. For details, see licenses/bin/tesla-aether.EPL1. + * https://github.com/tesla/tesla-aether + * io.tesla.aether:tesla-aether + + This product bundles Eclipse Aether libraries version 0.9.0.M2, copyright Sonatype, Inc., + which is available under the Eclipse Public License 1.0. For details, see licenses/bin/aether-core.EPL1. + * https://github.com/eclipse/aether-core + * org.eclipse.aether:aether-api + * org.eclipse.aether:aether-connector-file + * org.eclipse.aether:aether-impl + * org.eclipse.aether:aether-spi + * org.eclipse.aether:aether-util + + +Mozilla Public License Version 2.0 +================================ + +BINARY/JAVA-CORE + This product bundles Rhino version 1.7R5, copyright Mozilla and individual contributors., + which is available under the Mozilla Public License Version 2.0. For details, see licenses/bin/rhino.MPL2. + * https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino + * org.mozilla:rhino + + +Creative Commons Attribution 2.5 +================================ + +BINARY/HADOOP-CLIENT + This product bundles "Java Concurrency In Practice" Book Annotations, copyright Brian Goetz and Tim Peierls, + which is available under the Creative Commons Attribution 2.5 license. For details, see licenses/bin/creative-commons-2.5.LICENSE. + * http://jcip.net/ + * net.jcip:jcip-annotations + + +Creative Commons CC0 +================================ + +BINARY/JAVA-CORE + This product bundles Reactive Streams version 1.0.2, which is available under a Creative Commons CC0 license. + For details, see licenses/bin/reactive-streams.CC0. + * org.reactivestreams:reactive-streams + + +Public Domain +================================ + +SOURCE/JAVA-CORE + This product uses a smear function adapted from MurmurHash3, written by Austin Appleby who has placed + MurmurHash3 in the public domain (https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp). + * processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/Groupers.java + +BINARY/JAVA-CORE + This product bundles AOP Alliance version 1.0, which is in the public domain (http://aopalliance.sourceforge.net/). + * aopalliance:aopalliance + + This product bundles XZ for Java version 1.8, which is in the public domain (https://tukaani.org/xz/java.html). + * org.tukaani:xz + +BINARY/HADOOP-CLIENT + This product bundles XZ for Java version 1.0, which is in the public domain (https://tukaani.org/xz/java.html). + * org.tukaani:xz diff --git a/NOTICE b/NOTICE index 5ed39d8b339..57018c61bde 100644 --- a/NOTICE +++ b/NOTICE @@ -4,97 +4,62 @@ Copyright 2018 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). + +############ SOURCE/JAVA-CORE ############ + +================= Apache Hive ================= +Apache Hive +Copyright 2008-2018 The Apache Software Foundation + + + + +================= Apache Lucene ================= +Apache Lucene +Copyright 2001-2019 The Apache Software Foundation + + + + +================= Apache Calcite ================= +Apache Calcite +Copyright 2012-2019 The Apache Software Foundation + +This product is based on source code originally developed +by DynamoBI Corporation, LucidEra Inc., SQLstream Inc. and others +under the auspices of the Eigenbase Foundation +and released as the LucidDB project. + + + + +================= Apache Hadoop ================= +Apache Hadoop +Copyright 2009-2017 The Apache Software Foundation + + + + +================= Metamarkets java-util ================= +java-util +Copyright 2011-2017 Metamarkets Group Inc. + + + + +================= Metamarkets bytebuffer-collections ================= +bytebuffer-collections +Copyright 2011-2015 Metamarkets Group Inc. + + + + +================= Metamarkets extendedset ================= +extendedset +Copyright 2012 Metamarkets Group Inc. + ------------------------------------------------------------------------------- -This product contains a modified version of Andrew Duffy's java-alphanum library - * LICENSE: - * https://github.com/amjjd/java-alphanum/blob/5c036e2e492cc7f3b7bcdebd46b8f9e2a87927e5/LICENSE.txt (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/amjjd/java-alphanum - -This product contains conjunctive normal form conversion code, a variance aggregator algorithm, and bloom filter adapted from Apache Hive - * LICENSE: - * https://github.com/apache/hive/blob/branch-2.0/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/apache/hive - -This product contains variable length long deserialization code adapted from Apache Lucene - * LICENSE: - * https://github.com/apache/lucene-solr/blob/master/lucene/LICENSE.txt (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/apache/lucene-solr - -This product contains a modified version of Metamarkets java-util library - * LICENSE: - * https://github.com/metamx/java-util/blob/master/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/metamx/java-util - * COMMIT TAG: - * https://github.com/metamx/java-util/commit/826021f - -This product contains a modified version of TestNG 6.8.7 - * LICENSE: - * http://testng.org/license/ (Apache License, Version 2.0) - * HOMEPAGE: - * http://testng.org/ - -This product contains a modified version of Metamarkets bytebuffer-collections library - * LICENSE: - * https://github.com/metamx/bytebuffer-collections/blob/master/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/metamx/bytebuffer-collections - * COMMIT TAG: - * https://github.com/metamx/bytebuffer-collections/commit/3d1e7c8 - -This product contains SQL query planning code adapted from Apache Calcite - * LICENSE: - * https://github.com/apache/calcite/blob/master/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://calcite.apache.org/ - -This product contains a modified version of Metamarkets extendedset library - * LICENSE: - * https://github.com/metamx/extendedset/blob/master/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/metamx/extendedset - * COMMIT TAG: - * https://github.com/metamx/extendedset/commit/c9d647d - -This product contains a modified version of Alessandro Colantonio's CONCISE +This library contains a modified version of Alessandro Colantonio's CONCISE (COmpressed 'N' Composable Integer SEt) library, extending the functionality of -ConciseSet to use IntBuffers. - * (c) 2010 Alessandro Colantonio - * - * - * LICENSE: - * Apache License, Version 2.0 - * HOMEPAGE: - * https://sourceforge.net/projects/concise/ - -This product contains a modified version of The Guava Authors's Closer class from Guava library: - * LICENSE: - * https://github.com/google/guava/blob/c462d69329709f72a17a64cb229d15e76e72199c/COPYING (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/google/guava - * COMMIT TAG: - * https://github.com/google/guava/commit/0ba7ccf36f5384a321cb78d62375bf7574e7bc24 - -This product contains code adapted from Apache Hadoop - * LICENSE: - * https://github.com/apache/hadoop/blob/trunk/LICENSE.txt (Apache License, Version 2.0) - * HOMEPAGE: - * http://hadoop.apache.org/ - -This product contains modified versions of the Dockerfile and related configuration files from SequenceIQ's Hadoop Docker image: - * LICENSE: - * https://github.com/sequenceiq/hadoop-docker/blob/master/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/sequenceiq/hadoop-docker/ - * COMMIT TAG: - * update this when this patch is committed - -This product contains fixed bins histogram percentile computation code adapted from Netflix Spectator: - * LICENSE: - * https://github.com/Netflix/spectator/blob/master/LICENSE (Apache License, Version 2.0) - * HOMEPAGE: - * https://github.com/Netflix/spectator +ConciseSet to use IntBuffers. \ No newline at end of file diff --git a/NOTICE.BINARY b/NOTICE.BINARY new file mode 100644 index 00000000000..af3b9213f9b --- /dev/null +++ b/NOTICE.BINARY @@ -0,0 +1,2747 @@ +Apache Druid (incubating) +Copyright 2018 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + +############ SOURCE/JAVA-CORE ############ + +================= Apache Hive ================= +Apache Hive +Copyright 2008-2018 The Apache Software Foundation + + + + +================= Apache Lucene ================= +Apache Lucene +Copyright 2001-2019 The Apache Software Foundation + + + + +================= Apache Calcite ================= +Apache Calcite +Copyright 2012-2019 The Apache Software Foundation + +This product is based on source code originally developed +by DynamoBI Corporation, LucidEra Inc., SQLstream Inc. and others +under the auspices of the Eigenbase Foundation +and released as the LucidDB project. + + + + +================= Apache Hadoop ================= +Apache Hadoop +Copyright 2009-2017 The Apache Software Foundation + + + + +================= Metamarkets java-util ================= +java-util +Copyright 2011-2017 Metamarkets Group Inc. + + + + +================= Metamarkets bytebuffer-collections ================= +bytebuffer-collections +Copyright 2011-2015 Metamarkets Group Inc. + + + + +================= Metamarkets extendedset ================= +extendedset +Copyright 2012 Metamarkets Group Inc. + +------------------------------------------------------------------------------- + +This library contains a modified version of Alessandro Colantonio's CONCISE +(COmpressed 'N' Composable Integer SEt) library, extending the functionality of +ConciseSet to use IntBuffers. + + + + +############ BINARY/WEB-CONSOLE ############ + +================= tslib 0.9.3 ================= +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed 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 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + + +############ BINARY/JAVA-CORE ############ + +================= aggdesigner-algorithm-6.0.jar ================= +Aggregate Designer + +Copyright 2006 - 2013 Pentaho Corporation. All rights reserved. +Copyright 2000-2005, 2014-2016 Julian Hyde + + + + +================= airline-0.7.jar ================= +Copyright Notices +================= + +Copyright 2011 Dain Sundstrom +Copyright 2010 Cedric Beust + + + + +================= audience-annotations-0.5.0.jar ================= +Apache Yetus - Audience Annotations +Copyright 2015-2017 The Apache Software Foundation + + + + +================= avatica-core-1.10.0.jar ================= +Apache Calcite Avatica +Copyright 2012-2017 The Apache Software Foundation + + + + +================= avatica-metrics-1.10.0.jar ================= +Apache Calcite Avatica Metrics +Copyright 2012-2017 The Apache Software Foundation + + + + +================= avatica-server-1.10.0.jar ================= +Apache Calcite Avatica Server +Copyright 2012-2017 The Apache Software Foundation + + + + +================= AWS SDK for Java 1.11.199 ================= +AWS SDK for Java +Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +This product includes software developed by +Amazon Technologies, Inc (http://www.amazon.com/). + +********************** +THIRD PARTY COMPONENTS +********************** +This software includes third party software subject to the following copyrights: +- XML parsing and utility functions from JetS3t - Copyright 2006-2009 James Murty. +- PKCS#1 PEM encoded private key parsing and utility functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. + +The licenses for these third party components are included in LICENSE.txt + + + + +================= calcite-core-1.17.0.jar ================= +Calcite Core +Copyright 2012-2018 The Apache Software Foundation + + + + +================= calcite-linq4j-1.17.0.jar ================= +Calcite Linq4j +Copyright 2012-2018 The Apache Software Foundation + + + + +================= classmate-1.0.0.jar ================= +Java ClassMate library was originally written by Tatu Saloranta (tatu.saloranta@iki.fi) + +Other developers who have contributed code are: + +* Brian Langel + + + + +================= commons-beanutils-1.9.3.jar ================= +Apache Commons BeanUtils +Copyright 2000-2016 The Apache Software Foundation + + + + +================= commons-cli-1.2.jar ================= +Apache Commons CLI +Copyright 2001-2009 The Apache Software Foundation + + + + +================= commons-codec-1.7.jar ================= +Apache Commons Codec +Copyright 2002-2012 The Apache Software Foundation + +-------------------------------------------------------------------------------- +src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java contains +test data from http://aspell.sourceforge.net/test/batch0.tab. + +Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org). Verbatim copying +and distribution of this entire article is permitted in any medium, +provided this notice is preserved. +-------------------------------------------------------------------------------- + + + + +================= commons-collections-3.2.2.jar ================= +Apache Commons Collections +Copyright 2001-2015 The Apache Software Foundation + + + + +================= commons-collections4-4.1.jar ================= +Apache Commons Collections +Copyright 2001-2015 The Apache Software Foundation + + + + +================= commons-compress-1.16.jar ================= +Apache Commons Compress +Copyright 2002-2018 The Apache Software Foundation + +The files in the package org.apache.commons.compress.archivers.sevenz +were derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/), +which has been placed in the public domain: + +"LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html) + + + + +================= commons-dbcp2-2.0.1.jar ================= +Apache Commons DBCP +Copyright 2001-2014 The Apache Software Foundation + + + + +================= commons-io-2.5.jar ================= +Apache Commons IO +Copyright 2002-2016 The Apache Software Foundation + + + + +================= commons-lang-2.6.jar ================= +Apache Commons Lang +Copyright 2001-2011 The Apache Software Foundation + + + + +================= commons-lang3-3.7.jar ================= +Apache Commons Lang +Copyright 2001-2017 The Apache Software Foundation + +This product includes software from the Spring Framework, +under the Apache License 2.0 (see: StringUtils.containsWhitespace()) + + + + +================= commons-logging-1.1.1.jar ================= +// ------------------------------------------------------------------ +// NOTICE file corresponding to the section 4d of The Apache License, +// Version 2.0, in this case for Commons Logging +// ------------------------------------------------------------------ + +Commons Logging +Copyright 2001-2007 The Apache Software Foundation + +This product includes/uses software(s) developed by 'an unknown organization' + - Unnamed - avalon-framework:avalon-framework:jar:4.1.3 + - Unnamed - log4j:log4j:jar:1.2.12 + - Unnamed - logkit:logkit:jar:1.0.1 + + + + +================= commons-math3-3.6.1.jar ================= +Apache Commons Math +Copyright 2001-2016 The Apache Software Foundation + +This product includes software developed for Orekit by +CS Systèmes d'Information (http://www.c-s.fr/) +Copyright 2010-2012 CS Systèmes d'Information + + + + +================= commons-pool-1.6.jar ================= +Apache Commons Pool +Copyright 2001-2012 The Apache Software Foundation + + + + +================= commons-pool2-2.2.jar ================= +Apache Commons Pool +Copyright 2001-2014 The Apache Software Foundation + +The LinkedBlockingDeque implementation is based on an implementation written by +Doug Lea with assistance from members of JCP JSR-166 Expert Group and released +to the public domain, as explained at +http://creativecommons.org/licenses/publicdomain + + + + +================= commons-text-1.3.jar ================= +Apache Commons Text +Copyright 2001-2018 The Apache Software Foundation + + + + +================= compress-lzf-1.0.4.jar ================= +# Compress LZF + +This library contains efficient implementation of LZF compression format, +as well as additional helper classes that build on JDK-provided gzip (deflat) +codec. + +## Licensing + +Library is licensed under Apache License 2.0, as per accompanying LICENSE file. + +## Credit + +Library has been written by Tatu Saloranta (tatu.saloranta@iki.fi). +It was started at Ning, inc., as an official Open Source process used by +platform backend, but after initial versions has been developed outside of +Ning by supporting community. + +Other contributors include: + +* Jon Hartlaub (first versions of streaming reader/writer; unit tests) +* Cedrik Lime: parallel LZF implementation + +Various community members have contributed bug reports, and suggested minor +fixes; these can be found from file "VERSION.txt" in SCM. + + + + +================= config-magic-0.9.jar ================= +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + + + + +================= curator-client-4.1.0.jar ================= +Curator Client +Copyright 2011-2018 The Apache Software Foundation + + + + +================= curator-framework-4.1.0.jar ================= +Curator Framework +Copyright 2011-2018 The Apache Software Foundation + + + + +================= curator-recipes-4.1.0.jar ================= +Curator Recipes +Copyright 2011-2018 The Apache Software Foundation + + + + +================= curator-x-discovery-4.1.0.jar ================= +Curator Service Discovery +Copyright 2011-2018 The Apache Software Foundation + + + + +================= Derby 10.11.1.1 ================= +derby-10.11.1.1.jar +derbyclient-10.11.1.1.jar +derbynet-10.11.1.1.jar +================= +========================================================================= +== NOTICE file corresponding to section 4(d) of the Apache License, +== Version 2.0, in this case for the Apache Derby distribution. +== +== DO NOT EDIT THIS FILE DIRECTLY. IT IS GENERATED +== BY THE buildnotice TARGET IN THE TOP LEVEL build.xml FILE. +== +========================================================================= + +Apache Derby +Copyright 2004-2014 The Apache Software Foundation + + +========================================================================= + +Portions of Derby were originally developed by +International Business Machines Corporation and are +licensed to the Apache Software Foundation under the +"Software Grant and Corporate Contribution License Agreement", +informally known as the "Derby CLA". +The following copyright notice(s) were affixed to portions of the code +with which this file is now or was at one time distributed +and are placed here unaltered. + +(C) Copyright 1997,2004 International Business Machines Corporation. All rights reserved. + +(C) Copyright IBM Corp. 2003. + + +========================================================================= + + +The portion of the functionTests under 'nist' was originally +developed by the National Institute of Standards and Technology (NIST), +an agency of the United States Department of Commerce, and adapted by +International Business Machines Corporation in accordance with the NIST +Software Acknowledgment and Redistribution document at +http://www.itl.nist.gov/div897/ctg/sql_form.htm + + + +========================================================================= + + +The JDBC apis for small devices and JDBC3 (under java/stubs/jsr169 and +java/stubs/jdbc3) were produced by trimming sources supplied by the +Apache Harmony project. In addition, the Harmony SerialBlob and +SerialClob implementations are used. The following notice covers the Harmony sources: + +Portions of Harmony were originally developed by +Intel Corporation and are licensed to the Apache Software +Foundation under the "Software Grant and Corporate Contribution +License Agreement", informally known as the "Intel Harmony CLA". + + +========================================================================= + + +The Derby build relies on source files supplied by the Apache Felix +project. The following notice covers the Felix files: + + Apache Felix Main + Copyright 2008 The Apache Software Foundation + + + I. Included Software + + This product includes software developed at + The Apache Software Foundation (http://www.apache.org/). + Licensed under the Apache License 2.0. + + This product includes software developed at + The OSGi Alliance (http://www.osgi.org/). + Copyright (c) OSGi Alliance (2000, 2007). + Licensed under the Apache License 2.0. + + This product includes software from http://kxml.sourceforge.net. + Copyright (c) 2002,2003, Stefan Haustein, Oberhausen, Rhld., Germany. + Licensed under BSD License. + + II. Used Software + + This product uses software developed at + The OSGi Alliance (http://www.osgi.org/). + Copyright (c) OSGi Alliance (2000, 2007). + Licensed under the Apache License 2.0. + + + III. License Summary + - Apache License 2.0 + - BSD License + + +========================================================================= + + +The Derby build relies on jar files supplied by the Apache Lucene +project. The following notice covers the Lucene files: + +Apache Lucene +Copyright 2013 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +Includes software from other Apache Software Foundation projects, +including, but not limited to: + - Apache Ant + - Apache Jakarta Regexp + - Apache Commons + - Apache Xerces + +ICU4J, (under analysis/icu) is licensed under an MIT styles license +and Copyright (c) 1995-2008 International Business Machines Corporation and others + +Some data files (under analysis/icu/src/data) are derived from Unicode data such +as the Unicode Character Database. See http://unicode.org/copyright.html for more +details. + +Brics Automaton (under core/src/java/org/apache/lucene/util/automaton) is +BSD-licensed, created by Anders Møller. See http://www.brics.dk/automaton/ + +The levenshtein automata tables (under core/src/java/org/apache/lucene/util/automaton) were +automatically generated with the moman/finenight FSA library, created by +Jean-Philippe Barrette-LaPierre. This library is available under an MIT license, +see http://sites.google.com/site/rrettesite/moman and +http://bitbucket.org/jpbarrette/moman/overview/ + +The class org.apache.lucene.util.WeakIdentityMap was derived from +the Apache CXF project and is Apache License 2.0. + +The Google Code Prettify is Apache License 2.0. +See http://code.google.com/p/google-code-prettify/ + +JUnit (junit-4.10) is licensed under the Common Public License v. 1.0 +See http://junit.sourceforge.net/cpl-v10.html + +This product includes code (JaspellTernarySearchTrie) from Java Spelling Checkin +g Package (jaspell): http://jaspell.sourceforge.net/ +License: The BSD License (http://www.opensource.org/licenses/bsd-license.php) + +The snowball stemmers in + analysis/common/src/java/net/sf/snowball +were developed by Martin Porter and Richard Boulton. +The snowball stopword lists in + analysis/common/src/resources/org/apache/lucene/analysis/snowball +were developed by Martin Porter and Richard Boulton. +The full snowball package is available from + http://snowball.tartarus.org/ + +The KStem stemmer in + analysis/common/src/org/apache/lucene/analysis/en +was developed by Bob Krovetz and Sergio Guzman-Lara (CIIR-UMass Amherst) +under the BSD-license. + +The Arabic,Persian,Romanian,Bulgarian, and Hindi analyzers (common) come with a default +stopword list that is BSD-licensed created by Jacques Savoy. These files reside in: +analysis/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/fa/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/ro/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/bg/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/hi/stopwords.txt +See http://members.unine.ch/jacques.savoy/clef/index.html. + +The German,Spanish,Finnish,French,Hungarian,Italian,Portuguese,Russian and Swedish light stemmers +(common) are based on BSD-licensed reference implementations created by Jacques Savoy and +Ljiljana Dolamic. These files reside in: +analysis/common/src/java/org/apache/lucene/analysis/de/GermanLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/de/GermanMinimalStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/es/SpanishLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/fi/FinnishLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchMinimalStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/hu/HungarianLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/it/ItalianLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishLightStemmer.java + +The Stempel analyzer (stempel) includes BSD-licensed software developed +by the Egothor project http://egothor.sf.net/, created by Leo Galambos, Martin Kvapil, +and Edmond Nolan. + +The Polish analyzer (stempel) comes with a default +stopword list that is BSD-licensed created by the Carrot2 project. The file resides +in stempel/src/resources/org/apache/lucene/analysis/pl/stopwords.txt. +See http://project.carrot2.org/license.html. + +The SmartChineseAnalyzer source code (smartcn) was +provided by Xiaoping Gao and copyright 2009 by www.imdict.net. + +WordBreakTestUnicode_*.java (under modules/analysis/common/src/test/) +is derived from Unicode data such as the Unicode Character Database. +See http://unicode.org/copyright.html for more details. + +The Morfologik analyzer (morfologik) includes BSD-licensed software +developed by Dawid Weiss and Marcin Miłkowski (http://morfologik.blogspot.com/). + +Morfologik uses data from Polish ispell/myspell dictionary +(http://www.sjp.pl/slownik/en/) licenced on the terms of (inter alia) +LGPL and Creative Commons ShareAlike. + +Morfologic includes data from BSD-licensed dictionary of Polish (SGJP) +(http://sgjp.pl/morfeusz/) + +Servlet-api.jar and javax.servlet-*.jar are under the CDDL license, the original +source code for this can be found at http://www.eclipse.org/jetty/downloads.php + +=========================================================================== +Kuromoji Japanese Morphological Analyzer - Apache Lucene Integration +=========================================================================== + +This software includes a binary and/or source version of data from + + mecab-ipadic-2.7.0-20070801 + +which can be obtained from + + http://atilika.com/releases/mecab-ipadic/mecab-ipadic-2.7.0-20070801.tar.gz + +or + + http://jaist.dl.sourceforge.net/project/mecab/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz + +=========================================================================== +mecab-ipadic-2.7.0-20070801 Notice +=========================================================================== + +Nara Institute of Science and Technology (NAIST), +the copyright holders, disclaims all warranties with regard to this +software, including all implied warranties of merchantability and +fitness, in no event shall NAIST be liable for +any special, 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 tortuous action, arising out +of or in connection with the use or performance of this software. + +A large portion of the dictionary entries +originate from ICOT Free Software. The following conditions for ICOT +Free Software applies to the current dictionary as well. + +Each User may also freely distribute the Program, whether in its +original form or modified, to any third party or parties, PROVIDED +that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear +on, or be attached to, the Program, which is distributed substantially +in the same form as set out herein and that such intended +distribution, if actually made, will neither violate or otherwise +contravene any of the laws and regulations of the countries having +jurisdiction over the User or the intended distribution itself. + +NO WARRANTY + +The program was produced on an experimental basis in the course of the +research and development conducted during the project and is provided +to users as so produced on an experimental basis. Accordingly, the +program is provided without any warranty whatsoever, whether express, +implied, statutory or otherwise. The term "warranty" used herein +includes, but is not limited to, any warranty of the quality, +performance, merchantability and fitness for a particular purpose of +the program and the nonexistence of any infringement or violation of +any right of any third party. + +Each user of the program will agree and understand, and be deemed to +have agreed and understood, that there is no warranty whatsoever for +the program and, accordingly, the entire risk arising from or +otherwise connected with the program is assumed by the user. + +Therefore, neither ICOT, the copyright holder, or any other +organization that participated in or was otherwise related to the +development of the program and their respective officials, directors, +officers and other employees shall be held liable for any and all +damages, including, without limitation, general, special, incidental +and consequential damages, arising out of or otherwise in connection +with the use or inability to use the program or any product, material +or result produced or otherwise obtained by using the program, +regardless of whether they have been advised of, or otherwise had +knowledge of, the possibility of such damages at any time during the +project or thereafter. Each user will be deemed to have agreed to the +foregoing by his or her commencement of use of the program. The term +"use" as used herein includes, but is not limited to, the use, +modification, copying and distribution of the program and the +production of secondary products from the program. + +In the case where the program, whether in its original form or +modified, was distributed or delivered to or received by a user from +any person, organization or entity other than ICOT, unless it makes or +grants independently of ICOT any specific warranty to the user in +writing, such person, organization or entity, will also be exempted +from and not be held liable to the user for any such damages as noted +above as far as the program is concerned. + + + + +================= guice-4.1.0.jar ================= +Google Guice - Core Library +Copyright 2006-2016 Google, Inc. + + + + +================= guice-multibindings-4.1.0.jar ================= +Google Guice - Extensions - MultiBindings +Copyright 2006-2016 Google, Inc. + + + + +================= guice-servlet-4.1.0.jar ================= +Google Guice - Extensions - Servlet +Copyright 2006-2016 Google, Inc. + + + + +================= httpclient-4.5.3.jar ================= +Apache HttpClient +Copyright 1999-2017 The Apache Software Foundation + + + + +================= httpcore-4.4.4.jar ================= +Apache HttpCore +Copyright 2005-2015 The Apache Software Foundation + + +This project contains annotations derived from JCIP-ANNOTATIONS +Copyright (c) 2005 Brian Goetz and Tim Peierls. See http://www.jcip.net + + + + +================= ion-java-1.0.2.jar ================= +Amazon Ion Java +Copyright 2007-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + + + +================= Jackson 2.6.7 ================= +jackson-annotations-2.6.7.jar +jackson-core-2.6.7.jar +jackson-databind-2.6.7.jar +jackson-dataformat-cbor-2.6.7.jar +jackson-dataformat-smile-2.6.7.jar +jackson-datatype-guava-2.6.7.jar +jackson-datatype-joda-2.6.7.jar +jackson-jaxrs-base-2.6.7.jar +jackson-jaxrs-json-provider-2.6.7.jar +jackson-jaxrs-smile-provider-2.6.7.jar +jackson-module-jaxb-annotations-2.6.7.jar +================= +# Jackson JSON processor + +Jackson is a high-performance, Free/Open Source JSON processing library. +It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has +been in development since 2007. +It is currently developed by a community of developers, as well as supported +commercially by FasterXML.com. + +## Licensing + +Jackson core and extension components may licensed under different licenses. +To find the details that apply to this artifact see the accompanying LICENSE file. +For more information, including possible other licensing options, contact +FasterXML.com (http://fasterxml.com). + +## Credits + +A list of contributors may be found from CREDITS file, which is included +in some artifacts (usually source distributions); but is always available +from the source code management (SCM) system project uses. + + + + +================= Jackson 1.9.13 ================= +jackson-core-asl-1.9.13.jar +jackson-mapper-asl-1.9.13.jar +================= +This product currently only contains code developed by authors +of specific components, as identified by the source code files; +if such notes are missing files have been created by +Tatu Saloranta. + +For additional credits (generally to people who reported problems) +see CREDITS file. + + + + +================== Jetty 9.4.10.v20180503 ================= +jetty-client-9.4.10.v20180503.jar +jetty-continuation-9.4.10.v20180503.jar +jetty-http-9.4.10.v20180503.jar +jetty-io-9.4.10.v20180503.jar +jetty-proxy-9.4.10.v20180503.jar +jetty-security-9.4.10.v20180503.jar +jetty-server-9.4.10.v20180503.jar +jetty-servlet-9.4.10.v20180503.jar +jetty-servlets-9.4.10.v20180503.jar +jetty-util-9.4.10.v20180503.jar +================== +============================================================== + Jetty Web Container + Copyright 1995-2018 Mort Bay Consulting Pty Ltd. +============================================================== + +The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd +unless otherwise noted. + +Jetty is dual licensed under both + + * The Apache 2.0 License + http://www.apache.org/licenses/LICENSE-2.0.html + + and + + * The Eclipse Public 1.0 License + http://www.eclipse.org/legal/epl-v10.html + +Jetty may be distributed under either license. + +------ +Eclipse + +The following artifacts are EPL. + * org.eclipse.jetty.orbit:org.eclipse.jdt.core + +The following artifacts are EPL and ASL2. + * org.eclipse.jetty.orbit:javax.security.auth.message + + +The following artifacts are EPL and CDDL 1.0. + * org.eclipse.jetty.orbit:javax.mail.glassfish + + +------ +Oracle + +The following artifacts are CDDL + GPLv2 with classpath exception. +https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html + + * javax.servlet:javax.servlet-api + * javax.annotation:javax.annotation-api + * javax.transaction:javax.transaction-api + * javax.websocket:javax.websocket-api + +------ +Oracle OpenJDK + +If ALPN is used to negotiate HTTP/2 connections, then the following +artifacts may be included in the distribution or downloaded when ALPN +module is selected. + + * java.sun.security.ssl + +These artifacts replace/modify OpenJDK classes. The modififications +are hosted at github and both modified and original are under GPL v2 with +classpath exceptions. +http://openjdk.java.net/legal/gplv2+ce.html + + +------ +OW2 + +The following artifacts are licensed by the OW2 Foundation according to the +terms of http://asm.ow2.org/license.html + +org.ow2.asm:asm-commons +org.ow2.asm:asm + + +------ +Apache + +The following artifacts are ASL2 licensed. + +org.apache.taglibs:taglibs-standard-spec +org.apache.taglibs:taglibs-standard-impl + + +------ +MortBay + +The following artifacts are ASL2 licensed. Based on selected classes from +following Apache Tomcat jars, all ASL2 licensed. + +org.mortbay.jasper:apache-jsp + org.apache.tomcat:tomcat-jasper + org.apache.tomcat:tomcat-juli + org.apache.tomcat:tomcat-jsp-api + org.apache.tomcat:tomcat-el-api + org.apache.tomcat:tomcat-jasper-el + org.apache.tomcat:tomcat-api + org.apache.tomcat:tomcat-util-scan + org.apache.tomcat:tomcat-util + +org.mortbay.jasper:apache-el + org.apache.tomcat:tomcat-jasper-el + org.apache.tomcat:tomcat-el-api + + +------ +Mortbay + +The following artifacts are CDDL + GPLv2 with classpath exception. + +https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html + +org.eclipse.jetty.toolchain:jetty-schemas + +------ +Assorted + +The UnixCrypt.java code implements the one way cryptography used by +Unix systems for simple password protection. Copyright 1996 Aki Yoshida, +modified April 2001 by Iris Van den Broeke, Daniel Deville. +Permission to use, copy, modify and distribute UnixCrypt +for non-commercial or commercial purposes and without fee is +granted provided that the copyright notice appears in all copies. + + + + +================= jdbi-2.63.1.jar ================= +Java ClassMate library was originally written by Tatu Saloranta (tatu.saloranta@iki.fi) + +Other developers who have contributed code are: + +* Brian Langel + + + + +================= joda-time-2.9.9.jar ================= +============================================================================= += NOTICE file corresponding to section 4d of the Apache License Version 2.0 = +============================================================================= +This product includes software developed by +Joda.org (http://www.joda.org/). + + + + +================= log4j-1.2-api-2.5.jar ================= +Apache Log4j 1.x Compatibility API +Copyright 1999-2015 Apache Software Foundation + + + + +================= log4j-api-2.5.jar ================= +Apache Log4j API +Copyright 1999-2015 Apache Software Foundation + + + + +================= log4j-core-2.5.jar ================= +Apache Log4j Core +Copyright 1999-2012 Apache Software Foundation + +ResolverUtil.java +Copyright 2005-2006 Tim Fennell + + + + +================= log4j-jul-2.5.jar ================= +Apache Log4j JUL Adapter +Copyright 1999-2015 Apache Software Foundation + + + + +================= log4j-slf4j-impl-2.5.jar ================= +Apache Log4j SLF4J Binding +Copyright 1999-2015 Apache Software Foundation + + + + +================= maven-aether-provider-3.1.1.jar ================= +Maven Aether Provider +Copyright 2001-2013 The Apache Software Foundation + + + + +================= maven-artifact-3.6.0.jar ================= +Maven Artifact +Copyright 2001-2018 The Apache Software Foundation + + + + +================= maven-model-3.1.1.jar ================= +Maven Model +Copyright 2001-2013 The Apache Software Foundation + + + + +================= maven-model-builder-3.1.1.jar ================= +Maven Model Builder +Copyright 2001-2013 The Apache Software Foundation + + + + +================= maven-repository-metadata-3.1.1.jar ================= +Maven Repository Metadata Model +Copyright 2001-2013 The Apache Software Foundation + + + + +================= maven-settings-3.1.1.jar ================= +Maven Settings +Copyright 2001-2013 The Apache Software Foundation + + + + +================= maven-settings-builder-3.1.1.jar ================= +Maven Settings Builder +Copyright 2001-2013 The Apache Software Foundation + + + + +================= metrics-core-4.0.0.jar ================= +Metrics +Copyright 2010-2013 Coda Hale and Yammer, Inc., 2014-2017 Dropwizard Team + +This product includes software developed by Coda Hale and Yammer, Inc. + +This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64, +LongAdder), which was released with the following comments: + + Written by Doug Lea with assistance from members of JCP JSR-166 + Expert Group and released to the public domain, as explained at + http://creativecommons.org/publicdomain/zero/1.0/ + + + + +================= netty-3.10.6.Final.jar ================= + The Netty Project + ================= + +Please visit the Netty web site for more information: + + * http://netty.io/ + +Copyright 2011 The Netty Project + +The Netty Project 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. + +Also, please refer to each LICENSE..txt file, which is located in +the 'license' directory of the distribution file, for the license terms of the +components that this product depends on. + +------------------------------------------------------------------------------- +This product contains the extensions to Java Collections Framework which has +been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: + + * LICENSE: + * license/LICENSE.jsr166y.txt (Public Domain) + * HOMEPAGE: + * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ + * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ + +This product contains a modified version of Robert Harder's Public Domain +Base64 Encoder and Decoder, which can be obtained at: + + * LICENSE: + * license/LICENSE.base64.txt (Public Domain) + * HOMEPAGE: + * http://iharder.sourceforge.net/current/java/base64/ + +This product contains a modified version of 'JZlib', a re-implementation of +zlib in pure Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.jzlib.txt (BSD Style License) + * HOMEPAGE: + * http://www.jcraft.com/jzlib/ + +This product contains a modified version of 'Webbit', a Java event based +WebSocket and HTTP server: + + * LICENSE: + * license/LICENSE.webbit.txt (BSD License) + * HOMEPAGE: + * https://github.com/joewalnes/webbit + +This product optionally depends on 'Protocol Buffers', Google's data +interchange format, which can be obtained at: + + * LICENSE: + * license/LICENSE.protobuf.txt (New BSD License) + * HOMEPAGE: + * http://code.google.com/p/protobuf/ + +This product optionally depends on 'Bouncy Castle Crypto APIs' to generate +a temporary self-signed X.509 certificate when the JVM does not provide the +equivalent functionality. It can be obtained at: + + * LICENSE: + * license/LICENSE.bouncycastle.txt (MIT License) + * HOMEPAGE: + * http://www.bouncycastle.org/ + +This product optionally depends on 'SLF4J', a simple logging facade for Java, +which can be obtained at: + + * LICENSE: + * license/LICENSE.slf4j.txt (MIT License) + * HOMEPAGE: + * http://www.slf4j.org/ + +This product optionally depends on 'Apache Commons Logging', a logging +framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-logging.txt (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging/ + +This product optionally depends on 'Apache Log4J', a logging framework, +which can be obtained at: + + * LICENSE: + * license/LICENSE.log4j.txt (Apache License 2.0) + * HOMEPAGE: + * http://logging.apache.org/log4j/ + +This product optionally depends on 'JBoss Logging', a logging framework, +which can be obtained at: + + * LICENSE: + * license/LICENSE.jboss-logging.txt (GNU LGPL 2.1) + * HOMEPAGE: + * http://anonsvn.jboss.org/repos/common/common-logging-spi/ + +This product optionally depends on 'Apache Felix', an open source OSGi +framework implementation, which can be obtained at: + + * LICENSE: + * license/LICENSE.felix.txt (Apache License 2.0) + * HOMEPAGE: + * http://felix.apache.org/ + + + + +================= Netty 4 ================= +netty-all-4.1.30.Final.jar +netty-buffer-4.1.29.Final.jar +netty-codec-4.1.29.Final.jar +netty-codec-dns-4.1.29.Final.jar +netty-codec-http-4.1.29.Final.jar +netty-codec-socks-4.1.29.Final.jar +netty-common-4.1.29.Final.jar +netty-handler-4.1.29.Final.jar +netty-handler-proxy-4.1.29.Final.jar +netty-reactive-streams-2.0.0.jar +netty-resolver-4.1.29.Final.jar +netty-resolver-dns-4.1.29.Final.jar +netty-transport-4.1.29.Final.jar +netty-transport-native-epoll-4.1.29.Final-linux-x86_64.jar +netty-transport-native-unix-common-4.1.29.Final.jar +================= + The Netty Project + ================= + +Please visit the Netty web site for more information: + + * http://netty.io/ + +Copyright 2014 The Netty Project + +The Netty Project 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. + +Also, please refer to each LICENSE..txt file, which is located in +the 'license' directory of the distribution file, for the license terms of the +components that this product depends on. + +------------------------------------------------------------------------------- +This product contains the extensions to Java Collections Framework which has +been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: + + * LICENSE: + * license/LICENSE.jsr166y.txt (Public Domain) + * HOMEPAGE: + * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ + * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ + +This product contains a modified version of Robert Harder's Public Domain +Base64 Encoder and Decoder, which can be obtained at: + + * LICENSE: + * license/LICENSE.base64.txt (Public Domain) + * HOMEPAGE: + * http://iharder.sourceforge.net/current/java/base64/ + +This product contains a modified portion of 'Webbit', an event based +WebSocket and HTTP server, which can be obtained at: + + * LICENSE: + * license/LICENSE.webbit.txt (BSD License) + * HOMEPAGE: + * https://github.com/joewalnes/webbit + +This product contains a modified portion of 'SLF4J', a simple logging +facade for Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.slf4j.txt (MIT License) + * HOMEPAGE: + * http://www.slf4j.org/ + +This product contains a modified portion of 'Apache Harmony', an open source +Java SE, which can be obtained at: + + * NOTICE: + * license/NOTICE.harmony.txt + * LICENSE: + * license/LICENSE.harmony.txt (Apache License 2.0) + * HOMEPAGE: + * http://archive.apache.org/dist/harmony/ + +This product contains a modified portion of 'jbzip2', a Java bzip2 compression +and decompression library written by Matthew J. Francis. It can be obtained at: + + * LICENSE: + * license/LICENSE.jbzip2.txt (MIT License) + * HOMEPAGE: + * https://code.google.com/p/jbzip2/ + +This product contains a modified portion of 'libdivsufsort', a C API library to construct +the suffix array and the Burrows-Wheeler transformed string for any input string of +a constant-size alphabet written by Yuta Mori. It can be obtained at: + + * LICENSE: + * license/LICENSE.libdivsufsort.txt (MIT License) + * HOMEPAGE: + * https://github.com/y-256/libdivsufsort + +This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM, + which can be obtained at: + + * LICENSE: + * license/LICENSE.jctools.txt (ASL2 License) + * HOMEPAGE: + * https://github.com/JCTools/JCTools + +This product optionally depends on 'JZlib', a re-implementation of zlib in +pure Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.jzlib.txt (BSD style License) + * HOMEPAGE: + * http://www.jcraft.com/jzlib/ + +This product optionally depends on 'Compress-LZF', a Java library for encoding and +decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: + + * LICENSE: + * license/LICENSE.compress-lzf.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/ning/compress + +This product optionally depends on 'lz4', a LZ4 Java compression +and decompression library written by Adrien Grand. It can be obtained at: + + * LICENSE: + * license/LICENSE.lz4.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jpountz/lz4-java + +This product optionally depends on 'lzma-java', a LZMA Java compression +and decompression library, which can be obtained at: + + * LICENSE: + * license/LICENSE.lzma-java.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jponge/lzma-java + +This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression +and decompression library written by William Kinney. It can be obtained at: + + * LICENSE: + * license/LICENSE.jfastlz.txt (MIT License) + * HOMEPAGE: + * https://code.google.com/p/jfastlz/ + +This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data +interchange format, which can be obtained at: + + * LICENSE: + * license/LICENSE.protobuf.txt (New BSD License) + * HOMEPAGE: + * https://github.com/google/protobuf + +This product optionally depends on 'Bouncy Castle Crypto APIs' to generate +a temporary self-signed X.509 certificate when the JVM does not provide the +equivalent functionality. It can be obtained at: + + * LICENSE: + * license/LICENSE.bouncycastle.txt (MIT License) + * HOMEPAGE: + * http://www.bouncycastle.org/ + +This product optionally depends on 'Snappy', a compression library produced +by Google Inc, which can be obtained at: + + * LICENSE: + * license/LICENSE.snappy.txt (New BSD License) + * HOMEPAGE: + * https://github.com/google/snappy + +This product optionally depends on 'JBoss Marshalling', an alternative Java +serialization API, which can be obtained at: + + * LICENSE: + * license/LICENSE.jboss-marshalling.txt (GNU LGPL 2.1) + * HOMEPAGE: + * http://www.jboss.org/jbossmarshalling + +This product optionally depends on 'Caliper', Google's micro- +benchmarking framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.caliper.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/google/caliper + +This product optionally depends on 'Apache Commons Logging', a logging +framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-logging.txt (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging/ + +This product optionally depends on 'Apache Log4J', a logging framework, which +can be obtained at: + + * LICENSE: + * license/LICENSE.log4j.txt (Apache License 2.0) + * HOMEPAGE: + * http://logging.apache.org/log4j/ + +This product optionally depends on 'Aalto XML', an ultra-high performance +non-blocking XML processor, which can be obtained at: + + * LICENSE: + * license/LICENSE.aalto-xml.txt (Apache License 2.0) + * HOMEPAGE: + * http://wiki.fasterxml.com/AaltoHome + +This product contains a modified version of 'HPACK', a Java implementation of +the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: + + * LICENSE: + * license/LICENSE.hpack.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/twitter/hpack + +This product contains a modified portion of 'Apache Commons Lang', a Java library +provides utilities for the java.lang API, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-lang.txt (Apache License 2.0) + * HOMEPAGE: + * https://commons.apache.org/proper/commons-lang/ + + +This product contains the Maven wrapper scripts from 'Maven Wrapper', that provides an easy way to ensure a user has everything necessary to run the Maven build. + + * LICENSE: + * license/LICENSE.mvn-wrapper.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/takari/maven-wrapper + + + + +================= objenesis-2.6.jar ================= +// ------------------------------------------------------------------ +// NOTICE file corresponding to the section 4d of The Apache License, +// Version 2.0, in this case for Objenesis +// ------------------------------------------------------------------ + +Objenesis +Copyright 2006-2017 Joe Walnes, Henri Tremblay, Leonardo Mesquita + + + + +================= plexus-utils-3.0.15.jar ================= +This product includes software developed by the Indiana University + Extreme! Lab (http://www.extreme.indiana.edu/). + +This product includes software developed by +ThoughtWorks (http://www.thoughtworks.com). + +This product includes software developed by +javolution (http://javolution.org/). + +This product includes software developed by +Rome (https://rome.dev.java.net/). + + + + +================= sigar-1.6.5.132.jar ================= +Copyright (c) 2004-2011 VMware, Inc. + +Licensed 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. + +ADDITIONAL LICENSE INFORMATION: + +Hyperic SIGAR includes some third-party open source components +in its distribution. The list below identifies the community or +organization and links to their appropriate license terms. + +The Hyperic team would like to thank all the communities +of the projects listed below for their contributions. + +---------------------------------------------------------- +Components under the Apache License 2.0: +---------------------------------------------------------- + +The following components are included without modification: + +- log4j - +Information: http://logging.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +The following components are included with modification: + +- cpptasks - +Information: http://ant-contrib.sourceforge.net/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +- (portions of) APR - +Information: http://apr.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +---------------------------------------------------------- +Components under BSD/MIT Style Licenses: +---------------------------------------------------------- + +The following components are included with modification: + +- solaris get_mib2 - +Information: ftp://vic.cc.purdue.edu/pub/tools/unix/solaris/get_mib2/ +License: within src/os/solaris/get_mib2.[ch] + +Copyright 1995 Purdue Research Foundation, West Lafayette, Indiana +47907. All rights reserved. + +Written by Victor A. Abell + +This software is not subject to any license of the American Telephone +and Telegraph Company or the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it freely, subject +to the following restrictions: + +1. Neither Victor A Abell nor Purdue University are responsible for + any consequences of the use of this software. + +2. The origin of this software must not be misrepresented, either by + explicit claim or by omission. Credit to Victor A. Abell and Purdue + University must appear in documentation and sources. + +3. Altered versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +4. This notice may not be removed or altered. + +- getline by Chris Thewalt - +Information: http://tinyurl.com/r438r +License: within src/sigar_getline.c + +Copyright (C) 1991, 1992 by Chris Thewalt (thewalt@ce.berkeley.edu) + +Permission to use, copy, modify, and distribute this software +for any purpose and without fee is hereby granted, provided +that the above copyright notices appear in all copies and that both the +copyright notice and this permission notice appear in supporting +documentation. This software is provided "as is" without express or +implied warranty. + +- PrintfFormat.java - +Information: http://java.sun.com/developer/technicalArticles/Programming/sprintf/PrintfFormat.java +License: within bindings/java/src/org/hyperic/sigar/util/PrintfFormat.java + +(c) 2000 Sun Microsystems, Inc. +ALL RIGHTS RESERVED + +License Grant- + +Permission to use, copy, modify, and distribute this Software and its +documentation for NON-COMMERCIAL or COMMERCIAL purposes and without fee is +hereby granted. + +This Software is provided "AS IS". All express warranties, including any +implied warranty of merchantability, satisfactory quality, fitness for a +particular purpose, or non-infringement, are disclaimed, except to the extent +that such disclaimers are held to be legally invalid. + +You acknowledge that Software is not designed, licensed or intended for use in +the design, construction, operation or maintenance of any nuclear facility +("High Risk Activities"). Sun disclaims any express or implied warranty of +fitness for such uses. + +Please refer to the file http://www.sun.com/policies/trademarks/ for further +important trademark information and to +http://java.sun.com/nav/business/index.html for further important licensing +information for the Java Technology. + + + + +================= wagon-provider-api-2.4.jar ================= +Apache Maven Wagon :: API +Copyright 2003-2013 The Apache Software Foundation + + + + +================= zookeeper-3.4.11.jar ================= +Apache ZooKeeper +Copyright 2009-2017 The Apache Software Foundation + + + + + + + + + +############ BINARY/HADOOP-CLIENT ############ + +================= apacheds-i18n-2.0.0-M15.jar ================= +ApacheDS I18n +Copyright 2003-2013 The Apache Software Foundation + + + + +================= apacheds-kerberos-codec-2.0.0-M15.jar ================= +ApacheDS Protocol Kerberos Codec +Copyright 2003-2013 The Apache Software Foundation + + + + +================= api-asn1-api-1.0.0-M20.jar ================= +Apache Directory API ASN.1 API +Copyright 2003-2013 The Apache Software Foundation + + + + +================= api-util-1.0.0-M20.jar ================= +Apache Directory LDAP API Utilities +Copyright 2003-2013 The Apache Software Foundation + + + + +================= avro-1.7.4.jar ================= +Apache Avro +Copyright 2009-2013 The Apache Software Foundation + + + + +================= commons-beanutils-1.7.0.jar ================= +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + + + + +================= commons-beanutils-core-1.8.0.jar ================= +Apache Commons BeanUtils +Copyright 2000-2008 The Apache Software Foundation + + + + +================= commons-codec-1.4.jar ================= +Apache Commons Codec +Copyright 2002-2009 The Apache Software Foundation + +-------------------------------------------------------------------------------- +src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java contains +test data from http://aspell.sourceforge.net/test/batch0.tab. + +Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org). Verbatim copying +and distribution of this entire article is permitted in any medium, +provided this notice is preserved. +-------------------------------------------------------------------------------- + + + + +================= commons-compress-1.4.1.jar ================= +Apache Commons Compress +Copyright 2002-2012 The Apache Software Foundation + + + + +================= commons-configuration-1.6.jar ================= +Apache Commons Configuration +Copyright 2001-2008 The Apache Software Foundation + + + + +================= commons-digester-1.8.jar ================= +Apache Jakarta Commons Digester +Copyright 2001-2006 The Apache Software Foundation + + + + +================= commons-io-2.4.jar ================= +Apache Commons IO +Copyright 2002-2012 The Apache Software Foundation + + + + +================= commons-logging-1.1.3.jar ================= +Apache Commons Logging +Copyright 2003-2013 The Apache Software Foundation + + + + +================= commons-math3-3.1.1.jar ================= +Apache Commons Math +Copyright 2001-2012 The Apache Software Foundation + +=============================================================================== + +The BracketFinder (package org.apache.commons.math3.optimization.univariate) +and PowellOptimizer (package org.apache.commons.math3.optimization.general) +classes are based on the Python code in module "optimize.py" (version 0.5) +developed by Travis E. Oliphant for the SciPy library (http://www.scipy.org/) +Copyright © 2003-2009 SciPy Developers. +=============================================================================== + +The LinearConstraint, LinearObjectiveFunction, LinearOptimizer, +RelationShip, SimplexSolver and SimplexTableau classes in package +org.apache.commons.math3.optimization.linear include software developed by +Benjamin McCann (http://www.benmccann.com) and distributed with +the following copyright: Copyright 2009 Google Inc. +=============================================================================== + +This product includes software developed by the +University of Chicago, as Operator of Argonne National +Laboratory. +The LevenbergMarquardtOptimizer class in package +org.apache.commons.math3.optimization.general includes software +translated from the lmder, lmpar and qrsolv Fortran routines +from the Minpack package +Minpack Copyright Notice (1999) University of Chicago. All rights reserved +=============================================================================== + +The GraggBulirschStoerIntegrator class in package +org.apache.commons.math3.ode.nonstiff includes software translated +from the odex Fortran routine developed by E. Hairer and G. Wanner. +Original source copyright: +Copyright (c) 2004, Ernst Hairer +=============================================================================== + +The EigenDecompositionImpl class in package +org.apache.commons.math3.linear includes software translated +from some LAPACK Fortran routines. Original source copyright: +Copyright (c) 1992-2008 The University of Tennessee. All rights reserved. +=============================================================================== + +The MersenneTwister class in package org.apache.commons.math3.random +includes software translated from the 2002-01-26 version of +the Mersenne-Twister generator written in C by Makoto Matsumoto and Takuji +Nishimura. Original source copyright: +Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, +All rights reserved +=============================================================================== + +The LocalizedFormatsTest class in the unit tests is an adapted version of +the OrekitMessagesTest class from the orekit library distributed under the +terms of the Apache 2 licence. Original source copyright: +Copyright 2010 CS Systèmes d'Information +=============================================================================== + +The HermiteInterpolator class and its corresponding test have been imported from +the orekit library distributed under the terms of the Apache 2 licence. Original +source copyright: +Copyright 2010-2012 CS Systèmes d'Information +=============================================================================== + +The creation of the package "o.a.c.m.analysis.integration.gauss" was inspired +by an original code donated by Sébastien Brisard. +=============================================================================== + + +The complete text of licenses and disclaimers associated with the the original +sources enumerated above at the time of code translation are in the LICENSE.txt +file. + + + + +================= commons-net-3.1.jar ================= +Apache Commons Net +Copyright 2001-2012 The Apache Software Foundation + + + + +================= curator-client-2.7.1.jar ================= +Curator Client +Copyright 2011-2015 The Apache Software Foundation + + + + +================= curator-framework-2.7.1.jar ================= +Curator Framework +Copyright 2011-2015 The Apache Software Foundation + + + + +================= curator-recipes-2.7.1.jar ================= +Curator Recipes +Copyright 2011-2015 The Apache Software Foundation + + + + +================= Hadoop 2.8.3 ================= +hadoop-annotations-2.8.3.jar +hadoop-auth-2.8.3.jar +hadoop-client-2.8.3.jar +hadoop-common-2.8.3.jar +hadoop-hdfs-client-2.8.3.jar +hadoop-mapreduce-client-app-2.8.3.jar +hadoop-mapreduce-client-common-2.8.3.jar +hadoop-mapreduce-client-core-2.8.3.jar +hadoop-mapreduce-client-jobclient-2.8.3.jar +hadoop-mapreduce-client-shuffle-2.8.3.jar +hadoop-yarn-api-2.8.3.jar +hadoop-yarn-client-2.8.3.jar +hadoop-yarn-common-2.8.3.jar +hadoop-yarn-server-common-2.8.3.jar +================= +The binary distribution of this product bundles binaries of +org.iq80.leveldb:leveldb-api (https://github.com/dain/leveldb), which has the +following notices: +* Copyright 2011 Dain Sundstrom +* Copyright 2011 FuseSource Corp. http://fusesource.com + +The binary distribution of this product bundles binaries of +org.fusesource.hawtjni:hawtjni-runtime (https://github.com/fusesource/hawtjni), +which has the following notices: +* This product includes software developed by FuseSource Corp. + http://fusesource.com +* This product includes software developed at + Progress Software Corporation and/or its subsidiaries or affiliates. +* This product includes software developed by IBM Corporation and others. + +The binary distribution of this product bundles binaries of +AWS Java SDK 1.10.6, +which has the following notices: + * This software includes third party software subject to the following + copyrights: - XML parsing and utility functions from JetS3t - Copyright + 2006-2009 James Murty. - JSON parsing and utility functions from JSON.org - + Copyright 2002 JSON.org. - PKCS#1 PEM encoded private key parsing and utility + functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. + +The binary distribution of this product bundles binaries of +Gson 2.2.4, +which has the following notices: + + The Netty Project + ================= + +Please visit the Netty web site for more information: + + * http://netty.io/ + +Copyright 2014 The Netty Project + +The Netty Project 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. + +Also, please refer to each LICENSE..txt file, which is located in +the 'license' directory of the distribution file, for the license terms of the +components that this product depends on. + +------------------------------------------------------------------------------- +This product contains the extensions to Java Collections Framework which has +been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: + + * LICENSE: + * license/LICENSE.jsr166y.txt (Public Domain) + * HOMEPAGE: + * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ + * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ + +This product contains a modified version of Robert Harder's Public Domain +Base64 Encoder and Decoder, which can be obtained at: + + * LICENSE: + * license/LICENSE.base64.txt (Public Domain) + * HOMEPAGE: + * http://iharder.sourceforge.net/current/java/base64/ + +This product contains a modified portion of 'Webbit', an event based +WebSocket and HTTP server, which can be obtained at: + + * LICENSE: + * license/LICENSE.webbit.txt (BSD License) + * HOMEPAGE: + * https://github.com/joewalnes/webbit + +This product contains a modified portion of 'SLF4J', a simple logging +facade for Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.slf4j.txt (MIT License) + * HOMEPAGE: + * http://www.slf4j.org/ + +This product contains a modified portion of 'ArrayDeque', written by Josh +Bloch of Google, Inc: + + * LICENSE: + * license/LICENSE.deque.txt (Public Domain) + +This product contains a modified portion of 'Apache Harmony', an open source +Java SE, which can be obtained at: + + * LICENSE: + * license/LICENSE.harmony.txt (Apache License 2.0) + * HOMEPAGE: + * http://archive.apache.org/dist/harmony/ + +This product contains a modified version of Roland Kuhn's ASL2 +AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue. +It can be obtained at: + + * LICENSE: + * license/LICENSE.abstractnodequeue.txt (Public Domain) + * HOMEPAGE: + * https://github.com/akka/akka/blob/wip-2.2.3-for-scala-2.11/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java + +This product contains a modified portion of 'jbzip2', a Java bzip2 compression +and decompression library written by Matthew J. Francis. It can be obtained at: + + * LICENSE: + * license/LICENSE.jbzip2.txt (MIT License) + * HOMEPAGE: + * https://code.google.com/p/jbzip2/ + +This product contains a modified portion of 'libdivsufsort', a C API library to construct +the suffix array and the Burrows-Wheeler transformed string for any input string of +a constant-size alphabet written by Yuta Mori. It can be obtained at: + + * LICENSE: + * license/LICENSE.libdivsufsort.txt (MIT License) + * HOMEPAGE: + * https://code.google.com/p/libdivsufsort/ + +This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM, + which can be obtained at: + + * LICENSE: + * license/LICENSE.jctools.txt (ASL2 License) + * HOMEPAGE: + * https://github.com/JCTools/JCTools + +This product optionally depends on 'JZlib', a re-implementation of zlib in +pure Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.jzlib.txt (BSD style License) + * HOMEPAGE: + * http://www.jcraft.com/jzlib/ + +This product optionally depends on 'Compress-LZF', a Java library for encoding and +decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: + + * LICENSE: + * license/LICENSE.compress-lzf.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/ning/compress + +This product optionally depends on 'lz4', a LZ4 Java compression +and decompression library written by Adrien Grand. It can be obtained at: + + * LICENSE: + * license/LICENSE.lz4.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jpountz/lz4-java + +This product optionally depends on 'lzma-java', a LZMA Java compression +and decompression library, which can be obtained at: + + * LICENSE: + * license/LICENSE.lzma-java.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jponge/lzma-java + +This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression +and decompression library written by William Kinney. It can be obtained at: + + * LICENSE: + * license/LICENSE.jfastlz.txt (MIT License) + * HOMEPAGE: + * https://code.google.com/p/jfastlz/ + +This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data +interchange format, which can be obtained at: + + * LICENSE: + * license/LICENSE.protobuf.txt (New BSD License) + * HOMEPAGE: + * http://code.google.com/p/protobuf/ + +This product optionally depends on 'Bouncy Castle Crypto APIs' to generate +a temporary self-signed X.509 certificate when the JVM does not provide the +equivalent functionality. It can be obtained at: + + * LICENSE: + * license/LICENSE.bouncycastle.txt (MIT License) + * HOMEPAGE: + * http://www.bouncycastle.org/ + +This product optionally depends on 'Snappy', a compression library produced +by Google Inc, which can be obtained at: + + * LICENSE: + * license/LICENSE.snappy.txt (New BSD License) + * HOMEPAGE: + * http://code.google.com/p/snappy/ + +This product optionally depends on 'JBoss Marshalling', an alternative Java +serialization API, which can be obtained at: + + * LICENSE: + * license/LICENSE.jboss-marshalling.txt (GNU LGPL 2.1) + * HOMEPAGE: + * http://www.jboss.org/jbossmarshalling + +This product optionally depends on 'Caliper', Google's micro- +benchmarking framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.caliper.txt (Apache License 2.0) + * HOMEPAGE: + * http://code.google.com/p/caliper/ + +This product optionally depends on 'Apache Commons Logging', a logging +framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-logging.txt (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging/ + +This product optionally depends on 'Apache Log4J', a logging framework, which +can be obtained at: + + * LICENSE: + * license/LICENSE.log4j.txt (Apache License 2.0) + * HOMEPAGE: + * http://logging.apache.org/log4j/ + +This product optionally depends on 'Aalto XML', an ultra-high performance +non-blocking XML processor, which can be obtained at: + + * LICENSE: + * license/LICENSE.aalto-xml.txt (Apache License 2.0) + * HOMEPAGE: + * http://wiki.fasterxml.com/AaltoHome + +This product contains a modified version of 'HPACK', a Java implementation of +the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: + + * LICENSE: + * license/LICENSE.hpack.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/twitter/hpack + +This product contains a modified portion of 'Apache Commons Lang', a Java library +provides utilities for the java.lang API, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-lang.txt (Apache License 2.0) + * HOMEPAGE: + * https://commons.apache.org/proper/commons-lang/ + +The binary distribution of this product bundles binaries of +Commons Codec 1.4, +which has the following notices: + * src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.javacontains test data from http://aspell.net/test/orig/batch0.tab.Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) + =============================================================================== + The content of package org.apache.commons.codec.language.bm has been translated + from the original php source code available at http://stevemorse.org/phoneticinfo.htm + with permission from the original authors. + Original source copyright:Copyright (c) 2008 Alexander Beider & Stephen P. Morse. + +The binary distribution of this product bundles binaries of +Commons Lang 2.6, +which has the following notices: + * This product includes software from the Spring Framework,under the Apache License 2.0 (see: StringUtils.containsWhitespace()) + +The binary distribution of this product bundles binaries of +Apache Log4j 1.2.17, +which has the following notices: + * ResolverUtil.java + Copyright 2005-2006 Tim Fennell + Dumbster SMTP test server + Copyright 2004 Jason Paul Kitchen + TypeUtil.java + Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams + +The binary distribution of this product bundles binaries of +Java Concurrency in Practice book annotations 1.0, +which has the following notices: + * Copyright (c) 2005 Brian Goetz and Tim Peierls Released under the Creative + Commons Attribution License (http://creativecommons.org/licenses/by/2.5) + Official home: http://www.jcip.net Any republication or derived work + distributed in source code form must include this copyright and license + notice. + +The binary distribution of this product bundles binaries of +Jetty 6.1.26, +which has the following notices: + * ============================================================== + Jetty Web Container + Copyright 1995-2016 Mort Bay Consulting Pty Ltd. + ============================================================== + + The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd + unless otherwise noted. + + Jetty is dual licensed under both + + * The Apache 2.0 License + http://www.apache.org/licenses/LICENSE-2.0.html + + and + + * The Eclipse Public 1.0 License + http://www.eclipse.org/legal/epl-v10.html + + Jetty may be distributed under either license. + + ------ + Eclipse + + The following artifacts are EPL. + * org.eclipse.jetty.orbit:org.eclipse.jdt.core + + The following artifacts are EPL and ASL2. + * org.eclipse.jetty.orbit:javax.security.auth.message + + + The following artifacts are EPL and CDDL 1.0. + * org.eclipse.jetty.orbit:javax.mail.glassfish + + + ------ + Oracle + + The following artifacts are CDDL + GPLv2 with classpath exception. + https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html + + * javax.servlet:javax.servlet-api + * javax.annotation:javax.annotation-api + * javax.transaction:javax.transaction-api + * javax.websocket:javax.websocket-api + + ------ + Oracle OpenJDK + + If ALPN is used to negotiate HTTP/2 connections, then the following + artifacts may be included in the distribution or downloaded when ALPN + module is selected. + + * java.sun.security.ssl + + These artifacts replace/modify OpenJDK classes. The modififications + are hosted at github and both modified and original are under GPL v2 with + classpath exceptions. + http://openjdk.java.net/legal/gplv2+ce.html + + + ------ + OW2 + + The following artifacts are licensed by the OW2 Foundation according to the + terms of http://asm.ow2.org/license.html + + org.ow2.asm:asm-commons + org.ow2.asm:asm + + + ------ + Apache + + The following artifacts are ASL2 licensed. + + org.apache.taglibs:taglibs-standard-spec + org.apache.taglibs:taglibs-standard-impl + + + ------ + MortBay + + The following artifacts are ASL2 licensed. Based on selected classes from + following Apache Tomcat jars, all ASL2 licensed. + + org.mortbay.jasper:apache-jsp + org.apache.tomcat:tomcat-jasper + org.apache.tomcat:tomcat-juli + org.apache.tomcat:tomcat-jsp-api + org.apache.tomcat:tomcat-el-api + org.apache.tomcat:tomcat-jasper-el + org.apache.tomcat:tomcat-api + org.apache.tomcat:tomcat-util-scan + org.apache.tomcat:tomcat-util + + org.mortbay.jasper:apache-el + org.apache.tomcat:tomcat-jasper-el + org.apache.tomcat:tomcat-el-api + + + ------ + Mortbay + + The following artifacts are CDDL + GPLv2 with classpath exception. + + https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html + + org.eclipse.jetty.toolchain:jetty-schemas + + ------ + Assorted + + The UnixCrypt.java code implements the one way cryptography used by + Unix systems for simple password protection. Copyright 1996 Aki Yoshida, + modified April 2001 by Iris Van den Broeke, Daniel Deville. + Permission to use, copy, modify and distribute UnixCrypt + for non-commercial or commercial purposes and without fee is + granted provided that the copyright notice appears in all copies./ + +The binary distribution of this product bundles binaries of +Snappy for Java 1.0.4.1, +which has the following notices: + * This product includes software developed by Google + Snappy: http://code.google.com/p/snappy/ (New BSD License) + + This product includes software developed by Apache + PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ + (Apache 2.0 license) + + This library containd statically linked libstdc++. This inclusion is allowed by + "GCC RUntime Library Exception" + http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html + + == Contributors == + * Tatu Saloranta + * Providing benchmark suite + * Alec Wysoker + * Performance and memory usage improvement + +The binary distribution of this product bundles binaries of +Xerces2 Java Parser 2.9.1, +which has the following notices: + * ========================================================================= + == NOTICE file corresponding to section 4(d) of the Apache License, == + == Version 2.0, in this case for the Apache Xerces Java distribution. == + ========================================================================= + + Apache Xerces Java + Copyright 1999-2007 The Apache Software Foundation + + This product includes software developed at + The Apache Software Foundation (http://www.apache.org/). + + Portions of this software were originally based on the following: + - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. + - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. + - voluntary contributions made by Paul Eng on behalf of the + Apache Software Foundation that were originally developed at iClick, Inc., + software copyright (c) 1999. + + + + +================= htrace-core4-4.0.1-incubating.jar ================= +htrace-core4 +Copyright 2015 The Apache Software Foundation + + + + +================= httpclient-4.5.2.jar ================= +Apache HttpClient +Copyright 1999-2016 The Apache Software Foundation + + + + +================= Jackson 1.9.13 ================= +jackson-jaxrs-1.9.13.jar +jackson-xc-1.9.13.jar +================= +This product currently only contains code developed by authors +of specific components, as identified by the source code files; +if such notes are missing files have been created by +Tatu Saloranta. + +For additional credits (generally to people who reported problems) +see CREDITS file. + + + + +================= Jetty 6.1.26 ================= +jetty-sslengine-6.1.26.jar +jetty-util-6.1.26.jar +================= +============================================================== + Jetty Web Container + Copyright 1995-2009 Mort Bay Consulting Pty Ltd +============================================================== + +The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd +unless otherwise noted. It is dual licensed under the apache 2.0 +license and eclipse 1.0 license. Jetty may be distributed under +either license. + +The javax.servlet package used was sourced from the Apache +Software Foundation and is distributed under the apache 2.0 +license. + +The UnixCrypt.java code implements the one way cryptography used by +Unix systems for simple password protection. Copyright 1996 Aki Yoshida, +modified April 2001 by Iris Van den Broeke, Daniel Deville. +Permission to use, copy, modify and distribute UnixCrypt +for non-commercial or commercial purposes and without fee is +granted provided that the copyright notice appears in all copies. + + + + +================= log4j-1.2.17.jar ================= +Apache log4j +Copyright 2007 The Apache Software Foundation + + + + +================= netty-3.6.2.Final.jar ================= + The Netty Project + ================= + +Please visit the Netty web site for more information: + + * http://netty.io/ + +Copyright 2011 The Netty Project + +The Netty Project 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. + +Also, please refer to each LICENSE..txt file, which is located in +the 'license' directory of the distribution file, for the license terms of the +components that this product depends on. + +------------------------------------------------------------------------------- +This product contains the extensions to Java Collections Framework which has +been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: + + * LICENSE: + * license/LICENSE.jsr166y.txt (Public Domain) + * HOMEPAGE: + * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ + * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ + +This product contains a modified version of Robert Harder's Public Domain +Base64 Encoder and Decoder, which can be obtained at: + + * LICENSE: + * license/LICENSE.base64.txt (Public Domain) + * HOMEPAGE: + * http://iharder.sourceforge.net/current/java/base64/ + +This product contains a modified version of 'JZlib', a re-implementation of +zlib in pure Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.jzlib.txt (BSD Style License) + * HOMEPAGE: + * http://www.jcraft.com/jzlib/ + +This product optionally depends on 'Protocol Buffers', Google's data +interchange format, which can be obtained at: + + * LICENSE: + * license/LICENSE.protobuf.txt (New BSD License) + * HOMEPAGE: + * http://code.google.com/p/protobuf/ + +This product optionally depends on 'SLF4J', a simple logging facade for Java, +which can be obtained at: + + * LICENSE: + * license/LICENSE.slf4j.txt (MIT License) + * HOMEPAGE: + * http://www.slf4j.org/ + +This product optionally depends on 'Apache Commons Logging', a logging +framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-logging.txt (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging/ + +This product optionally depends on 'Apache Log4J', a logging framework, +which can be obtained at: + + * LICENSE: + * license/LICENSE.log4j.txt (Apache License 2.0) + * HOMEPAGE: + * http://logging.apache.org/log4j/ + +This product optionally depends on 'JBoss Logging', a logging framework, +which can be obtained at: + + * LICENSE: + * license/LICENSE.jboss-logging.txt (GNU LGPL 2.1) + * HOMEPAGE: + * http://anonsvn.jboss.org/repos/common/common-logging-spi/ + +This product optionally depends on 'Apache Felix', an open source OSGi +framework implementation, which can be obtained at: + + * LICENSE: + * license/LICENSE.felix.txt (Apache License 2.0) + * HOMEPAGE: + * http://felix.apache.org/ + +This product optionally depends on 'Webbit', a Java event based +WebSocket and HTTP server: + + * LICENSE: + * license/LICENSE.webbit.txt (BSD License) + * HOMEPAGE: + * https://github.com/joewalnes/webbit + + + + +================= snappy-1.0.4.1.jar ================= +This product includes software developed by Google + Snappy: http://code.google.com/p/snappy/ (New BSD License) + + +This library containd statically linked libstdc++. This inclusion is allowed by +"GCC RUntime Library Exception" +http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html + +== Contributors == + * Tatu Saloranta + * Providing benchmark suite + * Alec Wysoker + * Performance and memory usage improvement + + + + + +================= zookeeper-3.4.6.jar ================= +Apache ZooKeeper +Copyright 2009-2012 The Apache Software Foundation + + + + + + + +############ BINARY/EXTENSIONS/druid-avro-extensions ############ + +================= avro-1.8.2.jar ================= +Apache Avro +Copyright 2009-2017 The Apache Software Foundation + + + + +================= avro-ipc-1.8.2.jar ================= +Apache Avro IPC +Copyright 2009-2017 The Apache Software Foundation + + + + +================= avro-mapred-1.8.2-hadoop2.jar ================= +Apache Avro +Copyright 2010 The Apache Software Foundation + +Based upon the representations of upstream licensors, it is understood that +portions of the mapreduce API included in the Java implementation are licensed +from various contributors under one or more contributor license agreements to +Odiago, Inc. and were then contributed by Odiago to Apache Avro, which has now +made them available under the Apache 2.0 license. The original file header text +is: + +| Licensed to Odiago, Inc. under one or more contributor license +| agreements. See the NOTICE file distributed with this work for +| additional information regarding copyright ownership. Odiago, Inc. +| 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. + +The Odiago NOTICE at the time of the contribution: + +| This product includes software developed by Odiago, Inc. +| (http://www.wibidata.com). + + + + +================= commons-collections-3.2.1.jar ================= +Apache Commons Collections +Copyright 2001-2008 The Apache Software Foundation + + + + +================= snappy-1.1.1.3.jar ================= +This product includes software developed by Google + Snappy: http://code.google.com/p/snappy/ (New BSD License) + +This product includes software developed by Apache + PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ + (Apache 2.0 license) + +This library containd statically linked libstdc++. This inclusion is allowed by +"GCC RUntime Library Exception" +http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html + +== Contributors == + * Tatu Saloranta + * Providing benchmark suite + * Alec Wysoker + * Performance and memory usage improvement + + + + +================= velocity-1.7.jar ================= +Apache Velocity + +Copyright (C) 2000-2007 The Apache Software Foundation + + + + +############ BINARY/EXTENSIONS/druid-bloom-filter ############ + +================= hive-storage-api-2.7.0.jar ================= +Hive Storage API +Copyright 2018 The Apache Software Foundation + + + + +############ BINARY/EXTENSIONS/druid-examples ############ + +================= commons-beanutils-1.8.3.jar ================= +Apache Commons BeanUtils +Copyright 2000-2010 The Apache Software Foundation + + + + +================= commons-validator-1.4.0.jar ================= +Apache Commons Validator +Copyright 2001-2012 The Apache Software Foundation + + + + +############ BINARY/EXTENSIONS/druid-kafka-eight ############ + +================= kafka-clients-0.8.2.1.jar ================= +Apache Kafka +Copyright 2012 The Apache Software Foundation. + + + + +================= kafka_2.10-0.8.2.1.jar ================= +Apache Kafka +Copyright 2012 The Apache Software Foundation. + + + + +================= metrics-core-2.2.0.jar ================= +Metrics +Copyright 2010-2012 Coda Hale and Yammer, Inc. + +This product includes software developed by Coda Hale and Yammer, Inc. + +This product includes code derived from the JSR-166 project (ThreadLocalRandom), which was released +with the following comments: + + Written by Doug Lea with assistance from members of JCP JSR-166 + Expert Group and released to the public domain, as explained at + http://creativecommons.org/publicdomain/zero/1.0/ + + + + +================= snappy-1.1.1.6.jar ================= +This product includes software developed by Google + Snappy: http://code.google.com/p/snappy/ (New BSD License) + +This product includes software developed by Apache + PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ + (Apache 2.0 license) + +This library containd statically linked libstdc++. This inclusion is allowed by +"GCC RUntime Library Exception" +http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html + +== Contributors == + * Tatu Saloranta + * Providing benchmark suite + * Alec Wysoker + * Performance and memory usage improvement + + + + +############ BINARY/EXTENSIONS/druid-kafka-indexing-service ############ + +================= kafka-clients-0.10.2.2.jar ================= +Apache Kafka +Copyright 2018 The Apache Software Foundation. + +This distribution has a binary dependency on jersey, which is available under the CDDL +License. The source code of jersey can be found at https://github.com/jersey/jersey/. + + + + +================= Jackson 1.9.2 ================= +jackson-jaxrs-1.9.2.jar +jackson-xc-1.9.2.jar +================= +This product currently only contains code developed by authors +of specific components, as identified by the source code files; +if such notes are missing files have been created by +Tatu Saloranta. + +For additional credits (generally to people who reported problems) +see CREDITS file. + + + + +================= snappy-1.1.2.6.jar ================= +This product includes software developed by Google + Snappy: http://code.google.com/p/snappy/ (New BSD License) + +This product includes software developed by Apache + PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ + (Apache 2.0 license) + +This library containd statically linked libstdc++. This inclusion is allowed by +"GCC RUntime Library Exception" +http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html + +== Contributors == + * Tatu Saloranta + * Providing benchmark suite + * Alec Wysoker + * Performance and memory usage improvement + + + + +############ BINARY/EXTENSIONS/druid-kerberos ############ + +================= jets3t-0.9.0.jar ================= + ========================================================================= + == NOTICE file corresponding to section 4(d) of the Apache License, == + == Version 2.0, in this case for the distribution of jets3t. == + ========================================================================= + + This product includes software developed by: + + The Apache Software Foundation (http://www.apache.org/). + + The ExoLab Project (http://www.exolab.org/) + + Sun Microsystems (http://www.sun.com/) + + Codehaus (http://castor.codehaus.org) + + Safehaus (http://jug.safehaus.org/Home) + + Tatu Saloranta (http://wiki.fasterxml.com/TatuSaloranta) + + + + +############ BINARY/EXTENSIONS/druid-parquet ############ + +================= parquet-avro-1.10.0.jar ================= +Apache Parquet MR (Incubating) +Copyright 2014-2015 The Apache Software Foundation + +-------------------------------------------------------------------------------- + +This product includes code from Apache Avro, which includes the following in +its NOTICE file: + + Apache Avro + Copyright 2010-2015 The Apache Software Foundation + + This product includes software developed at + The Apache Software Foundation (http://www.apache.org/). + + + + +================= parquet-format-2.4.0.jar ================= +Apache Parquet Format +Copyright 2017 The Apache Software Foundation + + + + +================= parquet-jackson-1.10.0.jar ================= +This product currently only contains code developed by authors +of specific components, as identified by the source code files; +if such notes are missing files have been created by +Tatu Saloranta. + +For additional credits (generally to people who reported problems) +see CREDITS file. + + + + +================= snappy-1.1.7.2.jar ================= +This product includes software developed by Google + Snappy: http://code.google.com/p/snappy/ (New BSD License) + +This product includes software developed by Apache + PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ + (Apache 2.0 license) + +This library containd statically linked libstdc++. This inclusion is allowed by +"GCC RUntime Library Exception" +http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html + +== Contributors == + * Tatu Saloranta + * Providing benchmark suite + * Alec Wysoker + * Performance and memory usage improvement diff --git a/README.md b/README.md index 429589d114e..e44c4c13992 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,4 @@ For instructions on building Druid from source, see [docs/content/development/bu ### Contributing Please follow the guidelines listed [here](http://druid.io/community/). + diff --git a/aws-common/pom.xml b/aws-common/pom.xml index b4e5e0d1a44..210e5717c8a 100644 --- a/aws-common/pom.xml +++ b/aws-common/pom.xml @@ -47,7 +47,7 @@ org.checkerframework - checker + checker-qual ${checkerframework.version} diff --git a/distribution/pom.xml b/distribution/pom.xml index 89df39f69b3..82ea3e5593f 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -77,6 +77,27 @@ false + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + prepare-package + + + + + + + + + + run + + + + diff --git a/distribution/src/assembly/assembly.xml b/distribution/src/assembly/assembly.xml index f972970eebd..856f5931608 100644 --- a/distribution/src/assembly/assembly.xml +++ b/distribution/src/assembly/assembly.xml @@ -232,12 +232,31 @@ ../ - LICENSE - NOTICE DISCLAIMER + licenses/** + + + ../LICENSE.BINARY + . + LICENSE + keep + + + ../NOTICE.BINARY + . + NOTICE + keep + + + ../README.BINARY + . + README + keep + + false diff --git a/distribution/src/assembly/source-assembly.xml b/distribution/src/assembly/source-assembly.xml index 0d7e0199331..5c9499e5f41 100644 --- a/distribution/src/assembly/source-assembly.xml +++ b/distribution/src/assembly/source-assembly.xml @@ -47,6 +47,10 @@ .gitignore .dockerignore .travis.yml + LICENSE.BINARY + NOTICE.BINARY + README.BINARY + licenses/bin publications/** upload.sh diff --git a/docs/_bin/generate-license-dependency-reports.py b/docs/_bin/generate-license-dependency-reports.py new file mode 100755 index 00000000000..506c3867c39 --- /dev/null +++ b/docs/_bin/generate-license-dependency-reports.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 + +# 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. + +import os +import subprocess +import sys + + +existing_jar_dict_notice = {} + +def main(): + if len(sys.argv) != 3: + sys.stderr.write('usage: program \n') + sys.exit(1) + + druid_path = sys.argv[1] + tmp_path = sys.argv[2] + + generate_reports(druid_path, tmp_path) + +def generate_reports(druid_path, tmp_path): + license_main_path = tmp_path + "/license-reports" + license_ext_path = tmp_path + "/license-reports/ext" + os.mkdir(license_main_path) + os.mkdir(license_ext_path) + + print("********** Generating main LICENSE report.... **********") + os.chdir(druid_path) + command = "mvn -Pdist -Ddependency.locations.enabled=false project-info-reports:dependencies" + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + command = "cp -r distribution/target/site {}/site".format(license_main_path) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + sys.exit() + + print("********** Generating extension LICENSE reports.... **********") + extension_dirs = os.listdir("extensions-core") + for extension_dir in extension_dirs: + full_extension_dir = druid_path + "/extensions-core/" + extension_dir + if not os.path.isdir(full_extension_dir): + continue + + print("--- Generating report for {}... ---".format(extension_dir)) + + extension_report_dir = "{}/{}".format(license_ext_path, extension_dir) + os.mkdir(extension_report_dir) + os.chdir(full_extension_dir) + + try: + command = "mvn -Ddependency.locations.enabled=false project-info-reports:dependencies" + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + command = "cp -r target/site {}/site".format(extension_report_dir) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + except: + print("Encountered error when generating report for: " + extension_dir) + + os.chdir("..") + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + print('Interrupted, closing.') \ No newline at end of file diff --git a/docs/_bin/jar-notice-lister.py b/docs/_bin/jar-notice-lister.py new file mode 100755 index 00000000000..f45f1ee00cb --- /dev/null +++ b/docs/_bin/jar-notice-lister.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 + +# 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. + +import os +import subprocess +import sys + +existing_jar_dict_notice = {} + +def main(): + if len(sys.argv) != 3: + sys.stderr.write('usage: program \n') + sys.exit(1) + + druid_path = sys.argv[1] + tmp_path = sys.argv[2] + + # copy everything in lib/ to the staging dir + lib_path = druid_path + "/lib" + tmp_lib_path = tmp_path + "/1-lib" + os.mkdir(tmp_lib_path) + command = "cp -r {}/* {}".format(lib_path, tmp_lib_path) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + # copy hadoop deps to the staging dir + hdeps_path = druid_path + "/hadoop-dependencies" + tmp_hdeps_path = tmp_path + "/2-hdeps" + os.mkdir(tmp_hdeps_path) + command = "cp -r {}/* {}".format(hdeps_path, tmp_hdeps_path) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + + # copy all extension folders to the staging dir + ext_path = druid_path + "/extensions" + tmp_ext_path = tmp_path + "/3-ext" + os.mkdir(tmp_ext_path) + command = "cp -r {}/* {}".format(ext_path, tmp_ext_path) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + + get_notices(tmp_path) + +def get_notices(tmp_jar_path): + print("********** Scanning directory for NOTICE" + tmp_jar_path + " **********") + jar_files = os.listdir(tmp_jar_path) + os.chdir(tmp_jar_path) + + for jar_file in jar_files: + if os.path.isdir(jar_file): + get_notices(jar_file) + continue + elif not os.path.isfile(jar_file) or ".jar" not in jar_file: + continue + + if existing_jar_dict_notice.get(jar_file) is not None: + print("---------- Already saw file: " + jar_file) + continue + else: + existing_jar_dict_notice[jar_file] = True + + try: + command = "jar tf {} | grep NOTICE".format(jar_file) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + except: + print("---------- no NOTICE file found in: " + jar_file) + continue + + for line in outstr.splitlines(): + try: + command = "jar xf {} {}".format(jar_file, line) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + command = "mv {} {}.NOTICE-FILE".format(line, jar_file) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + command = "cat {}.NOTICE-FILE".format(jar_file) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + print("================= " + jar_file + " =================") + print(outstr) + print("\n") + except: + print("Error while grabbing NOTICE file: " + jar_file) + continue + + os.chdir("..") + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + print('Interrupted, closing.') \ No newline at end of file diff --git a/docs/_bin/npm-license-helper.py b/docs/_bin/npm-license-helper.py new file mode 100755 index 00000000000..b6db90b05ac --- /dev/null +++ b/docs/_bin/npm-license-helper.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 + +# 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. + +import json +import re +import shutil +import sys + +# Helper program for generating LICENSE contents for dependencies under web-console. +# Generates entries for MIT-licensed deps and dumps info for non-MIT deps. +# Uses JSON output from https://www.npmjs.com/package/license-checker. + +if len(sys.argv) != 3: + sys.stderr.write('usage: program \n') + sys.stderr.write('Run the following command in web-console/ to generate the input license report:\n') + sys.stderr.write(' license-checker --production --json\n') + sys.exit(1) + +license_report_path = sys.argv[1] +license_output_path = sys.argv[2] + +non_mit_licenses = [] + +license_entry_template = "This product bundles {} version {}, copyright {},\n which is available under an MIT license. For details, see licenses/{}.MIT.\n" + +with open(license_report_path, 'r') as license_report_file: + license_report = json.load(license_report_file) + for dependency_name_version in license_report: + dependency = license_report[dependency_name_version] + + match_result = re.match("(.+)@(.+)", dependency_name_version) + dependency_name = match_result.group(1) + nice_dependency_name = dependency_name.replace("/", "-") + dependency_ver = match_result.group(2) + + try: + licenseType = dependency["licenses"] + licenseFile = dependency["licenseFile"] + except: + print("No license file for {}".format(dependency_name_version)) + + try: + publisher = dependency["publisher"] + except: + publisher = "" + + if licenseType != "MIT": + non_mit_licenses.append(dependency) + continue + + fullDependencyPath = dependency["path"] + partialDependencyPath = re.match(".*/(web-console.*)", fullDependencyPath).group(1) + + print(license_entry_template.format(dependency_name, dependency_ver, publisher, nice_dependency_name)) + shutil.copy2(licenseFile, license_output_path + "/" + nice_dependency_name + ".MIT") + + print("\nNon-MIT licenses:\n--------------------\n") + for non_mit_license in non_mit_licenses: + print(non_mit_license) diff --git a/docs/_bin/web-console-dep-lister.py b/docs/_bin/web-console-dep-lister.py new file mode 100755 index 00000000000..3ee66a10f2c --- /dev/null +++ b/docs/_bin/web-console-dep-lister.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +# 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. + +import re +import sys + +# Helper program for listing the deps in the compiled web-console-.js file in druid-console.jar + +if len(sys.argv) != 2: + sys.stderr.write('usage: program \n') + sys.exit(1) + +web_console_path = sys.argv[1] + +dep_dict = {} +with open(web_console_path, 'r') as web_console_file: + for line in web_console_file.readlines(): + match_result = re.match('/\*\*\*/ "\./node_modules/([\@\-a-zA-Z0-9_]+)/.*', line) + if match_result != None: + dependency_name = match_result.group(1) + dep_dict[dependency_name] = True + for dep in dep_dict: + print(dep) \ No newline at end of file diff --git a/examples/quickstart/tutorial/hadoop/docker/LICENSE b/examples/quickstart/tutorial/hadoop/docker/LICENSE deleted file mode 100644 index 4f4964bf3f3..00000000000 --- a/examples/quickstart/tutorial/hadoop/docker/LICENSE +++ /dev/null @@ -1,1331 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - - -Apache Knox Subcomponents (binary distributions): - -Apache Knox includes a number of sub-components with separate copyright -notices and license terms. Your use of these sub-components is subject -to the terms and conditions of the following licenses. - ------------------------------------------------------------------------------- -From Jetty and Jerico ------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to -its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by -that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense and -any related settlement negotiations. The Indemnified Contributor may -participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement , including but not limited to the risks and costs -of program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a -distinguishing version number. The Program (including Contributions) may always -be distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. - - -For TODO.jar (Jave EE Servlet API) - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - - 1.1. Contributor. means each individual or entity that creates or contributes - to the creation of Modifications. - - 1.2. Contributor Version. means the combination of the Original Software, - prior Modifications used by a Contributor (if any), and the - Modifications made by that particular Contributor. - - 1.3. Covered Software. means (a) the Original Software, or (b) Modifications, - or (c) the combination of files containing Original Software with files - containing Modifications, in each case including portions thereof. - - 1.4. Executable. means the Covered Software in any form other than Source - Code. - - 1.5. Initial Developer. means the individual or entity that first makes - Original Software available under this License. - - 1.6. Larger Work. means a work which combines Covered Software or portions - thereof with code not governed by the terms of this License. - - 1.7. License. means this document. - - 1.8. Licensable. means having the right to grant, to the maximum extent - possible, whether at the time of the initial grant or subsequently - acquired, any and all of the rights conveyed herein. - - 1.9. Modifications. means the Source Code and Executable form of any of the - following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available under - the terms of this License. - - 1.10. Original Software. means the Source Code and Executable form of - computer software code that is originally released under this License. - - 1.11. Patent Claims. means any patent claim(s), now owned or hereafter - acquired, including without limitation, method, process, and apparatus - claims, in any patent Licensable by grantor. - - 1.12. Source Code. means (a) the common form of computer software code in - which modifications are made and (b) associated documentation included - in or with such code. - - 1.13. You. (or .Your.) means an individual or a legal entity exercising - rights under, and complying with all of the terms of, this License. For - legal entities, .You. includes any entity which controls, is controlled - by, or is under common control with You. For purposes of this - definition, .control. means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to - third party intellectual property claims, the Initial Developer hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) - Licensable by Initial Developer, to use, reproduce, modify, display, - perform, sublicense and distribute the Original Software (or - portions thereof), with or without Modifications, and/or as part of - a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on the - date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is granted: - (1) for code that You delete from the Original Software, or (2) for - infringements caused by: (i) the modification of the Original - Software, or (ii) the combination of the Original Software with - other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third - party intellectual property claims, each Contributor hereby grants You a - world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) - Licensable by Contributor to use, reproduce, modify, display, - perform, sublicense and distribute the Modifications created by such - Contributor (or portions thereof), either on an unmodified basis, - with other Modifications, as Covered Software and/or as part of a - Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling of - Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on - the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is granted: - (1) for any code that Contributor has deleted from the Contributor - Version; (2) for infringements caused by: (i) third party - modifications of Contributor Version, or (ii) the combination of - Modifications made by that Contributor with other software (except - as part of the Contributor Version) or other devices; or (3) under - Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - Any Covered Software that You distribute or otherwise make available in - Executable form must also be made available in Source Code form and that - Source Code form must be distributed only under the terms of this License. - You must include a copy of this License with every copy of the Source Code - form of the Covered Software You distribute or otherwise make available. - You must inform recipients of any such Covered Software in Executable form - as to how they can obtain such Covered Software in Source Code form in a - reasonable manner on or through a medium customarily used for software - exchange. - - 3.2. Modifications. - The Modifications that You create or to which You contribute are governed - by the terms of this License. You represent that You believe Your - Modifications are Your original creation(s) and/or You have sufficient - rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - You must include a notice in each of Your Modifications that identifies - You as the Contributor of the Modification. You may not remove or alter - any copyright, patent or trademark notices contained within the Covered - Software, or any notices of licensing or any descriptive text giving - attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - You may not offer or impose any terms on any Covered Software in Source - Code form that alters or restricts the applicable version of this License - or the recipients. rights hereunder. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability obligations to - one or more recipients of Covered Software. However, you may do so only on - Your own behalf, and not on behalf of the Initial Developer or any - Contributor. You must make it absolutely clear that any such warranty, - support, indemnity or liability obligation is offered by You alone, and - You hereby agree to indemnify the Initial Developer and every Contributor - for any liability incurred by the Initial Developer or such Contributor as - a result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - You may distribute the Executable form of the Covered Software under the - terms of this License or under the terms of a license of Your choice, - which may contain terms different from this License, provided that You are - in compliance with the terms of this License and that the license for the - Executable form does not attempt to limit or alter the recipient.s rights - in the Source Code form from the rights set forth in this License. If You - distribute the Covered Software in Executable form under a different - license, You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial Developer - or Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial Developer or - such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - You may create a Larger Work by combining Covered Software with other code - not governed by the terms of this License and distribute the Larger Work - as a single product. In such a case, You must make sure the requirements - of this License are fulfilled for the Covered Software. - -4. Versions of the License. - - 4.1. New Versions. - Sun Microsystems, Inc. is the initial license steward and may publish - revised and/or new versions of this License from time to time. Each - version will be given a distinguishing version number. Except as provided - in Section 4.3, no one other than the license steward has the right to - modify this License. - - 4.2. Effect of New Versions. - You may always continue to use, distribute or otherwise make the Covered - Software available under the terms of the version of the License under - which You originally received the Covered Software. If the Initial - Developer includes a notice in the Original Software prohibiting it from - being distributed or otherwise made available under any subsequent version - of the License, You must distribute and make the Covered Software - available under the terms of the version of the License under which You - originally received the Covered Software. Otherwise, You may also choose - to use, distribute or otherwise make the Covered Software available under - the terms of any subsequent version of the License published by the - license steward. - - 4.3. Modified Versions. - When You are an Initial Developer and You want to create a new license for - Your Original Software, You may create and use a modified version of this - License if You: (a) rename the license and remove any references to the - name of the license steward (except to note that the license differs from - this License); and (b) otherwise make it clear that the license contains - terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT - LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, - MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK - AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD - ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL - DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY - SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED - HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding declaratory - judgment actions) against Initial Developer or a Contributor (the - Initial Developer or Contributor against whom You assert such claim - is referred to as .Participant.) alleging that the Participant - Software (meaning the Contributor Version where the Participant is a - Contributor or the Original Software where the Participant is the - Initial Developer) directly or indirectly infringes any patent, then - any and all rights granted directly or indirectly to You by such - Participant, the Initial Developer (if the Initial Developer is not - the Participant) and all Contributors under Sections 2.1 and/or 2.2 - of this License shall, upon 60 days notice from Participant terminate - prospectively and automatically at the expiration of such 60 day - notice period, unless if within such 60 day period You withdraw Your - claim with respect to the Participant Software against such - Participant either unilaterally or pursuant to a written agreement - with Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end - user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING - NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY - OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF - ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, - INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, - COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF - SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR - DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT - APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS - EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a .commercial item,. as that term is defined in 48 - C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as - that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and commercial - computer software documentation. as such terms are used in 48 C.F.R. 12.212 - (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 - through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered - Software with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or - provision that addresses Government rights in computer software under this - License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. This License shall be governed by the law of the jurisdiction - specified in a notice contained within the Original Software (except to the - extent applicable law, if any, provides otherwise), excluding such - jurisdiction's conflict-of-law provisions. Any litigation relating to this - License shall be subject to the jurisdiction of the courts located in the - jurisdiction and venue specified in a notice contained within the Original - Software, with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys. fees and expenses. The - application of the United Nations Convention on Contracts for the - International Sale of Goods is expressly excluded. Any law or regulation - which provides that the language of a contract shall be construed against - the drafter shall not apply to this License. You agree that You alone are - responsible for compliance with the United States export administration - regulations (and the export control laws and regulation of any other - countries) when You use, distribute or otherwise make available any Covered - Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is responsible - for claims and damages arising, directly or indirectly, out of its - utilization of rights under this License and You agree to work with Initial - Developer and Contributors to distribute such responsibility on an equitable - basis. Nothing herein is intended or shall be deemed to constitute any - admission of liability. - - NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION - LICENSE (CDDL) - - The code released under the CDDL shall be governed by the laws of the State - of California (excluding conflict-of-law provisions). Any litigation relating - to this License shall be subject to the jurisdiction of the Federal Courts of - the Northern District of California and the state courts of the State of - California, with venue lying in Santa Clara County, California. - - ------------------------------------------------------------------------------- -ANTLR 2 License (from ApacheDS, Groovy) ------------------------------------------------------------------------------- -We reserve no legal rights to the ANTLR--it is fully in the public domain. -An individual or company may do whatever they wish with source code -distributed with ANTLR or the code generated by ANTLR, including the -incorporation of ANTLR, or its output, into commerical software. -We encourage users to develop software with ANTLR. However, we do ask that -credit is given to us for developing ANTLR. By "credit", we mean that if you -use ANTLR or incorporate any source code into one of your programs -(commercial product, research project, or otherwise) that you acknowledge -this fact somewhere in the documentation, research report, etc... If you like -ANTLR and have developed a nice tool with the output, please mention that you -developed it using ANTLR. In addition, we ask that the headers remain intact -in our source code. As long as these guidelines are kept, we expect to -continue enhancing this system and expect to make other tools available as -they are completed. - ------------------------------------------------------------------------------- -ASM Project License (from CGLib, Groovy) ------------------------------------------------------------------------------- -Copyright (c) 2000-2011 INRIA, France Telecom -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 holders 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 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. - - ------------------------------------------------------------------------------- -Bouncy Castle License (from ApacheDS) ------------------------------------------------------------------------------- -Copyright (c) 2000 - 2012 The Legion Of The Bouncy Castle -(http://www.bouncycastle.org) - -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. - - ------------------------------------------------------------------------------- -Eclipse Public License - v1.0 (from Jetty/Jerico) ------------------------------------------------------------------------------- -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to the Program by such Contributor itself or -anyone acting on such Contributor’s behalf. Contributions do not include -additions to the Program which: (i) are separate modules of software -distributed in conjunction with the Program under their own license agreement, -and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this -Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free copyright license to - reproduce, prepare derivative works of, publicly display, publicly perform, - distribute and sublicense the Contribution of such Contributor, if any, - and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free patent license under - Licensed Patents to make, use, sell, offer to sell, import and otherwise - transfer the Contribution of such Contributor, if any, in source code and - object code form. This patent license shall apply to the combination of the - Contribution and the Program if, at the time the Contribution is added by - the Contributor, such addition of the Contribution causes such combination - to be covered by the Licensed Patents. The patent license shall not apply - to any other combinations which include the Contribution. No hardware per - se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses - to its Contributions set forth herein, no assurances are provided by any - Contributor that the Program does not infringe the patent or other - intellectual property rights of any other entity. Each Contributor - disclaims any liability to Recipient for claims brought by any other - entity based on infringement of intellectual property rights or otherwise. - As a condition to exercising the rights and licenses granted hereunder, - each Recipient hereby assumes sole responsibility to secure any other - intellectual property rights needed, if any. For example, if a third - party patent license is required to allow Recipient to distribute the - Program, it is Recipient’s responsibility to acquire that license before - distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and - conditions, express and implied, including warranties or conditions of - title and non-infringement, and implied warranties or conditions of - merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for - damages, including direct, indirect, special, incidental and consequential - damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by - that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such - Contributor, and informs licensees how to obtain it in a reasonable manner - on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within -the Program. - -Each Contributor must identify itself as the originator of its Contribution, -if any, in a manner that reasonably allows subsequent Recipients to identify -the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, -if a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, -damages and costs (collectively "Losses") arising from claims, lawsuits and -other legal actions brought by a third party against the Indemnified -Contributor to the extent caused by the acts or omissions of such Commercial -Contributor in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any claims -or Losses relating to any actual or alleged intellectual property infringement. -In order to qualify, an Indemnified Contributor must: a) promptly notify the -Commercial Contributor in writing of such claim, and b) allow the Commercial -Contributor to control, and cooperate with the Commercial Contributor in, the -defense and any related settlement negotiations. The Indemnified Contributor -may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If -that Commercial Contributor then makes performance claims, or offers -warranties related to Product X, those performance claims and warranties are -such Commercial Contributor’s responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a -court requires any other Contributor to pay any damages as a result, the -Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON -AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS -OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement , including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage to -or loss of data, programs or equipment, and unavailability or interruption of -operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of the -remainder of the terms of this Agreement, and without further action by the -parties hereto, such provision shall be reformed to the minimum extent -necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient’s patent(s), then such Recipient’s rights granted -under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming -aware of such noncompliance. If all Recipient’s rights under this Agreement -terminate, Recipient agrees to cease use and distribution of the Program as -soon as reasonably practicable. However, Recipient’s obligations under this -Agreement and any licenses granted by Recipient relating to the Program shall -continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to -time. No one other than the Agreement Steward has the right to modify this -Agreement. The Eclipse Foundation is the initial Agreement Steward. The -Eclipse Foundation may assign the responsibility to serve as the Agreement -Steward to a suitable separate entity. Each new version of the Agreement -will be given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the -Agreement under which it was received. In addition, after a new version of -the Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly -stated in Sections 2(a) and 2(b) above, Recipient receives no rights or -licenses to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in the -Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial -in any resulting litigation. - - --------------------------------------------------------------------------------------------------- -JDBM LICENSE v1.00 (from ApacheDS) --------------------------------------------------------------------------------------------------- -/** - * JDBM LICENSE v1.00 - * - * Redistribution and use of this software and associated documentation - * ("Software"), with or without modification, are permitted provided - * that the following conditions are met: - * - * 1. Redistributions of source code must retain copyright - * statements and notices. Redistributions must also contain a - * copy of this document. - * - * 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. The name "JDBM" must not be used to endorse or promote - * products derived from this Software without prior written - * permission of Cees de Groot. For written permission, - * please contact cg@cdegroot.com. - * - * 4. Products derived from this Software may not be called "JDBM" - * nor may "JDBM" appear in their names without prior written - * permission of Cees de Groot. - * - * 5. Due credit should be given to the JDBM Project - * (http://jdbm.sourceforge.net/). - * - * THIS SOFTWARE IS PROVIDED BY THE JDBM PROJECT AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESSED 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 - * CEES DE GROOT OR ANY 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. - * - * Copyright 2000 (C) Cees de Groot. All Rights Reserved. - * Contributions are Copyright (C) 2000 by their associated contributors. - * - * $Id: LICENSE.txt,v 1.1 2000/05/05 23:59:52 boisvert Exp $ - */ - ------------------------------------------------------------------------------- -JLine License - BSD (from Groovy) ------------------------------------------------------------------------------- -Copyright (c) 2002-2006, Marc Prud'hommeaux -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. - -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. - -Neither the name of JLine 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 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. - - ------------------------------------------------------------------------------- -SL4J License - MIT ------------------------------------------------------------------------------- -Copyright (c) 2004-2013 QOS.ch -All rights reserved. - -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. - ------------------------------------------------------------------------------- -Tanuki Software License (from ApacheDS) ------------------------------------------------------------------------------- -Copyright (c) 1999, 2004 Tanuki Software - -Permission is hereby granted, free of charge, to any person -obtaining a copy of the Java Service Wrapper 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, sub-license, -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 -NON-INFRINGEMENT. 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. - - ------------------------------------------------------------------------------- -Silver Egg Technology License (from ApacheDS) ------------------------------------------------------------------------------- -Portions of the Software have been derived from source code -developed by Silver Egg Technology under the following license: - -Copyright (c) 2001 Silver Egg Technology - -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, sub-license, 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. - - ------------------------------------------------------------------------------- -Sun Microsystems, Inc. License (from Groovy) ------------------------------------------------------------------------------- -The following notice applies to the files: - -src/main/org/codehaus/groovy/jsr223/GroovyCompiledScript.java -src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java -src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java - -/* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * 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. - * 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. Neither the name of the Sun Microsystems nor the names of - * is contributors may be used to endorse or promote products derived from this software - * without specific prior written permission. - - * 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. - */ - ------------------------------------------------------------------------------- -European Commission License (from Hadoop) ------------------------------------------------------------------------------- -For the org.apache.hadoop.util.bloom.* classes: - -/** - * - * Copyright (c) 2005, European Commission project OneLab under contract - * 034819 (http://www.one-lab.org) - * 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. - * - 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. - * - Neither the name of the University Catholique de Louvain - UCL - * 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 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. - */ - ------------------------------------------------------------------------------- -zlib/libpng License ------------------------------------------------------------------------------- -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. - - ------------------------------------------------------------------------------- -bzip2 License ------------------------------------------------------------------------------- -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. 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. - 3. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 4. The name of the author may not 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. - -Julian Seward, Cambridge, UK. -jseward@acm.org diff --git a/licenses/bin/@babel-runtime.MIT b/licenses/bin/@babel-runtime.MIT new file mode 100644 index 00000000000..f31575ec773 --- /dev/null +++ b/licenses/bin/@babel-runtime.MIT @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +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. diff --git a/licenses/bin/aether-connector-okhttp.EPL1 b/licenses/bin/aether-connector-okhttp.EPL1 new file mode 100644 index 00000000000..16cc69a5235 --- /dev/null +++ b/licenses/bin/aether-connector-okhttp.EPL1 @@ -0,0 +1,87 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/licenses/bin/antlr-stringtemplate.BSD3 b/licenses/bin/antlr-stringtemplate.BSD3 new file mode 100644 index 00000000000..67e047c05e9 --- /dev/null +++ b/licenses/bin/antlr-stringtemplate.BSD3 @@ -0,0 +1,26 @@ +[The "BSD licence"] +Copyright (c) 2003-2008 Terence Parr +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. The name of the author may not 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. diff --git a/licenses/bin/antlr.BSD3 b/licenses/bin/antlr.BSD3 new file mode 100644 index 00000000000..8ea1b564d66 --- /dev/null +++ b/licenses/bin/antlr.BSD3 @@ -0,0 +1,9 @@ +[The BSD License] +Copyright (c) 2012 Terence Parr and Sam Harwell +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. +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. +Neither the name of the author 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 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.YRIGHT 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. \ No newline at end of file diff --git a/licenses/bin/antlr4-runtime.BSD3 b/licenses/bin/antlr4-runtime.BSD3 new file mode 100644 index 00000000000..3537d506775 --- /dev/null +++ b/licenses/bin/antlr4-runtime.BSD3 @@ -0,0 +1,26 @@ +[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. diff --git a/licenses/bin/array-includes.MIT b/licenses/bin/array-includes.MIT new file mode 100644 index 00000000000..8c271c14b62 --- /dev/null +++ b/licenses/bin/array-includes.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +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. \ No newline at end of file diff --git a/licenses/bin/asap.MIT b/licenses/bin/asap.MIT new file mode 100644 index 00000000000..ba18c61390d --- /dev/null +++ b/licenses/bin/asap.MIT @@ -0,0 +1,21 @@ + +Copyright 2009–2014 Contributors. All rights reserved. + +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. + diff --git a/licenses/bin/asm.BSD3 b/licenses/bin/asm.BSD3 new file mode 100644 index 00000000000..8806c7d030f --- /dev/null +++ b/licenses/bin/asm.BSD3 @@ -0,0 +1,27 @@ + ASM: a very small and fast Java bytecode manipulation framework + Copyright (c) 2000-2011 INRIA, France Telecom + 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 holders 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 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. diff --git a/licenses/bin/axios.MIT b/licenses/bin/axios.MIT new file mode 100644 index 00000000000..d36c80ef27b --- /dev/null +++ b/licenses/bin/axios.MIT @@ -0,0 +1,19 @@ +Copyright (c) 2014-present Matt Zabriskie + +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. diff --git a/licenses/bin/bootstrap.MIT b/licenses/bin/bootstrap.MIT new file mode 100644 index 00000000000..8d94aa9ac9f --- /dev/null +++ b/licenses/bin/bootstrap.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2014 Twitter, Inc + +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. diff --git a/licenses/bin/brace.MIT b/licenses/bin/brace.MIT new file mode 100644 index 00000000000..41702c50434 --- /dev/null +++ b/licenses/bin/brace.MIT @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +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. diff --git a/licenses/bin/chain-function.MIT b/licenses/bin/chain-function.MIT new file mode 100644 index 00000000000..3bc6c700982 --- /dev/null +++ b/licenses/bin/chain-function.MIT @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jason Quense + +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. diff --git a/licenses/bin/checkerframework-annotations.MIT b/licenses/bin/checkerframework-annotations.MIT new file mode 100644 index 00000000000..18c9a740e5a --- /dev/null +++ b/licenses/bin/checkerframework-annotations.MIT @@ -0,0 +1 @@ +the Checker Framework developers \ No newline at end of file diff --git a/licenses/bin/classnames.MIT b/licenses/bin/classnames.MIT new file mode 100644 index 00000000000..d8e561e950e --- /dev/null +++ b/licenses/bin/classnames.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Jed Watson + +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. diff --git a/licenses/bin/creative-commons-2.5.LICENSE b/licenses/bin/creative-commons-2.5.LICENSE new file mode 100644 index 00000000000..f2aa747f528 --- /dev/null +++ b/licenses/bin/creative-commons-2.5.LICENSE @@ -0,0 +1,60 @@ + +Attribution-NonCommercial 2.5 + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + +"Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. +"Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. +"Licensor" means the individual or entity that offers the Work under the terms of this License. +"Original Author" means the individual or entity who created the Work. +"Work" means the copyrightable work of authorship offered under the terms of this License. +"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + +to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; +to create and reproduce Derivative Works; +to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; +to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Sections 4(d) and 4(e). + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + +You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. +You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. +If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. +For the avoidance of doubt, where the Work is a musical composition: + +Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work if that performance is primarily intended for or directed toward commercial advantage or private monetary compensation. +Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if Your distribution of such cover version is primarily intended for or directed toward commercial advantage or private monetary compensation. +Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor reserves the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if Your public digital performance is primarily intended for or directed toward commercial advantage or private monetary compensation. +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + +This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. +Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. +8. Miscellaneous + +Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. +Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. +If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. +This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at https://creativecommons.org/. \ No newline at end of file diff --git a/licenses/bin/css-loader.MIT b/licenses/bin/css-loader.MIT new file mode 100644 index 00000000000..8c11fc7289b --- /dev/null +++ b/licenses/bin/css-loader.MIT @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +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. diff --git a/licenses/bin/d3-array.BSD3 b/licenses/bin/d3-array.BSD3 new file mode 100644 index 00000000000..b1b22233e2c --- /dev/null +++ b/licenses/bin/d3-array.BSD3 @@ -0,0 +1,27 @@ +Copyright 2010-2018 Mike Bostock +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. + +* 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. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +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. diff --git a/licenses/bin/define-properties.MIT b/licenses/bin/define-properties.MIT new file mode 100644 index 00000000000..8c271c14b62 --- /dev/null +++ b/licenses/bin/define-properties.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +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. \ No newline at end of file diff --git a/licenses/bin/dom-helpers.MIT b/licenses/bin/dom-helpers.MIT new file mode 100644 index 00000000000..284f555dbe2 --- /dev/null +++ b/licenses/bin/dom-helpers.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jason Quense + +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. \ No newline at end of file diff --git a/licenses/bin/dom4.MIT b/licenses/bin/dom4.MIT new file mode 100644 index 00000000000..78dd4477be0 --- /dev/null +++ b/licenses/bin/dom4.MIT @@ -0,0 +1,19 @@ +Copyright (C) 2013-2015 by Andrea Giammarchi - @WebReflection + +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. diff --git a/licenses/bin/druid-console.MIT b/licenses/bin/druid-console.MIT new file mode 100644 index 00000000000..ab36f2ddc4a --- /dev/null +++ b/licenses/bin/druid-console.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Metamarkets + +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. diff --git a/licenses/bin/encoding.MIT b/licenses/bin/encoding.MIT new file mode 100644 index 00000000000..33f5a9a366f --- /dev/null +++ b/licenses/bin/encoding.MIT @@ -0,0 +1,16 @@ +Copyright (c) 2012-2014 Andris Reinman + +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 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. diff --git a/licenses/bin/es-abstract.MIT b/licenses/bin/es-abstract.MIT new file mode 100644 index 00000000000..8c271c14b62 --- /dev/null +++ b/licenses/bin/es-abstract.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +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. \ No newline at end of file diff --git a/licenses/bin/es-to-primitive.MIT b/licenses/bin/es-to-primitive.MIT new file mode 100644 index 00000000000..b43df444e51 --- /dev/null +++ b/licenses/bin/es-to-primitive.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. + diff --git a/licenses/bin/es6-shim.MIT b/licenses/bin/es6-shim.MIT new file mode 100644 index 00000000000..996ec8d6f76 --- /dev/null +++ b/licenses/bin/es6-shim.MIT @@ -0,0 +1,26 @@ +The project was initially based on [es6-shim by Axel Rauschmayer](https://github.com/rauschma/es6-shim). + +Current maintainers are: [Paul Miller](http://paulmillr.com), [Jordan Harband](https://github.com/ljharb), and [C. Scott Ananian](http://cscott.net). + +The MIT License (MIT) + +Copyright (c) 2013-2016 Paul Miller (http://paulmillr.com) and contributors + +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. + diff --git a/licenses/bin/es7-shim.MIT b/licenses/bin/es7-shim.MIT new file mode 100644 index 00000000000..f670305e024 --- /dev/null +++ b/licenses/bin/es7-shim.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (C) 2015-2016 Jordan Harband and contributors + +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. + diff --git a/licenses/bin/fbjs.MIT b/licenses/bin/fbjs.MIT new file mode 100644 index 00000000000..29e2bc2145a --- /dev/null +++ b/licenses/bin/fbjs.MIT @@ -0,0 +1,20 @@ +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +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. diff --git a/licenses/bin/font-awesome.MIT b/licenses/bin/font-awesome.MIT new file mode 100644 index 00000000000..6058388853c --- /dev/null +++ b/licenses/bin/font-awesome.MIT @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2014 Font Awesome + +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. \ No newline at end of file diff --git a/licenses/bin/font-awesome.SIL-OFL b/licenses/bin/font-awesome.SIL-OFL new file mode 100644 index 00000000000..9d0040e08b4 --- /dev/null +++ b/licenses/bin/font-awesome.SIL-OFL @@ -0,0 +1,94 @@ +Copyright (c) 2014, Font Awesome (http://fontawesome.io), +with Reserved Font Name FontAwesome. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/licenses/bin/function-bind.MIT b/licenses/bin/function-bind.MIT new file mode 100644 index 00000000000..62d6d237ff1 --- /dev/null +++ b/licenses/bin/function-bind.MIT @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +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. + diff --git a/licenses/bin/has-symbols.MIT b/licenses/bin/has-symbols.MIT new file mode 100644 index 00000000000..df31cbf3c06 --- /dev/null +++ b/licenses/bin/has-symbols.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +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. diff --git a/licenses/bin/has.MIT b/licenses/bin/has.MIT new file mode 100644 index 00000000000..ae7014d385d --- /dev/null +++ b/licenses/bin/has.MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +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. diff --git a/licenses/bin/history.MIT b/licenses/bin/history.MIT new file mode 100644 index 00000000000..312045b34ea --- /dev/null +++ b/licenses/bin/history.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016 Michael Jackson + +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. diff --git a/licenses/bin/hjson.MIT b/licenses/bin/hjson.MIT new file mode 100644 index 00000000000..f814dd5830a --- /dev/null +++ b/licenses/bin/hjson.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017 Christian Zangl + +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. diff --git a/licenses/bin/hoist-non-react-statics.BSD3 b/licenses/bin/hoist-non-react-statics.BSD3 new file mode 100644 index 00000000000..2464f59ec1f --- /dev/null +++ b/licenses/bin/hoist-non-react-statics.BSD3 @@ -0,0 +1,29 @@ +Software License Agreement (BSD License) +======================================== + +Copyright (c) 2015, Yahoo! Inc. All rights reserved. +---------------------------------------------------- + +Redistribution and use of this software 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. + * 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. + * Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be + used to endorse or promote products derived from this software without + specific prior written permission of Yahoo! Inc. + +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. diff --git a/licenses/bin/icu4j.ICU b/licenses/bin/icu4j.ICU new file mode 100644 index 00000000000..ec2a91321d2 --- /dev/null +++ b/licenses/bin/icu4j.ICU @@ -0,0 +1,385 @@ + + + + +ICU License - ICU 1.8.1 and later + + + + +

ICU License - ICU 1.8.1 and later

+ +

COPYRIGHT AND PERMISSION NOTICE

+ +

+Copyright (c) 1995-2014 International Business Machines Corporation and others +

+

+All rights reserved. +

+

+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, and/or sell +copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies +of the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. +

+

+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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL +THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, +OR ANY SPECIAL 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. +

+

+Except as contained in this notice, the name of a copyright holder shall not be +used in advertising or otherwise to promote the sale, use or other dealings in +this Software without prior written authorization of the copyright holder. +

+ +
+

+All trademarks and registered trademarks mentioned herein are the property of their respective owners. +

+ +
+ +

Third-Party Software Licenses

+This section contains third-party software notices and/or additional terms for licensed +third-party software components included within ICU libraries. + +

1. Unicode Data Files and Software

+ +
COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2014 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in
+http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software,
+(b) this copyright and permission notice appear in associated
+documentation, and
+(c) there is clear notice in each modified Data File or in the Software
+as well as in the documentation associated with the Data File(s) or
+Software that the data or software has been modified.
+
+THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 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 THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
+ +

2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)

+
+ #    The Google Chrome software developed by Google is licensed under the BSD license. Other software included in this distribution is provided under other licenses, as set forth below.
+ #
+ #	The BSD License
+ #	http://opensource.org/licenses/bsd-license.php
+ #	Copyright (C) 2006-2008, Google Inc.
+ #
+ #	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.
+ #	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.
+ #	Neither the name of  Google Inc. 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 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.
+ #
+ #
+ #	The word list in cjdict.txt are generated by combining three word lists listed
+ #	below with further processing for compound word breaking. The frequency is generated
+ #	with an iterative training against Google web corpora.
+ #
+ #	* Libtabe (Chinese)
+ #	  - https://sourceforge.net/project/?group_id=1519
+ #	  - Its license terms and conditions are shown below.
+ #
+ #	* IPADIC (Japanese)
+ #	  - http://chasen.aist-nara.ac.jp/chasen/distribution.html
+ #	  - Its license terms and conditions are shown below.
+ #
+ #	---------COPYING.libtabe ---- BEGIN--------------------
+ #
+ #	/*
+ #	 * Copyrighy (c) 1999 TaBE Project.
+ #	 * Copyright (c) 1999 Pai-Hsiang Hsiao.
+ #	 * 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.
+ #	 * . 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.
+ #	 * . Neither the name of the TaBE Project 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 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
+ #	 * REGENTS 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.
+ #	 */
+ #
+ #	/*
+ #	 * Copyright (c) 1999 Computer Systems and Communication Lab,
+ #	 *                    Institute of Information Science, Academia Sinica.
+ #	 * 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.
+ #	 * . 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.
+ #	 * . Neither the name of the Computer Systems and Communication Lab
+ #	 *   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 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
+ #	 * REGENTS 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.
+ #	 */
+ #
+ #	Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois
+ #	c-tsai4@uiuc.edu  http://casper.beckman.uiuc.edu/~c-tsai4
+ #
+ #	---------------COPYING.libtabe-----END------------------------------------
+ #
+ #
+ #	---------------COPYING.ipadic-----BEGIN------------------------------------
+ #
+ #	Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
+ #	and Technology.  All Rights Reserved.
+ #
+ #	Use, reproduction, and distribution of this software is permitted.
+ #	Any copy of this software, whether in its original form or modified,
+ #	must include both the above copyright notice and the following
+ #	paragraphs.
+ #
+ #	Nara Institute of Science and Technology (NAIST),
+ #	the copyright holders, disclaims all warranties with regard to this
+ #	software, including all implied warranties of merchantability and
+ #	fitness, in no event shall NAIST be liable for
+ #	any special, 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 tortuous action, arising out
+ #	of or in connection with the use or performance of this software.
+ #
+ #	A large portion of the dictionary entries
+ #	originate from ICOT Free Software.  The following conditions for ICOT
+ #	Free Software applies to the current dictionary as well.
+ #
+ #	Each User may also freely distribute the Program, whether in its
+ #	original form or modified, to any third party or parties, PROVIDED
+ #	that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
+ #	on, or be attached to, the Program, which is distributed substantially
+ #	in the same form as set out herein and that such intended
+ #	distribution, if actually made, will neither violate or otherwise
+ #	contravene any of the laws and regulations of the countries having
+ #	jurisdiction over the User or the intended distribution itself.
+ #
+ #	NO WARRANTY
+ #
+ #	The program was produced on an experimental basis in the course of the
+ #	research and development conducted during the project and is provided
+ #	to users as so produced on an experimental basis.  Accordingly, the
+ #	program is provided without any warranty whatsoever, whether express,
+ #	implied, statutory or otherwise.  The term "warranty" used herein
+ #	includes, but is not limited to, any warranty of the quality,
+ #	performance, merchantability and fitness for a particular purpose of
+ #	the program and the nonexistence of any infringement or violation of
+ #	any right of any third party.
+ #
+ #	Each user of the program will agree and understand, and be deemed to
+ #	have agreed and understood, that there is no warranty whatsoever for
+ #	the program and, accordingly, the entire risk arising from or
+ #	otherwise connected with the program is assumed by the user.
+ #
+ #	Therefore, neither ICOT, the copyright holder, or any other
+ #	organization that participated in or was otherwise related to the
+ #	development of the program and their respective officials, directors,
+ #	officers and other employees shall be held liable for any and all
+ #	damages, including, without limitation, general, special, incidental
+ #	and consequential damages, arising out of or otherwise in connection
+ #	with the use or inability to use the program or any product, material
+ #	or result produced or otherwise obtained by using the program,
+ #	regardless of whether they have been advised of, or otherwise had
+ #	knowledge of, the possibility of such damages at any time during the
+ #	project or thereafter.  Each user will be deemed to have agreed to the
+ #	foregoing by his or her commencement of use of the program.  The term
+ #	"use" as used herein includes, but is not limited to, the use,
+ #	modification, copying and distribution of the program and the
+ #	production of secondary products from the program.
+ #
+ #	In the case where the program, whether in its original form or
+ #	modified, was distributed or delivered to or received by a user from
+ #	any person, organization or entity other than ICOT, unless it makes or
+ #	grants independently of ICOT any specific warranty to the user in
+ #	writing, such person, organization or entity, will also be exempted
+ #	from and not be held liable to the user for any such damages as noted
+ #	above as far as the program is concerned.
+ #
+ #	---------------COPYING.ipadic-----END------------------------------------
+
+ +

3. Lao Word Break Dictionary Data (laodict.txt)

+
+ #	Copyright (c) 2013 International Business Machines Corporation
+ #	and others. All Rights Reserved.
+ #
+ #	Project:    http://code.google.com/p/lao-dictionary/
+ #	Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
+ #	License:    http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt
+ #	            (copied below)
+ #
+ #	This file is derived from the above dictionary, with slight modifications.
+ #	--------------------------------------------------------------------------------
+ #	Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
+ #	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. 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.
+ #
+ #	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 HOLDER 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.
+ #	--------------------------------------------------------------------------------
+
+ +

4. Burmese Word Break Dictionary Data (burmesedict.txt)

+
+ #	Copyright (c) 2014 International Business Machines Corporation
+ #	and others. All Rights Reserved.
+ #
+ #	This list is part of a project hosted at:
+ #	  github.com/kanyawtech/myanmar-karen-word-lists
+ #
+ #	--------------------------------------------------------------------------------
+ #	Copyright (c) 2013, LeRoy Benjamin Sharon
+ #	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.
+ #
+ #	  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.
+ #
+ #	  Neither the name Myanmar Karen Word Lists, 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 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 HOLDER 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.
+ #	--------------------------------------------------------------------------------
+
+ +

5. Time Zone Database

+

ICU uses the public domain data and code derived from +Time Zone Database for its time zone support. The ownership of the TZ database is explained +in BCP 175: Procedure for Maintaining the Time Zone +Database section 7.

+ +

+7.  Database Ownership
+
+   The TZ database itself is not an IETF Contribution or an IETF
+   document.  Rather it is a pre-existing and regularly updated work
+   that is in the public domain, and is intended to remain in the public
+   domain.  Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do not apply
+   to the TZ Database or contributions that individuals make to it.
+   Should any claims be made and substantiated against the TZ Database,
+   the organization that is providing the IANA Considerations defined in
+   this RFC, under the memorandum of understanding with the IETF,
+   currently ICANN, may act in accordance with all competent court
+   orders.  No ownership claims will be made by ICANN or the IETF Trust
+   on the database or the code.  Any person making a contribution to the
+   database or code waives all rights to future claims in that
+   contribution or in the TZ Database.
+
+
+ + + + diff --git a/licenses/bin/invariant.MIT b/licenses/bin/invariant.MIT new file mode 100644 index 00000000000..188fb2b0bd8 --- /dev/null +++ b/licenses/bin/invariant.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +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. diff --git a/licenses/bin/is-buffer.MIT b/licenses/bin/is-buffer.MIT new file mode 100644 index 00000000000..0c068ceecbd --- /dev/null +++ b/licenses/bin/is-buffer.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +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. diff --git a/licenses/bin/is-callable.MIT b/licenses/bin/is-callable.MIT new file mode 100644 index 00000000000..b43df444e51 --- /dev/null +++ b/licenses/bin/is-callable.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. + diff --git a/licenses/bin/is-date-object.MIT b/licenses/bin/is-date-object.MIT new file mode 100644 index 00000000000..b43df444e51 --- /dev/null +++ b/licenses/bin/is-date-object.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. + diff --git a/licenses/bin/is-regex.MIT b/licenses/bin/is-regex.MIT new file mode 100644 index 00000000000..47b7b5078fc --- /dev/null +++ b/licenses/bin/is-regex.MIT @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +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. diff --git a/licenses/bin/is-symbol.MIT b/licenses/bin/is-symbol.MIT new file mode 100644 index 00000000000..b43df444e51 --- /dev/null +++ b/licenses/bin/is-symbol.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. + diff --git a/licenses/bin/isarray.MIT b/licenses/bin/isarray.MIT new file mode 100644 index 00000000000..2cdc8e4148c --- /dev/null +++ b/licenses/bin/isarray.MIT @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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. diff --git a/licenses/bin/janino.BSD3 b/licenses/bin/janino.BSD3 new file mode 100644 index 00000000000..ef871e24262 --- /dev/null +++ b/licenses/bin/janino.BSD3 @@ -0,0 +1,31 @@ +Janino - An embedded Java[TM] compiler + +Copyright (c) 2001-2016, Arno Unkrig +Copyright (c) 2015-2016 TIBCO Software Inc. +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 JANINO 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 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 HOLDERS 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. diff --git a/licenses/bin/javax-el.CDDL11 b/licenses/bin/javax-el.CDDL11 new file mode 100644 index 00000000000..82dfb5ccd43 --- /dev/null +++ b/licenses/bin/javax-el.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. ß + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/javax.CDDL11 b/licenses/bin/javax.CDDL11 new file mode 100644 index 00000000000..596a510633d --- /dev/null +++ b/licenses/bin/javax.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. � + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/javax.activation.CDDL11 b/licenses/bin/javax.activation.CDDL11 new file mode 100644 index 00000000000..596a510633d --- /dev/null +++ b/licenses/bin/javax.activation.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. � + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/javax.el-api.CDDL11 b/licenses/bin/javax.el-api.CDDL11 new file mode 100644 index 00000000000..82dfb5ccd43 --- /dev/null +++ b/licenses/bin/javax.el-api.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. ß + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/javax.servlet-api.CDDL11 b/licenses/bin/javax.servlet-api.CDDL11 new file mode 100644 index 00000000000..82dfb5ccd43 --- /dev/null +++ b/licenses/bin/javax.servlet-api.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. ß + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/jcl-over-slf4j.IMT b/licenses/bin/jcl-over-slf4j.IMT new file mode 100644 index 00000000000..8fda22f4d72 --- /dev/null +++ b/licenses/bin/jcl-over-slf4j.IMT @@ -0,0 +1,21 @@ +Copyright (c) 2004-2014 QOS.ch +All rights reserved. + +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. diff --git a/licenses/bin/jcodings.MIT b/licenses/bin/jcodings.MIT new file mode 100644 index 00000000000..f85e365de02 --- /dev/null +++ b/licenses/bin/jcodings.MIT @@ -0,0 +1,17 @@ +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. diff --git a/licenses/bin/jersey.CDDL11 b/licenses/bin/jersey.CDDL11 new file mode 100644 index 00000000000..82dfb5ccd43 --- /dev/null +++ b/licenses/bin/jersey.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. ß + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/jline.BSD3 b/licenses/bin/jline.BSD3 new file mode 100644 index 00000000000..246f54f7365 --- /dev/null +++ b/licenses/bin/jline.BSD3 @@ -0,0 +1,32 @@ +Copyright (c) 2002-2006, Marc Prud'hommeaux +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. + +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. + +Neither the name of JLine 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 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. diff --git a/licenses/bin/joni.MIT b/licenses/bin/joni.MIT new file mode 100644 index 00000000000..9341f05eee9 --- /dev/null +++ b/licenses/bin/joni.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 JRuby Team + +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. diff --git a/licenses/bin/jopt-simple.MIT b/licenses/bin/jopt-simple.MIT new file mode 100644 index 00000000000..6796036beaa --- /dev/null +++ b/licenses/bin/jopt-simple.MIT @@ -0,0 +1,24 @@ +/* + The MIT License + + Copyright (c) 2004-2011 Paul R. Holser, Jr. + + 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. +*/ diff --git a/licenses/bin/jsch.BSD3 b/licenses/bin/jsch.BSD3 new file mode 100644 index 00000000000..edd491dfbfb --- /dev/null +++ b/licenses/bin/jsch.BSD3 @@ -0,0 +1,30 @@ +JSch 0.0.* was released under the GNU LGPL license. Later, we have switched +over to a BSD-style license. + +------------------------------------------------------------------------------ +Copyright (c) 2002-2015 Atsuhiko Yamanaka, JCraft,Inc. +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. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT, +INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. diff --git a/licenses/bin/jsr305.BSD3 b/licenses/bin/jsr305.BSD3 new file mode 100644 index 00000000000..84247609255 --- /dev/null +++ b/licenses/bin/jsr305.BSD3 @@ -0,0 +1,8 @@ +The JSR-305 reference implementation (lib/jsr305.jar) is +distributed under the terms of the New BSD license: + + http://www.opensource.org/licenses/bsd-license.php + +See the JSR-305 home page for more information: + + http://code.google.com/p/jsr-305/ diff --git a/licenses/bin/jsr311-api.CDDL11 b/licenses/bin/jsr311-api.CDDL11 new file mode 100644 index 00000000000..82dfb5ccd43 --- /dev/null +++ b/licenses/bin/jsr311-api.CDDL11 @@ -0,0 +1,362 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates or + contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), and + the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing Original + Software with files containing Modifications, in each case including + portions thereof. + + 1.4. "Executable" means the Covered Software in any form other than + Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original Software + or previous Modifications; + + B. Any new file that contains any part of the Original Software or + previous Modification; or + + C. Any new file that is contributed or otherwise made available + under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable form + of computer software code that is originally released under this + License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, + this License. For legal entities, "You" includes any entity which + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, the Initial Developer + hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Software (or portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of + Original Software, to make, have made, use, practice, sell, and + offer for sale, and/or otherwise dispose of the Original Software + (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on + the date Initial Developer first distributes or otherwise makes the + Original Software available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original Software, or + (2) for infringements caused by: (i) the modification of the + Original Software, or (ii) the combination of the Original Software + with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and subject + to third party intellectual property claims, each Contributor hereby + grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as Covered Software + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling + of Modifications made by that Contributor either alone and/or in + combination with its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, have made, and/or + otherwise dispose of: (1) Modifications made by that Contributor (or + portions thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions of such + combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective + on the date Contributor first distributes or otherwise makes the + Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted from the + Contributor Version; (2) for infringements caused by: (i) third + party modifications of Contributor Version, or (ii) the combination + of Modifications made by that Contributor with other software + (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make available + in Executable form must also be made available in Source Code form + and that Source Code form must be distributed only under the terms + of this License. You must include a copy of this License with every + copy of the Source Code form of the Covered Software You distribute + or otherwise make available. You must inform recipients of any such + Covered Software in Executable form as to how they can obtain such + Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or You + have sufficient rights to grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may not + remove or alter any copyright, patent or trademark notices contained + within the Covered Software, or any notices of licensing or any + descriptive text giving attribution to any Contributor or the + Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version of + this License or the recipients' rights hereunder. You may choose to + offer, and to charge a fee for, warranty, support, indemnity or + liability obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on behalf of + the Initial Developer or any Contributor. You must make it + absolutely clear that any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree + to indemnify the Initial Developer and every Contributor for any + liability incurred by the Initial Developer or such Contributor as a + result of warranty, support, indemnity or liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software under + the terms of this License or under the terms of a license of Your + choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make + it absolutely clear that any terms which differ from this License + are offered by You alone, not by the Initial Developer or + Contributor. You hereby agree to indemnify the Initial Developer and + every Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and distribute + the Larger Work as a single product. In such a case, You must make + sure the requirements of this License are fulfilled for the Covered + Software. + +4. Versions of the License. + + 4.1. New Versions. + + Oracle is the initial license steward and may publish revised and/or + new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section + 4.3, no one other than the license steward has the right to modify + this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. If + the Initial Developer includes a notice in the Original Software + prohibiting it from being distributed or otherwise made available + under any subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the version + of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or + otherwise make the Covered Software available under the terms of any + subsequent version of the License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license and + remove any references to the name of the license steward (except to + note that the license differs from this License); and (b) otherwise + make it clear that the license contains terms which differ from this + License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE + IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR + NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE + DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY + OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN + ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS + AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond the + termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that the + Participant Software (meaning the Contributor Version where the + Participant is a Contributor or the Original Software where the + Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if the + Initial Developer is not the Participant) and all Contributors under + Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice + from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 + day period You withdraw Your claim with respect to the Participant + Software against such Participant either unilaterally or pursuant to + a written agreement with Participant. + + 6.3. If You assert a patent infringement claim against Participant + alleging that the Participant Software directly or indirectly + infringes any patent where such claim is resolved (such as by + license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 6.4. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE + TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR + LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE + POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT + APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH + PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH + LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION + AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is defined + in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" (as that term is defined at 48 C.F.R. ß + 252.227-7014(a)(1)) and "commercial computer software documentation" + as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent + with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 + (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights + clause is in lieu of, and supersedes, any other FAR, DFAR, or other + clause or provision that addresses Government rights in computer + software under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + the law of the jurisdiction specified in a notice contained within + the Original Software (except to the extent applicable law, if any, + provides otherwise), excluding such jurisdiction's conflict-of-law + provisions. Any litigation relating to this License shall be subject + to the jurisdiction of the courts located in the jurisdiction and + venue specified in a notice contained within the Original Software, + with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys' fees and expenses. + The application of the United Nations Convention on Contracts for + the International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall be + construed against the drafter shall not apply to this License. You + agree that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, distribute + or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +------------------------------------------------------------------------ + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION +LICENSE (CDDL) + +The code released under the CDDL shall be governed by the laws of the +State of California (excluding conflict-of-law provisions). Any +litigation relating to this License shall be subject to the jurisdiction +of the Federal Courts of the Northern District of California and the +state courts of the State of California, with venue lying in Santa Clara +County, California. diff --git a/licenses/bin/leveldbjni.BSD3 b/licenses/bin/leveldbjni.BSD3 new file mode 100644 index 00000000000..8edd375909b --- /dev/null +++ b/licenses/bin/leveldbjni.BSD3 @@ -0,0 +1,27 @@ +Copyright (c) 2011 FuseSource Corp. 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. + * 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. + * Neither the name of FuseSource Corp. 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 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. diff --git a/licenses/bin/numeral.MIT b/licenses/bin/numeral.MIT new file mode 100644 index 00000000000..e373f8976a8 --- /dev/null +++ b/licenses/bin/numeral.MIT @@ -0,0 +1,22 @@ +Copyright (c) 2016 Adam Draper + +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. diff --git a/licenses/bin/object-assign.MIT b/licenses/bin/object-assign.MIT new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/licenses/bin/object-assign.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/licenses/bin/object-keys.MIT b/licenses/bin/object-keys.MIT new file mode 100644 index 00000000000..28553fdd068 --- /dev/null +++ b/licenses/bin/object-keys.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +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. \ No newline at end of file diff --git a/licenses/bin/os-browserify.MIT b/licenses/bin/os-browserify.MIT new file mode 100644 index 00000000000..e69de29bb2d diff --git a/licenses/bin/paranamer.BSD3 b/licenses/bin/paranamer.BSD3 new file mode 100644 index 00000000000..9eab8791863 --- /dev/null +++ b/licenses/bin/paranamer.BSD3 @@ -0,0 +1,29 @@ +[ ParaNamer used to be 'Pubic Domain', but since it includes a small piece of ASM it is now the same license as that: BSD ] + + Portions copyright (c) 2006-2018 Paul Hammant & ThoughtWorks Inc + Portions copyright (c) 2000-2007 INRIA, France Telecom + 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 holders 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 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. diff --git a/licenses/bin/path-to-regexp.MIT b/licenses/bin/path-to-regexp.MIT new file mode 100644 index 00000000000..983fbe8aec3 --- /dev/null +++ b/licenses/bin/path-to-regexp.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +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. diff --git a/licenses/bin/postgresql.BSD3 b/licenses/bin/postgresql.BSD3 new file mode 100644 index 00000000000..fd416d2ec47 --- /dev/null +++ b/licenses/bin/postgresql.BSD3 @@ -0,0 +1,26 @@ +Copyright (c) 1997-2011, PostgreSQL Global Development Group +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 PostgreSQL Global Development Group 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 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. diff --git a/licenses/bin/process.MIT b/licenses/bin/process.MIT new file mode 100644 index 00000000000..b8c1246cf49 --- /dev/null +++ b/licenses/bin/process.MIT @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 Roman Shtylman + +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. diff --git a/licenses/bin/promise.MIT b/licenses/bin/promise.MIT new file mode 100644 index 00000000000..7a1f763640a --- /dev/null +++ b/licenses/bin/promise.MIT @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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. diff --git a/licenses/bin/prop-types.MIT b/licenses/bin/prop-types.MIT new file mode 100644 index 00000000000..188fb2b0bd8 --- /dev/null +++ b/licenses/bin/prop-types.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +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. diff --git a/licenses/bin/protobuf-java.BSD3 b/licenses/bin/protobuf-java.BSD3 new file mode 100644 index 00000000000..f028c823242 --- /dev/null +++ b/licenses/bin/protobuf-java.BSD3 @@ -0,0 +1,42 @@ +This license applies to all parts of Protocol Buffers except the following: + + - Atomicops support for generic gcc, located in + src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. + This file is copyrighted by Red Hat Inc. + + - Atomicops support for AIX/POWER, located in + src/google/protobuf/stubs/atomicops_internals_power.h. + This file is copyrighted by Bloomberg Finance LP. + +Copyright 2014, Google Inc. 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. + * 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. + * Neither the name of Google Inc. 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 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. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. diff --git a/licenses/bin/pure-render-decorator.MIT b/licenses/bin/pure-render-decorator.MIT new file mode 100644 index 00000000000..06754d3c037 --- /dev/null +++ b/licenses/bin/pure-render-decorator.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Félix Girault + +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. diff --git a/licenses/bin/react-ace.MIT b/licenses/bin/react-ace.MIT new file mode 100644 index 00000000000..3010ee6d923 --- /dev/null +++ b/licenses/bin/react-ace.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 James Hrisho + +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. + diff --git a/licenses/bin/react-addons-css-transition-group.MIT b/licenses/bin/react-addons-css-transition-group.MIT new file mode 100644 index 00000000000..188fb2b0bd8 --- /dev/null +++ b/licenses/bin/react-addons-css-transition-group.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +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. diff --git a/licenses/bin/react-dom.MIT b/licenses/bin/react-dom.MIT new file mode 100644 index 00000000000..b96dcb0480a --- /dev/null +++ b/licenses/bin/react-dom.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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. diff --git a/licenses/bin/react-is.MIT b/licenses/bin/react-is.MIT new file mode 100644 index 00000000000..b96dcb0480a --- /dev/null +++ b/licenses/bin/react-is.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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. diff --git a/licenses/bin/react-router-dom.MIT b/licenses/bin/react-router-dom.MIT new file mode 100644 index 00000000000..c79afb81e56 --- /dev/null +++ b/licenses/bin/react-router-dom.MIT @@ -0,0 +1,37 @@ +# react-router-dom + +DOM bindings for [React Router](https://reacttraining.com/react-router). + +## Installation + +Using [npm](https://www.npmjs.com/): + + $ npm install --save react-router-dom + +Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else: + +```js +// using ES6 modules +import { BrowserRouter, Route, Link } from 'react-router-dom' + +// using CommonJS modules +const BrowserRouter = require('react-router-dom').BrowserRouter +const Route = require('react-router-dom').Route +const Link = require('react-router-dom').Link +``` + +The UMD build is also available on [unpkg](https://unpkg.com): + +```html + +``` + +You can find the library on `window.ReactRouterDOM`. + +## Issues + +If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues). + +## Credits + +React Router is built and maintained by [React Training](https://reacttraining.com). diff --git a/licenses/bin/react-router.MIT b/licenses/bin/react-router.MIT new file mode 100644 index 00000000000..a46e3167fca --- /dev/null +++ b/licenses/bin/react-router.MIT @@ -0,0 +1,40 @@ +# react-router + +Declarative routing for [React](https://facebook.github.io/react). + +## Installation + +Using [npm](https://www.npmjs.com/): + + $ npm install --save react-router + +**Note:** This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead install `react-router-dom`. Similarly, if you are writing a React Native application, you should instead install `react-router-native`. Both of those will install `react-router` as a dependency. + + +Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else: + +```js +// using ES6 modules +import { Router, Route, Switch } from 'react-router' + +// using CommonJS modules +var Router = require('react-router').Router +var Route = require('react-router').Route +var Switch = require('react-router').Switch +``` + +The UMD build is also available on [unpkg](https://unpkg.com): + +```html + +``` + +You can find the library on `window.ReactRouter`. + +## Issues + +If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues). + +## Credits + +React Router is built and maintained by [React Training](https://reacttraining.com). diff --git a/licenses/bin/react-table.MIT b/licenses/bin/react-table.MIT new file mode 100644 index 00000000000..9fe1442eeb4 --- /dev/null +++ b/licenses/bin/react-table.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Tanner Linsley + +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. diff --git a/licenses/bin/react-transition-group.BSD3 b/licenses/bin/react-transition-group.BSD3 new file mode 100644 index 00000000000..8b268b61104 --- /dev/null +++ b/licenses/bin/react-transition-group.BSD3 @@ -0,0 +1,30 @@ +BSD 3-Clause License + +Copyright (c) 2016, React Community +Forked from React (https://github.com/facebook/react) Copyright 2013-present, Facebook, Inc. +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. + +* 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. + +* 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 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 HOLDER 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. diff --git a/licenses/bin/react.MIT b/licenses/bin/react.MIT new file mode 100644 index 00000000000..b96dcb0480a --- /dev/null +++ b/licenses/bin/react.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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. diff --git a/licenses/bin/reactive-streams.CC0 b/licenses/bin/reactive-streams.CC0 new file mode 100644 index 00000000000..696f2c0ec2d --- /dev/null +++ b/licenses/bin/reactive-streams.CC0 @@ -0,0 +1,8 @@ +Licensed under Public Domain (CC0) + +To the extent possible under law, the person who associated CC0 with +this code has waived all copyright and related or neighboring +rights to this code. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see . diff --git a/licenses/bin/resolve-pathname.MIT b/licenses/bin/resolve-pathname.MIT new file mode 100644 index 00000000000..54ff40f6e24 --- /dev/null +++ b/licenses/bin/resolve-pathname.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Michael Jackson 2016-2018 + +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. diff --git a/licenses/bin/rhino.MPL2 b/licenses/bin/rhino.MPL2 new file mode 100644 index 00000000000..cd6ebb83d75 --- /dev/null +++ b/licenses/bin/rhino.MPL2 @@ -0,0 +1,375 @@ +The majority of Rhino is licensed under the MPL 2.0: + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/licenses/bin/scala-lang.BSD3 b/licenses/bin/scala-lang.BSD3 new file mode 100644 index 00000000000..7eb343f34fe --- /dev/null +++ b/licenses/bin/scala-lang.BSD3 @@ -0,0 +1,12 @@ +Copyright (c) 2002- EPFL +Copyright (c) 2011- Lightbend, Inc. + +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 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 HOLDER 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. \ No newline at end of file diff --git a/licenses/bin/scheduler.MIT b/licenses/bin/scheduler.MIT new file mode 100644 index 00000000000..b96dcb0480a --- /dev/null +++ b/licenses/bin/scheduler.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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. diff --git a/licenses/bin/slf4j.MIT b/licenses/bin/slf4j.MIT new file mode 100644 index 00000000000..f5ecafa0074 --- /dev/null +++ b/licenses/bin/slf4j.MIT @@ -0,0 +1,21 @@ +Copyright (c) 2004-2008 QOS.ch +All rights reserved. + +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. diff --git a/licenses/bin/string-at.MIT b/licenses/bin/string-at.MIT new file mode 100644 index 00000000000..b43df444e51 --- /dev/null +++ b/licenses/bin/string-at.MIT @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. + diff --git a/licenses/bin/style-loader.MIT b/licenses/bin/style-loader.MIT new file mode 100644 index 00000000000..8c11fc7289b --- /dev/null +++ b/licenses/bin/style-loader.MIT @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +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. diff --git a/licenses/bin/tesla-aether.EPL1 b/licenses/bin/tesla-aether.EPL1 new file mode 100644 index 00000000000..16cc69a5235 --- /dev/null +++ b/licenses/bin/tesla-aether.EPL1 @@ -0,0 +1,87 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/licenses/bin/tether.MIT b/licenses/bin/tether.MIT new file mode 100644 index 00000000000..fabf1dc3dd7 --- /dev/null +++ b/licenses/bin/tether.MIT @@ -0,0 +1,8 @@ +Copyright (c) 2014-2017 HubSpot, Inc. + +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. + diff --git a/licenses/bin/ua-parser-js.MIT b/licenses/bin/ua-parser-js.MIT new file mode 100644 index 00000000000..1f3ef511cf1 --- /dev/null +++ b/licenses/bin/ua-parser-js.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012-2018 Faisal Salman <> + +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. diff --git a/licenses/bin/value-equal.MIT b/licenses/bin/value-equal.MIT new file mode 100644 index 00000000000..54ff40f6e24 --- /dev/null +++ b/licenses/bin/value-equal.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Michael Jackson 2016-2018 + +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. diff --git a/licenses/bin/warning.MIT b/licenses/bin/warning.MIT new file mode 100644 index 00000000000..188fb2b0bd8 --- /dev/null +++ b/licenses/bin/warning.MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +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. diff --git a/licenses/bin/webpack.MIT b/licenses/bin/webpack.MIT new file mode 100644 index 00000000000..8c11fc7289b --- /dev/null +++ b/licenses/bin/webpack.MIT @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +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. diff --git a/licenses/bin/xmlenc.BSD3 b/licenses/bin/xmlenc.BSD3 new file mode 100644 index 00000000000..3a70c9bfcda --- /dev/null +++ b/licenses/bin/xmlenc.BSD3 @@ -0,0 +1,27 @@ +Copyright 2003-2005, Ernst de Haan +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 COPYRIGHT HOLDER 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. diff --git a/licenses/bin/zstandard.BSD3 b/licenses/bin/zstandard.BSD3 new file mode 100644 index 00000000000..a793a802892 --- /dev/null +++ b/licenses/bin/zstandard.BSD3 @@ -0,0 +1,30 @@ +BSD License + +For Zstandard software + +Copyright (c) 2016-present, Facebook, Inc. 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. + + * 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. + + * Neither the name Facebook 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 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 HOLDER 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. diff --git a/licenses/bin/zstd-jni.BSD2 b/licenses/bin/zstd-jni.BSD2 new file mode 100644 index 00000000000..32c6bbdd980 --- /dev/null +++ b/licenses/bin/zstd-jni.BSD2 @@ -0,0 +1,26 @@ +Zstd-jni: JNI bindings to Zstd Library + +Copyright (c) 2015-2016, Luben Karavelov/ All rights reserved. + +BSD License + +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. + +* 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. + +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 HOLDER 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. diff --git a/licenses/src/datatables.BSD3 b/licenses/src/datatables.BSD3 new file mode 100644 index 00000000000..19a177bf749 --- /dev/null +++ b/licenses/src/datatables.BSD3 @@ -0,0 +1,10 @@ +Copyright (c) 2008-2010, Allan Jardine +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. + * 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. + * Neither the name of Allan Jardine nor SpryMedia UK may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "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 HOLDERS 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. \ No newline at end of file diff --git a/licenses/src/jquery-ui.MIT b/licenses/src/jquery-ui.MIT new file mode 100644 index 00000000000..741585591f0 --- /dev/null +++ b/licenses/src/jquery-ui.MIT @@ -0,0 +1,26 @@ +Copyright 2012 jQuery Foundation and other contributors, +http://jqueryui.com/ + +This software consists of voluntary contributions made by many +individuals (AUTHORS.txt, http://jqueryui.com/about) For exact +contribution history, see the revision history and logs, available +at http://jquery-ui.googlecode.com/svn/ + +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. diff --git a/licenses/src/jquery.MIT b/licenses/src/jquery.MIT new file mode 100644 index 00000000000..163c7cbd29d --- /dev/null +++ b/licenses/src/jquery.MIT @@ -0,0 +1,10 @@ +The MIT License (MIT) + +Copyright (c) 2005, 2014 jQuery Foundation, Inc. + +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. + diff --git a/licenses/src/underscore.MIT b/licenses/src/underscore.MIT new file mode 100644 index 00000000000..de86c6ca6b6 --- /dev/null +++ b/licenses/src/underscore.MIT @@ -0,0 +1,22 @@ +Copyright (c) 2011 Jeremy Ashkenas, DocumentCloud + +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. diff --git a/pom.xml b/pom.xml index 1ab8ad1b6c4..9818aab5d64 100644 --- a/pom.xml +++ b/pom.xml @@ -1474,6 +1474,7 @@ quickstart/tutorial/conf/** docker/*.conf target/** + licenses/** **/test/resources/** **/derby.log **/jvm.config @@ -1482,6 +1483,11 @@ **/*.json **/*.parq **/*.parquet + LICENSE + LICENSE.BINARY + NOTICE + NOTICE.BINARY + LABELS.md .github/ISSUE_TEMPLATE/*.md diff --git a/processing/pom.xml b/processing/pom.xml index 9f781b0588b..1c469890ac4 100644 --- a/processing/pom.xml +++ b/processing/pom.xml @@ -113,7 +113,7 @@ org.checkerframework - checker + checker-qual ${checkerframework.version} From 65118277a3be4900939bcfe102f5ff491cb33d9e Mon Sep 17 00:00:00 2001 From: Xue Yu <278006819@qq.com> Date: Tue, 5 Mar 2019 11:18:22 +0800 Subject: [PATCH 02/19] support sin cos etc trigonometric function in sql (#7182) * support triangle function in sql * feedback address --- .../org/apache/druid/math/expr/Function.java | 37 +++++++++++++++ docs/content/misc/math-expr.md | 2 + docs/content/querying/sql.md | 8 ++++ .../calcite/planner/DruidOperatorTable.java | 9 ++++ .../druid/sql/calcite/CalciteQueryTest.java | 47 +++++++++++++++++++ 5 files changed, 103 insertions(+) diff --git a/core/src/main/java/org/apache/druid/math/expr/Function.java b/core/src/main/java/org/apache/druid/math/expr/Function.java index 24247558c13..2b03bfc1038 100644 --- a/core/src/main/java/org/apache/druid/math/expr/Function.java +++ b/core/src/main/java/org/apache/druid/math/expr/Function.java @@ -122,6 +122,27 @@ interface Function } } + class Pi implements Function + { + private static final double PI = Math.PI; + + @Override + public String name() + { + return "pi"; + } + + @Override + public ExprEval apply(List args, Expr.ObjectBinding bindings) + { + if (args.size() >= 1) { + throw new IAE("Function[%s] needs 0 argument", name()); + } + + return ExprEval.of(PI); + } + } + class Abs extends SingleParamMath { @Override @@ -248,6 +269,22 @@ interface Function } } + class Cot extends SingleParamMath + { + @Override + public String name() + { + return "cot"; + } + + @Override + protected ExprEval eval(double param) + { + return ExprEval.of(Math.cos(param) / Math.sin(param)); + } + } + + class Div extends DoubleParamMath { @Override diff --git a/docs/content/misc/math-expr.md b/docs/content/misc/math-expr.md index ff749eae943..a1166828c86 100644 --- a/docs/content/misc/math-expr.md +++ b/docs/content/misc/math-expr.md @@ -109,6 +109,7 @@ See javadoc of java.lang.Math for detailed explanation for each function. |copysign|copysign(x) would return the first floating-point argument with the sign of the second floating-point argument| |cos|cos(x) would return the trigonometric cosine of x| |cosh|cosh(x) would return the hyperbolic cosine of x| +|cot|cot(x) would return the trigonometric cotangent of an angle x| |div|div(x,y) is integer division of x by y| |exp|exp(x) would return Euler's number raised to the power of x| |expm1|expm1(x) would return e^x-1| @@ -122,6 +123,7 @@ See javadoc of java.lang.Math for detailed explanation for each function. |min|min(x, y) would return the smaller of two values| |nextafter|nextafter(x, y) would return the floating-point number adjacent to the x in the direction of the y| |nextUp|nextUp(x) would return the floating-point value adjacent to x in the direction of positive infinity| +|pi|pi would return the constant value of the π | |pow|pow(x, y) would return the value of the x raised to the power of y| |remainder|remainder(x, y) would return the remainder operation on two arguments as prescribed by the IEEE 754 standard| |rint|rint(x) would return value that is closest in value to x and is equal to a mathematical integer| diff --git a/docs/content/querying/sql.md b/docs/content/querying/sql.md index 31e0109a9a7..d708850f094 100644 --- a/docs/content/querying/sql.md +++ b/docs/content/querying/sql.md @@ -147,6 +147,14 @@ Numeric functions will return 64 bit integers or 64 bit floats, depending on the |`x * y`|Multiplication.| |`x / y`|Division.| |`MOD(x, y)`|Modulo (remainder of x divided by y).| +|`SIN(expr)`|Trigonometric sine of an angle expr.| +|`COS(expr)`|Trigonometric cosine of an angle expr.| +|`TAN(expr)`|Trigonometric tangent of an angle expr.| +|`COT(expr)`|Trigonometric cotangent of an angle expr.| +|`ASIN(expr)`|Arc sine of expr.| +|`ACOS(expr)`|Arc cosine of expr.| +|`ATAN(expr)`|Arc tangent of expr.| +|`ATAN2(y, x)`|Angle theta from the conversion of rectangular coordinates (x, y) to polar * coordinates (r, theta).| ### String functions diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidOperatorTable.java b/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidOperatorTable.java index 601303dd2d1..b355095da74 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidOperatorTable.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidOperatorTable.java @@ -121,6 +121,15 @@ public class DruidOperatorTable implements SqlOperatorTable .add(new DirectOperatorConversion(SqlStdOperatorTable.REPLACE, "replace")) .add(new DirectOperatorConversion(SqlStdOperatorTable.SQRT, "sqrt")) .add(new DirectOperatorConversion(SqlStdOperatorTable.UPPER, "upper")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.PI, "pi")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.SIN, "sin")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.COS, "cos")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.TAN, "tan")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.COT, "cot")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.ASIN, "asin")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.ACOS, "acos")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.ATAN, "atan")) + .add(new DirectOperatorConversion(SqlStdOperatorTable.ATAN2, "atan2")) .add(new UnaryPrefixOperatorConversion(SqlStdOperatorTable.NOT, "!")) .add(new UnaryPrefixOperatorConversion(SqlStdOperatorTable.UNARY_MINUS, "-")) .add(new UnaryFunctionOperatorConversion(SqlStdOperatorTable.IS_NULL, "isnull")) diff --git a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java index ad6030fb8d7..839d8927ad9 100644 --- a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java +++ b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java @@ -7598,4 +7598,51 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) ); } + + @Test + public void testTrigonometricFunction() throws Exception + { + testQuery( + PLANNER_CONFIG_DEFAULT, + QUERY_CONTEXT_DONT_SKIP_EMPTY_BUCKETS, + "SELECT exp(count(*)) + 10, sin(pi / 6), cos(pi / 6), tan(pi / 6), cot(pi / 6)," + + "asin(exp(count(*)) / 2), acos(exp(count(*)) / 2), atan(exp(count(*)) / 2), atan2(exp(count(*)), 1) " + + "FROM druid.foo WHERE dim2 = 0", + CalciteTests.REGULAR_USER_AUTH_RESULT, + ImmutableList.of(Druids.newTimeseriesQueryBuilder() + .dataSource(CalciteTests.DATASOURCE1) + .intervals(querySegmentSpec(Filtration.eternity())) + .filters(selector("dim2", "0", null)) + .granularity(Granularities.ALL) + .aggregators(aggregators( + new CountAggregatorFactory("a0") + )) + .postAggregators( + expresionPostAgg("p0", "(exp(\"a0\") + 10)"), + expresionPostAgg("p1", "sin((pi() / 6))"), + expresionPostAgg("p2", "cos((pi() / 6))"), + expresionPostAgg("p3", "tan((pi() / 6))"), + expresionPostAgg("p4", "cot((pi() / 6))"), + expresionPostAgg("p5", "asin((exp(\"a0\") / 2))"), + expresionPostAgg("p6", "acos((exp(\"a0\") / 2))"), + expresionPostAgg("p7", "atan((exp(\"a0\") / 2))"), + expresionPostAgg("p8", "atan2(exp(\"a0\"),1)") + ) + .context(QUERY_CONTEXT_DONT_SKIP_EMPTY_BUCKETS) + .build()), + ImmutableList.of( + new Object[]{ + 11.0, + Math.sin(Math.PI / 6), + Math.cos(Math.PI / 6), + Math.tan(Math.PI / 6), + Math.cos(Math.PI / 6) / Math.sin(Math.PI / 6), + Math.asin(0.5), + Math.acos(0.5), + Math.atan(0.5), + Math.atan2(1, 1) + } + ) + ); + } } From 37cbad79b175c5be9620566c5f5a976cd50b2e6c Mon Sep 17 00:00:00 2001 From: Roman Leventov Date: Tue, 5 Mar 2019 21:06:40 -0300 Subject: [PATCH 03/19] Adjust issue templates (#7188) * Adjust issue templates * typo * bug -> problem --- .github/ISSUE_TEMPLATE/feature.md | 22 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ----------------- .../{bug_report.md => problem_report.md} | 15 ++++++------- .github/ISSUE_TEMPLATE/proposal.md | 14 ++++++------ 4 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/feature.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md rename .github/ISSUE_TEMPLATE/{bug_report.md => problem_report.md} (59%) diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 00000000000..c29ede84605 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,22 @@ +--- +name: Feature/Change +about: A template for Druid feature and change descriptions +title: "" +labels: Feature/Change Description +assignees: '' + +--- + +### Description + +Please describe the feature or change with as much detail as possible. + +If you have a detailed implementation in mind and wish to contribute that implementation yourself, and the change that +you are planning would require a 'Design Review' tag because it introduces or changes some APIs, or it is large and +imposes lasting consequences on the codebase, please open a Proposal instead. + +### Motivation + +Please provide the following for the desired feature or change: +- A detailed description of the intended use case, if applicable +- Rationale for why the desired feature/change would be beneficial diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 9d279ca83d3..00000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature/Change Request -about: A template for Druid feature and change requests -title: "" -labels: Wish list -assignees: '' - ---- - -# Description - -Please describe the feature or change with as much detail as possible. - -If you have a detailed implementation in mind and wish to contribute that implementation yourself, please open a Proposal issue instead. - -# Motivation - -Please provide the following for the desired feature or change: -- A detailed description of the intended use case, if applicable -- Rationale for why the desired feature/change would be beneficial diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/problem_report.md similarity index 59% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/problem_report.md index 91b0097db73..3ddb7412b85 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/problem_report.md @@ -1,23 +1,22 @@ --- -name: Bug Report -about: A template for Druid bug reports +name: Problem Report +about: A template for Druid problem reports title: "" -labels: Bug assignees: '' --- Please provide a detailed title (e.g. "Broker crashes when using TopN query with Bound filter" instead of just "Broker crashes"). -# Affected Version +### Affected Version -The Druid version where the bug was encountered. +The Druid version where the problem was encountered. -# Description +### Description -Please include as much detailed information about the bug as possible. +Please include as much detailed information about the problem as possible. - Cluster size - Configurations in use -- Steps to reproduce the bug +- Steps to reproduce the problem - The error message or stack traces encountered. Providing more context, such as nearby log messages or even entire logs, can be helpful. - Any debugging that you have already done diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md index 3c043387059..73baab6f5f1 100644 --- a/.github/ISSUE_TEMPLATE/proposal.md +++ b/.github/ISSUE_TEMPLATE/proposal.md @@ -2,16 +2,16 @@ name: Proposal about: A template for major Druid change proposals title: "[PROPOSAL]" -labels: Proposal +labels: Proposal, Design Review assignees: '' --- -# Motivation +### Motivation A description of the problem. -# Proposed changes +### Proposed changes This section should provide a detailed description of the changes being proposed. This will usually be the longest section; please feel free to split this section or other sections into subsections if needed. @@ -21,11 +21,11 @@ This section should include any changes made to user-facing interfaces, for exam - SQL language - Emitted metrics -# Rationale +### Rationale A discussion of why this particular solution is the best one. One good way to approach this is to discuss other alternative solutions that you considered and decided against. This should also include a discussion of any specific benefits or drawbacks you are aware of. -# Operational impact +### Operational impact This section should describe how the proposed changes will impact the operation of existing clusters. It should answer questions such as: @@ -33,10 +33,10 @@ This section should describe how the proposed changes will impact the operation - Is there a migration path that cluster operators need to be aware of? - Will there be any effect on the ability to do a rolling upgrade, or to do a rolling _downgrade_ if an operator wants to switch back to a previous version? -# Test plan (optional) +### Test plan (optional) An optional discussion of how the proposed changes will be tested. This section should focus on higher level system test strategy and not unit tests (as UTs will be implementation dependent). -# Future work (optional) +### Future work (optional) An optional discussion of things that you believe are out of scope for the particular proposal but would be nice follow-ups. It helps show where a particular change could be leading us. There isn't any commitment that the proposal author will actually work on the items discussed in this section. From 9183e32876158052172cbc8cb7ce2864aabbdb1f Mon Sep 17 00:00:00 2001 From: Jonathan Wei Date: Tue, 5 Mar 2019 16:44:02 -0800 Subject: [PATCH 04/19] Add more approximate algorithm docs (#7195) --- .../extensions-core/approximate-histograms.md | 6 ++- docs/content/development/extensions.md | 2 +- docs/content/querying/aggregations.md | 39 ++++++++++++++++++- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/docs/content/development/extensions-core/approximate-histograms.md b/docs/content/development/extensions-core/approximate-histograms.md index ea9e17b3243..b60ff1310e9 100644 --- a/docs/content/development/extensions-core/approximate-histograms.md +++ b/docs/content/development/extensions-core/approximate-histograms.md @@ -28,7 +28,11 @@ Make sure to [include](../../operations/including-extensions.html) `druid-histog The `druid-histogram` extension provides an approximate histogram aggregator and a fixed buckets histogram aggregator. -## Approximate Histogram aggregator +## Approximate Histogram aggregator (Deprecated) + +
+The Approximate Histogram aggregator is deprecated. Please use DataSketches Quantiles instead which provides a superior distribution-independent algorithm with formal error guarantees. +
This aggregator is based on [http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf](http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf) diff --git a/docs/content/development/extensions.md b/docs/content/development/extensions.md index 888f8536a74..f24bfc687e1 100644 --- a/docs/content/development/extensions.md +++ b/docs/content/development/extensions.md @@ -47,7 +47,7 @@ Core extensions are maintained by Druid committers. |druid-caffeine-cache|A local cache implementation backed by Caffeine.|[link](../development/extensions-core/caffeine-cache.html)| |druid-datasketches|Support for approximate counts and set operations with [DataSketches](http://datasketches.github.io/).|[link](../development/extensions-core/datasketches-extension.html)| |druid-hdfs-storage|HDFS deep storage.|[link](../development/extensions-core/hdfs.html)| -|druid-histogram|Approximate histograms and quantiles aggregator.|[link](../development/extensions-core/approximate-histograms.html)| +|druid-histogram|Approximate histograms and quantiles aggregator. Deprecated, please use the [DataSketches quantiles aggregator](../development/extensions-core/datasketches-quantiles.html) from the `druid-datasketches` extension instead.|[link](../development/extensions-core/approximate-histograms.html)| |druid-kafka-eight|Kafka ingest firehose (high level consumer) for realtime nodes(deprecated).|[link](../development/extensions-core/kafka-eight-firehose.html)| |druid-kafka-extraction-namespace|Kafka-based namespaced lookup. Requires namespace lookup extension.|[link](../development/extensions-core/kafka-extraction-namespace.html)| |druid-kafka-indexing-service|Supervised exactly-once Kafka ingestion for the indexing service.|[link](../development/extensions-core/kafka-ingestion.html)| diff --git a/docs/content/querying/aggregations.md b/docs/content/querying/aggregations.md index c2d2c72d1da..886141ac762 100644 --- a/docs/content/querying/aggregations.md +++ b/docs/content/querying/aggregations.md @@ -277,10 +277,16 @@ The [DataSketches Theta Sketch](../development/extensions-core/datasketches-thet The [DataSketches HLL Sketch](../development/extensions-core/datasketches-hll.html) extension-provided aggregator gives distinct count estimates using the HyperLogLog algorithm. The HLL Sketch is faster and requires less storage than the Theta Sketch, but does not support intersection or difference operations. -#### Cardinality/HyperUnique +#### Cardinality/HyperUnique (Deprecated) + +
+The Cardinality and HyperUnique aggregators are deprecated. Please use DataSketches HLL Sketch instead. +
The [Cardinality and HyperUnique](../hll-old.html) aggregators are older aggregator implementations available by default in Druid that also provide distinct count estimates using the HyperLogLog algorithm. The newer [DataSketches HLL Sketch](../development/extensions-core/datasketches-hll.html) extension-provided aggregator has superior accuracy and performance and is recommended instead. +The DataSketches team has published a [comparison study](https://datasketches.github.io/docs/HLL/HllSketchVsDruidHyperLogLogCollector.html) between Druid's original HLL algorithm and the DataSketches HLL algorithm. Based on the demonstrated advantages of the DataSketches implementation, we have deprecated Druid's original HLL aggregator. + Please note that DataSketches HLL aggregators and `hyperUnique` aggregators are not mutually compatible. ### Histograms and quantiles @@ -289,10 +295,39 @@ Please note that DataSketches HLL aggregators and `hyperUnique` aggregators are The [DataSketches Quantiles Sketch](../development/extensions-core/datasketches-quantiles.html) extension-provided aggregator provides quantile estimates and histogram approximations using the numeric quantiles DoublesSketch from the [datasketches](http://datasketches.github.io/) library. -#### Approximate Histogram +We recommend this aggregator in general for quantiles/histogram use cases, as it provides formal error bounds and has distribution-independent accuracy. + +#### Moments Sketch (Experimental) + +The [Moments Sketch](../development/extensions-contrib/momentsketch-quantiles.html) extension-provided aggregator is an experimental aggregator that provides quantile estimates using the [Moments Sketch](https://github.com/stanford-futuredata/momentsketch). + +The Moments Sketch aggregator is provided as an experimental option. It is optimized for merging speed and it can have higher aggregation performance compared to the DataSketches quantiles aggregator. However, the accuracy of the Moments Sketch is distribution-dependent, so users will need to empirically verify that the aggregator is suitable for their input data. + +As a general guideline for experimentation, the [Moments Sketch paper](https://arxiv.org/pdf/1803.01969.pdf) points out that this algorithm works better on inputs with high entropy. In particular, the algorithm is not a good fit when the input data consists of a small number of clustered discrete values. + +#### Fixed Buckets Histogram + +Druid also provides a [simple histogram implementation]((../development/extensions-core/approxiate-histograms.html#fixed-buckets-histogram) that uses a fixed range and fixed number of buckets with support for quantile estimation, backed by an array of bucket count values. + +The fixed buckets histogram can perform well when the distribution of the input data allows a small number of buckets to be used. + +We do not recommend the fixed buckets histogram for general use, as its usefulness is extremely data dependent. However, it is made available for users that have already identified use cases where a fixed buckets histogram is suitable. + +#### Approximate Histogram (Deprecated) The [Approximate Histogram](../development/extensions-core/approxiate-histograms.html) extension-provided aggregator also provides quantile estimates and histogram approximations, based on [http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf](http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf). +The algorithm used by this deprecated aggregator is highly distribution-dependent and its output is subject to serious distortions when the input does not fit within the algorithm's limitations. + +A [study published by the DataSketches team](https://datasketches.github.io/docs/Quantiles/DruidApproxHistogramStudy.html) demonstrates some of the known failure modes of this algorithm: +- The algorithm's quantile calculations can fail to provide results for a large range of rank values (all ranks less than 0.89 in the example used in the study), returning all zeroes instead. +- The algorithm can completely fail to record spikes in the tail ends of the distribution +- In general, the histogram produced by the algorithm can deviate significantly from the true histogram, with no bounds on the errors. + +It is not possible to determine a priori how well this aggregator will behave for a given input stream, nor does the aggregator provide any indication that serious distortions are present in the output. + +For these reasons, we have deprecated this aggregator and do not recommend its use. + ## Miscellaneous Aggregations ### Filtered Aggregator From e48a9c138e66f3aed1701a6bc62cd1d2342cc169 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Tue, 5 Mar 2019 22:06:36 -0800 Subject: [PATCH 05/19] Reduce default max # of subTasks to 1 for native parallel task (#7181) * Reduce # of max subTasks to 2 * fix typo and add more doc * add more doc and link * change default and add warning * fix doc * add test * fix it test --- docs/content/ingestion/native_tasks.md | 46 ++++++-- .../druid/indexing/common/task/IndexTask.java | 11 +- .../parallel/ParallelIndexSupervisorTask.java | 37 ++++-- .../parallel/ParallelIndexTuningConfig.java | 5 +- ...stractParallelIndexSupervisorTaskTest.java | 16 --- .../ParallelIndexSupervisorTaskKillTest.java | 8 +- ...rallelIndexSupervisorTaskResourceTest.java | 7 +- .../ParallelIndexSupervisorTaskTest.java | 110 +++++++++++++----- 8 files changed, 162 insertions(+), 78 deletions(-) diff --git a/docs/content/ingestion/native_tasks.md b/docs/content/ingestion/native_tasks.md index 837574cb589..4ecaccf53ac 100644 --- a/docs/content/ingestion/native_tasks.md +++ b/docs/content/ingestion/native_tasks.md @@ -54,7 +54,17 @@ which specifies a split and submits worker tasks using those specs. As a result, the implementation of splittable firehoses. Please note that multiple tasks can be created for the same worker task spec if one of them fails. -Since this task doesn't shuffle intermediate data, it isn't available for [perfect rollup](../ingestion/index.html#roll-up-modes). +You may want to consider the below points: +- Since this task doesn't shuffle intermediate data, it isn't available for [perfect rollup](../ingestion/index.html#roll-up-modes). +- The number of tasks for parallel ingestion is decided by `maxNumSubTasks` in the tuningConfig. + Since the supervisor task creates up to `maxNumSubTasks` worker tasks regardless of the available task slots, + it may affect to other ingestion performance. As a result, it's important to set `maxNumSubTasks` properly. + See the below [Capacity Planning](#capacity-planning) section for more details. +- By default, batch ingestion replaces all data in any segment that it writes to. If you'd like to add to the segment + instead, set the appendToExisting flag in ioConfig. Note that it only replaces data in segments where it actively adds + data: if there are segments in your granularitySpec's intervals that have no data written by this task, they will be + left alone. + An example ingestion spec is: @@ -122,16 +132,15 @@ An example ingestion spec is: "baseDir": "examples/indexing/", "filter": "wikipedia_index_data*" } + }, + "tuningconfig": { + "type": "index_parallel", + "maxNumSubTasks": 2 } } } ``` -By default, batch ingestion replaces all data in any segment that it writes to. If you'd like to add to the segment -instead, set the appendToExisting flag in ioConfig. Note that it only replaces data in segments where it actively adds -data: if there are segments in your granularitySpec's intervals that have no data written by this task, they will be -left alone. - #### Task Properties |property|description|required?| @@ -181,7 +190,7 @@ The tuningConfig is optional and default parameters will be used if no tuningCon |reportParseExceptions|If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped.|false|no| |pushTimeout|Milliseconds to wait for pushing segments. It must be >= 0, where 0 means to wait forever.|0|no| |segmentWriteOutMediumFactory|Segment write-out medium to use when creating segments. See [SegmentWriteOutMediumFactory](#segmentWriteOutMediumFactory).|Not specified, the value from `druid.peon.defaultSegmentWriteOutMediumFactory.type` is used|no| -|maxNumSubTasks|Maximum number of tasks which can be run at the same time.|Integer.MAX_VALUE|no| +|maxNumSubTasks|Maximum number of tasks which can be run at the same time. The supervisor task would spawn worker tasks up to `maxNumSubTasks` regardless of the available task slots. If this value is set to 1, the supervisor task processes data ingestion on its own instead of spawning worker tasks. If this value is set to too large, too many worker tasks can be created which might block other ingestion. Check [Capacity Planning](#capacity-planning) for more details.|1|no| |maxRetry|Maximum number of retries on task failures.|3|no| |taskStatusCheckPeriodMs|Polling period in milleseconds to check running task statuses.|1000|no| |chatHandlerTimeout|Timeout for reporting the pushed segments in worker tasks.|PT10S|no| @@ -372,7 +381,7 @@ An example of the result is "reportParseExceptions": false, "pushTimeout": 0, "segmentWriteOutMediumFactory": null, - "maxNumSubTasks": 2147483647, + "maxNumSubTasks": 4, "maxRetry": 3, "taskStatusCheckPeriodMs": 1000, "chatHandlerTimeout": "PT10S", @@ -408,6 +417,27 @@ An example of the result is Returns the task attempt history of the worker task spec of the given id, or HTTP 404 Not Found error if the supervisor task is running in the sequential mode. +### Capacity Planning + +The supervisor task can create up to `maxNumSubTasks` worker tasks no matter how many task slots are currently available. +As a result, total number of tasks which can be run at the same time is `(maxNumSubTasks + 1)` (including the supervisor task). +Please note that this can be even larger than total number of task slots (sum of the capacity of all workers). +If `maxNumSubTasks` is larger than `n (available task slots)`, then +`maxNumSubTasks` tasks are created by the supervisor task, but only `n` tasks would be started. +Others will wait in the pending state until any running task is finished. + +If you are using the Parallel Index Task with stream ingestion together, +we would recommend to limit the max capacity for batch ingestion to prevent +stream ingestion from being blocked by batch ingestion. Suppose you have +`t` Parallel Index Tasks to run at the same time, but want to limit +the max number of tasks for batch ingestion to `b`. Then, (sum of `maxNumSubTasks` +of all Parallel Index Tasks + `t` (for supervisor tasks)) must be smaller than `b`. + +If you have some tasks of a higher priority than others, you may set their +`maxNumSubTasks` to a higher value than lower priority tasks. +This may help the higher priority tasks to finish earlier than lower priority tasks +by assigning more task slots to them. + Local Index Task ---------------- diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java index d0e083a2b6e..689ff1af551 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java @@ -405,7 +405,16 @@ public class IndexTask extends AbstractTask implements ChatHandler try { if (chatHandlerProvider.isPresent()) { log.info("Found chat handler of class[%s]", chatHandlerProvider.get().getClass().getName()); - chatHandlerProvider.get().register(getId(), this, false); + + if (chatHandlerProvider.get().get(getId()).isPresent()) { + // This is a workaround for ParallelIndexSupervisorTask to avoid double registering when it runs in the + // sequential mode. See ParallelIndexSupervisorTask.runSequential(). + // Note that all HTTP endpoints are not available in this case. This works only for + // ParallelIndexSupervisorTask because it doesn't support APIs for live ingestion reports. + log.warn("Chat handler is already registered. Skipping chat handler registration."); + } else { + chatHandlerProvider.get().register(getId(), this, false); + } } else { log.warn("No chat handler detected"); } diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java index 90e359df17d..a9a8066a0f1 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java @@ -256,13 +256,23 @@ public class ParallelIndexSupervisorTask extends AbstractTask implements ChatHan chatHandlerProvider.register(getId(), this, false); try { - if (baseFirehoseFactory.isSplittable()) { + if (isParallelMode()) { return runParallel(toolbox); } else { - log.warn( - "firehoseFactory[%s] is not splittable. Running sequentially", - baseFirehoseFactory.getClass().getSimpleName() - ); + if (!baseFirehoseFactory.isSplittable()) { + log.warn( + "firehoseFactory[%s] is not splittable. Running sequentially.", + baseFirehoseFactory.getClass().getSimpleName() + ); + } else if (ingestionSchema.getTuningConfig().getMaxNumSubTasks() == 1) { + log.warn( + "maxNumSubTasks is 1. Running sequentially. " + + "Please set maxNumSubTasks to something higher than 1 if you want to run in parallel ingestion mode." + ); + } else { + throw new ISE("Unknown reason for sequentail mode. Failing this task."); + } + return runSequential(toolbox); } } @@ -271,6 +281,15 @@ public class ParallelIndexSupervisorTask extends AbstractTask implements ChatHan } } + private boolean isParallelMode() + { + if (baseFirehoseFactory.isSplittable() && ingestionSchema.getTuningConfig().getMaxNumSubTasks() > 1) { + return true; + } else { + return false; + } + } + @VisibleForTesting void setToolbox(TaskToolbox toolbox) { @@ -280,7 +299,7 @@ public class ParallelIndexSupervisorTask extends AbstractTask implements ChatHan private TaskStatus runParallel(TaskToolbox toolbox) throws Exception { createRunner(toolbox); - return TaskStatus.fromCode(getId(), runner.run()); + return TaskStatus.fromCode(getId(), Preconditions.checkNotNull(runner, "runner").run()); } private TaskStatus runSequential(TaskToolbox toolbox) @@ -479,11 +498,7 @@ public class ParallelIndexSupervisorTask extends AbstractTask implements ChatHan public Response getMode(@Context final HttpServletRequest req) { IndexTaskUtils.datasourceAuthorizationCheck(req, Action.READ, getDataSource(), authorizerMapper); - if (runner == null) { - return Response.status(Response.Status.SERVICE_UNAVAILABLE).entity("task is not running yet").build(); - } else { - return Response.ok(baseFirehoseFactory.isSplittable() ? "parallel" : "sequential").build(); - } + return Response.ok(isParallelMode() ? "parallel" : "sequential").build(); } @GET diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexTuningConfig.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexTuningConfig.java index 85929dbd880..c0e93704d25 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexTuningConfig.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexTuningConfig.java @@ -22,6 +22,7 @@ package org.apache.druid.indexing.common.task.batch.parallel; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.google.common.base.Preconditions; import org.apache.druid.indexing.common.task.IndexTask.IndexTuningConfig; import org.apache.druid.segment.IndexSpec; import org.apache.druid.segment.writeout.SegmentWriteOutMediumFactory; @@ -34,7 +35,7 @@ import java.util.Objects; @JsonTypeName("index_parallel") public class ParallelIndexTuningConfig extends IndexTuningConfig { - private static final int DEFAULT_MAX_NUM_BATCH_TASKS = Integer.MAX_VALUE; // unlimited + private static final int DEFAULT_MAX_NUM_BATCH_TASKS = 1; private static final int DEFAULT_MAX_RETRY = 3; private static final long DEFAULT_TASK_STATUS_CHECK_PERIOD_MS = 1000; @@ -131,6 +132,8 @@ public class ParallelIndexTuningConfig extends IndexTuningConfig this.chatHandlerTimeout = DEFAULT_CHAT_HANDLER_TIMEOUT; this.chatHandlerNumRetries = DEFAULT_CHAT_HANDLER_NUM_RETRIES; + + Preconditions.checkArgument(this.maxNumSubTasks > 0, "maxNumSubTasks must be positive"); } @JsonProperty diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/AbstractParallelIndexSupervisorTaskTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/AbstractParallelIndexSupervisorTaskTest.java index 7dbdc133f7d..8792956bc95 100644 --- a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/AbstractParallelIndexSupervisorTaskTest.java +++ b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/AbstractParallelIndexSupervisorTaskTest.java @@ -294,22 +294,6 @@ public class AbstractParallelIndexSupervisorTaskTest extends IngestionTestBase new DropwizardRowIngestionMetersFactory() ); } - - @Override - public TaskStatus run(TaskToolbox toolbox) throws Exception - { - return TaskStatus.fromCode( - getId(), - new TestParallelIndexTaskRunner( - toolbox, - getId(), - getGroupId(), - getIngestionSchema(), - getContext(), - new NoopIndexingServiceClient() - ).run() - ); - } } static class TestParallelIndexTaskRunner extends SinglePhaseParallelIndexTaskRunner diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskKillTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskKillTest.java index 6e71656fe2b..c7c8d0b897e 100644 --- a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskKillTest.java +++ b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskKillTest.java @@ -281,9 +281,8 @@ public class ParallelIndexSupervisorTaskKillTest extends AbstractParallelIndexSu } @Override - public TaskStatus run(TaskToolbox toolbox) throws Exception + ParallelIndexTaskRunner createRunner(TaskToolbox toolbox) { - setToolbox(toolbox); setRunner( new TestRunner( toolbox, @@ -291,10 +290,7 @@ public class ParallelIndexSupervisorTaskKillTest extends AbstractParallelIndexSu indexingServiceClient ) ); - return TaskStatus.fromCode( - getId(), - getRunner().run() - ); + return getRunner(); } } diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskResourceTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskResourceTest.java index 668c8ec1985..04aa5a7a1b0 100644 --- a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskResourceTest.java +++ b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskResourceTest.java @@ -500,7 +500,7 @@ public class ParallelIndexSupervisorTaskResourceTest extends AbstractParallelInd } @Override - public TaskStatus run(TaskToolbox toolbox) throws Exception + ParallelIndexTaskRunner createRunner(TaskToolbox toolbox) { setRunner( new TestRunner( @@ -509,10 +509,7 @@ public class ParallelIndexSupervisorTaskResourceTest extends AbstractParallelInd indexingServiceClient ) ); - return TaskStatus.fromCode( - getId(), - getRunner().run() - ); + return getRunner(); } } diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskTest.java index 241e9f57fae..efc1fc493bf 100644 --- a/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskTest.java +++ b/indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTaskTest.java @@ -24,7 +24,6 @@ import org.apache.druid.data.input.FiniteFirehoseFactory; import org.apache.druid.data.input.InputSplit; import org.apache.druid.data.input.impl.StringInputRowParser; import org.apache.druid.indexer.TaskState; -import org.apache.druid.indexer.TaskStatus; import org.apache.druid.indexing.common.TaskToolbox; import org.apache.druid.indexing.common.actions.TaskActionClient; import org.apache.druid.indexing.common.task.TaskResource; @@ -229,10 +228,87 @@ public class ParallelIndexSupervisorTaskTest extends AbstractParallelIndexSuperv Assert.assertEquals(TaskState.SUCCESS, task.run(toolbox).getStatusCode()); } + @Test + public void testWith1MaxNumSubTasks() throws Exception + { + final ParallelIndexSupervisorTask task = newTask( + Intervals.of("2017/2018"), + new ParallelIndexIOConfig( + new LocalFirehoseFactory(inputDir, "test_*", null), + false + ), + new ParallelIndexTuningConfig( + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + 1, + null, + null, + null, + null, + null, + null, + null + ) + ); + actionClient = createActionClient(task); + toolbox = createTaskToolbox(task); + + prepareTaskForLocking(task); + Assert.assertTrue(task.isReady(actionClient)); + Assert.assertEquals(TaskState.SUCCESS, task.run(toolbox).getStatusCode()); + Assert.assertNull("Runner must be null if the task was in the sequential mode", task.getRunner()); + } + private ParallelIndexSupervisorTask newTask( Interval interval, ParallelIndexIOConfig ioConfig ) + { + return newTask( + interval, + ioConfig, + new ParallelIndexTuningConfig( + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + 2, + null, + null, + null, + null, + null, + null, + null + ) + ); + } + + private ParallelIndexSupervisorTask newTask( + Interval interval, + ParallelIndexIOConfig ioConfig, + ParallelIndexTuningConfig tuningConfig + ) { // set up ingestion spec final ParallelIndexIngestionSpec ingestionSpec = new ParallelIndexIngestionSpec( @@ -257,29 +333,7 @@ public class ParallelIndexSupervisorTaskTest extends AbstractParallelIndexSuperv getObjectMapper() ), ioConfig, - new ParallelIndexTuningConfig( - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - 2, - null, - null, - null, - null, - null, - null, - null - ) + tuningConfig ); // set up test tools @@ -315,9 +369,8 @@ public class ParallelIndexSupervisorTaskTest extends AbstractParallelIndexSuperv } @Override - public TaskStatus run(TaskToolbox toolbox) throws Exception + ParallelIndexTaskRunner createRunner(TaskToolbox toolbox) { - setToolbox(toolbox); setRunner( new TestRunner( toolbox, @@ -325,10 +378,7 @@ public class ParallelIndexSupervisorTaskTest extends AbstractParallelIndexSuperv indexingServiceClient ) ); - return TaskStatus.fromCode( - getId(), - getRunner().run() - ); + return getRunner(); } } From 3ed250787d06b74a2ac36d6a81df7cc2bb08eea0 Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Wed, 6 Mar 2019 14:50:04 -0800 Subject: [PATCH 06/19] Densify swapped hll buffer (#6865) * Densify swapped hll buffer * Make test loop limit pre-increment * Reformat * Fix test comments --- .../druid/hll/HyperLogLogCollector.java | 7 ++ .../druid/hll/HyperLogLogCollectorTest.java | 113 +++++++++++++++--- 2 files changed, 103 insertions(+), 17 deletions(-) diff --git a/hll/src/main/java/org/apache/druid/hll/HyperLogLogCollector.java b/hll/src/main/java/org/apache/druid/hll/HyperLogLogCollector.java index 5fd7df778de..82912146625 100644 --- a/hll/src/main/java/org/apache/druid/hll/HyperLogLogCollector.java +++ b/hll/src/main/java/org/apache/druid/hll/HyperLogLogCollector.java @@ -387,6 +387,13 @@ public abstract class HyperLogLogCollector implements Comparable> 50,000,000), offsets are mismatched between the main HLL and the ones * with 100 values, requiring a floating max as described in * http://druid.io/blog/2014/02/18/hyperloglog-optimizations-for-real-world-systems.html @@ -502,7 +517,8 @@ public class HyperLogLogCollectorTest return retVal; } - @Ignore @Test // This test can help when finding potential combinations that are weird, but it's non-deterministic + @Ignore + @Test // This test can help when finding potential combinations that are weird, but it's non-deterministic public void testFoldingwithDifferentOffsets() { // final Random random = new Random(37); // this seed will cause this test to fail because of slightly larger errors @@ -533,7 +549,8 @@ public class HyperLogLogCollectorTest } } - @Ignore @Test + @Ignore + @Test public void testFoldingwithDifferentOffsets2() throws Exception { final Random random = new Random(0); @@ -707,6 +724,81 @@ public class HyperLogLogCollectorTest Assert.assertEquals(0, collector.getNumNonZeroRegisters()); } + @Test + public void testRegisterSwapWithSparse() + { + final HyperLogLogCollector collector = HyperLogLogCollector.makeLatestCollector(); + // Skip the first bucket + for (int i = 1; i < HyperLogLogCollector.NUM_BUCKETS; i++) { + collector.add((short) i, (byte) 1); + Assert.assertEquals(i, collector.getNumNonZeroRegisters()); + Assert.assertEquals(0, collector.getRegisterOffset()); + } + Assert.assertEquals( + 15615.219683654448D, + HyperLogLogCollector.makeCollector(collector.toByteBuffer().asReadOnlyBuffer()) + .estimateCardinality(), + 1e-5D + ); + + final byte[] hash = new byte[10]; + hash[0] = 1; // Bucket 0, 1 offset of 0 + collector.add(hash); + Assert.assertEquals(0, collector.getNumNonZeroRegisters()); + Assert.assertEquals(1, collector.getRegisterOffset()); + + // We have a REALLY bad distribution, Sketch as 0 is fine. + Assert.assertEquals( + 0.0D, + HyperLogLogCollector.makeCollector(collector.toByteBuffer().asReadOnlyBuffer()) + .estimateCardinality(), + 1e-5D + ); + final ByteBuffer buffer = collector.toByteBuffer(); + Assert.assertEquals(collector.getNumHeaderBytes(), buffer.remaining()); + + final HyperLogLogCollector denseCollector = HyperLogLogCollector.makeLatestCollector(); + for (int i = 0; i < HyperLogLogCollector.NUM_BUCKETS - 1; i++) { + denseCollector.add((short) i, (byte) 1); + } + + Assert.assertEquals(HyperLogLogCollector.NUM_BUCKETS - 1, denseCollector.getNumNonZeroRegisters()); + final HyperLogLogCollector folded = denseCollector.fold(HyperLogLogCollector.makeCollector(buffer)); + Assert.assertNotNull(folded.toByteBuffer()); + Assert.assertEquals(folded.getStorageBuffer().remaining(), denseCollector.getNumBytesForDenseStorage()); + } + + // Example of a terrible sampling filter. Don't use this method + @Test + public void testCanFillUpOnMod() + { + final HashFunction fn = Hashing.murmur3_128(); + final HyperLogLogCollector hyperLogLogCollector = HyperLogLogCollector.makeLatestCollector(); + final byte[] b = new byte[10]; + b[0] = 1; + hyperLogLogCollector.add(b); + final Random random = new Random(347893248701078L); + long loops = 0; + // Do a 1% "sample" where the mod of the hash is 43 + final Predicate pass = i -> { + // ByteOrder.nativeOrder() on lots of systems is ByteOrder.LITTLE_ENDIAN + final ByteBuffer bb = ByteBuffer.wrap(fn.hashInt(i).asBytes()).order(ByteOrder.LITTLE_ENDIAN); + return (bb.getInt() % 100) == 43; + }; + final long loopLimit = 1_000_000_000L; + do { + final int rnd = random.nextInt(); + if (!pass.test(rnd)) { + continue; + } + final Hasher hasher = fn.newHasher(); + hasher.putInt(rnd); + hyperLogLogCollector.add(hasher.hash().asBytes()); + } while (hyperLogLogCollector.getNumNonZeroRegisters() > 0 && ++loops < loopLimit); + Assert.assertNotEquals(loopLimit, loops); + Assert.assertEquals(hyperLogLogCollector.getNumHeaderBytes(), hyperLogLogCollector.toByteBuffer().remaining()); + } + @Test public void testMergeMaxOverflow() { @@ -736,19 +828,6 @@ public class HyperLogLogCollectorTest Assert.assertEquals(67, collector.getMaxOverflowValue()); } - - private static void fillBuckets(HyperLogLogCollector collector, byte startOffset, byte endOffset) - { - byte offset = startOffset; - while (offset <= endOffset) { - // fill buckets to shift registerOffset - for (short bucket = 0; bucket < 2048; ++bucket) { - collector.add(bucket, offset); - } - offset++; - } - } - @Test public void testFoldOrder() { From de55905a5fd5e5093d2fd156542a2b209e2d6c58 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Fri, 8 Mar 2019 16:17:52 -0800 Subject: [PATCH 07/19] integration-tests: make ITParallelIndexTest still work in parallel (#7211) * integration-tests: make ITParallelIndexTest still work in parallel Follow-up to #7181, which made the default behavior for index_parallel tasks non-parallel. * Validate that parallel index subtasks were run --- .../clients/OverlordResourceTestClient.java | 14 ++++++++++- .../testing/clients/TaskResponseObject.java | 9 ++++++++ .../indexer/AbstractITBatchIndexTest.java | 23 +++++++++++++++++++ .../wikipedia_parallel_index_task.json | 4 ++++ .../wikipedia_parallel_reindex_task.json | 4 ++++ 5 files changed, 53 insertions(+), 1 deletion(-) diff --git a/integration-tests/src/main/java/org/apache/druid/testing/clients/OverlordResourceTestClient.java b/integration-tests/src/main/java/org/apache/druid/testing/clients/OverlordResourceTestClient.java index 5cee2fb2886..f2e600e4264 100644 --- a/integration-tests/src/main/java/org/apache/druid/testing/clients/OverlordResourceTestClient.java +++ b/integration-tests/src/main/java/org/apache/druid/testing/clients/OverlordResourceTestClient.java @@ -153,6 +153,11 @@ public class OverlordResourceTestClient return getTasks("pendingTasks"); } + public List getCompleteTasksForDataSource(final String dataSource) + { + return getTasks(StringUtils.format("tasks?state=complete&datasource=%s", StringUtils.urlEncode(dataSource))); + } + private List getTasks(String identifier) { try { @@ -233,7 +238,14 @@ public class OverlordResourceTestClient { try { StatusResponseHolder response = httpClient.go( - new Request(HttpMethod.POST, new URL(StringUtils.format("%ssupervisor/%s/shutdown", getIndexerURL(), StringUtils.urlEncode(id)))), + new Request( + HttpMethod.POST, + new URL(StringUtils.format( + "%ssupervisor/%s/shutdown", + getIndexerURL(), + StringUtils.urlEncode(id) + )) + ), responseHandler ).get(); if (!response.getStatus().equals(HttpResponseStatus.OK)) { diff --git a/integration-tests/src/main/java/org/apache/druid/testing/clients/TaskResponseObject.java b/integration-tests/src/main/java/org/apache/druid/testing/clients/TaskResponseObject.java index 501cd5e1398..38f0a86223e 100644 --- a/integration-tests/src/main/java/org/apache/druid/testing/clients/TaskResponseObject.java +++ b/integration-tests/src/main/java/org/apache/druid/testing/clients/TaskResponseObject.java @@ -28,6 +28,7 @@ public class TaskResponseObject { private final String id; + private final String type; private final DateTime createdTime; private final DateTime queueInsertionTime; private final TaskState status; @@ -35,12 +36,14 @@ public class TaskResponseObject @JsonCreator private TaskResponseObject( @JsonProperty("id") String id, + @JsonProperty("type") String type, @JsonProperty("createdTime") DateTime createdTime, @JsonProperty("queueInsertionTime") DateTime queueInsertionTime, @JsonProperty("status") TaskState status ) { this.id = id; + this.type = type; this.createdTime = createdTime; this.queueInsertionTime = queueInsertionTime; this.status = status; @@ -52,6 +55,12 @@ public class TaskResponseObject return id; } + @SuppressWarnings("unused") // Used by Jackson serialization? + public String getType() + { + return type; + } + @SuppressWarnings("unused") // Used by Jackson serialization? public DateTime getCreatedTime() { diff --git a/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java b/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java index 226824f476f..121fd7a9bda 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java @@ -160,10 +160,25 @@ public class AbstractITBatchIndexTest extends AbstractIndexerTest { final Set oldVersions = waitForNewVersion ? coordinator.getSegmentVersions(dataSourceName) : null; + long startSubTaskCount = -1; + final boolean assertRunsSubTasks = taskSpec.contains("index_parallel"); + if (assertRunsSubTasks) { + startSubTaskCount = countCompleteSubTasks(dataSourceName); + } + final String taskID = indexer.submitTask(taskSpec); LOG.info("TaskID for loading index task %s", taskID); indexer.waitUntilTaskCompletes(taskID); + if (assertRunsSubTasks) { + final long newSubTasks = countCompleteSubTasks(dataSourceName) - startSubTaskCount; + Assert.assertTrue( + StringUtils.format( + "The supervisor task[%s] didn't create any sub tasks. Was it executed in the parallel mode?", + taskID + ), newSubTasks > 0); + } + // ITParallelIndexTest does a second round of ingestion to replace segements in an existing // data source. For that second round we need to make sure the coordinator actually learned // about the new segments befor waiting for it to report that all segments are loaded; otherwise @@ -179,4 +194,12 @@ public class AbstractITBatchIndexTest extends AbstractIndexerTest () -> coordinator.areSegmentsLoaded(dataSourceName), "Segment Load" ); } + + private long countCompleteSubTasks(final String dataSource) + { + return indexer.getCompleteTasksForDataSource(dataSource) + .stream() + .filter(t -> t.getType().equals("index_sub")) + .count(); + } } diff --git a/integration-tests/src/test/resources/indexer/wikipedia_parallel_index_task.json b/integration-tests/src/test/resources/indexer/wikipedia_parallel_index_task.json index f317c538f6b..887508ad7e9 100644 --- a/integration-tests/src/test/resources/indexer/wikipedia_parallel_index_task.json +++ b/integration-tests/src/test/resources/indexer/wikipedia_parallel_index_task.json @@ -61,6 +61,10 @@ "baseDir": "/resources/data/batch_index", "filter": "wikipedia_index_data*" } + }, + "tuningConfig": { + "type": "index_parallel", + "maxNumSubTasks": 10 } } } \ No newline at end of file diff --git a/integration-tests/src/test/resources/indexer/wikipedia_parallel_reindex_task.json b/integration-tests/src/test/resources/indexer/wikipedia_parallel_reindex_task.json index c06890bfde4..ef16c648cb8 100644 --- a/integration-tests/src/test/resources/indexer/wikipedia_parallel_reindex_task.json +++ b/integration-tests/src/test/resources/indexer/wikipedia_parallel_reindex_task.json @@ -60,6 +60,10 @@ "baseDir": "/resources/data/batch_index", "filter": "wikipedia_index_data2*" } + }, + "tuningConfig": { + "type": "index_parallel", + "maxNumSubTasks": 10 } } } \ No newline at end of file From a44df6522c6d0ff66e4a21fec0fef5cb8c5f8246 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Fri, 8 Mar 2019 16:33:51 -0800 Subject: [PATCH 08/19] rename maintenance mode to decommission (#7154) * rename maintenance mode to decommission * review changes * missed one * fix straggler, add doc about decommissioning stalling if no active servers * fix missed typo, docs * refine docs * doc changes, replace generals * add explicit comment to mention suppressed stats for balanceTier * rename decommissioningVelocity to decommissioningMaxSegmentsToMovePercent and update docs * fix precondition check * decommissioningMaxPercentOfMaxSegmentsToMove * fix test * fix test * fixes --- docs/content/configuration/index.md | 12 +-- .../coordinator/CoordinatorDynamicConfig.java | 101 ++++++++++-------- .../server/coordinator/DruidCoordinator.java | 4 +- .../server/coordinator/ServerHolder.java | 19 ++-- .../helper/DruidCoordinatorBalancer.java | 67 +++++++----- .../rules/BroadcastDistributionRule.java | 2 +- .../server/coordinator/rules/LoadRule.java | 14 +-- .../DruidCoordinatorBalancerTest.java | 40 +++---- .../rules/BroadcastDistributionRuleTest.java | 48 ++++----- .../coordinator/rules/LoadRuleTest.java | 26 ++--- .../http/CoordinatorDynamicConfigTest.java | 32 +++--- 11 files changed, 192 insertions(+), 173 deletions(-) diff --git a/docs/content/configuration/index.md b/docs/content/configuration/index.md index e8d3bfe7ece..e6edcdd386e 100644 --- a/docs/content/configuration/index.md +++ b/docs/content/configuration/index.md @@ -783,8 +783,8 @@ A sample Coordinator dynamic config JSON object is shown below: "replicationThrottleLimit": 10, "emitBalancingStats": false, "killDataSourceWhitelist": ["wikipedia", "testDatasource"], - "historicalNodesInMaintenance": ["localhost:8182", "localhost:8282"], - "nodesInMaintenancePriority": 7 + "decommissioningNodes": ["localhost:8182", "localhost:8282"], + "decommissioningMaxPercentOfMaxSegmentsToMove": 70 } ``` @@ -798,14 +798,14 @@ Issuing a GET request at the same URL will return the spec that is currently in |`maxSegmentsToMove`|The maximum number of segments that can be moved at any given time.|5| |`replicantLifetime`|The maximum number of Coordinator runs for a segment to be replicated before we start alerting.|15| |`replicationThrottleLimit`|The maximum number of segments that can be replicated at one time.|10| -|`balancerComputeThreads`|Thread pool size for computing moving cost of segments in segment balancing. Consider increasing this if you have a lot of segments and moving segment starts to get stuck.|1| +|`balancerComputeThreads`|Thread pool size for computing moving cost of segments in segment balancing. Consider increasing this if you have a lot of segments and moving segments starts to get stuck.|1| |`emitBalancingStats`|Boolean flag for whether or not we should emit balancing stats. This is an expensive operation.|false| |`killDataSourceWhitelist`|List of dataSources for which kill tasks are sent if property `druid.coordinator.kill.on` is true. This can be a list of comma-separated dataSources or a JSON array.|none| |`killAllDataSources`|Send kill tasks for ALL dataSources if property `druid.coordinator.kill.on` is true. If this is set to true then `killDataSourceWhitelist` must not be specified or be empty list.|false| |`killPendingSegmentsSkipList`|List of dataSources for which pendingSegments are _NOT_ cleaned up if property `druid.coordinator.kill.pendingSegments.on` is true. This can be a list of comma-separated dataSources or a JSON array.|none| -|`maxSegmentsInNodeLoadingQueue`|The maximum number of segments that could be queued for loading to any given server. This parameter could be used to speed up segments loading process, especially if there are "slow" processes in the cluster (with low loading speed) or if too much segments scheduled to be replicated to some particular node (faster loading could be preferred to better segments distribution). Desired value depends on segments loading speed, acceptable replication time and number of processes. Value 1000 could be a start point for a rather big cluster. Default value is 0 (loading queue is unbounded) |0| -|`historicalNodesInMaintenance`| List of Historical nodes in maintenance mode. Coordinator doesn't assign new segments on those nodes and moves segments from the nodes according to a specified priority.|none| -|`nodesInMaintenancePriority`| Priority of segments from servers in maintenance. Coordinator takes ceil(maxSegmentsToMove * (priority / 10)) from servers in maitenance during balancing phase, i.e.:
0 - no segments from servers in maintenance will be processed during balancing
5 - 50% segments from servers in maintenance
10 - 100% segments from servers in maintenance
By leveraging the priority an operator can prevent general nodes from overload or decrease maitenance time instead.|7| +|`maxSegmentsInNodeLoadingQueue`|The maximum number of segments that could be queued for loading to any given server. This parameter could be used to speed up segments loading process, especially if there are "slow" nodes in the cluster (with low loading speed) or if too much segments scheduled to be replicated to some particular node (faster loading could be preferred to better segments distribution). Desired value depends on segments loading speed, acceptable replication time and number of nodes. Value 1000 could be a start point for a rather big cluster. Default value is 0 (loading queue is unbounded) |0| +|`decommissioningNodes`| List of historical servers to 'decommission'. Coordinator will not assign new segments to 'decommissioning' servers, and segments will be moved away from them to be placed on non-decommissioning servers at the maximum rate specified by `decommissioningMaxPercentOfMaxSegmentsToMove`.|none| +|`decommissioningMaxPercentOfMaxSegmentsToMove`| The maximum number of segments that may be moved away from 'decommissioning' servers to non-decommissioning (that is, active) servers during one Coordinator run. This value is relative to the total maximum segment movements allowed during one run which is determined by `maxSegmentsToMove`. If `decommissioningMaxPercentOfMaxSegmentsToMove` is 0, segments will neither be moved from _or to_ 'decommissioning' servers, effectively putting them in a sort of "maintenance" mode that will not participate in balancing or assignment by load rules. Decommissioning can also become stalled if there are no available active servers to place the segments. By leveraging the maximum percent of decommissioning segment movements, an operator can prevent active servers from overload by prioritizing balancing, or decrease decommissioning time instead. The value should be between 0 and 100.|70| To view the audit history of Coordinator dynamic config issue a GET request to the URL - diff --git a/server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java b/server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java index de034af5dfc..14bf3395add 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java @@ -28,6 +28,8 @@ import org.apache.druid.java.util.common.IAE; import javax.annotation.Nonnull; import javax.annotation.Nullable; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; import java.util.Collection; import java.util.HashSet; import java.util.Objects; @@ -56,8 +58,8 @@ public class CoordinatorDynamicConfig private final boolean emitBalancingStats; private final boolean killAllDataSources; private final Set killableDataSources; - private final Set historicalNodesInMaintenance; - private final int nodesInMaintenancePriority; + private final Set decommissioningNodes; + private final int decommissioningMaxPercentOfMaxSegmentsToMove; // The pending segments of the dataSources in this list are not killed. private final Set protectedPendingSegmentDatasources; @@ -88,8 +90,8 @@ public class CoordinatorDynamicConfig @JsonProperty("killAllDataSources") boolean killAllDataSources, @JsonProperty("killPendingSegmentsSkipList") Object protectedPendingSegmentDatasources, @JsonProperty("maxSegmentsInNodeLoadingQueue") int maxSegmentsInNodeLoadingQueue, - @JsonProperty("historicalNodesInMaintenance") Object historicalNodesInMaintenance, - @JsonProperty("nodesInMaintenancePriority") int nodesInMaintenancePriority + @JsonProperty("decommissioningNodes") Object decommissioningNodes, + @JsonProperty("decommissioningMaxPercentOfMaxSegmentsToMove") int decommissioningMaxPercentOfMaxSegmentsToMove ) { this.millisToWaitBeforeDeleting = millisToWaitBeforeDeleting; @@ -104,12 +106,12 @@ public class CoordinatorDynamicConfig this.killableDataSources = parseJsonStringOrArray(killableDataSources); this.protectedPendingSegmentDatasources = parseJsonStringOrArray(protectedPendingSegmentDatasources); this.maxSegmentsInNodeLoadingQueue = maxSegmentsInNodeLoadingQueue; - this.historicalNodesInMaintenance = parseJsonStringOrArray(historicalNodesInMaintenance); + this.decommissioningNodes = parseJsonStringOrArray(decommissioningNodes); Preconditions.checkArgument( - nodesInMaintenancePriority >= 0 && nodesInMaintenancePriority <= 10, - "nodesInMaintenancePriority should be in range [0, 10]" + decommissioningMaxPercentOfMaxSegmentsToMove >= 0 && decommissioningMaxPercentOfMaxSegmentsToMove <= 100, + "decommissioningMaxPercentOfMaxSegmentsToMove should be in range [0, 100]" ); - this.nodesInMaintenancePriority = nodesInMaintenancePriority; + this.decommissioningMaxPercentOfMaxSegmentsToMove = decommissioningMaxPercentOfMaxSegmentsToMove; if (this.killAllDataSources && !this.killableDataSources.isEmpty()) { throw new IAE("can't have killAllDataSources and non-empty killDataSourceWhitelist"); @@ -231,32 +233,37 @@ public class CoordinatorDynamicConfig } /** - * Historical nodes list in maintenance mode. Coordinator doesn't assign new segments on those nodes and moves - * segments from those nodes according to a specified priority. + * List of historical servers to 'decommission'. Coordinator will not assign new segments to 'decommissioning' servers, + * and segments will be moved away from them to be placed on non-decommissioning servers at the maximum rate specified by + * {@link CoordinatorDynamicConfig#getDecommissioningMaxPercentOfMaxSegmentsToMove}. * * @return list of host:port entries */ @JsonProperty - public Set getHistoricalNodesInMaintenance() + public Set getDecommissioningNodes() { - return historicalNodesInMaintenance; + return decommissioningNodes; + } /** - * Priority of segments from servers in maintenance. Coordinator takes ceil(maxSegmentsToMove * (priority / 10)) - * from servers in maitenance during balancing phase, i.e.: - * 0 - no segments from servers in maintenance will be processed during balancing - * 5 - 50% segments from servers in maintenance - * 10 - 100% segments from servers in maintenance - * By leveraging the priority an operator can prevent general nodes from overload or decrease maitenance time - * instead. + * The percent of {@link CoordinatorDynamicConfig#getMaxSegmentsToMove()} that determines the maximum number of + * segments that may be moved away from 'decommissioning' servers (specified by + * {@link CoordinatorDynamicConfig#getDecommissioningNodes()}) to non-decommissioning servers during one Coordinator + * balancer run. If this value is 0, segments will neither be moved from or to 'decommissioning' servers, effectively + * putting them in a sort of "maintenance" mode that will not participate in balancing or assignment by load rules. + * Decommissioning can also become stalled if there are no available active servers to place the segments. By + * adjusting this value, an operator can prevent active servers from overload by prioritizing balancing, or + * decrease decommissioning time instead. * - * @return number in range [0, 10] + * @return number in range [0, 100] */ + @Min(0) + @Max(100) @JsonProperty - public int getNodesInMaintenancePriority() + public int getDecommissioningMaxPercentOfMaxSegmentsToMove() { - return nodesInMaintenancePriority; + return decommissioningMaxPercentOfMaxSegmentsToMove; } @Override @@ -275,8 +282,8 @@ public class CoordinatorDynamicConfig ", killDataSourceWhitelist=" + killableDataSources + ", protectedPendingSegmentDatasources=" + protectedPendingSegmentDatasources + ", maxSegmentsInNodeLoadingQueue=" + maxSegmentsInNodeLoadingQueue + - ", historicalNodesInMaintenance=" + historicalNodesInMaintenance + - ", nodesInMaintenancePriority=" + nodesInMaintenancePriority + + ", decommissioningNodes=" + decommissioningNodes + + ", decommissioningMaxPercentOfMaxSegmentsToMove=" + decommissioningMaxPercentOfMaxSegmentsToMove + '}'; } @@ -328,10 +335,10 @@ public class CoordinatorDynamicConfig if (!Objects.equals(protectedPendingSegmentDatasources, that.protectedPendingSegmentDatasources)) { return false; } - if (!Objects.equals(historicalNodesInMaintenance, that.historicalNodesInMaintenance)) { + if (!Objects.equals(decommissioningNodes, that.decommissioningNodes)) { return false; } - return nodesInMaintenancePriority == that.nodesInMaintenancePriority; + return decommissioningMaxPercentOfMaxSegmentsToMove == that.decommissioningMaxPercentOfMaxSegmentsToMove; } @Override @@ -350,8 +357,8 @@ public class CoordinatorDynamicConfig maxSegmentsInNodeLoadingQueue, killableDataSources, protectedPendingSegmentDatasources, - historicalNodesInMaintenance, - nodesInMaintenancePriority + decommissioningNodes, + decommissioningMaxPercentOfMaxSegmentsToMove ); } @@ -372,7 +379,7 @@ public class CoordinatorDynamicConfig private static final boolean DEFAULT_EMIT_BALANCING_STATS = false; private static final boolean DEFAULT_KILL_ALL_DATA_SOURCES = false; private static final int DEFAULT_MAX_SEGMENTS_IN_NODE_LOADING_QUEUE = 0; - private static final int DEFAULT_MAINTENANCE_MODE_SEGMENTS_PRIORITY = 7; + private static final int DEFAULT_DECOMMISSIONING_MAX_SEGMENTS_TO_MOVE_PERCENT = 70; private Long millisToWaitBeforeDeleting; private Long mergeBytesLimit; @@ -386,8 +393,8 @@ public class CoordinatorDynamicConfig private Boolean killAllDataSources; private Object killPendingSegmentsSkipList; private Integer maxSegmentsInNodeLoadingQueue; - private Object maintenanceList; - private Integer maintenanceModeSegmentsPriority; + private Object decommissioningNodes; + private Integer decommissioningMaxPercentOfMaxSegmentsToMove; public Builder() { @@ -407,8 +414,8 @@ public class CoordinatorDynamicConfig @JsonProperty("killAllDataSources") @Nullable Boolean killAllDataSources, @JsonProperty("killPendingSegmentsSkipList") @Nullable Object killPendingSegmentsSkipList, @JsonProperty("maxSegmentsInNodeLoadingQueue") @Nullable Integer maxSegmentsInNodeLoadingQueue, - @JsonProperty("historicalNodesInMaintenance") @Nullable Object maintenanceList, - @JsonProperty("nodesInMaintenancePriority") @Nullable Integer maintenanceModeSegmentsPriority + @JsonProperty("decommissioningNodes") @Nullable Object decommissioningNodes, + @JsonProperty("decommissioningMaxPercentOfMaxSegmentsToMove") @Nullable Integer decommissioningMaxPercentOfMaxSegmentsToMove ) { this.millisToWaitBeforeDeleting = millisToWaitBeforeDeleting; @@ -423,8 +430,8 @@ public class CoordinatorDynamicConfig this.killableDataSources = killableDataSources; this.killPendingSegmentsSkipList = killPendingSegmentsSkipList; this.maxSegmentsInNodeLoadingQueue = maxSegmentsInNodeLoadingQueue; - this.maintenanceList = maintenanceList; - this.maintenanceModeSegmentsPriority = maintenanceModeSegmentsPriority; + this.decommissioningNodes = decommissioningNodes; + this.decommissioningMaxPercentOfMaxSegmentsToMove = decommissioningMaxPercentOfMaxSegmentsToMove; } public Builder withMillisToWaitBeforeDeleting(long millisToWaitBeforeDeleting) @@ -493,15 +500,15 @@ public class CoordinatorDynamicConfig return this; } - public Builder withMaintenanceList(Set list) + public Builder withDecommissioningNodes(Set decommissioning) { - this.maintenanceList = list; + this.decommissioningNodes = decommissioning; return this; } - public Builder withMaintenanceModeSegmentsPriority(Integer priority) + public Builder withDecommissioningMaxPercentOfMaxSegmentsToMove(Integer percent) { - this.maintenanceModeSegmentsPriority = priority; + this.decommissioningMaxPercentOfMaxSegmentsToMove = percent; return this; } @@ -522,10 +529,10 @@ public class CoordinatorDynamicConfig maxSegmentsInNodeLoadingQueue == null ? DEFAULT_MAX_SEGMENTS_IN_NODE_LOADING_QUEUE : maxSegmentsInNodeLoadingQueue, - maintenanceList, - maintenanceModeSegmentsPriority == null - ? DEFAULT_MAINTENANCE_MODE_SEGMENTS_PRIORITY - : maintenanceModeSegmentsPriority + decommissioningNodes, + decommissioningMaxPercentOfMaxSegmentsToMove == null + ? DEFAULT_DECOMMISSIONING_MAX_SEGMENTS_TO_MOVE_PERCENT + : decommissioningMaxPercentOfMaxSegmentsToMove ); } @@ -548,10 +555,10 @@ public class CoordinatorDynamicConfig maxSegmentsInNodeLoadingQueue == null ? defaults.getMaxSegmentsInNodeLoadingQueue() : maxSegmentsInNodeLoadingQueue, - maintenanceList == null ? defaults.getHistoricalNodesInMaintenance() : maintenanceList, - maintenanceModeSegmentsPriority == null - ? defaults.getNodesInMaintenancePriority() - : maintenanceModeSegmentsPriority + decommissioningNodes == null ? defaults.getDecommissioningNodes() : decommissioningNodes, + decommissioningMaxPercentOfMaxSegmentsToMove == null + ? defaults.getDecommissioningMaxPercentOfMaxSegmentsToMove() + : decommissioningMaxPercentOfMaxSegmentsToMove ); } } diff --git a/server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java b/server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java index b92effc8651..c20ae0c5d51 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java @@ -694,7 +694,7 @@ public class DruidCoordinator } // Find all historical servers, group them by subType and sort by ascending usage - Set nodesInMaintenance = params.getCoordinatorDynamicConfig().getHistoricalNodesInMaintenance(); + Set decommissioningServers = params.getCoordinatorDynamicConfig().getDecommissioningNodes(); final DruidCluster cluster = new DruidCluster(); for (ImmutableDruidServer server : servers) { if (!loadManagementPeons.containsKey(server.getName())) { @@ -709,7 +709,7 @@ public class DruidCoordinator new ServerHolder( server, loadManagementPeons.get(server.getName()), - nodesInMaintenance.contains(server.getHost()) + decommissioningServers.contains(server.getHost()) ) ); } diff --git a/server/src/main/java/org/apache/druid/server/coordinator/ServerHolder.java b/server/src/main/java/org/apache/druid/server/coordinator/ServerHolder.java index c7d7a86c825..ba96566a4df 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/ServerHolder.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/ServerHolder.java @@ -32,18 +32,18 @@ public class ServerHolder implements Comparable private static final Logger log = new Logger(ServerHolder.class); private final ImmutableDruidServer server; private final LoadQueuePeon peon; - private final boolean inMaintenance; + private final boolean isDecommissioning; public ServerHolder(ImmutableDruidServer server, LoadQueuePeon peon) { this(server, peon, false); } - public ServerHolder(ImmutableDruidServer server, LoadQueuePeon peon, boolean inMaintenance) + public ServerHolder(ImmutableDruidServer server, LoadQueuePeon peon, boolean isDecommissioning) { this.server = server; this.peon = peon; - this.inMaintenance = inMaintenance; + this.isDecommissioning = isDecommissioning; } public ImmutableDruidServer getServer() @@ -82,14 +82,15 @@ public class ServerHolder implements Comparable } /** - * Historical nodes can be placed in maintenance mode, which instructs Coordinator to move segments from them - * according to a specified priority. The mechanism allows to drain segments from nodes which are planned for - * replacement. - * @return true if the node is in maitenance mode + * Historical nodes can be 'decommissioned', which instructs Coordinator to move segments from them according to + * the percent of move operations diverted from normal balancer moves for this purpose by + * {@link CoordinatorDynamicConfig#getDecommissioningMaxPercentOfMaxSegmentsToMove()}. The mechanism allows draining + * segments from nodes which are planned for replacement. + * @return true if the node is decommissioning */ - public boolean isInMaintenance() + public boolean isDecommissioning() { - return inMaintenance; + return isDecommissioning; } public long getAvailableSize() diff --git a/server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorBalancer.java b/server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorBalancer.java index 10499ac807a..cf8d7253191 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorBalancer.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorBalancer.java @@ -95,37 +95,41 @@ public class DruidCoordinatorBalancer implements DruidCoordinatorHelper { if (params.getAvailableSegments().size() == 0) { - log.info("Metadata segments are not available. Cannot balance."); + log.warn("Metadata segments are not available. Cannot balance."); + // suppress emit zero stats return; } currentlyMovingSegments.computeIfAbsent(tier, t -> new ConcurrentHashMap<>()); if (!currentlyMovingSegments.get(tier).isEmpty()) { reduceLifetimes(tier); - log.info("[%s]: Still waiting on %,d segments to be moved", tier, currentlyMovingSegments.get(tier).size()); + log.info( + "[%s]: Still waiting on %,d segments to be moved. Skipping balance.", + tier, + currentlyMovingSegments.get(tier).size() + ); + // suppress emit zero stats return; } /* - Take as much segments from maintenance servers as priority allows and find the best location for them on - available servers. After that, balance segments within available servers pool. + Take as many segments from decommissioning servers as decommissioningMaxPercentOfMaxSegmentsToMove allows and find + the best location for them on active servers. After that, balance segments within active servers pool. */ Map> partitions = - servers.stream().collect(Collectors.partitioningBy(ServerHolder::isInMaintenance)); - final List maintenanceServers = partitions.get(true); - final List availableServers = partitions.get(false); + servers.stream().collect(Collectors.partitioningBy(ServerHolder::isDecommissioning)); + final List decommissioningServers = partitions.get(true); + final List activeServers = partitions.get(false); log.info( - "Found %d servers in maintenance, %d available servers servers", - maintenanceServers.size(), - availableServers.size() + "Found %d active servers, %d decommissioning servers", + activeServers.size(), + decommissioningServers.size() ); - if (maintenanceServers.isEmpty()) { - if (availableServers.size() <= 1) { - log.info("[%s]: %d available servers servers found. Cannot balance.", tier, availableServers.size()); - } - } else if (availableServers.isEmpty()) { - log.info("[%s]: no available servers servers found during maintenance. Cannot balance.", tier); + if ((decommissioningServers.isEmpty() && activeServers.size() <= 1) || activeServers.isEmpty()) { + log.warn("[%s]: insufficient active servers. Cannot balance.", tier); + // suppress emit zero stats + return; } int numSegments = 0; @@ -134,23 +138,30 @@ public class DruidCoordinatorBalancer implements DruidCoordinatorHelper } if (numSegments == 0) { - log.info("No segments found. Cannot balance."); + log.info("No segments found. Cannot balance."); + // suppress emit zero stats return; } final int maxSegmentsToMove = Math.min(params.getCoordinatorDynamicConfig().getMaxSegmentsToMove(), numSegments); - int priority = params.getCoordinatorDynamicConfig().getNodesInMaintenancePriority(); - int maxMaintenanceSegmentsToMove = (int) Math.ceil(maxSegmentsToMove * priority / 10.0); - log.info("Processing %d segments from servers in maintenance mode", maxMaintenanceSegmentsToMove); - Pair maintenanceResult = - balanceServers(params, maintenanceServers, availableServers, maxMaintenanceSegmentsToMove); - int maxGeneralSegmentsToMove = maxSegmentsToMove - maintenanceResult.lhs; - log.info("Processing %d segments from servers in general mode", maxGeneralSegmentsToMove); - Pair generalResult = - balanceServers(params, availableServers, availableServers, maxGeneralSegmentsToMove); + int decommissioningMaxPercentOfMaxSegmentsToMove = + params.getCoordinatorDynamicConfig().getDecommissioningMaxPercentOfMaxSegmentsToMove(); + int maxSegmentsToMoveFromDecommissioningNodes = + (int) Math.ceil(maxSegmentsToMove * (decommissioningMaxPercentOfMaxSegmentsToMove / 100.0)); + log.info( + "Processing %d segments for moving from decommissioning servers", + maxSegmentsToMoveFromDecommissioningNodes + ); + Pair decommissioningResult = + balanceServers(params, decommissioningServers, activeServers, maxSegmentsToMoveFromDecommissioningNodes); - int moved = generalResult.lhs + maintenanceResult.lhs; - int unmoved = generalResult.rhs + maintenanceResult.rhs; + int maxGeneralSegmentsToMove = maxSegmentsToMove - decommissioningResult.lhs; + log.info("Processing %d segments for balancing between active servers", maxGeneralSegmentsToMove); + Pair generalResult = + balanceServers(params, activeServers, activeServers, maxGeneralSegmentsToMove); + + int moved = generalResult.lhs + decommissioningResult.lhs; + int unmoved = generalResult.rhs + decommissioningResult.rhs; if (unmoved == maxSegmentsToMove) { // Cluster should be alive and constantly adjusting log.info("No good moves found in tier [%s]", tier); diff --git a/server/src/main/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRule.java b/server/src/main/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRule.java index b28f569e55b..658171236ad 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRule.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRule.java @@ -46,7 +46,7 @@ public abstract class BroadcastDistributionRule implements Rule } else { params.getDruidCluster().getAllServers().forEach( eachHolder -> { - if (!eachHolder.isInMaintenance() + if (!eachHolder.isDecommissioning() && colocatedDataSources.stream() .anyMatch(source -> eachHolder.getServer().getDataSource(source) != null)) { loadServerHolders.add(eachHolder); diff --git a/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java b/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java index 3de93cfdaf9..1de3479fe30 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java @@ -153,8 +153,8 @@ public abstract class LoadRule implements Rule log.makeAlert("Tier[%s] has no servers! Check your cluster configuration!", tier).emit(); return Collections.emptyList(); } - Predicate isNotInMaintenance = s -> !s.isInMaintenance(); - return queue.stream().filter(isNotInMaintenance.and(predicate)).collect(Collectors.toList()); + Predicate isActive = s -> !s.isDecommissioning(); + return queue.stream().filter(isActive.and(predicate)).collect(Collectors.toList()); } /** @@ -385,14 +385,14 @@ public abstract class LoadRule implements Rule Map> holders = holdersInTier.stream() .filter(s -> s.isServingSegment(segment)) .collect(Collectors.partitioningBy( - ServerHolder::isInMaintenance, + ServerHolder::isDecommissioning, Collectors.toCollection(TreeSet::new) )); - TreeSet maintenanceServers = holders.get(true); - TreeSet availableServers = holders.get(false); - int left = dropSegmentFromServers(balancerStrategy, segment, maintenanceServers, numToDrop); + TreeSet decommissioningServers = holders.get(true); + TreeSet activeServers = holders.get(false); + int left = dropSegmentFromServers(balancerStrategy, segment, decommissioningServers, numToDrop); if (left > 0) { - left = dropSegmentFromServers(balancerStrategy, segment, availableServers, left); + left = dropSegmentFromServers(balancerStrategy, segment, activeServers, left); } if (left != 0) { log.warn("Wtf, holder was null? I have no servers serving [%s]?", segment.getId()); diff --git a/server/src/test/java/org/apache/druid/server/coordinator/DruidCoordinatorBalancerTest.java b/server/src/test/java/org/apache/druid/server/coordinator/DruidCoordinatorBalancerTest.java index 67521e397e0..dbd3048e539 100644 --- a/server/src/test/java/org/apache/druid/server/coordinator/DruidCoordinatorBalancerTest.java +++ b/server/src/test/java/org/apache/druid/server/coordinator/DruidCoordinatorBalancerTest.java @@ -201,14 +201,14 @@ public class DruidCoordinatorBalancerTest /** * Server 1 has 2 segments. - * Server 2 (maintenance) has 2 segments. + * Server 2 (decommissioning) has 2 segments. * Server 3 is empty. - * Maintenance has priority 7. + * Decommissioning percent is 60. * Max segments to move is 3. * 2 (of 2) segments should be moved from Server 2 and 1 (of 2) from Server 1. */ @Test - public void testMoveMaintenancePriority() + public void testMoveDecommissioningMaxPercentOfMaxSegmentsToMove() { mockDruidServer(druidServer1, "1", "normal", 30L, 100L, Arrays.asList(segment1, segment2)); mockDruidServer(druidServer2, "2", "normal", 30L, 100L, Arrays.asList(segment3, segment4)); @@ -239,8 +239,8 @@ public class DruidCoordinatorBalancerTest .withDynamicConfigs( CoordinatorDynamicConfig.builder() .withMaxSegmentsToMove(3) - .withMaintenanceModeSegmentsPriority(6) - .build() // ceil(3 * 0.6) = 2 segments from servers in maintenance + .withDecommissioningMaxPercentOfMaxSegmentsToMove(60) + .build() // ceil(3 * 0.6) = 2 segments from decommissioning servers ) .withBalancerStrategy(strategy) .build(); @@ -251,28 +251,28 @@ public class DruidCoordinatorBalancerTest } @Test - public void testZeroMaintenancePriority() + public void testZeroDecommissioningMaxPercentOfMaxSegmentsToMove() { - DruidCoordinatorRuntimeParams params = setupParamsForMaintenancePriority(0); + DruidCoordinatorRuntimeParams params = setupParamsForDecommissioningMaxPercentOfMaxSegmentsToMove(0); params = new DruidCoordinatorBalancerTester(coordinator).run(params); Assert.assertEquals(1L, params.getCoordinatorStats().getTieredStat("movedCount", "normal")); Assert.assertThat(peon3.getSegmentsToLoad(), is(equalTo(ImmutableSet.of(segment1)))); } @Test - public void testMaxMaintenancePriority() + public void testMaxDecommissioningMaxPercentOfMaxSegmentsToMove() { - DruidCoordinatorRuntimeParams params = setupParamsForMaintenancePriority(10); + DruidCoordinatorRuntimeParams params = setupParamsForDecommissioningMaxPercentOfMaxSegmentsToMove(10); params = new DruidCoordinatorBalancerTester(coordinator).run(params); Assert.assertEquals(1L, params.getCoordinatorStats().getTieredStat("movedCount", "normal")); Assert.assertThat(peon3.getSegmentsToLoad(), is(equalTo(ImmutableSet.of(segment2)))); } /** - * Should balance segments as usual (ignoring priority) with empty maintenanceList. + * Should balance segments as usual (ignoring percent) with empty decommissioningNodes. */ @Test - public void testMoveMaintenancePriorityWithNoMaintenance() + public void testMoveDecommissioningMaxPercentOfMaxSegmentsToMoveWithNoDecommissioning() { mockDruidServer(druidServer1, "1", "normal", 30L, 100L, Arrays.asList(segment1, segment2)); mockDruidServer(druidServer2, "2", "normal", 0L, 100L, Arrays.asList(segment3, segment4)); @@ -300,7 +300,7 @@ public class DruidCoordinatorBalancerTest ImmutableList.of(false, false, false) ) .withDynamicConfigs( - CoordinatorDynamicConfig.builder().withMaxSegmentsToMove(3).withMaintenanceModeSegmentsPriority(9).build() + CoordinatorDynamicConfig.builder().withMaxSegmentsToMove(3).withDecommissioningMaxPercentOfMaxSegmentsToMove(9).build() ) .withBalancerStrategy(strategy) .build(); @@ -311,10 +311,10 @@ public class DruidCoordinatorBalancerTest } /** - * Shouldn't move segments to a server in maintenance mode. + * Shouldn't move segments to a decommissioning server. */ @Test - public void testMoveToServerInMaintenance() + public void testMoveToDecommissioningServer() { mockDruidServer(druidServer1, "1", "normal", 30L, 100L, segments); mockDruidServer(druidServer2, "2", "normal", 0L, 100L, Collections.emptyList()); @@ -347,7 +347,7 @@ public class DruidCoordinatorBalancerTest } @Test - public void testMoveFromServerInMaintenance() + public void testMoveFromDecommissioningServer() { mockDruidServer(druidServer1, "1", "normal", 30L, 100L, segments); mockDruidServer(druidServer2, "2", "normal", 0L, 100L, Collections.emptyList()); @@ -512,7 +512,7 @@ public class DruidCoordinatorBalancerTest private DruidCoordinatorRuntimeParams.Builder defaultRuntimeParamsBuilder( List druidServers, List peons, - List maintenance + List decommissioning ) { return DruidCoordinatorRuntimeParams @@ -524,7 +524,7 @@ public class DruidCoordinatorBalancerTest "normal", IntStream .range(0, druidServers.size()) - .mapToObj(i -> new ServerHolder(druidServers.get(i), peons.get(i), maintenance.get(i))) + .mapToObj(i -> new ServerHolder(druidServers.get(i), peons.get(i), decommissioning.get(i))) .collect(Collectors.toSet()) ) ) @@ -622,7 +622,7 @@ public class DruidCoordinatorBalancerTest } } - private DruidCoordinatorRuntimeParams setupParamsForMaintenancePriority(int priority) + private DruidCoordinatorRuntimeParams setupParamsForDecommissioningMaxPercentOfMaxSegmentsToMove(int percent) { mockDruidServer(druidServer1, "1", "normal", 30L, 100L, Arrays.asList(segment1, segment3)); mockDruidServer(druidServer2, "2", "normal", 30L, 100L, Arrays.asList(segment2, segment3)); @@ -632,7 +632,7 @@ public class DruidCoordinatorBalancerTest mockCoordinator(coordinator); - // either maintenance servers list or general ones (ie servers list is [2] or [1, 3]) + // either decommissioning servers list or acitve ones (ie servers list is [2] or [1, 3]) BalancerStrategy strategy = EasyMock.createMock(BalancerStrategy.class); EasyMock.expect(strategy.pickSegmentToMove(ImmutableList.of(new ServerHolder(druidServer2, peon2, true)))) .andReturn(new BalancerSegmentHolder(druidServer2, segment2)); @@ -651,7 +651,7 @@ public class DruidCoordinatorBalancerTest .withDynamicConfigs( CoordinatorDynamicConfig.builder() .withMaxSegmentsToMove(1) - .withMaintenanceModeSegmentsPriority(priority) + .withDecommissioningMaxPercentOfMaxSegmentsToMove(percent) .build() ) .withBalancerStrategy(strategy) diff --git a/server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleTest.java b/server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleTest.java index 359fb6895cc..83398d7f6dc 100644 --- a/server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleTest.java +++ b/server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleTest.java @@ -58,9 +58,9 @@ public class BroadcastDistributionRuleTest private final List largeSegments2 = new ArrayList<>(); private DataSegment smallSegment; private DruidCluster secondCluster; - private ServerHolder generalServer; - private ServerHolder maintenanceServer2; - private ServerHolder maintenanceServer1; + private ServerHolder activeServer; + private ServerHolder decommissioningServer1; + private ServerHolder decommissioningServer2; @Before public void setUp() @@ -200,9 +200,9 @@ public class BroadcastDistributionRuleTest ) ); - generalServer = new ServerHolder( + activeServer = new ServerHolder( new DruidServer( - "general", + "active", "host1", null, 100, @@ -214,9 +214,9 @@ public class BroadcastDistributionRuleTest new LoadQueuePeonTester() ); - maintenanceServer1 = new ServerHolder( + decommissioningServer1 = new ServerHolder( new DruidServer( - "maintenance1", + "decommissioning1", "host2", null, 100, @@ -229,9 +229,9 @@ public class BroadcastDistributionRuleTest true ); - maintenanceServer2 = new ServerHolder( + decommissioningServer2 = new ServerHolder( new DruidServer( - "maintenance2", + "decommissioning2", "host3", null, 100, @@ -267,9 +267,9 @@ public class BroadcastDistributionRuleTest ImmutableMap.of( "tier1", Stream.of( - generalServer, - maintenanceServer1, - maintenanceServer2 + activeServer, + decommissioningServer1, + decommissioningServer2 ).collect(Collectors.toCollection(() -> new TreeSet<>(Collections.reverseOrder()))) ) ); @@ -315,19 +315,19 @@ public class BroadcastDistributionRuleTest /** * Servers: - * name | segments - * -------------+-------------- - * general | large segment - * maintenance1 | small segment - * maintenance2 | large segment + * name | segments + * -----------------+-------------- + * active | large segment + * decommissioning1 | small segment + * decommissioning2 | large segment * * After running the rule for the small segment: - * general | large & small segments - * maintenance1 | - * maintenance2 | large segment + * active | large & small segments + * decommissioning1 | + * decommissionint2 | large segment */ @Test - public void testBroadcastWithMaintenance() + public void testBroadcastDecommissioning() { final ForeverBroadcastDistributionRule rule = new ForeverBroadcastDistributionRule(ImmutableList.of("large_source")); @@ -348,9 +348,9 @@ public class BroadcastDistributionRuleTest assertEquals(1L, stats.getGlobalStat(LoadRule.ASSIGNED_COUNT)); assertEquals(false, stats.hasPerTierStats()); - assertEquals(1, generalServer.getPeon().getSegmentsToLoad().size()); - assertEquals(1, maintenanceServer1.getPeon().getSegmentsToDrop().size()); - assertEquals(0, maintenanceServer2.getPeon().getSegmentsToLoad().size()); + assertEquals(1, activeServer.getPeon().getSegmentsToLoad().size()); + assertEquals(1, decommissioningServer1.getPeon().getSegmentsToDrop().size()); + assertEquals(0, decommissioningServer2.getPeon().getSegmentsToLoad().size()); } @Test diff --git a/server/src/test/java/org/apache/druid/server/coordinator/rules/LoadRuleTest.java b/server/src/test/java/org/apache/druid/server/coordinator/rules/LoadRuleTest.java index 9a9bcb170a7..a8793b2a647 100644 --- a/server/src/test/java/org/apache/druid/server/coordinator/rules/LoadRuleTest.java +++ b/server/src/test/java/org/apache/druid/server/coordinator/rules/LoadRuleTest.java @@ -687,11 +687,11 @@ public class LoadRuleTest } /** - * 2 servers in different tiers, the first is in maitenance mode. - * Should not load a segment to the server in maintenance mode. + * 2 servers in different tiers, the first is decommissioning. + * Should not load a segment to the server that is decommissioning */ @Test - public void testLoadDuringMaitenance() + public void testLoadDecommissioning() { final LoadQueuePeon mockPeon1 = createEmptyPeon(); final LoadQueuePeon mockPeon2 = createOneCallPeonMock(); @@ -737,11 +737,11 @@ public class LoadRuleTest } /** - * 2 tiers, 2 servers each, 1 server of the second tier is in maintenance. - * Should not load a segment to the server in maintenance mode. + * 2 tiers, 2 servers each, 1 server of the second tier is decommissioning. + * Should not load a segment to the server that is decommssioning. */ @Test - public void testLoadReplicaDuringMaitenance() + public void testLoadReplicaDuringDecommissioning() { EasyMock.expect(throttler.canCreateReplicant(EasyMock.anyString())).andReturn(true).anyTimes(); @@ -796,11 +796,11 @@ public class LoadRuleTest } /** - * 2 servers with a segment, one server in maintenance mode. + * 2 servers with a segment, one server decommissioning. * Should drop a segment from both. */ @Test - public void testDropDuringMaintenance() + public void testDropDuringDecommissioning() { final LoadQueuePeon mockPeon = createEmptyPeon(); mockPeon.dropSegment(EasyMock.anyObject(), EasyMock.anyObject()); @@ -859,12 +859,12 @@ public class LoadRuleTest /** * 3 servers hosting 3 replicas of the segment. - * 1 servers is in maitenance. + * 1 servers is decommissioning. * 1 replica is redundant. - * Should drop from the server in maintenance. + * Should drop from the decommissioning server. */ @Test - public void testRedundantReplicaDropDuringMaintenance() + public void testRedundantReplicaDropDuringDecommissioning() { final LoadQueuePeon mockPeon1 = new LoadQueuePeonTester(); final LoadQueuePeon mockPeon2 = new LoadQueuePeonTester(); @@ -1019,12 +1019,12 @@ public class LoadRuleTest return mockPeon2; } - private static ServerHolder createServerHolder(String tier, LoadQueuePeon mockPeon1, boolean maintenance) + private static ServerHolder createServerHolder(String tier, LoadQueuePeon mockPeon1, boolean isDecommissioning) { return new ServerHolder( createServer(tier).toImmutableDruidServer(), mockPeon1, - maintenance + isDecommissioning ); } } diff --git a/server/src/test/java/org/apache/druid/server/http/CoordinatorDynamicConfigTest.java b/server/src/test/java/org/apache/druid/server/http/CoordinatorDynamicConfigTest.java index e0979252012..af97906f9cc 100644 --- a/server/src/test/java/org/apache/druid/server/http/CoordinatorDynamicConfigTest.java +++ b/server/src/test/java/org/apache/druid/server/http/CoordinatorDynamicConfigTest.java @@ -50,8 +50,8 @@ public class CoordinatorDynamicConfigTest + " \"emitBalancingStats\": true,\n" + " \"killDataSourceWhitelist\": [\"test1\",\"test2\"],\n" + " \"maxSegmentsInNodeLoadingQueue\": 1,\n" - + " \"historicalNodesInMaintenance\": [\"host1\", \"host2\"],\n" - + " \"nodesInMaintenancePriority\": 9\n" + + " \"decommissioningNodes\": [\"host1\", \"host2\"],\n" + + " \"decommissioningMaxPercentOfMaxSegmentsToMove\": 9\n" + "}\n"; CoordinatorDynamicConfig actual = mapper.readValue( @@ -63,19 +63,19 @@ public class CoordinatorDynamicConfigTest ), CoordinatorDynamicConfig.class ); - ImmutableSet maintenance = ImmutableSet.of("host1", "host2"); + ImmutableSet decommissioning = ImmutableSet.of("host1", "host2"); ImmutableSet whitelist = ImmutableSet.of("test1", "test2"); - assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, maintenance, 9); + assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, decommissioning, 9); - actual = CoordinatorDynamicConfig.builder().withMaintenanceList(ImmutableSet.of("host1")).build(actual); + actual = CoordinatorDynamicConfig.builder().withDecommissioningNodes(ImmutableSet.of("host1")).build(actual); assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, ImmutableSet.of("host1"), 9); - actual = CoordinatorDynamicConfig.builder().withMaintenanceModeSegmentsPriority(5).build(actual); + actual = CoordinatorDynamicConfig.builder().withDecommissioningMaxPercentOfMaxSegmentsToMove(5).build(actual); assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, ImmutableSet.of("host1"), 5); } @Test - public void testMaintenanceParametersBackwardCompatibility() throws Exception + public void testDecommissioningParametersBackwardCompatibility() throws Exception { String jsonStr = "{\n" + " \"millisToWaitBeforeDeleting\": 1,\n" @@ -99,14 +99,14 @@ public class CoordinatorDynamicConfigTest ), CoordinatorDynamicConfig.class ); - ImmutableSet maintenance = ImmutableSet.of(); + ImmutableSet decommissioning = ImmutableSet.of(); ImmutableSet whitelist = ImmutableSet.of("test1", "test2"); - assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, maintenance, 0); + assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, decommissioning, 0); - actual = CoordinatorDynamicConfig.builder().withMaintenanceList(ImmutableSet.of("host1")).build(actual); + actual = CoordinatorDynamicConfig.builder().withDecommissioningNodes(ImmutableSet.of("host1")).build(actual); assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, ImmutableSet.of("host1"), 0); - actual = CoordinatorDynamicConfig.builder().withMaintenanceModeSegmentsPriority(5).build(actual); + actual = CoordinatorDynamicConfig.builder().withDecommissioningMaxPercentOfMaxSegmentsToMove(5).build(actual); assertConfig(actual, 1, 1, 1, 1, 1, 1, 2, true, whitelist, false, 1, ImmutableSet.of("host1"), 5); } @@ -217,7 +217,7 @@ public class CoordinatorDynamicConfigTest { CoordinatorDynamicConfig defaultConfig = CoordinatorDynamicConfig.builder().build(); ImmutableSet emptyList = ImmutableSet.of(); - assertConfig(defaultConfig, 900000, 524288000, 100, 5, 15, 10, 1, false, emptyList, false, 0, emptyList, 7); + assertConfig(defaultConfig, 900000, 524288000, 100, 5, 15, 10, 1, false, emptyList, false, 0, emptyList, 70); } @Test @@ -257,8 +257,8 @@ public class CoordinatorDynamicConfigTest Set expectedKillableDatasources, boolean expectedKillAllDataSources, int expectedMaxSegmentsInNodeLoadingQueue, - Set maintenanceList, - int maintenancePriority + Set decommissioning, + int decommissioningMaxPercentOfMaxSegmentsToMove ) { Assert.assertEquals(expectedMillisToWaitBeforeDeleting, config.getMillisToWaitBeforeDeleting()); @@ -272,7 +272,7 @@ public class CoordinatorDynamicConfigTest Assert.assertEquals(expectedKillableDatasources, config.getKillableDataSources()); Assert.assertEquals(expectedKillAllDataSources, config.isKillAllDataSources()); Assert.assertEquals(expectedMaxSegmentsInNodeLoadingQueue, config.getMaxSegmentsInNodeLoadingQueue()); - Assert.assertEquals(maintenanceList, config.getHistoricalNodesInMaintenance()); - Assert.assertEquals(maintenancePriority, config.getNodesInMaintenancePriority()); + Assert.assertEquals(decommissioning, config.getDecommissioningNodes()); + Assert.assertEquals(decommissioningMaxPercentOfMaxSegmentsToMove, config.getDecommissioningMaxPercentOfMaxSegmentsToMove()); } } From 6991735f73bc9bfed81fe2757699a418da111d90 Mon Sep 17 00:00:00 2001 From: Surekha Date: Fri, 8 Mar 2019 16:40:59 -0800 Subject: [PATCH 09/19] Fix and add sys IT tests to travis script (#7208) * Add sys IT tests to travis script * minor fixes * Modify the test queries * modify query --- ci/travis_script_integration_part2.sh | 2 +- integration-tests/README.md | 5 +++++ .../druid/tests/indexer/AbstractITBatchIndexTest.java | 11 +++++++++-- .../indexer/ITSystemTableBatchIndexTaskTest.java | 4 ++-- .../druid/tests/query/ITSystemTableQueryTest.java | 3 +-- .../indexer/sys_segment_batch_index_queries.json | 4 ++-- .../test/resources/queries/sys_segment_queries.json | 6 +----- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ci/travis_script_integration_part2.sh b/ci/travis_script_integration_part2.sh index 24cd7970ece..8c9f5eebd76 100755 --- a/ci/travis_script_integration_part2.sh +++ b/ci/travis_script_integration_part2.sh @@ -21,6 +21,6 @@ set -e pushd $TRAVIS_BUILD_DIR/integration-tests -mvn verify -P integration-tests -Dit.test=ITUnionQueryTest,ITNestedQueryPushDownTest,ITTwitterQueryTest,ITWikipediaQueryTest,ITBasicAuthConfigurationTest,ITTLSTest +mvn verify -P integration-tests -Dit.test=ITUnionQueryTest,ITNestedQueryPushDownTest,ITTwitterQueryTest,ITWikipediaQueryTest,ITBasicAuthConfigurationTest,ITTLSTest,ITSystemTableQueryTest,ITSystemTableBatchIndexTaskTest popd diff --git a/integration-tests/README.md b/integration-tests/README.md index eeafc2f0495..55ec1855b1f 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -215,3 +215,8 @@ This will tell the test framework that the test class needs to be constructed us 2) FromFileTestQueryHelper - reads queries with expected results from file and executes them and verifies the results using ResultVerifier Refer ITIndexerTest as an example on how to use dependency Injection + +### Register new tests for Travis CI + +Once you add new integration tests, don't forget to add them to `{DRUID_ROOT}/ci/travis_script_integration.sh` +or `{DRUID_ROOT}/ci/travis_script_integration_part2.sh` for Travis CI to run them. diff --git a/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java b/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java index 121fd7a9bda..df95de927c1 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/indexer/AbstractITBatchIndexTest.java @@ -144,9 +144,16 @@ public class AbstractITBatchIndexTest extends AbstractIndexerTest String dataSource, String indexTaskFilePath, String queryFilePath - ) + ) throws IOException { - submitTaskAndWait(indexTaskFilePath, dataSource, false); + final String fullDatasourceName = dataSource + config.getExtraDatasourceNameSuffix(); + final String taskSpec = StringUtils.replace( + getTaskAsString(indexTaskFilePath), + "%%DATASOURCE%%", + fullDatasourceName + ); + + submitTaskAndWait(taskSpec, fullDatasourceName, false); try { sqlQueryHelper.testQueriesFromFile(queryFilePath, 2); } diff --git a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITSystemTableBatchIndexTaskTest.java b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITSystemTableBatchIndexTaskTest.java index d06155d31f2..c138c9fe75d 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITSystemTableBatchIndexTaskTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITSystemTableBatchIndexTaskTest.java @@ -30,7 +30,7 @@ import java.io.Closeable; public class ITSystemTableBatchIndexTaskTest extends AbstractITBatchIndexTest { - private static final Logger LOG = new Logger(ITCompactionTaskTest.class); + private static final Logger LOG = new Logger(ITSystemTableBatchIndexTaskTest.class); private static String INDEX_TASK = "/indexer/wikipedia_index_task.json"; private static String SYSTEM_QUERIES_RESOURCE = "/indexer/sys_segment_batch_index_queries.json"; private static String INDEX_DATASOURCE = "wikipedia_index_test"; @@ -40,7 +40,7 @@ public class ITSystemTableBatchIndexTaskTest extends AbstractITBatchIndexTest { LOG.info("Starting batch index sys table queries"); try ( - final Closeable indexCloseable = unloader(INDEX_DATASOURCE) + final Closeable indexCloseable = unloader(INDEX_DATASOURCE + config.getExtraDatasourceNameSuffix()); ) { doIndexTestSqlTest( INDEX_DATASOURCE, diff --git a/integration-tests/src/test/java/org/apache/druid/tests/query/ITSystemTableQueryTest.java b/integration-tests/src/test/java/org/apache/druid/tests/query/ITSystemTableQueryTest.java index 378fc5a39b1..82089f4b1ef 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/query/ITSystemTableQueryTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/query/ITSystemTableQueryTest.java @@ -19,7 +19,6 @@ package org.apache.druid.tests.query; -import com.google.common.base.Throwables; import com.google.inject.Inject; import org.apache.druid.testing.IntegrationTestingConfig; import org.apache.druid.testing.clients.CoordinatorResourceTestClient; @@ -65,7 +64,7 @@ public class ITSystemTableQueryTest this.queryHelper.testQueriesFromFile(SYSTEM_QUERIES_RESOURCE, 2); } catch (Exception e) { - throw Throwables.propagate(e); + throw new RuntimeException(e); } } } diff --git a/integration-tests/src/test/resources/indexer/sys_segment_batch_index_queries.json b/integration-tests/src/test/resources/indexer/sys_segment_batch_index_queries.json index f49b387eda2..b8e863b95f4 100644 --- a/integration-tests/src/test/resources/indexer/sys_segment_batch_index_queries.json +++ b/integration-tests/src/test/resources/indexer/sys_segment_batch_index_queries.json @@ -1,7 +1,7 @@ [ { "query": { - "query": "SELECT count(*) FROM sys.segments WHERE datasource='wikipedia_index_test'" + "query": "SELECT count(*) FROM sys.segments WHERE datasource LIKE 'wikipedia_index_test%'" }, "expectedResults": [ { @@ -21,7 +21,7 @@ }, { "query": { - "query": "SELECT status FROM sys.tasks" + "query": "SELECT status AS status FROM sys.tasks WHERE datasource LIKE 'wikipedia_index_test%' GROUP BY 1" }, "expectedResults": [ { diff --git a/integration-tests/src/test/resources/queries/sys_segment_queries.json b/integration-tests/src/test/resources/queries/sys_segment_queries.json index d414af71fe1..8e074107135 100644 --- a/integration-tests/src/test/resources/queries/sys_segment_queries.json +++ b/integration-tests/src/test/resources/queries/sys_segment_queries.json @@ -1,17 +1,13 @@ [ { "query": { - "query": "SELECT datasource, count(*) FROM sys.segments GROUP BY 1" + "query": "SELECT datasource, count(*) FROM sys.segments WHERE datasource='wikipedia_editstream' OR datasource='twitterstream' GROUP BY 1 " }, "expectedResults": [ { "datasource": "wikipedia_editstream", "EXPR$1": 1 }, - { - "datasource": "wikipedia", - "EXPR$1": 1 - }, { "datasource": "twitterstream", "EXPR$1": 3 From 62f0de9b8978178460091bbd8ce824d92242e90e Mon Sep 17 00:00:00 2001 From: jorbay-au <40071830+jorbay-au@users.noreply.github.com> Date: Fri, 8 Mar 2019 16:42:08 -0800 Subject: [PATCH 10/19] Remove outdated instruction for rule updates (#7205) --- docs/content/operations/rule-configuration.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/content/operations/rule-configuration.md b/docs/content/operations/rule-configuration.md index 4847b16b99d..4bc37a8578d 100644 --- a/docs/content/operations/rule-configuration.md +++ b/docs/content/operations/rule-configuration.md @@ -33,8 +33,6 @@ The Coordinator loads a set of rules from the metadata storage. Rules may be spe Note: It is recommended that the Coordinator console is used to configure rules. However, the Coordinator process does have HTTP endpoints to programmatically configure rules. -When a rule is updated, the change may not be reflected until the next time the Coordinator runs. This will be fixed in the near future. - Load Rules ---------- From 9bebf113ba188dbac242dd7fcc74845e34105d7f Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Fri, 8 Mar 2019 17:54:05 -0800 Subject: [PATCH 11/19] Fix race in historical when loading segments in parallel (#7203) * Fix race in historical when loading segments in parallel * revert unnecessary change * remove synchronized * add reference counting locking * fix build * fix comment --- .../segment/ReferenceCountingSegment.java | 5 +- .../druid/segment/loading/SegmentLoader.java | 2 + .../SegmentLoaderLocalCacheManager.java | 188 +++++++++--- .../apache/druid/server/SegmentManager.java | 6 +- .../BatchDataSegmentAnnouncer.java | 9 +- .../coordination/SegmentLoadDropHandler.java | 26 +- .../server/coordinator/HttpLoadQueuePeon.java | 10 +- .../loading/CacheTestSegmentLoader.java | 1 - .../druid/server/SegmentManagerTest.java | 24 +- .../SegmentManagerThreadSafetyTest.java | 268 ++++++++++++++++++ .../SegmentLoadDropHandlerTest.java | 9 - .../BatchDataSegmentAnnouncerTest.java | 110 ++++++- .../coordinator/HttpLoadQueuePeonTest.java | 26 -- 13 files changed, 561 insertions(+), 123 deletions(-) create mode 100644 server/src/test/java/org/apache/druid/server/SegmentManagerThreadSafetyTest.java diff --git a/processing/src/main/java/org/apache/druid/segment/ReferenceCountingSegment.java b/processing/src/main/java/org/apache/druid/segment/ReferenceCountingSegment.java index 4f27a4f3394..ef98b7515b2 100644 --- a/processing/src/main/java/org/apache/druid/segment/ReferenceCountingSegment.java +++ b/processing/src/main/java/org/apache/druid/segment/ReferenceCountingSegment.java @@ -19,7 +19,6 @@ package org.apache.druid.segment; -import com.google.common.base.Preconditions; import org.apache.druid.java.util.emitter.EmittingLogger; import org.apache.druid.timeline.SegmentId; import org.joda.time.Interval; @@ -45,8 +44,10 @@ public class ReferenceCountingSegment extends AbstractSegment @Override protected boolean onAdvance(int phase, int registeredParties) { - Preconditions.checkState(registeredParties == 0); // Ensure that onAdvance() doesn't throw exception, otherwise termination won't happen + if (registeredParties != 0) { + log.error("registeredParties[%s] is not 0", registeredParties); + } try { baseSegment.close(); } diff --git a/server/src/main/java/org/apache/druid/segment/loading/SegmentLoader.java b/server/src/main/java/org/apache/druid/segment/loading/SegmentLoader.java index 3db4672f3fb..301e7370229 100644 --- a/server/src/main/java/org/apache/druid/segment/loading/SegmentLoader.java +++ b/server/src/main/java/org/apache/druid/segment/loading/SegmentLoader.java @@ -25,6 +25,8 @@ import org.apache.druid.timeline.DataSegment; import java.io.File; /** + * Loading segments from deep storage to local storage. + * Implementations must be thread-safe. */ public interface SegmentLoader { diff --git a/server/src/main/java/org/apache/druid/segment/loading/SegmentLoaderLocalCacheManager.java b/server/src/main/java/org/apache/druid/segment/loading/SegmentLoaderLocalCacheManager.java index 92987354a74..48049b0611e 100644 --- a/server/src/main/java/org/apache/druid/segment/loading/SegmentLoaderLocalCacheManager.java +++ b/server/src/main/java/org/apache/druid/segment/loading/SegmentLoaderLocalCacheManager.java @@ -20,10 +20,12 @@ package org.apache.druid.segment.loading; import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Longs; import com.google.inject.Inject; import org.apache.commons.io.FileUtils; import org.apache.druid.guice.annotations.Json; +import org.apache.druid.java.util.common.ISE; import org.apache.druid.java.util.emitter.EmittingLogger; import org.apache.druid.segment.IndexIO; import org.apache.druid.segment.Segment; @@ -32,15 +34,17 @@ import org.apache.druid.timeline.DataSegment; import java.io.File; import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; import java.util.Comparator; import java.util.List; +import java.util.concurrent.ConcurrentHashMap; /** */ public class SegmentLoaderLocalCacheManager implements SegmentLoader { private static final EmittingLogger log = new EmittingLogger(SegmentLoaderLocalCacheManager.class); + private static final Comparator COMPARATOR = (left, right) -> + Longs.compare(right.available(), left.available()); private final IndexIO indexIO; private final SegmentLoaderConfig config; @@ -48,15 +52,30 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader private final List locations; - private final Object lock = new Object(); + // This directoryWriteRemoveLock is used when creating or removing a directory + private final Object directoryWriteRemoveLock = new Object(); - private static final Comparator COMPARATOR = new Comparator() - { - @Override public int compare(StorageLocation left, StorageLocation right) - { - return Longs.compare(right.available(), left.available()); - } - }; + /** + * A map between segment and referenceCountingLocks. + * + * These locks should be acquired whenever getting or deleting files for a segment. + * If different threads try to get or delete files simultaneously, one of them creates a lock first using + * {@link #createOrGetLock}. And then, all threads compete with each other to get the lock. + * Finally, the lock should be released using {@link #unlock}. + * + * An example usage is: + * + * final ReferenceCountingLock lock = createOrGetLock(segment); + * synchronized (lock) { + * try { + * doSomething(); + * } + * finally { + * unlock(lock); + * } + * } + */ + private final ConcurrentHashMap segmentLocks = new ConcurrentHashMap<>(); // Note that we only create this via injection in historical and realtime nodes. Peons create these // objects via SegmentLoaderFactory objects, so that they can store segments in task-specific @@ -74,12 +93,15 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader this.locations = new ArrayList<>(); for (StorageLocationConfig locationConfig : config.getLocations()) { - locations.add(new StorageLocation( - locationConfig.getPath(), - locationConfig.getMaxSize(), - locationConfig.getFreeSpacePercent() - )); + locations.add( + new StorageLocation( + locationConfig.getPath(), + locationConfig.getMaxSize(), + locationConfig.getFreeSpacePercent() + ) + ); } + locations.sort(COMPARATOR); } @Override @@ -90,7 +112,7 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader private StorageLocation findStorageLocationIfLoaded(final DataSegment segment) { - for (StorageLocation location : getSortedList(locations)) { + for (StorageLocation location : locations) { File localStorageDir = new File(location.getPath(), DataSegmentPusher.getDefaultStorageDir(segment, false)); if (localStorageDir.exists()) { return location; @@ -102,7 +124,16 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader @Override public Segment getSegment(DataSegment segment) throws SegmentLoadingException { - File segmentFiles = getSegmentFiles(segment); + final ReferenceCountingLock lock = createOrGetLock(segment); + final File segmentFiles; + synchronized (lock) { + try { + segmentFiles = getSegmentFiles(segment); + } + finally { + unlock(segment, lock); + } + } File factoryJson = new File(segmentFiles, "factory.json"); final SegmentizerFactory factory; @@ -123,14 +154,22 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader @Override public File getSegmentFiles(DataSegment segment) throws SegmentLoadingException { - StorageLocation loc = findStorageLocationIfLoaded(segment); - String storageDir = DataSegmentPusher.getDefaultStorageDir(segment, false); + final ReferenceCountingLock lock = createOrGetLock(segment); + synchronized (lock) { + try { + StorageLocation loc = findStorageLocationIfLoaded(segment); + String storageDir = DataSegmentPusher.getDefaultStorageDir(segment, false); - if (loc == null) { - loc = loadSegmentWithRetry(segment, storageDir); + if (loc == null) { + loc = loadSegmentWithRetry(segment, storageDir); + } + loc.addSegment(segment); + return new File(loc.getPath(), storageDir); + } + finally { + unlock(segment, lock); + } } - loc.addSegment(segment); - return new File(loc.getPath(), storageDir); } /** @@ -140,7 +179,7 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader */ private StorageLocation loadSegmentWithRetry(DataSegment segment, String storageDirStr) throws SegmentLoadingException { - for (StorageLocation loc : getSortedList(locations)) { + for (StorageLocation loc : locations) { if (loc.canHandle(segment)) { File storageDir = new File(loc.getPath(), storageDirStr); @@ -169,7 +208,7 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader // We use a marker to prevent the case where a segment is downloaded, but before the download completes, // the parent directories of the segment are removed final File downloadStartMarker = new File(storageDir, "downloadStartMarker"); - synchronized (lock) { + synchronized (directoryWriteRemoveLock) { if (!storageDir.mkdirs()) { log.debug("Unable to make parent file[%s]", storageDir); } @@ -212,23 +251,31 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader return; } - StorageLocation loc = findStorageLocationIfLoaded(segment); + final ReferenceCountingLock lock = createOrGetLock(segment); + synchronized (lock) { + try { + StorageLocation loc = findStorageLocationIfLoaded(segment); - if (loc == null) { - log.info("Asked to cleanup something[%s] that didn't exist. Skipping.", segment); - return; - } + if (loc == null) { + log.warn("Asked to cleanup something[%s] that didn't exist. Skipping.", segment); + return; + } - // If storageDir.mkdirs() success, but downloadStartMarker.createNewFile() failed, - // in this case, findStorageLocationIfLoaded() will think segment is located in the failed storageDir which is actually not. - // So we should always clean all possible locations here - for (StorageLocation location : getSortedList(locations)) { - File localStorageDir = new File(location.getPath(), DataSegmentPusher.getDefaultStorageDir(segment, false)); - if (localStorageDir.exists()) { - // Druid creates folders of the form dataSource/interval/version/partitionNum. - // We need to clean up all these directories if they are all empty. - cleanupCacheFiles(location.getPath(), localStorageDir); - location.removeSegment(segment); + // If storageDir.mkdirs() success, but downloadStartMarker.createNewFile() failed, + // in this case, findStorageLocationIfLoaded() will think segment is located in the failed storageDir which is actually not. + // So we should always clean all possible locations here + for (StorageLocation location : locations) { + File localStorageDir = new File(location.getPath(), DataSegmentPusher.getDefaultStorageDir(segment, false)); + if (localStorageDir.exists()) { + // Druid creates folders of the form dataSource/interval/version/partitionNum. + // We need to clean up all these directories if they are all empty. + cleanupCacheFiles(location.getPath(), localStorageDir); + location.removeSegment(segment); + } + } + } + finally { + unlock(segment, lock); } } } @@ -239,13 +286,13 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader return; } - synchronized (lock) { + synchronized (directoryWriteRemoveLock) { log.info("Deleting directory[%s]", cacheFile); try { FileUtils.deleteDirectory(cacheFile); } catch (Exception e) { - log.error("Unable to remove file[%s]", cacheFile); + log.error(e, "Unable to remove directory[%s]", cacheFile); } } @@ -258,11 +305,62 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader } } - private List getSortedList(List locs) + private ReferenceCountingLock createOrGetLock(DataSegment dataSegment) { - List locations = new ArrayList<>(locs); - Collections.sort(locations, COMPARATOR); + return segmentLocks.compute( + dataSegment, + (segment, lock) -> { + final ReferenceCountingLock nonNullLock; + if (lock == null) { + nonNullLock = new ReferenceCountingLock(); + } else { + nonNullLock = lock; + } + nonNullLock.increment(); + return nonNullLock; + } + ); + } - return locations; + private void unlock(DataSegment dataSegment, ReferenceCountingLock lock) + { + segmentLocks.compute( + dataSegment, + (segment, existingLock) -> { + //noinspection ObjectEquality + if (existingLock == null || existingLock != lock) { + throw new ISE("WTH? Different createOrGetLock instance"); + } else { + if (existingLock.numReferences == 1) { + return null; + } else { + existingLock.decrement(); + return existingLock; + } + } + } + ); + } + + @VisibleForTesting + private static class ReferenceCountingLock + { + private int numReferences; + + private void increment() + { + ++numReferences; + } + + private void decrement() + { + --numReferences; + } + } + + @VisibleForTesting + public ConcurrentHashMap getSegmentLocks() + { + return segmentLocks; } } diff --git a/server/src/main/java/org/apache/druid/server/SegmentManager.java b/server/src/main/java/org/apache/druid/server/SegmentManager.java index a1975ffb7a8..ecbb0d49686 100644 --- a/server/src/main/java/org/apache/druid/server/SegmentManager.java +++ b/server/src/main/java/org/apache/druid/server/SegmentManager.java @@ -171,7 +171,7 @@ public class SegmentManager ); if ((entry != null) && (entry.getChunk(segment.getShardSpec().getPartitionNum()) != null)) { - log.warn("Told to load a adapter for a segment[%s] that already exists", segment.getId()); + log.warn("Told to load an adapter for segment[%s] that already exists", segment.getId()); resultSupplier.set(false); } else { loadedIntervals.add( @@ -223,6 +223,8 @@ public class SegmentManager final PartitionChunk removed = loadedIntervals.remove( segment.getInterval(), segment.getVersion(), + // remove() internally searches for a partitionChunk to remove which is *equal* to the given + // partitionChunk. Note that partitionChunk.equals() checks only the partitionNum, but not the object. segment.getShardSpec().createChunk(null) ); final ReferenceCountingSegment oldQueryable = (removed == null) ? null : removed.getObject(); @@ -234,7 +236,7 @@ public class SegmentManager oldQueryable.close(); } else { log.info( - "Told to delete a queryable on dataSource[%s] for interval[%s] and version [%s] that I don't have.", + "Told to delete a queryable on dataSource[%s] for interval[%s] and version[%s] that I don't have.", dataSourceName, segment.getInterval(), segment.getVersion() diff --git a/server/src/main/java/org/apache/druid/server/coordination/BatchDataSegmentAnnouncer.java b/server/src/main/java/org/apache/druid/server/coordination/BatchDataSegmentAnnouncer.java index d45c51cced6..205bbac1d0b 100644 --- a/server/src/main/java/org/apache/druid/server/coordination/BatchDataSegmentAnnouncer.java +++ b/server/src/main/java/org/apache/druid/server/coordination/BatchDataSegmentAnnouncer.java @@ -119,9 +119,14 @@ public class BatchDataSegmentAnnouncer implements DataSegmentAnnouncer return; } - DataSegment toAnnounce = segmentTransformer.apply(segment); - synchronized (lock) { + if (segmentLookup.containsKey(segment)) { + log.info("Skipping announcement of segment [%s]. Announcement exists already.", segment.getId()); + return; + } + + DataSegment toAnnounce = segmentTransformer.apply(segment); + changes.addChangeRequest(new SegmentChangeRequestLoad(toAnnounce)); if (config.isSkipSegmentAnnouncementOnZk()) { diff --git a/server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java b/server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java index 53b12c9aee5..36fbe5638e7 100644 --- a/server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java +++ b/server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java @@ -106,11 +106,16 @@ public class SegmentLoadDropHandler implements DataSegmentChangeHandler SegmentManager segmentManager ) { - this(jsonMapper, config, announcer, serverAnnouncer, segmentManager, - Executors.newScheduledThreadPool( - config.getNumLoadingThreads(), - Execs.makeThreadFactory("SimpleDataSegmentChangeHandler-%s") - ) + this( + jsonMapper, + config, + announcer, + serverAnnouncer, + segmentManager, + Executors.newScheduledThreadPool( + config.getNumLoadingThreads(), + Execs.makeThreadFactory("SimpleDataSegmentChangeHandler-%s") + ) ); } @@ -250,7 +255,7 @@ public class SegmentLoadDropHandler implements DataSegmentChangeHandler * Load a single segment. If the segment is loaded successfully, this function simply returns. Otherwise it will * throw a SegmentLoadingException * - * @throws SegmentLoadingException + * @throws SegmentLoadingException if it fails to load the given segment */ private void loadSegment(DataSegment segment, DataSegmentChangeCallback callback) throws SegmentLoadingException { @@ -305,6 +310,7 @@ public class SegmentLoadDropHandler implements DataSegmentChangeHandler } } loadSegment(segment, DataSegmentChangeCallback.NOOP); + // announce segment even if the segment file already exists. try { announcer.announceSegment(segment); } @@ -727,16 +733,10 @@ public class SegmentLoadDropHandler implements DataSegmentChangeHandler (request, statusRef) -> result.add(new DataSegmentChangeRequestAndStatus(request, statusRef.get())) ); - super.set(result); + set(result); } } - @Override - public boolean setException(Throwable throwable) - { - return super.setException(throwable); - } - @Override public boolean cancel(boolean interruptIfRunning) { diff --git a/server/src/main/java/org/apache/druid/server/coordinator/HttpLoadQueuePeon.java b/server/src/main/java/org/apache/druid/server/coordinator/HttpLoadQueuePeon.java index e3ab60412f4..0c0ee56e072 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/HttpLoadQueuePeon.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/HttpLoadQueuePeon.java @@ -147,9 +147,9 @@ public class HttpLoadQueuePeon extends LoadQueuePeon return; } - int batchSize = config.getHttpLoadQueuePeonBatchSize(); + final int batchSize = config.getHttpLoadQueuePeonBatchSize(); - List newRequests = new ArrayList<>(batchSize); + final List newRequests = new ArrayList<>(batchSize); synchronized (lock) { Iterator> iter = Iterators.concat( @@ -157,8 +157,7 @@ public class HttpLoadQueuePeon extends LoadQueuePeon segmentsToLoad.entrySet().iterator() ); - while (batchSize > 0 && iter.hasNext()) { - batchSize--; + while (newRequests.size() < batchSize && iter.hasNext()) { Map.Entry entry = iter.next(); if (entry.getValue().hasTimedOut()) { entry.getValue().requestFailed("timed out"); @@ -304,8 +303,7 @@ public class HttpLoadQueuePeon extends LoadQueuePeon return; } - if (status.getState() - == SegmentLoadDropHandler.Status.STATE.FAILED) { + if (status.getState() == SegmentLoadDropHandler.Status.STATE.FAILED) { holder.requestFailed(status.getFailureCause()); } else { holder.requestSucceeded(); diff --git a/server/src/test/java/org/apache/druid/segment/loading/CacheTestSegmentLoader.java b/server/src/test/java/org/apache/druid/segment/loading/CacheTestSegmentLoader.java index 5723359b77a..0b291d40210 100644 --- a/server/src/test/java/org/apache/druid/segment/loading/CacheTestSegmentLoader.java +++ b/server/src/test/java/org/apache/druid/segment/loading/CacheTestSegmentLoader.java @@ -37,7 +37,6 @@ import java.util.Set; */ public class CacheTestSegmentLoader implements SegmentLoader { - private final Set segmentsInTrash = new HashSet<>(); @Override diff --git a/server/src/test/java/org/apache/druid/server/SegmentManagerTest.java b/server/src/test/java/org/apache/druid/server/SegmentManagerTest.java index 826f249a7b0..14cbdbd90a4 100644 --- a/server/src/test/java/org/apache/druid/server/SegmentManagerTest.java +++ b/server/src/test/java/org/apache/druid/server/SegmentManagerTest.java @@ -309,7 +309,8 @@ public class SegmentManagerTest public void testLoadDuplicatedSegmentsInParallel() throws ExecutionException, InterruptedException, SegmentLoadingException { - final List> futures = ImmutableList.of(segments.get(0), segments.get(0), segments.get(0)).stream() + final List> futures = ImmutableList.of(segments.get(0), segments.get(0), segments.get(0)) + .stream() .map( segment -> executor.submit( () -> segmentManager.loadSegment(segment) @@ -347,16 +348,17 @@ public class SegmentManagerTest throws SegmentLoadingException, ExecutionException, InterruptedException { segmentManager.loadSegment(segments.get(0)); - final List> futures = ImmutableList.of(segments.get(1), segments.get(2)).stream() - .map( - segment -> executor.submit( - () -> { - segmentManager.dropSegment(segment); - return (Void) null; - } - ) - ) - .collect(Collectors.toList()); + final List> futures = ImmutableList.of(segments.get(1), segments.get(2)) + .stream() + .map( + segment -> executor.submit( + () -> { + segmentManager.dropSegment(segment); + return (Void) null; + } + ) + ) + .collect(Collectors.toList()); for (Future future : futures) { future.get(); diff --git a/server/src/test/java/org/apache/druid/server/SegmentManagerThreadSafetyTest.java b/server/src/test/java/org/apache/druid/server/SegmentManagerThreadSafetyTest.java new file mode 100644 index 00000000000..ab78689751e --- /dev/null +++ b/server/src/test/java/org/apache/druid/server/SegmentManagerThreadSafetyTest.java @@ -0,0 +1,268 @@ +/* + * 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. + */ + +package org.apache.druid.server; + +import com.fasterxml.jackson.databind.InjectableValues.Std; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.jsontype.NamedType; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.google.common.collect.ImmutableMap; +import org.apache.commons.io.FileUtils; +import org.apache.druid.jackson.DefaultObjectMapper; +import org.apache.druid.java.util.common.FileUtils.FileCopyResult; +import org.apache.druid.java.util.common.Intervals; +import org.apache.druid.java.util.common.StringUtils; +import org.apache.druid.java.util.common.concurrent.Execs; +import org.apache.druid.java.util.emitter.EmittingLogger; +import org.apache.druid.segment.IndexIO; +import org.apache.druid.segment.QueryableIndex; +import org.apache.druid.segment.Segment; +import org.apache.druid.segment.StorageAdapter; +import org.apache.druid.segment.loading.DataSegmentPusher; +import org.apache.druid.segment.loading.LocalDataSegmentPuller; +import org.apache.druid.segment.loading.LocalLoadSpec; +import org.apache.druid.segment.loading.SegmentLoaderConfig; +import org.apache.druid.segment.loading.SegmentLoaderLocalCacheManager; +import org.apache.druid.segment.loading.SegmentLoadingException; +import org.apache.druid.segment.loading.SegmentizerFactory; +import org.apache.druid.segment.loading.StorageLocationConfig; +import org.apache.druid.server.metrics.NoopServiceEmitter; +import org.apache.druid.timeline.DataSegment; +import org.apache.druid.timeline.SegmentId; +import org.apache.druid.timeline.partition.NumberedShardSpec; +import org.joda.time.Interval; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +import javax.annotation.Nullable; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +public class SegmentManagerThreadSafetyTest +{ + private static final int NUM_THREAD = 4; + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + private TestSegmentPuller segmentPuller; + private ObjectMapper objectMapper; + private IndexIO indexIO; + private File segmentCacheDir; + private File segmentDeepStorageDir; + private SegmentLoaderLocalCacheManager segmentLoader; + private SegmentManager segmentManager; + private ExecutorService exec; + + @Before + public void setup() throws IOException + { + segmentPuller = new TestSegmentPuller(); + objectMapper = new DefaultObjectMapper() + .registerModule( + new SimpleModule().registerSubtypes(new NamedType(LocalLoadSpec.class, "local"), new NamedType(TestSegmentizerFactory.class, "test")) + ) + .setInjectableValues(new Std().addValue(LocalDataSegmentPuller.class, segmentPuller)); + indexIO = new IndexIO(objectMapper, () -> 0); + segmentCacheDir = temporaryFolder.newFolder(); + segmentDeepStorageDir = temporaryFolder.newFolder(); + segmentLoader = new SegmentLoaderLocalCacheManager( + indexIO, + new SegmentLoaderConfig() + { + @Override + public List getLocations() + { + return Collections.singletonList( + new StorageLocationConfig().setPath(segmentCacheDir) + ); + } + }, + objectMapper + ); + segmentManager = new SegmentManager(segmentLoader); + exec = Execs.multiThreaded(NUM_THREAD, "SegmentManagerThreadSafetyTest-%d"); + EmittingLogger.registerEmitter(new NoopServiceEmitter()); + } + + @After + public void teardown() throws IOException + { + exec.shutdownNow(); + FileUtils.deleteDirectory(segmentCacheDir); + } + + @Test(timeout = 5000L) + public void testLoadSameSegment() throws IOException, ExecutionException, InterruptedException + { + final DataSegment segment = createSegment("2019-01-01/2019-01-02"); + final List futures = IntStream + .range(0, 16) + .mapToObj(i -> exec.submit(() -> segmentManager.loadSegment(segment))) + .collect(Collectors.toList()); + for (Future future : futures) { + future.get(); + } + Assert.assertEquals(1, segmentPuller.numFileLoaded.size()); + Assert.assertEquals(1, segmentPuller.numFileLoaded.values().iterator().next().intValue()); + Assert.assertEquals(0, segmentLoader.getSegmentLocks().size()); + } + + @Test(timeout = 5000L) + public void testLoadMultipleSegments() throws IOException, ExecutionException, InterruptedException + { + final List segments = new ArrayList<>(88); + for (int i = 0; i < 11; i++) { + for (int j = 0; j < 8; j++) { + segments.add(createSegment(StringUtils.format("2019-%02d-01/2019-%02d-01", i + 1, i + 2))); + } + } + + final List futures = IntStream + .range(0, 16) + .mapToObj(i -> exec.submit(() -> { + for (DataSegment segment : segments) { + try { + segmentManager.loadSegment(segment); + } + catch (SegmentLoadingException e) { + throw new RuntimeException(e); + } + } + })) + .collect(Collectors.toList()); + for (Future future : futures) { + future.get(); + } + Assert.assertEquals(11, segmentPuller.numFileLoaded.size()); + Assert.assertEquals(1, segmentPuller.numFileLoaded.values().iterator().next().intValue()); + Assert.assertEquals(0, segmentLoader.getSegmentLocks().size()); + } + + private DataSegment createSegment(String interval) throws IOException + { + final DataSegment tmpSegment = new DataSegment( + "dataSource", + Intervals.of(interval), + "version", + Collections.emptyMap(), + Collections.emptyList(), + Collections.emptyList(), + new NumberedShardSpec(0, 0), + 9, + 100 + ); + final String storageDir = DataSegmentPusher.getDefaultStorageDir(tmpSegment, false); + final File segmentDir = new File(segmentDeepStorageDir, storageDir); + FileUtils.forceMkdir(segmentDir); + + final File factoryJson = new File(segmentDir, "factory.json"); + objectMapper.writeValue(factoryJson, new TestSegmentizerFactory()); + return tmpSegment.withLoadSpec( + ImmutableMap.of("type", "local", "path", segmentDir.getAbsolutePath()) + ); + } + + private static class TestSegmentPuller extends LocalDataSegmentPuller + { + private final Map numFileLoaded = new HashMap<>(); + + @Override + public FileCopyResult getSegmentFiles(final File sourceFile, final File dir) + { + numFileLoaded.compute(sourceFile, (f, numLoaded) -> numLoaded == null ? 1 : numLoaded + 1); + try { + FileUtils.copyDirectory(sourceFile, dir); + } + catch (IOException e) { + throw new RuntimeException(e); + } + return new FileCopyResult() + { + @Override + public long size() + { + return 100L; + } + }; + } + } + + private static class TestSegmentizerFactory implements SegmentizerFactory + { + @Override + public Segment factorize(DataSegment segment, File parentDir) + { + return new Segment() + { + @Override + public SegmentId getId() + { + return segment.getId(); + } + + @Override + public Interval getDataInterval() + { + return segment.getInterval(); + } + + @Nullable + @Override + public QueryableIndex asQueryableIndex() + { + throw new UnsupportedOperationException(); + } + + @Override + public StorageAdapter asStorageAdapter() + { + throw new UnsupportedOperationException(); + } + + @Override + public T as(Class clazz) + { + throw new UnsupportedOperationException(); + } + + @Override + public void close() + { + + } + }; + } + } +} diff --git a/server/src/test/java/org/apache/druid/server/coordination/SegmentLoadDropHandlerTest.java b/server/src/test/java/org/apache/druid/server/coordination/SegmentLoadDropHandlerTest.java index 6f227e48699..f5455fbbfb2 100644 --- a/server/src/test/java/org/apache/druid/server/coordination/SegmentLoadDropHandlerTest.java +++ b/server/src/test/java/org/apache/druid/server/coordination/SegmentLoadDropHandlerTest.java @@ -65,15 +65,6 @@ public class SegmentLoadDropHandlerTest private static final Logger log = new Logger(ZkCoordinatorTest.class); private final ObjectMapper jsonMapper = TestHelper.makeJsonMapper(); - private final DruidServerMetadata me = new DruidServerMetadata( - "dummyServer", - "dummyHost", - null, - 0, - ServerType.HISTORICAL, - "normal", - 0 - ); private SegmentLoadDropHandler segmentLoadDropHandler; private DataSegmentAnnouncer announcer; diff --git a/server/src/test/java/org/apache/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java b/server/src/test/java/org/apache/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java index 52006f5880d..8debba13180 100644 --- a/server/src/test/java/org/apache/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java +++ b/server/src/test/java/org/apache/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java @@ -51,10 +51,17 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import java.io.IOException; +import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Map.Entry; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicInteger; /** @@ -65,11 +72,12 @@ public class BatchDataSegmentAnnouncerTest private static final String testBasePath = "/test"; private static final String testSegmentsPath = "/test/segments/id"; private static final Joiner joiner = Joiner.on("/"); + private static final int NUM_THREADS = 4; private TestingCluster testingCluster; private CuratorFramework cf; private ObjectMapper jsonMapper; - private Announcer announcer; + private TestAnnouncer announcer; private SegmentReader segmentReader; private BatchDataSegmentAnnouncer segmentAnnouncer; private Set testSegments; @@ -78,6 +86,7 @@ public class BatchDataSegmentAnnouncerTest private Boolean skipDimensionsAndMetrics; private Boolean skipLoadSpec; + private ExecutorService exec; @Before public void setUp() throws Exception @@ -96,7 +105,7 @@ public class BatchDataSegmentAnnouncerTest jsonMapper = TestHelper.makeJsonMapper(); - announcer = new Announcer( + announcer = new TestAnnouncer( cf, Execs.directExecutor() ); @@ -157,6 +166,8 @@ public class BatchDataSegmentAnnouncerTest for (int i = 0; i < 100; i++) { testSegments.add(makeSegment(i)); } + + exec = Execs.multiThreaded(NUM_THREADS, "BatchDataSegmentAnnouncerTest-%d"); } @After @@ -165,6 +176,7 @@ public class BatchDataSegmentAnnouncerTest announcer.stop(); cf.close(); testingCluster.stop(); + exec.shutdownNow(); } @Test @@ -299,6 +311,14 @@ public class BatchDataSegmentAnnouncerTest testBatchAnnounce(true); } + @Test + public void testMultipleBatchAnnounce() throws Exception + { + for (int i = 0; i < 10; i++) { + testBatchAnnounce(false); + } + } + private void testBatchAnnounce(boolean testHistory) throws Exception { segmentAnnouncer.announceSegments(testSegments); @@ -342,11 +362,72 @@ public class BatchDataSegmentAnnouncerTest } } - @Test - public void testMultipleBatchAnnounce() throws Exception + @Test(timeout = 5000L) + public void testAnnounceSegmentsWithSameSegmentConcurrently() throws ExecutionException, InterruptedException { - for (int i = 0; i < 10; i++) { - testBatchAnnounce(false); + final List futures = new ArrayList<>(NUM_THREADS); + + for (int i = 0; i < NUM_THREADS; i++) { + futures.add( + exec.submit(() -> { + try { + segmentAnnouncer.announceSegments(testSegments); + } + catch (IOException e) { + throw new RuntimeException(e); + } + }) + ); + } + + for (Future future : futures) { + future.get(); + } + + // Announcing 100 segments requires 2 nodes because of maxBytesPerNode configuration. + Assert.assertEquals(2, announcer.numPathAnnounced.size()); + for (ConcurrentHashMap eachMap : announcer.numPathAnnounced.values()) { + for (Entry entry : eachMap.entrySet()) { + Assert.assertEquals(1, entry.getValue().get()); + } + } + } + + @Test(timeout = 5000L) + public void testAnnounceSegmentWithSameSegmentConcurrently() throws ExecutionException, InterruptedException + { + final List futures = new ArrayList<>(NUM_THREADS); + + final DataSegment segment1 = makeSegment(0); + final DataSegment segment2 = makeSegment(1); + final DataSegment segment3 = makeSegment(2); + final DataSegment segment4 = makeSegment(3); + + for (int i = 0; i < NUM_THREADS; i++) { + futures.add( + exec.submit(() -> { + try { + segmentAnnouncer.announceSegment(segment1); + segmentAnnouncer.announceSegment(segment2); + segmentAnnouncer.announceSegment(segment3); + segmentAnnouncer.announceSegment(segment4); + } + catch (IOException e) { + throw new RuntimeException(e); + } + }) + ); + } + + for (Future future : futures) { + future.get(); + } + + Assert.assertEquals(1, announcer.numPathAnnounced.size()); + for (ConcurrentHashMap eachMap : announcer.numPathAnnounced.values()) { + for (Entry entry : eachMap.entrySet()) { + Assert.assertEquals(1, entry.getValue().get()); + } } } @@ -396,4 +477,21 @@ public class BatchDataSegmentAnnouncerTest return new HashSet<>(); } } + + private static class TestAnnouncer extends Announcer + { + private final ConcurrentHashMap> numPathAnnounced = new ConcurrentHashMap<>(); + + private TestAnnouncer(CuratorFramework curator, ExecutorService exec) + { + super(curator, exec); + } + + @Override + public void announce(String path, byte[] bytes, boolean removeParentIfCreated) + { + numPathAnnounced.computeIfAbsent(path, k -> new ConcurrentHashMap<>()).computeIfAbsent(bytes, k -> new AtomicInteger(0)).incrementAndGet(); + super.announce(path, bytes, removeParentIfCreated); + } + } } diff --git a/server/src/test/java/org/apache/druid/server/coordinator/HttpLoadQueuePeonTest.java b/server/src/test/java/org/apache/druid/server/coordinator/HttpLoadQueuePeonTest.java index 1b6ff3df57c..0f73695c167 100644 --- a/server/src/test/java/org/apache/druid/server/coordinator/HttpLoadQueuePeonTest.java +++ b/server/src/test/java/org/apache/druid/server/coordinator/HttpLoadQueuePeonTest.java @@ -20,12 +20,9 @@ package org.apache.druid.server.coordinator; import com.fasterxml.jackson.core.type.TypeReference; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import org.apache.druid.discovery.DiscoveryDruidNode; -import org.apache.druid.discovery.DruidNodeDiscovery; import org.apache.druid.java.util.common.Intervals; import org.apache.druid.java.util.common.RE; import org.apache.druid.java.util.common.concurrent.Execs; @@ -47,12 +44,10 @@ import org.junit.Test; import java.io.ByteArrayInputStream; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; -import java.util.concurrent.atomic.AtomicInteger; /** */ @@ -172,29 +167,8 @@ public class HttpLoadQueuePeonTest } - private static class TestDruidNodeDiscovery implements DruidNodeDiscovery - { - Listener listener; - - @Override - public Collection getAllNodes() - { - throw new UnsupportedOperationException("Not Implemented."); - } - - @Override - public void registerListener(Listener listener) - { - listener.nodesAdded(ImmutableList.of()); - listener.nodeViewInitialized(); - this.listener = listener; - } - } - private static class TestHttpClient implements HttpClient { - AtomicInteger requestNum = new AtomicInteger(0); - @Override public ListenableFuture go( Request request, From 5cc171419cf64e07448b501f47114ece9c03740b Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Sat, 9 Mar 2019 15:14:09 -0800 Subject: [PATCH 12/19] move jetty module to Lifecycle.Stage.LAST to allow graceful shutdown to work with lookups and stuff, put http-clint on lifecycle modules lifecycle (#7215) --- .../druid/tests/security/ITTLSTest.java | 5 +- .../druid/guice/http/HttpClientModule.java | 2 +- .../druid/guice/http/LifecycleUtils.java | 52 ------------------- .../jetty/JettyServerModule.java | 3 +- .../server/initialization/BaseJettyTest.java | 3 +- 5 files changed, 6 insertions(+), 59 deletions(-) delete mode 100644 server/src/main/java/org/apache/druid/guice/http/LifecycleUtils.java diff --git a/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java index 1b67c6407b8..40aaa2c49a6 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java @@ -24,7 +24,6 @@ import com.google.common.base.Throwables; import com.google.inject.Inject; import org.apache.druid.guice.annotations.Client; import org.apache.druid.guice.http.DruidHttpClientConfig; -import org.apache.druid.guice.http.LifecycleUtils; import org.apache.druid.https.SSLClientConfig; import org.apache.druid.java.util.common.ISE; import org.apache.druid.java.util.common.StringUtils; @@ -391,7 +390,7 @@ public class ITTLSTest HttpClient client = HttpClientInit.createClient( builder.build(), - LifecycleUtils.asMmxLifecycle(lifecycle) + lifecycle ); HttpClient adminClient = new CredentialedHttpClient( @@ -418,7 +417,7 @@ public class ITTLSTest HttpClient client = HttpClientInit.createClient( builder.build(), - LifecycleUtils.asMmxLifecycle(lifecycle) + lifecycle ); HttpClient adminClient = new CredentialedHttpClient( diff --git a/server/src/main/java/org/apache/druid/guice/http/HttpClientModule.java b/server/src/main/java/org/apache/druid/guice/http/HttpClientModule.java index fd173f864b9..ff3742fd27a 100644 --- a/server/src/main/java/org/apache/druid/guice/http/HttpClientModule.java +++ b/server/src/main/java/org/apache/druid/guice/http/HttpClientModule.java @@ -150,7 +150,7 @@ public class HttpClientModule implements Module HttpClient client = HttpClientInit.createClient( builder.build(), - LifecycleUtils.asMmxLifecycle(getLifecycleProvider().get()) + getLifecycleProvider().get() ); if (isEscalated) { diff --git a/server/src/main/java/org/apache/druid/guice/http/LifecycleUtils.java b/server/src/main/java/org/apache/druid/guice/http/LifecycleUtils.java deleted file mode 100644 index c5c3428349c..00000000000 --- a/server/src/main/java/org/apache/druid/guice/http/LifecycleUtils.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -package org.apache.druid.guice.http; - -import com.google.common.base.Throwables; -import org.apache.druid.java.util.common.lifecycle.Lifecycle; - -public class LifecycleUtils -{ - public static Lifecycle asMmxLifecycle(Lifecycle lifecycle) - { - final Lifecycle metamxLifecycle = new Lifecycle("http-client"); - try { - lifecycle.addMaybeStartHandler(new Lifecycle.Handler() - { - @Override - public void start() throws Exception - { - metamxLifecycle.start(); - } - - @Override - public void stop() - { - metamxLifecycle.stop(); - } - }); - } - catch (Exception e) { - throw Throwables.propagate(e); - } - - return metamxLifecycle; - } -} diff --git a/server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java b/server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java index f67613d207e..0454f8d0f28 100644 --- a/server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java +++ b/server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java @@ -440,7 +440,8 @@ public class JettyServerModule extends JerseyServletModule log.warn(e, "Unable to stop Jetty server."); } } - } + }, + Lifecycle.Stage.LAST ); return server; diff --git a/server/src/test/java/org/apache/druid/server/initialization/BaseJettyTest.java b/server/src/test/java/org/apache/druid/server/initialization/BaseJettyTest.java index 75ef8560217..e578d3993ad 100644 --- a/server/src/test/java/org/apache/druid/server/initialization/BaseJettyTest.java +++ b/server/src/test/java/org/apache/druid/server/initialization/BaseJettyTest.java @@ -24,7 +24,6 @@ import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.servlet.GuiceFilter; import org.apache.druid.guice.annotations.Self; -import org.apache.druid.guice.http.LifecycleUtils; import org.apache.druid.java.util.common.lifecycle.Lifecycle; import org.apache.druid.java.util.http.client.HttpClient; import org.apache.druid.java.util.http.client.HttpClientConfig; @@ -119,7 +118,7 @@ public abstract class BaseJettyTest try { this.client = HttpClientInit.createClient( new HttpClientConfig(maxClientConnections, SSLContext.getDefault(), Duration.ZERO), - LifecycleUtils.asMmxLifecycle(druidLifecycle) + druidLifecycle ); } catch (Exception e) { From 94463b5778b007c87b74f467415d61434c8ebc30 Mon Sep 17 00:00:00 2001 From: Jonathan Wei Date: Sat, 9 Mar 2019 15:16:23 -0800 Subject: [PATCH 13/19] Add missing redirects and fix broken links (#7213) * Add missing redirects * Fix zookeeper redirect * Fix broken links --- docs/_bin/make-redirects.py | 1 + docs/_bin/missing-redirect-finder.py | 54 +++++++++++++++++++ docs/_bin/missing-redirect-finder2.py | 49 +++++++++++++++++ docs/_redirects.json | 45 +++++++++++++++- docs/content/configuration/index.md | 4 +- docs/content/design/broker.md | 2 +- docs/content/design/coordinator.md | 2 +- docs/content/design/overlord.md | 2 +- .../extensions-core/bloom-filter.md | 4 +- .../extensions-core/kinesis-ingestion.md | 9 ++-- .../simple-client-sslcontext.md | 4 +- docs/content/ingestion/firehose.md | 4 +- docs/content/ingestion/reports.md | 6 +-- docs/content/operations/tls-support.md | 6 +-- docs/content/querying/aggregations.md | 6 +-- docs/content/querying/sql.md | 8 +-- 16 files changed, 177 insertions(+), 29 deletions(-) create mode 100755 docs/_bin/missing-redirect-finder.py create mode 100755 docs/_bin/missing-redirect-finder2.py diff --git a/docs/_bin/make-redirects.py b/docs/_bin/make-redirects.py index 5a32a0d86a1..5affcb5ed44 100755 --- a/docs/_bin/make-redirects.py +++ b/docs/_bin/make-redirects.py @@ -57,6 +57,7 @@ for redirect in redirects: raise Exception('Redirect target does not exist for source: ' + source) # Write redirect file + os.makedirs(os.path.dirname(source_file), exist_ok=True) with open(source_file, 'w') as f: f.write("---\n") f.write("layout: redirect_page\n") diff --git a/docs/_bin/missing-redirect-finder.py b/docs/_bin/missing-redirect-finder.py new file mode 100755 index 00000000000..732cd804f60 --- /dev/null +++ b/docs/_bin/missing-redirect-finder.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 + +# 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. + +import os +import subprocess +import sys + +deleted_paths_dict = {} + +# assumes docs/latest in the doc repo has the current files for the next release +# deletes docs for old versions and copies docs/latest into the old versions +# run `git status | grep deleted:` on the doc repo to see what pages were deleted and feed that into +# missing-redirect-finder2.py +def main(): + if len(sys.argv) != 2: + sys.stderr.write('usage: program \n') + sys.exit(1) + + druid_docs_path = sys.argv[1] + druid_docs_path = "{}/docs".format(druid_docs_path) + prev_release_doc_paths = os.listdir(druid_docs_path) + for doc_path in prev_release_doc_paths: + if (doc_path != "img" and doc_path != "latest"): + print("DOC PATH: " + doc_path) + + try: + command = "rm -rf {}/{}/*".format(druid_docs_path, doc_path) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + + command = "cp -r {}/latest/* {}/{}/".format(druid_docs_path, druid_docs_path, doc_path) + outstr = subprocess.check_output(command, shell=True).decode('UTF-8') + except: + print("error in path: " + doc_path) + continue + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + print('Interrupted, closing.') diff --git a/docs/_bin/missing-redirect-finder2.py b/docs/_bin/missing-redirect-finder2.py new file mode 100755 index 00000000000..fd383934384 --- /dev/null +++ b/docs/_bin/missing-redirect-finder2.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 + +# 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. + +import json +import sys + +# Takes the output of `git status | grep deleted:` on the doc repo +# and cross references deleted pages with the _redirects.json file +if len(sys.argv) != 3: + sys.stderr.write('usage: program \n') + sys.exit(1) + +del_paths = sys.argv[1] +redirect_json_path = sys.argv[2] + +dep_dict = {} +with open(del_paths, 'r') as del_paths_file: + for line in del_paths_file.readlines(): + subidx = line.index("/", 0) + line2 = line[subidx+1:] + subidx = line2.index("/", 0) + line3 = line2[subidx+1:] + dep_dict[line3.strip("\n")] = True + +existing_redirects = {} +with open(redirect_json_path, 'r') as redirect_json_file: + redirect_json = json.load(redirect_json_file) + for redirect_entry in redirect_json: + redirect_source = redirect_entry["source"] + redirect_source = redirect_source.replace(".html", ".md") + existing_redirects[redirect_source] = True + +for dep in dep_dict: + if dep not in existing_redirects: + print("MISSING REDIRECT: " + dep) diff --git a/docs/_redirects.json b/docs/_redirects.json index 9e53a746875..222c665518a 100644 --- a/docs/_redirects.json +++ b/docs/_redirects.json @@ -122,5 +122,48 @@ {"source": "tutorials/tutorial-loading-batch-data.html", "target": "tutorial-batch.html"}, {"source": "tutorials/tutorial-loading-streaming-data.html", "target": "tutorial-streams.html"}, {"source": "tutorials/tutorial-the-druid-cluster.html", "target": "cluster.html"}, - {"source": "development/extensions-core/caffeine-cache.html", "target":"../../configuration/caching.html"} + {"source": "development/extensions-core/caffeine-cache.html", "target":"../../configuration/caching.html"}, + {"source": "Production-Cluster-Configuration.html", "target": "tutorials/cluster.html"}, + {"source": "development/extensions-contrib/parquet.html", "target":"../../development/extensions-core/parquet.html"}, + {"source": "development/extensions-contrib/scan-query.html", "target":"../../querying/scan-query.html"}, + {"source": "tutorials/ingestion.html", "target": "index.html"}, + {"source": "tutorials/ingestion-streams.html", "target": "index.html"}, + {"source": "ingestion/native-batch.html", "target": "native_tasks.html"}, + {"source": "Compute.html", "target": "design/processes.html"}, + {"source": "Contribute.html", "target": "../../community/index.html"}, + {"source": "Download.html", "target": "../../downloads.html"}, + {"source": "Druid-Personal-Demo-Cluster.html", "target": "tutorials/index.html"}, + {"source": "Home.html", "target": "index.html"}, + {"source": "Loading-Your-Data.html", "target": "ingestion/index.html"}, + {"source": "Master.html", "target": "design/processes.html"}, + {"source": "MySQL.html", "target": "development/extensions-core/mysql.html"}, + {"source": "OrderBy.html", "target": "querying/limitspec.html"}, + {"source": "Querying-your-data.html", "target": "querying/querying.html"}, + {"source": "Spatial-Filters.html", "target": "development/geo.html"}, + {"source": "Spatial-Indexing.html", "target": "development/geo.html"}, + {"source": "Stand-Alone-With-Riak-CS.html", "target": "index.html"}, + {"source": "Support.html", "target": "../../community/index.html"}, + {"source": "Tutorial:-Webstream.html", "target": "tutorials/index.html"}, + {"source": "Twitter-Tutorial.html", "target": "tutorials/index.html"}, + {"source": "Tutorial:-Loading-Your-Data-Part-1.html", "target": "tutorials/index.html"}, + {"source": "Tutorial:-Loading-Your-Data-Part-2.html", "target": "tutorials/index.html"}, + {"source": "Kafka-Eight.html", "target": "development/extensions-core/kafka-eight-firehose.html"}, + {"source": "Thanks.html", "target": "../../community/index.html"}, + {"source": "Tutorial-A-First-Look-at-Druid.html", "target": "tutorials/index.html"}, + {"source": "Tutorial-All-About-Queries.html", "target": "tutorials/index.html"}, + {"source": "Tutorial-Loading-Batch-Data.html", "target": "tutorials/index.html"}, + {"source": "Tutorial-Loading-Streaming-Data.html", "target": "tutorials/index.html"}, + {"source": "Tutorial-The-Druid-Cluster.html", "target": "tutorials/index.html"}, + {"source": "configuration/hadoop.html", "target": "ingestion/hadoop.html"}, + {"source": "configuration/production-cluster.html", "target": "tutorials/cluster.html"}, + {"source": "configuration/zookeeper.html", "target": "dependencies/zookeeper.html"}, + {"source": "querying/optimizations.html", "target": "dependencies/cluster.html"}, + {"source": "development/community-extensions/azure.html", "target": "../extensions-contrib/azure.html"}, + {"source": "development/community-extensions/cassandra.html", "target": "../extensions-contrib/cassandra.html"}, + {"source": "development/community-extensions/cloudfiles.html", "target": "../extensions-contrib/cloudfiles.html"}, + {"source": "development/community-extensions/graphite.html", "target": "../extensions-contrib/graphite.html"}, + {"source": "development/community-extensions/kafka-simple.html", "target": "../extensions-contrib/kafka-simple.html"}, + {"source": "development/community-extensions/rabbitmq.html", "target": "../extensions-contrib/rabbitmq.html"}, + {"source": "development/extensions-core/namespaced-lookup.html", "target": "lookups-cached-global.html"}, + {"source": "operations/insert-segment-to-db.html", "target": "../index.html"} ] diff --git a/docs/content/configuration/index.md b/docs/content/configuration/index.md index e6edcdd386e..14cbbfc4bdd 100644 --- a/docs/content/configuration/index.md +++ b/docs/content/configuration/index.md @@ -243,9 +243,9 @@ and `druid.tlsPort` properties on each process. Please see `Configuration` secti #### Jetty Server TLS Configuration Druid uses Jetty as an embedded web server. To get familiar with TLS/SSL in general and related concepts like Certificates etc. -reading this [Jetty documentation](http://www.eclipse.org/jetty/documentation/9.3.x/configuring-ssl.html) might be helpful. +reading this [Jetty documentation](http://www.eclipse.org/jetty/documentation/9.4.x/configuring-ssl.html) might be helpful. To get more in depth knowledge of TLS/SSL support in Java in general, please refer to this [guide](http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html). -The documentation [here](http://www.eclipse.org/jetty/documentation/9.3.x/configuring-ssl.html#configuring-sslcontextfactory) +The documentation [here](http://www.eclipse.org/jetty/documentation/9.4.x/configuring-ssl.html#configuring-sslcontextfactory) can help in understanding TLS/SSL configurations listed below. This [document](http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html) lists all the possible values for the below mentioned configs among others provided by Java implementation. diff --git a/docs/content/design/broker.md b/docs/content/design/broker.md index fe9119d4b8b..29ea42eb7ce 100644 --- a/docs/content/design/broker.md +++ b/docs/content/design/broker.md @@ -47,7 +47,7 @@ org.apache.druid.cli.Main server broker Most druid queries contain an interval object that indicates a span of time for which data is requested. Likewise, Druid [Segments](../design/segments.html) are partitioned to contain data for some interval of time and segments are distributed across a cluster. Consider a simple datasource with 7 segments where each segment contains data for a given day of the week. Any query issued to the datasource for more than one day of data will hit more than one segment. These segments will likely be distributed across multiple processes, and hence, the query will likely hit multiple processes. -To determine which processes to forward queries to, the Broker process first builds a view of the world from information in Zookeeper. Zookeeper maintains information about [Historical](../design/historical.html) and streaming ingestion [Peon](../design/peon.html) processes and the segments they are serving. For every datasource in Zookeeper, the Broker process builds a timeline of segments and the processes that serve them. When queries are received for a specific datasource and interval, the Broker process performs a lookup into the timeline associated with the query datasource for the query interval and retrieves the processes that contain data for the query. The Broker process then forwards down the query to the selected processes. +To determine which processes to forward queries to, the Broker process first builds a view of the world from information in Zookeeper. Zookeeper maintains information about [Historical](../design/historical.html) and streaming ingestion [Peon](../design/peons.html) processes and the segments they are serving. For every datasource in Zookeeper, the Broker process builds a timeline of segments and the processes that serve them. When queries are received for a specific datasource and interval, the Broker process performs a lookup into the timeline associated with the query datasource for the query interval and retrieves the processes that contain data for the query. The Broker process then forwards down the query to the selected processes. ### Caching diff --git a/docs/content/design/coordinator.md b/docs/content/design/coordinator.md index 9571f3a697b..810f212e604 100644 --- a/docs/content/design/coordinator.md +++ b/docs/content/design/coordinator.md @@ -113,7 +113,7 @@ If it finds such segments, it simply skips them. ### The Coordinator Console -The Druid Coordinator exposes a web GUI for displaying cluster information and rule configuration. For more details, please see [coordinator console](../operations/web-consoles.html#coordinator-console). +The Druid Coordinator exposes a web GUI for displaying cluster information and rule configuration. For more details, please see [coordinator console](../operations/management-uis.html#coordinator-consoles). ### FAQ diff --git a/docs/content/design/overlord.md b/docs/content/design/overlord.md index 40f3c440215..9fb2465f810 100644 --- a/docs/content/design/overlord.md +++ b/docs/content/design/overlord.md @@ -41,7 +41,7 @@ This mode is recommended if you intend to use the indexing service as the single ### Overlord Console -The Overlord provides a UI for managing tasks and workers. For more details, please see [overlord console](../operations/web-consoles.html#overlord-console). +The Overlord provides a UI for managing tasks and workers. For more details, please see [overlord console](../operations/management-uis.html#overlord-console). ### Blacklisted Workers diff --git a/docs/content/development/extensions-core/bloom-filter.md b/docs/content/development/extensions-core/bloom-filter.md index 651cc305962..86c645d469c 100644 --- a/docs/content/development/extensions-core/bloom-filter.md +++ b/docs/content/development/extensions-core/bloom-filter.md @@ -76,7 +76,7 @@ This string can then be used in the native or sql Druid query. |`type` |Filter Type. Should always be `bloom`|yes| |`dimension` |The dimension to filter over. | yes | |`bloomKFilter` |Base64 encoded Binary representation of `org.apache.hive.common.util.BloomKFilter`| yes | -|`extractionFn`|[Extraction function](./../dimensionspecs.html#extraction-functions) to apply to the dimension values |no| +|`extractionFn`|[Extraction function](../../querying/dimensionspecs.html#extraction-functions) to apply to the dimension values |no| ### Serialized Format for BloomKFilter @@ -129,7 +129,7 @@ for the query. |-------------------------|------------------------------|----------------------------------| |`type` |Aggregator Type. Should always be `bloom`|yes| |`name` |Output field name |yes| -|`field` |[DimensionSpec](./../dimensionspecs.html) to add to `org.apache.hive.common.util.BloomKFilter` | yes | +|`field` |[DimensionSpec](../../querying/dimensionspecs.html) to add to `org.apache.hive.common.util.BloomKFilter` | yes | |`maxNumEntries` |Maximum number of distinct values supported by `org.apache.hive.common.util.BloomKFilter`, default `1500`| no | ### Example diff --git a/docs/content/development/extensions-core/kinesis-ingestion.md b/docs/content/development/extensions-core/kinesis-ingestion.md index 47041709c37..38e383020ac 100644 --- a/docs/content/development/extensions-core/kinesis-ingestion.md +++ b/docs/content/development/extensions-core/kinesis-ingestion.md @@ -1,3 +1,8 @@ +--- +layout: doc_page +title: "Kinesis Indexing Service" +--- + ---- -layout: doc_page ---- - # Kinesis Indexing Service Similar to the [Kafka indexing service](./kafka-ingestion.html), the Kinesis indexing service enables the configuration of *supervisors* on the Overlord, which facilitate ingestion from diff --git a/docs/content/development/extensions-core/simple-client-sslcontext.md b/docs/content/development/extensions-core/simple-client-sslcontext.md index 107739eddc6..9c2638f2d85 100644 --- a/docs/content/development/extensions-core/simple-client-sslcontext.md +++ b/docs/content/development/extensions-core/simple-client-sslcontext.md @@ -45,9 +45,9 @@ The following table contains optional parameters for supporting client certifica |`druid.client.https.keyStorePath`|The file path or URL of the TLS/SSL Key store containing the client certificate that Druid will use when communicating with other Druid services. If this is null, the other properties in this table are ignored.|none|yes| |`druid.client.https.keyStoreType`|The type of the key store.|none|yes| |`druid.client.https.certAlias`|Alias of TLS client certificate in the keystore.|none|yes| -|`druid.client.https.keyStorePassword`|The [Password Provider](../operations/password-provider.html) or String password for the Key Store.|none|no| +|`druid.client.https.keyStorePassword`|The [Password Provider](../../operations/password-provider.html) or String password for the Key Store.|none|no| |`druid.client.https.keyManagerFactoryAlgorithm`|Algorithm to use for creating KeyManager, more details [here](https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#KeyManager).|`javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm()`|no| -|`druid.client.https.keyManagerPassword`|The [Password Provider](../operations/password-provider.html) or String password for the Key Manager.|none|no| +|`druid.client.https.keyManagerPassword`|The [Password Provider](../../operations/password-provider.html) or String password for the Key Manager.|none|no| |`druid.client.https.validateHostnames`|Validate the hostname of the server. This should not be disabled unless you are using [custom TLS certificate checks](../../operations/tls-support.html#custom-tls-certificate-checks) and know that standard hostname validation is not needed.|true|no| This [document](http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html) lists all the possible diff --git a/docs/content/ingestion/firehose.md b/docs/content/ingestion/firehose.md index 322a1f29d2c..b451c25c8ca 100644 --- a/docs/content/ingestion/firehose.md +++ b/docs/content/ingestion/firehose.md @@ -112,8 +112,8 @@ A sample ingest firehose spec is shown below - SqlFirehoseFactory can be used to ingest events residing in RDBMS. The database connection information is provided as part of the ingestion spec. For each query, the results are fetched locally and indexed. If there are multiple queries from which data needs to be indexed, queries are prefetched in the background upto `maxFetchCapacityBytes` bytes. Requires one of the following extensions: - * [MySQL Metadata Store](../ingestion/mysql.html). - * [PostgreSQL Metadata Store](../ingestion/postgresql.html). + * [MySQL Metadata Store](../development/extensions-core/mysql.html). + * [PostgreSQL Metadata Store](../development/extensions-core/postgresql.html). ```json { diff --git a/docs/content/ingestion/reports.md b/docs/content/ingestion/reports.md index 869637499ce..922fa77ed2c 100644 --- a/docs/content/ingestion/reports.md +++ b/docs/content/ingestion/reports.md @@ -88,7 +88,7 @@ The `errorMsg` field shows a message describing the error that caused a task to ### Row stats -The non-parallel [Native Batch Task](../native_tasks.md), the Hadoop batch task, and the tasks created by the Kafka Indexing Service support retrieval of row stats while the task is running. +The non-parallel [Native Batch Task](../ingestion/native_tasks.html), the Hadoop batch task, and the tasks created by the Kafka Indexing Service support retrieval of row stats while the task is running. The live report can be accessed with a GET to the following URL on a Peon running a task: @@ -133,7 +133,7 @@ An example report is shown below. The `movingAverages` section contains 1 minute } ``` -Note that this is only supported by the non-parallel [Native Batch Task](../native_tasks.md), the Hadoop Batch task, and the tasks created by the Kafka Indexing Service. +Note that this is only supported by the non-parallel [Native Batch Task](../ingestion/native_tasks.html), the Hadoop Batch task, and the tasks created by the Kafka Indexing Service. For the Kafka Indexing Service, a GET to the following Overlord API will retrieve live row stat reports from each task being managed by the supervisor and provide a combined report. @@ -149,4 +149,4 @@ Current lists of unparseable events can be retrieved from a running task with a http://:/druid/worker/v1/chat//unparseableEvents ``` -Note that this is only supported by the non-parallel [Native Batch Task](../native_tasks.md) and the tasks created by the Kafka Indexing Service. +Note that this is only supported by the non-parallel [Native Batch Task](../ingestion/native_tasks.html) and the tasks created by the Kafka Indexing Service. diff --git a/docs/content/operations/tls-support.md b/docs/content/operations/tls-support.md index 5585e623f41..744f20c14f8 100644 --- a/docs/content/operations/tls-support.md +++ b/docs/content/operations/tls-support.md @@ -37,9 +37,9 @@ and `druid.tlsPort` properties on each process. Please see `Configuration` secti # Jetty Server TLS Configuration Druid uses Jetty as an embedded web server. To get familiar with TLS/SSL in general and related concepts like Certificates etc. -reading this [Jetty documentation](http://www.eclipse.org/jetty/documentation/9.3.x/configuring-ssl.html) might be helpful. +reading this [Jetty documentation](http://www.eclipse.org/jetty/documentation/9.4.x/configuring-ssl.html) might be helpful. To get more in depth knowledge of TLS/SSL support in Java in general, please refer to this [guide](http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html). -The documentation [here](http://www.eclipse.org/jetty/documentation/9.3.x/configuring-ssl.html#configuring-sslcontextfactory) +The documentation [here](http://www.eclipse.org/jetty/documentation/9.4.x/configuring-ssl.html#configuring-sslcontextfactory) can help in understanding TLS/SSL configurations listed below. This [document](http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html) lists all the possible values for the below mentioned configs among others provided by Java implementation. @@ -58,7 +58,7 @@ The following table contains configuration options related to client certificate |`druid.server.https.trustStoreType`|The type of the trust store containing certificates used to validate client certificates. Not needed if `requireClientCertificate` is false.|`java.security.KeyStore.getDefaultType()`|no| |`druid.server.https.trustStorePath`|The file path or URL of the trust store containing certificates used to validate client certificates. Not needed if `requireClientCertificate` is false.|none|yes, only if `requireClientCertificate` is true| |`druid.server.https.trustStoreAlgorithm`|Algorithm to be used by TrustManager to validate client certificate chains. Not needed if `requireClientCertificate` is false.|`javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()`|no| -|`druid.server.https.trustStorePassword`|The [Password Provider](../../operations/password-provider.html) or String password for the Trust Store. Not needed if `requireClientCertificate` is false.|none|no| +|`druid.server.https.trustStorePassword`|The [Password Provider](../operations/password-provider.html) or String password for the Trust Store. Not needed if `requireClientCertificate` is false.|none|no| |`druid.server.https.validateHostnames`|If set to true, check that the client's hostname matches the CN/subjectAltNames in the client certificate. Not used if `requireClientCertificate` is false.|true|no| |`druid.server.https.crlPath`|Specifies a path to a file containing static [Certificate Revocation Lists](https://en.wikipedia.org/wiki/Certificate_revocation_list), used to check if a client certificate has been revoked. Not used if `requireClientCertificate` is false.|null|no| diff --git a/docs/content/querying/aggregations.md b/docs/content/querying/aggregations.md index 886141ac762..eef4c68bfd8 100644 --- a/docs/content/querying/aggregations.md +++ b/docs/content/querying/aggregations.md @@ -280,10 +280,10 @@ The [DataSketches HLL Sketch](../development/extensions-core/datasketches-hll.ht #### Cardinality/HyperUnique (Deprecated)
-The Cardinality and HyperUnique aggregators are deprecated. Please use DataSketches HLL Sketch instead. +The Cardinality and HyperUnique aggregators are deprecated. Please use DataSketches HLL Sketch instead.
-The [Cardinality and HyperUnique](../hll-old.html) aggregators are older aggregator implementations available by default in Druid that also provide distinct count estimates using the HyperLogLog algorithm. The newer [DataSketches HLL Sketch](../development/extensions-core/datasketches-hll.html) extension-provided aggregator has superior accuracy and performance and is recommended instead. +The [Cardinality and HyperUnique](../querying/hll-old.html) aggregators are older aggregator implementations available by default in Druid that also provide distinct count estimates using the HyperLogLog algorithm. The newer [DataSketches HLL Sketch](../development/extensions-core/datasketches-hll.html) extension-provided aggregator has superior accuracy and performance and is recommended instead. The DataSketches team has published a [comparison study](https://datasketches.github.io/docs/HLL/HllSketchVsDruidHyperLogLogCollector.html) between Druid's original HLL algorithm and the DataSketches HLL algorithm. Based on the demonstrated advantages of the DataSketches implementation, we have deprecated Druid's original HLL aggregator. @@ -315,7 +315,7 @@ We do not recommend the fixed buckets histogram for general use, as its usefulne #### Approximate Histogram (Deprecated) -The [Approximate Histogram](../development/extensions-core/approxiate-histograms.html) extension-provided aggregator also provides quantile estimates and histogram approximations, based on [http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf](http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf). +The [Approximate Histogram](../development/extensions-core/approximate-histograms.html) extension-provided aggregator also provides quantile estimates and histogram approximations, based on [http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf](http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf). The algorithm used by this deprecated aggregator is highly distribution-dependent and its output is subject to serious distortions when the input does not fit within the algorithm's limitations. diff --git a/docs/content/querying/sql.md b/docs/content/querying/sql.md index d708850f094..66ecc43071f 100644 --- a/docs/content/querying/sql.md +++ b/docs/content/querying/sql.md @@ -119,10 +119,10 @@ Only the COUNT aggregation can accept DISTINCT. |`MAX(expr)`|Takes the maximum of numbers.| |`AVG(expr)`|Averages numbers.| |`APPROX_COUNT_DISTINCT(expr)`|Counts distinct values of expr, which can be a regular column or a hyperUnique column. This is always approximate, regardless of the value of "useApproximateCountDistinct". See also `COUNT(DISTINCT expr)`.| -|`APPROX_COUNT_DISTINCT_DS_HLL(expr, [lgK, tgtHllType])`|Counts distinct values of expr, which can be a regular column or an [HLL sketch](../development/extensions-core/datasketches-hll.html) column. The `lgK` and `tgtHllType` parameters are described in the HLL sketch documentation. This is always approximate, regardless of the value of "useApproximateCountDistinct". See also `COUNT(DISTINCT expr)`. The [DataSketches extension](../development/extensions-core/datasketches-extensions.html) must be loaded to use this function.| -|`APPROX_COUNT_DISTINCT_DS_THETA(expr, [size])`|Counts distinct values of expr, which can be a regular column or a [Theta sketch](../development/extensions-core/datasketches-theta.html) column. The `size` parameter is described in the Theta sketch documentation. This is always approximate, regardless of the value of "useApproximateCountDistinct". See also `COUNT(DISTINCT expr)`. The [DataSketches extension](../development/extensions-core/datasketches-extensions.html) must be loaded to use this function.| +|`APPROX_COUNT_DISTINCT_DS_HLL(expr, [lgK, tgtHllType])`|Counts distinct values of expr, which can be a regular column or an [HLL sketch](../development/extensions-core/datasketches-hll.html) column. The `lgK` and `tgtHllType` parameters are described in the HLL sketch documentation. This is always approximate, regardless of the value of "useApproximateCountDistinct". See also `COUNT(DISTINCT expr)`. The [DataSketches extension](../development/extensions-core/datasketches-extension.html) must be loaded to use this function.| +|`APPROX_COUNT_DISTINCT_DS_THETA(expr, [size])`|Counts distinct values of expr, which can be a regular column or a [Theta sketch](../development/extensions-core/datasketches-theta.html) column. The `size` parameter is described in the Theta sketch documentation. This is always approximate, regardless of the value of "useApproximateCountDistinct". See also `COUNT(DISTINCT expr)`. The [DataSketches extension](../development/extensions-core/datasketches-extension.html) must be loaded to use this function.| |`APPROX_QUANTILE(expr, probability, [resolution])`|Computes approximate quantiles on numeric or [approxHistogram](../development/extensions-core/approximate-histograms.html#approximate-histogram-aggregator) exprs. The "probability" should be between 0 and 1 (exclusive). The "resolution" is the number of centroids to use for the computation. Higher resolutions will give more precise results but also have higher overhead. If not provided, the default resolution is 50. The [approximate histogram extension](../development/extensions-core/approximate-histograms.html) must be loaded to use this function.| -|`APPROX_QUANTILE_DS(expr, probability, [k])`|Computes approximate quantiles on numeric or [Quantiles sketch](../development/extensions-core/datasketches-quantiles.html) exprs. The "probability" should be between 0 and 1 (exclusive). The `k` parameter is described in the Quantiles sketch documentation. The [DataSketches extension](../development/extensions-core/datasketches-extensions.html) must be loaded to use this function.| +|`APPROX_QUANTILE_DS(expr, probability, [k])`|Computes approximate quantiles on numeric or [Quantiles sketch](../development/extensions-core/datasketches-quantiles.html) exprs. The "probability" should be between 0 and 1 (exclusive). The `k` parameter is described in the Quantiles sketch documentation. The [DataSketches extension](../development/extensions-core/datasketches-extension.html) must be loaded to use this function.| |`APPROX_QUANTILE_FIXED_BUCKETS(expr, probability, numBuckets, lowerLimit, upperLimit, [outlierHandlingMode])`|Computes approximate quantiles on numeric or [fixed buckets histogram](../development/extensions-core/approximate-histograms.html#fixed-buckets-histogram) exprs. The "probability" should be between 0 and 1 (exclusive). The `numBuckets`, `lowerLimit`, `upperLimit`, and `outlierHandlingMode` parameters are described in the fixed buckets histogram documentation. The [approximate histogram extension](../development/extensions-core/approximate-histograms.html) must be loaded to use this function.| |`BLOOM_FILTER(expr, numEntries)`|Computes a bloom filter from values produced by `expr`, with `numEntries` maximum number of distinct values before false positve rate increases. See [bloom filter extension](../development/extensions-core/bloom-filter.html) documentation for additional details.| @@ -668,7 +668,7 @@ check out [ingestion tasks](#../ingestion/tasks.html) |Column|Notes| |------|-----| |task_id|Unique task identifier| -|type|Task type, for example this value is "index" for indexing tasks. See [tasks-overview](../ingestion/tasks.md)| +|type|Task type, for example this value is "index" for indexing tasks. See [tasks-overview](../ingestion/tasks.html)| |datasource|Datasource name being indexed| |created_time|Timestamp in ISO8601 format corresponding to when the ingestion task was created. Note that this value is populated for completed and waiting tasks. For running and pending tasks this value is set to 1970-01-01T00:00:00Z| |queue_insertion_time|Timestamp in ISO8601 format corresponding to when this task was added to the queue on the Overlord| From 8804bd0dc10c4b0d3f63179501c96259b91d798e Mon Sep 17 00:00:00 2001 From: Samarth Jain Date: Mon, 11 Mar 2019 09:52:46 -0700 Subject: [PATCH 14/19] Remove unnecessary check for contains() in LoadRule (#7073) See https://github.com/apache/incubator-druid/issues/7072 --- .../org/apache/druid/server/coordinator/rules/LoadRule.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java b/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java index 1de3479fe30..3b2b642bf03 100644 --- a/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java +++ b/server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java @@ -74,10 +74,7 @@ public abstract class LoadRule implements Rule currentReplicants.putAll(params.getSegmentReplicantLookup().getClusterTiers(segment.getId())); final CoordinatorStats stats = new CoordinatorStats(); - - if (params.getAvailableSegments().contains(segment)) { - assign(params, segment, stats); - } + assign(params, segment, stats); drop(params, segment, stats); From 4290e5ae7a9be0cfff68bddae0501602c5ed1c73 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Mon, 11 Mar 2019 11:33:02 -0700 Subject: [PATCH 15/19] Cache selectors in QueryableIndexColumnSelectorFactory. (#7216) For selectors with internal caches (like SingleScanTimeDimensionSelector, SingleLongInputCachingExpressionColumnValueSelector, etc) we can get a perf boost and memory usage decrease by sharing selectors. --- .../QueryableIndexColumnSelectorFactory.java | 87 ++++++++++++------- 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/processing/src/main/java/org/apache/druid/segment/QueryableIndexColumnSelectorFactory.java b/processing/src/main/java/org/apache/druid/segment/QueryableIndexColumnSelectorFactory.java index c0b5ee52f4d..ec5ee1d06d8 100644 --- a/processing/src/main/java/org/apache/druid/segment/QueryableIndexColumnSelectorFactory.java +++ b/processing/src/main/java/org/apache/druid/segment/QueryableIndexColumnSelectorFactory.java @@ -30,6 +30,7 @@ import org.apache.druid.segment.column.ValueType; import org.apache.druid.segment.data.ReadableOffset; import javax.annotation.Nullable; +import java.util.HashMap; import java.util.Map; /** @@ -45,8 +46,14 @@ class QueryableIndexColumnSelectorFactory implements ColumnSelectorFactory private final Closer closer; protected final ReadableOffset offset; + // Share Column objects, since they cache decompressed buffers internally, and we can avoid recomputation if the + // same column is used by more than one part of a query. private final Map columnCache; + // Share selectors too, for the same reason that we cache columns (they may cache things internally). + private final Map dimensionSelectorCache; + private final Map valueSelectorCache; + QueryableIndexColumnSelectorFactory( QueryableIndex index, VirtualColumns virtualColumns, @@ -62,16 +69,23 @@ class QueryableIndexColumnSelectorFactory implements ColumnSelectorFactory this.closer = closer; this.offset = offset; this.columnCache = columnCache; + this.dimensionSelectorCache = new HashMap<>(); + this.valueSelectorCache = new HashMap<>(); } @Override public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec) { - if (virtualColumns.exists(dimensionSpec.getDimension())) { - return virtualColumns.makeDimensionSelector(dimensionSpec, this); - } + return dimensionSelectorCache.computeIfAbsent( + dimensionSpec, + spec -> { + if (virtualColumns.exists(spec.getDimension())) { + return virtualColumns.makeDimensionSelector(spec, this); + } - return dimensionSpec.decorate(makeDimensionSelectorUndecorated(dimensionSpec)); + return spec.decorate(makeDimensionSelectorUndecorated(spec)); + } + ); } private DimensionSelector makeDimensionSelectorUndecorated(DimensionSpec dimensionSpec) @@ -93,20 +107,10 @@ class QueryableIndexColumnSelectorFactory implements ColumnSelectorFactory return type.makeNumericWrappingDimensionSelector(makeColumnValueSelector(dimension), extractionFn); } - BaseColumn column = columnCache.computeIfAbsent(dimension, d -> { - BaseColumn col = columnHolder.getColumn(); - if (col instanceof DictionaryEncodedColumn) { - return closer.register(col); - } else { - // Return null from the lambda in computeIfAbsent() results in no recorded value in the columnCache and - // the column variable is set to null. - return null; - } - }); + final DictionaryEncodedColumn column = getCachedColumn(dimension, DictionaryEncodedColumn.class); - if (column instanceof DictionaryEncodedColumn) { - //noinspection unchecked - return ((DictionaryEncodedColumn) column).makeDimensionSelector(offset, extractionFn); + if (column != null) { + return column.makeDimensionSelector(offset, extractionFn); } else { return DimensionSelector.constant(null, extractionFn); } @@ -115,24 +119,41 @@ class QueryableIndexColumnSelectorFactory implements ColumnSelectorFactory @Override public ColumnValueSelector makeColumnValueSelector(String columnName) { - if (virtualColumns.exists(columnName)) { - return virtualColumns.makeColumnValueSelector(columnName, this); - } + return valueSelectorCache.computeIfAbsent( + columnName, + name -> { + if (virtualColumns.exists(columnName)) { + return virtualColumns.makeColumnValueSelector(columnName, this); + } - BaseColumn column = columnCache.computeIfAbsent(columnName, name -> { - ColumnHolder holder = index.getColumnHolder(name); - if (holder != null) { - return closer.register(holder.getColumn()); - } else { - return null; - } - }); + BaseColumn column = getCachedColumn(columnName, BaseColumn.class); - if (column != null) { - return column.makeColumnValueSelector(offset); - } else { - return NilColumnValueSelector.instance(); - } + if (column != null) { + return column.makeColumnValueSelector(offset); + } else { + return NilColumnValueSelector.instance(); + } + } + ); + } + + @Nullable + @SuppressWarnings("unchecked") + private T getCachedColumn(final String columnName, final Class clazz) + { + return (T) columnCache.computeIfAbsent( + columnName, + name -> { + ColumnHolder holder = index.getColumnHolder(name); + if (holder != null && clazz.isAssignableFrom(holder.getColumn().getClass())) { + return closer.register(holder.getColumn()); + } else { + // Return null from the lambda in computeIfAbsent() results in no recorded value in the columnCache and + // the column variable is set to null. + return null; + } + } + ); } @Override From e1d8c17746497a46c864f352823cd86b2216781c Mon Sep 17 00:00:00 2001 From: Jonathan Wei Date: Mon, 11 Mar 2019 11:36:07 -0700 Subject: [PATCH 16/19] Add commit ID milestone helper script (#7100) * Add commit ID milestone helper script * Filter on merged/closed in API call --- docs/_bin/get-milestone-prs.py | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 docs/_bin/get-milestone-prs.py diff --git a/docs/_bin/get-milestone-prs.py b/docs/_bin/get-milestone-prs.py new file mode 100755 index 00000000000..0948c0238c0 --- /dev/null +++ b/docs/_bin/get-milestone-prs.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 + +# 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. + +import os +import re +import requests +import subprocess +import sys +import time + +if len(sys.argv) != 5: + sys.stderr.write('usage: program \n') + sys.stderr.write(" e.g., program myusername upstream 0.13.0-incubating 0.14.0-incubating") + sys.stderr.write(" It is also necessary to set a GIT_TOKEN environment variable containing a personal access token.") + sys.exit(1) + +github_username = sys.argv[1] +upstream_remote = sys.argv[2] +previous_branch = sys.argv[3] +release_branch = sys.argv[4] +master_branch = "master" + +upstream_master = "{}/{}".format(upstream_remote, master_branch) +upstream_previous = "{}/{}".format(upstream_remote, previous_branch) +upstream_release = "{}/{}".format(upstream_remote, release_branch) + +command = "git log {}..{} --oneline | tail -1".format(upstream_master, upstream_previous) + +# Find the commit where the previous release branch was cut from master +previous_branch_first_commit = subprocess.check_output(command, shell=True).decode('UTF-8') +match_result = re.match("(\w+) .*", previous_branch_first_commit) +previous_branch_first_commit = match_result.group(1) + +print("Previous branch: {}, first commit: {}".format(upstream_previous, previous_branch_first_commit)) + +# Find all commits between that commit and the current release branch +command = "git rev-list {}..{}".format(previous_branch_first_commit, upstream_release) +all_release_commits = subprocess.check_output(command, shell=True).decode('UTF-8') + +for commit_id in all_release_commits.splitlines(): + try: + # wait 3 seconds between calls to avoid hitting the rate limit + time.sleep(3) + + search_url = "https://api.github.com/search/issues?q=type:pr+is:merged+is:closed+repo:apache/incubator-druid+SHA:{}" + resp = requests.get(search_url.format(commit_id), auth=(github_username, os.environ["GIT_TOKEN"])) + resp_json = resp.json() + + milestone_found = False + closed_pr_nums = [] + if (resp_json.get("items") is None): + print("Could not get PRs for commit ID {}, resp: {}".format(commit_id, resp_json)) + continue + + for pr in resp_json["items"]: + closed_pr_nums.append(pr["number"]) + milestone = pr["milestone"] + if milestone is not None: + milestone_found = True + print("COMMIT: {}, PR#: {}, MILESTONE: {}".format(commit_id, pr["number"], pr["milestone"]["url"])) + if not milestone_found: + print("NO MILESTONE FOUND FOR COMMIT: {}, CLOSED PRs: {}".format(commit_id, closed_pr_nums)) + + except Exception as e: + print("Got exception for commitID: {} ex: {}".format(commit_id, e)) + continue From d7ba19d477732578fc310831ed28365b36332752 Mon Sep 17 00:00:00 2001 From: Clint Wylie Date: Mon, 11 Mar 2019 11:37:58 -0700 Subject: [PATCH 17/19] sql, filters, and virtual columns (#6902) * refactor sql planning to re-use expression virtual columns when possible when constructing a DruidQuery, allowing virtual columns to be defined in filter expressions, and making resulting native druid queries more concise. also minor refactor of built-in sql aggregators to maximize code re-use * fix it * fix it in the right place * fixup for base64 stuff * fixup tests * fix merge conflict on import order * fixup * fix imports * fix tests * review comments * refactor * re-arrange * better javadoc * fixup merge * fixup tests * fix accidental changes --- .../hll/sql/HllSketchSqlAggregator.java | 13 +- .../sql/DoublesSketchSqlAggregator.java | 13 +- .../theta/sql/ThetaSketchSqlAggregator.java | 13 +- .../hll/sql/HllSketchSqlAggregatorTest.java | 14 +- .../sql/DoublesSketchSqlAggregatorTest.java | 4 +- .../sql/ThetaSketchSqlAggregatorTest.java | 14 +- .../bloom/sql/BloomFilterSqlAggregator.java | 12 +- .../sql/BloomFilterOperatorConversion.java | 24 +- .../sql/BloomFilterSqlAggregatorTest.java | 12 +- .../filter/sql/BloomDimFilterSqlTest.java | 50 +- ...BucketsHistogramQuantileSqlAggregator.java | 13 +- .../histogram/sql/QuantileSqlAggregator.java | 11 +- ...etsHistogramQuantileSqlAggregatorTest.java | 4 +- .../sql/QuantileSqlAggregatorTest.java | 4 +- .../sql/calcite/aggregation/Aggregation.java | 28 +- .../aggregation/DimensionExpression.java | 23 +- .../calcite/aggregation/SqlAggregator.java | 9 +- .../ApproxCountDistinctSqlAggregator.java | 18 +- .../aggregation/builtin/AvgSqlAggregator.java | 55 +- .../builtin/CountSqlAggregator.java | 19 +- .../aggregation/builtin/MaxSqlAggregator.java | 54 +- .../aggregation/builtin/MinSqlAggregator.java | 54 +- .../builtin/SimpleSqlAggregator.java | 96 +++ .../aggregation/builtin/SumSqlAggregator.java | 54 +- .../sql/calcite/expression/Expressions.java | 142 ++-- .../expression/SqlOperatorConversion.java | 9 +- .../builtin/LikeOperatorConversion.java | 39 +- .../filtration/ConvertBoundsToSelectors.java | 16 +- .../sql/calcite/filtration/Filtration.java | 14 +- .../druid/sql/calcite/rel/DruidQuery.java | 225 ++--- .../sql/calcite/rel/DruidQuerySignature.java | 148 ++++ .../druid/sql/calcite/rule/GroupByRules.java | 19 +- .../sql/calcite/BaseCalciteQueryTest.java | 16 +- .../druid/sql/calcite/CalciteQueryTest.java | 770 +++++++++--------- .../calcite/filtration/FiltrationTest.java | 5 +- 35 files changed, 1110 insertions(+), 904 deletions(-) create mode 100644 sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SimpleSqlAggregator.java create mode 100644 sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuerySignature.java diff --git a/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregator.java b/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregator.java index 13147ffdddf..93760ffd3e4 100644 --- a/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregator.java +++ b/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregator.java @@ -42,13 +42,13 @@ import org.apache.druid.query.dimension.DefaultDimensionSpec; import org.apache.druid.query.dimension.DimensionSpec; import org.apache.druid.segment.VirtualColumn; import org.apache.druid.segment.column.ValueType; -import org.apache.druid.segment.virtual.ExpressionVirtualColumn; import org.apache.druid.sql.calcite.aggregation.Aggregation; import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.Calcites; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -71,7 +71,7 @@ public class HllSketchSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexBuilder rexBuilder, String name, AggregateCall aggregateCall, @@ -80,6 +80,7 @@ public class HllSketchSqlAggregator implements SqlAggregator boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); // Don't use Aggregations.getArgumentsForSimpleAggregator, since it won't let us use direct column access // for string columns. final RexNode columnRexNode = Expressions.fromFieldAccess( @@ -147,10 +148,10 @@ public class HllSketchSqlAggregator implements SqlAggregator if (columnArg.isDirectColumnAccess()) { dimensionSpec = columnArg.getSimpleExtraction().toDimensionSpec(null, inputType); } else { - final ExpressionVirtualColumn virtualColumn = columnArg.toVirtualColumn( - Calcites.makePrefixedName(name, "v"), - inputType, - plannerContext.getExprMacroTable() + VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + columnArg, + sqlTypeName ); dimensionSpec = new DefaultDimensionSpec(virtualColumn.getOutputName(), null, inputType); virtualColumns.add(virtualColumn); diff --git a/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregator.java b/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregator.java index 0a0a05ba272..96e4c8190aa 100644 --- a/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregator.java +++ b/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregator.java @@ -38,13 +38,13 @@ import org.apache.druid.query.aggregation.datasketches.quantiles.DoublesSketchAg import org.apache.druid.query.aggregation.datasketches.quantiles.DoublesSketchToQuantilePostAggregator; import org.apache.druid.query.aggregation.post.FieldAccessPostAggregator; import org.apache.druid.segment.VirtualColumn; -import org.apache.druid.segment.column.ValueType; import org.apache.druid.segment.virtual.ExpressionVirtualColumn; import org.apache.druid.sql.calcite.aggregation.Aggregation; import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -66,7 +66,7 @@ public class DoublesSketchSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( final PlannerContext plannerContext, - final RowSignature rowSignature, + final DruidQuerySignature querySignature, final RexBuilder rexBuilder, final String name, final AggregateCall aggregateCall, @@ -75,6 +75,7 @@ public class DoublesSketchSqlAggregator implements SqlAggregator final boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); final DruidExpression input = Expressions.toDruidExpression( plannerContext, rowSignature, @@ -178,10 +179,10 @@ public class DoublesSketchSqlAggregator implements SqlAggregator k ); } else { - final ExpressionVirtualColumn virtualColumn = input.toVirtualColumn( - StringUtils.format("%s:v", name), - ValueType.FLOAT, - plannerContext.getExprMacroTable() + VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + input, + SqlTypeName.FLOAT ); virtualColumns.add(virtualColumn); aggregatorFactory = new DoublesSketchAggregatorFactory( diff --git a/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregator.java b/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregator.java index f202c1a9533..339f169c4d9 100644 --- a/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregator.java +++ b/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregator.java @@ -41,13 +41,13 @@ import org.apache.druid.query.dimension.DefaultDimensionSpec; import org.apache.druid.query.dimension.DimensionSpec; import org.apache.druid.segment.VirtualColumn; import org.apache.druid.segment.column.ValueType; -import org.apache.druid.segment.virtual.ExpressionVirtualColumn; import org.apache.druid.sql.calcite.aggregation.Aggregation; import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.Calcites; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -70,7 +70,7 @@ public class ThetaSketchSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexBuilder rexBuilder, String name, AggregateCall aggregateCall, @@ -79,6 +79,7 @@ public class ThetaSketchSqlAggregator implements SqlAggregator boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); // Don't use Aggregations.getArgumentsForSimpleAggregator, since it won't let us use direct column access // for string columns. final RexNode columnRexNode = Expressions.fromFieldAccess( @@ -135,10 +136,10 @@ public class ThetaSketchSqlAggregator implements SqlAggregator if (columnArg.isDirectColumnAccess()) { dimensionSpec = columnArg.getSimpleExtraction().toDimensionSpec(null, inputType); } else { - final ExpressionVirtualColumn virtualColumn = columnArg.toVirtualColumn( - Calcites.makePrefixedName(name, "v"), - inputType, - plannerContext.getExprMacroTable() + VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + columnArg, + sqlTypeName ); dimensionSpec = new DefaultDimensionSpec(virtualColumn.getOutputName(), null, inputType); virtualColumns.add(virtualColumn); diff --git a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregatorTest.java b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregatorTest.java index da70643ae40..70cccbad626 100644 --- a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregatorTest.java +++ b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchSqlAggregatorTest.java @@ -246,13 +246,13 @@ public class HllSketchSqlAggregatorTest extends CalciteTestBase .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a3:v", + "v0", "substring(\"dim2\", 0, 1)", ValueType.STRING, TestExprMacroTable.INSTANCE ), new ExpressionVirtualColumn( - "a4:v", + "v1", "concat(substring(\"dim2\", 0, 1),'x')", ValueType.STRING, TestExprMacroTable.INSTANCE @@ -278,13 +278,13 @@ public class HllSketchSqlAggregatorTest extends CalciteTestBase ), new HllSketchBuildAggregatorFactory( "a3", - "a3:v", + "v0", null, null ), new HllSketchBuildAggregatorFactory( "a4", - "a4:v", + "v1", null, null ), @@ -330,7 +330,7 @@ public class HllSketchSqlAggregatorTest extends CalciteTestBase .setGranularity(Granularities.ALL) .setVirtualColumns( new ExpressionVirtualColumn( - "d0:v", + "v0", "timestamp_floor(\"__time\",'P1D',null,'UTC')", ValueType.LONG, TestExprMacroTable.INSTANCE @@ -339,8 +339,8 @@ public class HllSketchSqlAggregatorTest extends CalciteTestBase .setDimensions( Collections.singletonList( new DefaultDimensionSpec( - "d0:v", - "d0", + "v0", + "v0", ValueType.LONG ) ) diff --git a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregatorTest.java b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregatorTest.java index 2b4e5e0f723..e51c2deb9b8 100644 --- a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregatorTest.java +++ b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchSqlAggregatorTest.java @@ -228,7 +228,7 @@ public class DoublesSketchSqlAggregatorTest extends CalciteTestBase .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a4:v", + "v0", "(\"m1\" * 2)", ValueType.FLOAT, TestExprMacroTable.INSTANCE @@ -238,7 +238,7 @@ public class DoublesSketchSqlAggregatorTest extends CalciteTestBase new DoublesSketchAggregatorFactory("a0:agg", "m1", null), new DoublesSketchAggregatorFactory("a1:agg", "m1", 64), new DoublesSketchAggregatorFactory("a2:agg", "m1", 256), - new DoublesSketchAggregatorFactory("a4:agg", "a4:v", null), + new DoublesSketchAggregatorFactory("a4:agg", "v0", null), new FilteredAggregatorFactory( new DoublesSketchAggregatorFactory("a5:agg", "m1", null), new SelectorDimFilter("dim1", "abc", null) diff --git a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregatorTest.java b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregatorTest.java index 939e396950a..af418f3e3a7 100644 --- a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregatorTest.java +++ b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSqlAggregatorTest.java @@ -246,13 +246,13 @@ public class ThetaSketchSqlAggregatorTest extends CalciteTestBase .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a3:v", + "v0", "substring(\"dim2\", 0, 1)", ValueType.STRING, TestExprMacroTable.INSTANCE ), new ExpressionVirtualColumn( - "a4:v", + "v1", "concat(substring(\"dim2\", 0, 1),'x')", ValueType.STRING, TestExprMacroTable.INSTANCE @@ -282,7 +282,7 @@ public class ThetaSketchSqlAggregatorTest extends CalciteTestBase ), new SketchMergeAggregatorFactory( "a3", - "a3:v", + "v0", null, null, null, @@ -290,7 +290,7 @@ public class ThetaSketchSqlAggregatorTest extends CalciteTestBase ), new SketchMergeAggregatorFactory( "a4", - "a4:v", + "v1", null, null, null, @@ -337,7 +337,7 @@ public class ThetaSketchSqlAggregatorTest extends CalciteTestBase .setGranularity(Granularities.ALL) .setVirtualColumns( new ExpressionVirtualColumn( - "d0:v", + "v0", "timestamp_floor(\"__time\",'P1D',null,'UTC')", ValueType.LONG, TestExprMacroTable.INSTANCE @@ -346,8 +346,8 @@ public class ThetaSketchSqlAggregatorTest extends CalciteTestBase .setDimensions( Collections.singletonList( new DefaultDimensionSpec( - "d0:v", - "d0", + "v0", + "v0", ValueType.LONG ) ) diff --git a/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregator.java b/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregator.java index 0a37dad945f..48415d6abeb 100644 --- a/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregator.java +++ b/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregator.java @@ -46,6 +46,7 @@ import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.Calcites; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -67,7 +68,7 @@ public class BloomFilterSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexBuilder rexBuilder, String name, AggregateCall aggregateCall, @@ -76,6 +77,7 @@ public class BloomFilterSqlAggregator implements SqlAggregator boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); final RexNode inputOperand = Expressions.fromFieldAccess( rowSignature, project, @@ -166,10 +168,10 @@ public class BloomFilterSqlAggregator implements SqlAggregator input.getSimpleExtraction().getExtractionFn() ); } else { - final ExpressionVirtualColumn virtualColumn = input.toVirtualColumn( - StringUtils.format("%s:v", aggName), - valueType, - plannerContext.getExprMacroTable() + VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + input, + inputOperand.getType().getSqlTypeName() ); virtualColumns.add(virtualColumn); spec = new DefaultDimensionSpec(virtualColumn.getOutputName(), virtualColumn.getOutputName()); diff --git a/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/sql/BloomFilterOperatorConversion.java b/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/sql/BloomFilterOperatorConversion.java index 794d0d8b4dd..a27ec4fe96a 100644 --- a/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/sql/BloomFilterOperatorConversion.java +++ b/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/sql/BloomFilterOperatorConversion.java @@ -33,12 +33,13 @@ import org.apache.druid.query.filter.BloomDimFilter; import org.apache.druid.query.filter.BloomKFilter; import org.apache.druid.query.filter.BloomKFilterHolder; import org.apache.druid.query.filter.DimFilter; +import org.apache.druid.segment.VirtualColumn; import org.apache.druid.sql.calcite.expression.DirectOperatorConversion; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.expression.OperatorConversions; import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import javax.annotation.Nullable; import java.io.IOException; @@ -67,17 +68,17 @@ public class BloomFilterOperatorConversion extends DirectOperatorConversion @Override public DimFilter toDruidFilter( final PlannerContext plannerContext, - final RowSignature rowSignature, + final DruidQuerySignature querySignature, final RexNode rexNode ) { final List operands = ((RexCall) rexNode).getOperands(); final DruidExpression druidExpression = Expressions.toDruidExpression( plannerContext, - rowSignature, + querySignature.getRowSignature(), operands.get(0) ); - if (druidExpression == null || !druidExpression.isSimpleExtraction()) { + if (druidExpression == null) { return null; } @@ -100,8 +101,19 @@ public class BloomFilterOperatorConversion extends DirectOperatorConversion druidExpression.getSimpleExtraction().getExtractionFn() ); } else { - // expression virtual columns not currently supported - return null; + VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + druidExpression, + operands.get(0).getType().getSqlTypeName() + ); + if (virtualColumn == null) { + return null; + } + return new BloomDimFilter( + virtualColumn.getOutputName(), + holder, + null + ); } } } diff --git a/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregatorTest.java b/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregatorTest.java index 6b218bbcb44..ceb8c42a83c 100644 --- a/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregatorTest.java +++ b/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/aggregation/bloom/sql/BloomFilterSqlAggregatorTest.java @@ -493,7 +493,7 @@ public class BloomFilterSqlAggregatorTest .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a0:agg:v", + "v0", "(\"l1\" * 2)", ValueType.LONG, TestExprMacroTable.INSTANCE @@ -503,7 +503,7 @@ public class BloomFilterSqlAggregatorTest ImmutableList.of( new BloomFilterAggregatorFactory( "a0:agg", - new DefaultDimensionSpec("a0:agg:v", "a0:agg:v"), + new DefaultDimensionSpec("v0", "v0"), TEST_NUM_ENTRIES ) ) @@ -556,7 +556,7 @@ public class BloomFilterSqlAggregatorTest .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a0:agg:v", + "v0", "(\"f1\" * 2)", ValueType.FLOAT, TestExprMacroTable.INSTANCE @@ -566,7 +566,7 @@ public class BloomFilterSqlAggregatorTest ImmutableList.of( new BloomFilterAggregatorFactory( "a0:agg", - new DefaultDimensionSpec("a0:agg:v", "a0:agg:v"), + new DefaultDimensionSpec("v0", "v0"), TEST_NUM_ENTRIES ) ) @@ -619,7 +619,7 @@ public class BloomFilterSqlAggregatorTest .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a0:agg:v", + "v0", "(\"d1\" * 2)", ValueType.DOUBLE, TestExprMacroTable.INSTANCE @@ -629,7 +629,7 @@ public class BloomFilterSqlAggregatorTest ImmutableList.of( new BloomFilterAggregatorFactory( "a0:agg", - new DefaultDimensionSpec("a0:agg:v", "a0:agg:v"), + new DefaultDimensionSpec("v0", "v0"), TEST_NUM_ENTRIES ) ) diff --git a/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/sql/BloomDimFilterSqlTest.java b/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/sql/BloomDimFilterSqlTest.java index 335599adf63..c8243dc29ab 100644 --- a/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/sql/BloomDimFilterSqlTest.java +++ b/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/sql/BloomDimFilterSqlTest.java @@ -46,6 +46,7 @@ import org.apache.druid.query.filter.ExpressionDimFilter; import org.apache.druid.query.filter.OrDimFilter; import org.apache.druid.query.lookup.LookupReferencesManager; import org.apache.druid.segment.TestHelper; +import org.apache.druid.segment.column.ValueType; import org.apache.druid.server.security.AuthenticationResult; import org.apache.druid.sql.calcite.BaseCalciteQueryTest; import org.apache.druid.sql.calcite.filtration.Filtration; @@ -130,7 +131,7 @@ public class BloomDimFilterSqlTest extends BaseCalciteQueryTest } @Test - public void testBloomFilterVirtualColumn() throws Exception + public void testBloomFilterExprFilter() throws Exception { BloomKFilter filter = new BloomKFilter(1500); filter.addString("a-foo"); @@ -141,17 +142,17 @@ public class BloomDimFilterSqlTest extends BaseCalciteQueryTest byte[] bytes = BloomFilterSerializersModule.bloomKFilterToBytes(filter); String base64 = StringUtils.encodeBase64String(bytes); + // fool the planner to make an expression virtual column to test bloom filter Druid expression testQuery( - StringUtils.format("SELECT COUNT(*) FROM druid.foo WHERE bloom_filter_test(concat(dim2, '-foo'), '%s')", base64), + StringUtils.format("SELECT COUNT(*) FROM druid.foo WHERE bloom_filter_test(concat(dim2, '-foo'), '%s') = TRUE", base64), ImmutableList.of( Druids.newTimeseriesQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) - .virtualColumns() .filters( new ExpressionDimFilter( - StringUtils.format("bloom_filter_test(concat(\"dim2\",'-foo'),'%s')", base64), + StringUtils.format("(bloom_filter_test(concat(\"dim2\",'-foo'),'%s') == 1)", base64), createExprMacroTable() ) ) @@ -165,11 +166,41 @@ public class BloomDimFilterSqlTest extends BaseCalciteQueryTest ); } + @Test + public void testBloomFilterVirtualColumn() throws Exception + { + BloomKFilter filter = new BloomKFilter(1500); + filter.addString("def-foo"); + byte[] bytes = BloomFilterSerializersModule.bloomKFilterToBytes(filter); + String base64 = StringUtils.encodeBase64String(bytes); + + testQuery( + StringUtils.format("SELECT COUNT(*) FROM druid.foo WHERE bloom_filter_test(concat(dim1, '-foo'), '%s')", base64), + ImmutableList.of( + Druids.newTimeseriesQueryBuilder() + .dataSource(CalciteTests.DATASOURCE1) + .intervals(querySegmentSpec(Filtration.eternity())) + .granularity(Granularities.ALL) + .virtualColumns(expressionVirtualColumn("v0", "concat(\"dim1\",'-foo')", ValueType.STRING)) + .filters( + new BloomDimFilter("v0", BloomKFilterHolder.fromBloomKFilter(filter), null) + ) + .aggregators(aggregators(new CountAggregatorFactory("a0"))) + .context(TIMESERIES_CONTEXT_DEFAULT) + .build() + ), + ImmutableList.of( + new Object[]{1L} + ) + ); + } + + @Test public void testBloomFilterVirtualColumnNumber() throws Exception { BloomKFilter filter = new BloomKFilter(1500); - filter.addDouble(20.2); + filter.addFloat(20.2f); byte[] bytes = BloomFilterSerializersModule.bloomKFilterToBytes(filter); String base64 = StringUtils.encodeBase64String(bytes); @@ -180,12 +211,11 @@ public class BloomDimFilterSqlTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) - .virtualColumns() + .virtualColumns( + expressionVirtualColumn("v0", "(2 * CAST(\"dim1\", 'DOUBLE'))", ValueType.FLOAT) + ) .filters( - new ExpressionDimFilter( - StringUtils.format("bloom_filter_test((2 * CAST(\"dim1\", 'DOUBLE')),'%s')", base64), - createExprMacroTable() - ) + new BloomDimFilter("v0", BloomKFilterHolder.fromBloomKFilter(filter), null) ) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .context(TIMESERIES_CONTEXT_DEFAULT) diff --git a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregator.java b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregator.java index 3a28edaeb9e..4c9208265f0 100644 --- a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregator.java +++ b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregator.java @@ -38,13 +38,13 @@ import org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram; import org.apache.druid.query.aggregation.histogram.FixedBucketsHistogramAggregatorFactory; import org.apache.druid.query.aggregation.histogram.QuantilePostAggregator; import org.apache.druid.segment.VirtualColumn; -import org.apache.druid.segment.column.ValueType; import org.apache.druid.segment.virtual.ExpressionVirtualColumn; import org.apache.druid.sql.calcite.aggregation.Aggregation; import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -66,7 +66,7 @@ public class FixedBucketsHistogramQuantileSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexBuilder rexBuilder, String name, AggregateCall aggregateCall, @@ -75,6 +75,7 @@ public class FixedBucketsHistogramQuantileSqlAggregator implements SqlAggregator boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); final DruidExpression input = Expressions.toDruidExpression( plannerContext, rowSignature, @@ -233,10 +234,10 @@ public class FixedBucketsHistogramQuantileSqlAggregator implements SqlAggregator outlierHandlingMode ); } else { - final ExpressionVirtualColumn virtualColumn = input.toVirtualColumn( - StringUtils.format("%s:v", name), - ValueType.FLOAT, - plannerContext.getExprMacroTable() + VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + input, + SqlTypeName.FLOAT ); virtualColumns.add(virtualColumn); aggregatorFactory = new FixedBucketsHistogramAggregatorFactory( diff --git a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregator.java b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregator.java index 26ec44d4b26..c00ad497a63 100644 --- a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregator.java +++ b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregator.java @@ -46,6 +46,7 @@ import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -67,7 +68,7 @@ public class QuantileSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( final PlannerContext plannerContext, - final RowSignature rowSignature, + DruidQuerySignature querySignature, final RexBuilder rexBuilder, final String name, final AggregateCall aggregateCall, @@ -76,6 +77,7 @@ public class QuantileSqlAggregator implements SqlAggregator final boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); final DruidExpression input = Expressions.toDruidExpression( plannerContext, rowSignature, @@ -193,11 +195,8 @@ public class QuantileSqlAggregator implements SqlAggregator ); } } else { - final ExpressionVirtualColumn virtualColumn = input.toVirtualColumn( - StringUtils.format("%s:v", name), - ValueType.FLOAT, - plannerContext.getExprMacroTable() - ); + final VirtualColumn virtualColumn = + querySignature.getOrCreateVirtualColumnForExpression(plannerContext, input, SqlTypeName.FLOAT); virtualColumns.add(virtualColumn); aggregatorFactory = new ApproximateHistogramAggregatorFactory( histogramName, diff --git a/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregatorTest.java b/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregatorTest.java index 2bac9e01a6f..c8f6b3ebafe 100644 --- a/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregatorTest.java +++ b/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregatorTest.java @@ -231,7 +231,7 @@ public class FixedBucketsHistogramQuantileSqlAggregatorTest extends CalciteTestB .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a4:v", + "v0", "(\"m1\" * 2)", ValueType.FLOAT, TestExprMacroTable.INSTANCE @@ -242,7 +242,7 @@ public class FixedBucketsHistogramQuantileSqlAggregatorTest extends CalciteTestB "a0:agg", "m1", 20, 0.0d, 10.0d, FixedBucketsHistogram.OutlierHandlingMode.IGNORE ), new FixedBucketsHistogramAggregatorFactory( - "a4:agg", "a4:v", 40, 0.0d, 20.0d, FixedBucketsHistogram.OutlierHandlingMode.IGNORE + "a4:agg", "v0", 40, 0.0d, 20.0d, FixedBucketsHistogram.OutlierHandlingMode.IGNORE ), new FilteredAggregatorFactory( new FixedBucketsHistogramAggregatorFactory( diff --git a/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregatorTest.java b/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregatorTest.java index ee354e5baab..7ba5a5c533f 100644 --- a/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregatorTest.java +++ b/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/sql/QuantileSqlAggregatorTest.java @@ -232,7 +232,7 @@ public class QuantileSqlAggregatorTest extends CalciteTestBase .granularity(Granularities.ALL) .virtualColumns( new ExpressionVirtualColumn( - "a4:v", + "v0", "(\"m1\" * 2)", ValueType.FLOAT, TestExprMacroTable.INSTANCE @@ -241,7 +241,7 @@ public class QuantileSqlAggregatorTest extends CalciteTestBase .aggregators(ImmutableList.of( new ApproximateHistogramAggregatorFactory("a0:agg", "m1", null, null, null, null), new ApproximateHistogramAggregatorFactory("a2:agg", "m1", 200, null, null, null), - new ApproximateHistogramAggregatorFactory("a4:agg", "a4:v", null, null, null, null), + new ApproximateHistogramAggregatorFactory("a4:agg", "v0", null, null, null, null), new FilteredAggregatorFactory( new ApproximateHistogramAggregatorFactory("a5:agg", "m1", null, null, null, null), new SelectorDimFilter("dim1", "abc", null) diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/Aggregation.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/Aggregation.java index 559af3eeaad..c987aeddb1e 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/Aggregation.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/Aggregation.java @@ -31,7 +31,7 @@ import org.apache.druid.query.filter.AndDimFilter; import org.apache.druid.query.filter.DimFilter; import org.apache.druid.segment.VirtualColumn; import org.apache.druid.sql.calcite.filtration.Filtration; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import javax.annotation.Nullable; import java.util.ArrayList; @@ -80,12 +80,6 @@ public class Aggregation ? postAggregator.getName() : Iterables.getOnlyElement(aggregatorFactories).getName(); - for (VirtualColumn virtualColumn : virtualColumns) { - if (!virtualColumn.getOutputName().startsWith(name)) { - throw new IAE("VirtualColumn[%s] not prefixed under[%s]", virtualColumn.getOutputName(), name); - } - } - for (AggregatorFactory aggregatorFactory : aggregatorFactories) { if (!aggregatorFactory.getName().startsWith(name)) { throw new IAE("Aggregator[%s] not prefixed under[%s]", aggregatorFactory.getName(), name); @@ -156,12 +150,13 @@ public class Aggregation : Iterables.getOnlyElement(aggregatorFactories).getName(); } - public Aggregation filter(final RowSignature sourceRowSignature, final DimFilter filter) + public Aggregation filter(final DruidQuerySignature querySignature, final DimFilter filter) { if (filter == null) { return this; } + if (postAggregator != null) { // Verify that this Aggregation contains all input to its postAggregator. // If not, this "filter" call won't work right. @@ -178,18 +173,29 @@ public class Aggregation } final DimFilter baseOptimizedFilter = Filtration.create(filter) - .optimizeFilterOnly(sourceRowSignature) + .optimizeFilterOnly(querySignature) .getDimFilter(); + Set aggVirtualColumnsPlusFilterColumns = new HashSet<>(virtualColumns); + for (String column : baseOptimizedFilter.getRequiredColumns()) { + if (querySignature.isVirtualColumnDefined(column)) { + aggVirtualColumnsPlusFilterColumns.add(querySignature.getVirtualColumn(column)); + } + } final List newAggregators = new ArrayList<>(); for (AggregatorFactory agg : aggregatorFactories) { if (agg instanceof FilteredAggregatorFactory) { final FilteredAggregatorFactory filteredAgg = (FilteredAggregatorFactory) agg; + for (String column : filteredAgg.getFilter().getRequiredColumns()) { + if (querySignature.isVirtualColumnDefined(column)) { + aggVirtualColumnsPlusFilterColumns.add(querySignature.getVirtualColumn(column)); + } + } newAggregators.add( new FilteredAggregatorFactory( filteredAgg.getAggregator(), Filtration.create(new AndDimFilter(ImmutableList.of(filteredAgg.getFilter(), baseOptimizedFilter))) - .optimizeFilterOnly(sourceRowSignature) + .optimizeFilterOnly(querySignature) .getDimFilter() ) ); @@ -198,7 +204,7 @@ public class Aggregation } } - return new Aggregation(virtualColumns, newAggregators, postAggregator); + return new Aggregation(new ArrayList<>(aggVirtualColumnsPlusFilterColumns), newAggregators, postAggregator); } @Override diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/DimensionExpression.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/DimensionExpression.java index 7fba517480f..72f296e3158 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/DimensionExpression.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/DimensionExpression.java @@ -19,17 +19,11 @@ package org.apache.druid.sql.calcite.aggregation; -import com.google.common.collect.ImmutableList; -import org.apache.druid.math.expr.ExprMacroTable; import org.apache.druid.query.dimension.DefaultDimensionSpec; import org.apache.druid.query.dimension.DimensionSpec; -import org.apache.druid.segment.VirtualColumn; import org.apache.druid.segment.column.ValueType; import org.apache.druid.sql.calcite.expression.DruidExpression; -import org.apache.druid.sql.calcite.planner.Calcites; -import javax.annotation.Nullable; -import java.util.List; import java.util.Objects; public class DimensionExpression @@ -64,25 +58,10 @@ public class DimensionExpression if (expression.isSimpleExtraction()) { return expression.getSimpleExtraction().toDimensionSpec(outputName, outputType); } else { - return new DefaultDimensionSpec(getVirtualColumnName(), getOutputName(), outputType); + return new DefaultDimensionSpec(getOutputName(), getOutputName(), outputType); } } - public List getVirtualColumns(final ExprMacroTable macroTable) - { - if (expression.isSimpleExtraction()) { - return ImmutableList.of(); - } else { - return ImmutableList.of(expression.toVirtualColumn(getVirtualColumnName(), outputType, macroTable)); - } - } - - @Nullable - public String getVirtualColumnName() - { - return expression.isSimpleExtraction() ? null : Calcites.makePrefixedName(outputName, "v"); - } - @Override public boolean equals(final Object o) { diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/SqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/SqlAggregator.java index 23240c69098..1c154746cf1 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/SqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/SqlAggregator.java @@ -24,7 +24,7 @@ import org.apache.calcite.rel.core.Project; import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.sql.SqlAggFunction; import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import javax.annotation.Nullable; import java.util.List; @@ -46,7 +46,7 @@ public interface SqlAggregator * they will be applied to your aggregator in a later step. * * @param plannerContext SQL planner context - * @param rowSignature signature of the rows being aggregated + * @param querySignature signature of the rows row signature and re-usable virtual column references * @param rexBuilder a rexBuilder, in case you need one * @param name desired output name of the aggregation * @param aggregateCall aggregate call object @@ -62,10 +62,9 @@ public interface SqlAggregator @Nullable Aggregation toDruidAggregation( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexBuilder rexBuilder, - String name, - AggregateCall aggregateCall, + String name, AggregateCall aggregateCall, Project project, List existingAggregations, boolean finalizeAggregations diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ApproxCountDistinctSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ApproxCountDistinctSqlAggregator.java index df9f9e5946a..bc59a32bb6d 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ApproxCountDistinctSqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ApproxCountDistinctSqlAggregator.java @@ -41,13 +41,13 @@ import org.apache.druid.query.dimension.DefaultDimensionSpec; import org.apache.druid.query.dimension.DimensionSpec; import org.apache.druid.segment.VirtualColumn; import org.apache.druid.segment.column.ValueType; -import org.apache.druid.segment.virtual.ExpressionVirtualColumn; import org.apache.druid.sql.calcite.aggregation.Aggregation; import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.Calcites; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -70,7 +70,7 @@ public class ApproxCountDistinctSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( final PlannerContext plannerContext, - final RowSignature rowSignature, + DruidQuerySignature querySignature, final RexBuilder rexBuilder, final String name, final AggregateCall aggregateCall, @@ -79,6 +79,7 @@ public class ApproxCountDistinctSqlAggregator implements SqlAggregator final boolean finalizeAggregations ) { + final RowSignature rowSignature = querySignature.getRowSignature(); // Don't use Aggregations.getArgumentsForSimpleAggregator, since it won't let us use direct column access // for string columns. final RexNode rexNode = Expressions.fromFieldAccess( @@ -92,7 +93,7 @@ public class ApproxCountDistinctSqlAggregator implements SqlAggregator return null; } - final List virtualColumns = new ArrayList<>(); + final List myvirtualColumns = new ArrayList<>(); final AggregatorFactory aggregatorFactory; final String aggregatorName = finalizeAggregations ? Calcites.makePrefixedName(name, "a") : name; @@ -110,13 +111,10 @@ public class ApproxCountDistinctSqlAggregator implements SqlAggregator if (arg.isSimpleExtraction()) { dimensionSpec = arg.getSimpleExtraction().toDimensionSpec(null, inputType); } else { - final ExpressionVirtualColumn virtualColumn = arg.toVirtualColumn( - Calcites.makePrefixedName(name, "v"), - inputType, - plannerContext.getExprMacroTable() - ); + VirtualColumn virtualColumn = + querySignature.getOrCreateVirtualColumnForExpression(plannerContext, arg, sqlTypeName); dimensionSpec = new DefaultDimensionSpec(virtualColumn.getOutputName(), null, inputType); - virtualColumns.add(virtualColumn); + myvirtualColumns.add(virtualColumn); } aggregatorFactory = new CardinalityAggregatorFactory( @@ -129,7 +127,7 @@ public class ApproxCountDistinctSqlAggregator implements SqlAggregator } return Aggregation.create( - virtualColumns, + myvirtualColumns, Collections.singletonList(aggregatorFactory), finalizeAggregations ? new HyperUniqueFinalizingPostAggregator(name, aggregatorFactory.getName()) : null ); diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/AvgSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/AvgSqlAggregator.java index 30b7029c9f5..2761d0c3e56 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/AvgSqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/AvgSqlAggregator.java @@ -20,10 +20,7 @@ package org.apache.druid.sql.calcite.aggregation.builtin; import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterables; import org.apache.calcite.rel.core.AggregateCall; -import org.apache.calcite.rel.core.Project; -import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.calcite.sql.type.SqlTypeName; @@ -34,17 +31,9 @@ import org.apache.druid.query.aggregation.post.ArithmeticPostAggregator; import org.apache.druid.query.aggregation.post.FieldAccessPostAggregator; import org.apache.druid.segment.column.ValueType; import org.apache.druid.sql.calcite.aggregation.Aggregation; -import org.apache.druid.sql.calcite.aggregation.Aggregations; -import org.apache.druid.sql.calcite.aggregation.SqlAggregator; -import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.planner.Calcites; -import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; -import javax.annotation.Nullable; -import java.util.List; - -public class AvgSqlAggregator implements SqlAggregator +public class AvgSqlAggregator extends SimpleSqlAggregator { @Override public SqlAggFunction calciteFunction() @@ -52,37 +41,16 @@ public class AvgSqlAggregator implements SqlAggregator return SqlStdOperatorTable.AVG; } - @Nullable @Override - public Aggregation toDruidAggregation( - final PlannerContext plannerContext, - final RowSignature rowSignature, - final RexBuilder rexBuilder, + Aggregation getAggregation( final String name, final AggregateCall aggregateCall, - final Project project, - final List existingAggregations, - final boolean finalizeAggregations + final ExprMacroTable macroTable, + final String fieldName, + final String expression ) { - if (aggregateCall.isDistinct()) { - return null; - } - - final List arguments = Aggregations.getArgumentsForSimpleAggregator( - plannerContext, - rowSignature, - aggregateCall, - project - ); - - if (arguments == null) { - return null; - } - - final DruidExpression arg = Iterables.getOnlyElement(arguments); final ValueType sumType; - // Use 64-bit sum regardless of the type of the AVG aggregator. if (SqlTypeName.INT_TYPES.contains(aggregateCall.getType().getSqlTypeName())) { sumType = ValueType.LONG; @@ -90,19 +58,6 @@ public class AvgSqlAggregator implements SqlAggregator sumType = ValueType.DOUBLE; } - final ExprMacroTable macroTable = plannerContext.getExprMacroTable(); - - final String fieldName; - final String expression; - - if (arg.isDirectColumnAccess()) { - fieldName = arg.getDirectColumn(); - expression = null; - } else { - fieldName = null; - expression = arg.getExpression(); - } - final String sumName = Calcites.makePrefixedName(name, "sum"); final String countName = Calcites.makePrefixedName(name, "count"); final AggregatorFactory sum = SumSqlAggregator.createSumAggregatorFactory( diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/CountSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/CountSqlAggregator.java index e98ec32a287..6ab7a16211e 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/CountSqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/CountSqlAggregator.java @@ -36,7 +36,7 @@ import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import javax.annotation.Nullable; import java.util.List; @@ -55,7 +55,7 @@ public class CountSqlAggregator implements SqlAggregator @Override public Aggregation toDruidAggregation( final PlannerContext plannerContext, - final RowSignature rowSignature, + final DruidQuerySignature querySignature, final RexBuilder rexBuilder, final String name, final AggregateCall aggregateCall, @@ -66,7 +66,7 @@ public class CountSqlAggregator implements SqlAggregator { final List args = Aggregations.getArgumentsForSimpleAggregator( plannerContext, - rowSignature, + querySignature.getRowSignature(), aggregateCall, project ); @@ -83,12 +83,9 @@ public class CountSqlAggregator implements SqlAggregator if (plannerContext.getPlannerConfig().isUseApproximateCountDistinct()) { return APPROX_COUNT_DISTINCT.toDruidAggregation( plannerContext, - rowSignature, + querySignature, rexBuilder, - name, - aggregateCall, - project, - existingAggregations, + name, aggregateCall, project, existingAggregations, finalizeAggregations ); } else { @@ -99,7 +96,7 @@ public class CountSqlAggregator implements SqlAggregator // COUNT(x) should count all non-null values of x. final RexNode rexNode = Expressions.fromFieldAccess( - rowSignature, + querySignature.getRowSignature(), project, Iterables.getOnlyElement(aggregateCall.getArgList()) ); @@ -107,7 +104,7 @@ public class CountSqlAggregator implements SqlAggregator if (rexNode.getType().isNullable()) { final DimFilter nonNullFilter = Expressions.toFilter( plannerContext, - rowSignature, + querySignature, rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_NULL, ImmutableList.of(rexNode)) ); @@ -116,7 +113,7 @@ public class CountSqlAggregator implements SqlAggregator throw new ISE("Could not create not-null filter for rexNode[%s]", rexNode); } - return Aggregation.create(new CountAggregatorFactory(name)).filter(rowSignature, nonNullFilter); + return Aggregation.create(new CountAggregatorFactory(name)).filter(querySignature, nonNullFilter); } else { return Aggregation.create(new CountAggregatorFactory(name)); } diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MaxSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MaxSqlAggregator.java index 923b0222ef9..c55533002ff 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MaxSqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MaxSqlAggregator.java @@ -19,10 +19,7 @@ package org.apache.druid.sql.calcite.aggregation.builtin; -import com.google.common.collect.Iterables; import org.apache.calcite.rel.core.AggregateCall; -import org.apache.calcite.rel.core.Project; -import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.druid.java.util.common.ISE; @@ -33,17 +30,9 @@ import org.apache.druid.query.aggregation.FloatMaxAggregatorFactory; import org.apache.druid.query.aggregation.LongMaxAggregatorFactory; import org.apache.druid.segment.column.ValueType; import org.apache.druid.sql.calcite.aggregation.Aggregation; -import org.apache.druid.sql.calcite.aggregation.Aggregations; -import org.apache.druid.sql.calcite.aggregation.SqlAggregator; -import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.planner.Calcites; -import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; -import javax.annotation.Nullable; -import java.util.List; - -public class MaxSqlAggregator implements SqlAggregator +public class MaxSqlAggregator extends SimpleSqlAggregator { @Override public SqlAggFunction calciteFunction() @@ -51,49 +40,16 @@ public class MaxSqlAggregator implements SqlAggregator return SqlStdOperatorTable.MAX; } - @Nullable @Override - public Aggregation toDruidAggregation( - final PlannerContext plannerContext, - final RowSignature rowSignature, - final RexBuilder rexBuilder, + Aggregation getAggregation( final String name, final AggregateCall aggregateCall, - final Project project, - final List existingAggregations, - final boolean finalizeAggregations + final ExprMacroTable macroTable, + final String fieldName, + final String expression ) { - if (aggregateCall.isDistinct()) { - return null; - } - - final List arguments = Aggregations.getArgumentsForSimpleAggregator( - plannerContext, - rowSignature, - aggregateCall, - project - ); - - if (arguments == null) { - return null; - } - - final DruidExpression arg = Iterables.getOnlyElement(arguments); final ValueType valueType = Calcites.getValueTypeForSqlTypeName(aggregateCall.getType().getSqlTypeName()); - final ExprMacroTable macroTable = plannerContext.getExprMacroTable(); - - final String fieldName; - final String expression; - - if (arg.isDirectColumnAccess()) { - fieldName = arg.getDirectColumn(); - expression = null; - } else { - fieldName = null; - expression = arg.getExpression(); - } - return Aggregation.create(createMaxAggregatorFactory(valueType, name, fieldName, expression, macroTable)); } diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MinSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MinSqlAggregator.java index 9e8abe9e5b6..d1d2d73f6d9 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MinSqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MinSqlAggregator.java @@ -19,10 +19,7 @@ package org.apache.druid.sql.calcite.aggregation.builtin; -import com.google.common.collect.Iterables; import org.apache.calcite.rel.core.AggregateCall; -import org.apache.calcite.rel.core.Project; -import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.druid.java.util.common.ISE; @@ -33,17 +30,9 @@ import org.apache.druid.query.aggregation.FloatMinAggregatorFactory; import org.apache.druid.query.aggregation.LongMinAggregatorFactory; import org.apache.druid.segment.column.ValueType; import org.apache.druid.sql.calcite.aggregation.Aggregation; -import org.apache.druid.sql.calcite.aggregation.Aggregations; -import org.apache.druid.sql.calcite.aggregation.SqlAggregator; -import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.planner.Calcites; -import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; -import javax.annotation.Nullable; -import java.util.List; - -public class MinSqlAggregator implements SqlAggregator +public class MinSqlAggregator extends SimpleSqlAggregator { @Override public SqlAggFunction calciteFunction() @@ -51,49 +40,16 @@ public class MinSqlAggregator implements SqlAggregator return SqlStdOperatorTable.MIN; } - @Nullable @Override - public Aggregation toDruidAggregation( - final PlannerContext plannerContext, - final RowSignature rowSignature, - final RexBuilder rexBuilder, + Aggregation getAggregation( final String name, final AggregateCall aggregateCall, - final Project project, - final List existingAggregations, - final boolean finalizeAggregations + final ExprMacroTable macroTable, + final String fieldName, + final String expression ) { - if (aggregateCall.isDistinct()) { - return null; - } - - final List arguments = Aggregations.getArgumentsForSimpleAggregator( - plannerContext, - rowSignature, - aggregateCall, - project - ); - - if (arguments == null) { - return null; - } - - final DruidExpression arg = Iterables.getOnlyElement(arguments); final ValueType valueType = Calcites.getValueTypeForSqlTypeName(aggregateCall.getType().getSqlTypeName()); - final ExprMacroTable macroTable = plannerContext.getExprMacroTable(); - - final String fieldName; - final String expression; - - if (arg.isDirectColumnAccess()) { - fieldName = arg.getDirectColumn(); - expression = null; - } else { - fieldName = null; - expression = arg.getExpression(); - } - return Aggregation.create(createMinAggregatorFactory(valueType, name, fieldName, expression, macroTable)); } diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SimpleSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SimpleSqlAggregator.java new file mode 100644 index 00000000000..b98450b835d --- /dev/null +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SimpleSqlAggregator.java @@ -0,0 +1,96 @@ +/* + * 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. + */ + +package org.apache.druid.sql.calcite.aggregation.builtin; + +import com.google.common.collect.Iterables; +import org.apache.calcite.rel.core.AggregateCall; +import org.apache.calcite.rel.core.Project; +import org.apache.calcite.rex.RexBuilder; +import org.apache.druid.math.expr.ExprMacroTable; +import org.apache.druid.sql.calcite.aggregation.Aggregation; +import org.apache.druid.sql.calcite.aggregation.Aggregations; +import org.apache.druid.sql.calcite.aggregation.SqlAggregator; +import org.apache.druid.sql.calcite.expression.DruidExpression; +import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; +import org.apache.druid.sql.calcite.table.RowSignature; + +import javax.annotation.Nullable; +import java.util.List; + +/** + * Abstraction for single column, single argument simple aggregators like sum, avg, min, max + */ +public abstract class SimpleSqlAggregator implements SqlAggregator +{ + @Nullable + @Override + public Aggregation toDruidAggregation( + final PlannerContext plannerContext, + final DruidQuerySignature querySignature, + final RexBuilder rexBuilder, + final String name, + final AggregateCall aggregateCall, + final Project project, + final List existingAggregations, + final boolean finalizeAggregations + ) + { + if (aggregateCall.isDistinct()) { + return null; + } + final RowSignature rowSignature = querySignature.getRowSignature(); + + final List arguments = Aggregations.getArgumentsForSimpleAggregator( + plannerContext, + rowSignature, + aggregateCall, + project + ); + + if (arguments == null) { + return null; + } + + final DruidExpression arg = Iterables.getOnlyElement(arguments); + final ExprMacroTable macroTable = plannerContext.getExprMacroTable(); + + final String fieldName; + final String expression; + + if (arg.isDirectColumnAccess()) { + fieldName = arg.getDirectColumn(); + expression = null; + } else { + fieldName = null; + expression = arg.getExpression(); + } + + return getAggregation(name, aggregateCall, macroTable, fieldName, expression); + } + + abstract Aggregation getAggregation( + String name, + AggregateCall aggregateCall, + ExprMacroTable macroTable, + String fieldName, + String expression + ); +} diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SumSqlAggregator.java b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SumSqlAggregator.java index 0d80932e80f..c96d74e5922 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SumSqlAggregator.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SumSqlAggregator.java @@ -19,10 +19,7 @@ package org.apache.druid.sql.calcite.aggregation.builtin; -import com.google.common.collect.Iterables; import org.apache.calcite.rel.core.AggregateCall; -import org.apache.calcite.rel.core.Project; -import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.druid.java.util.common.ISE; @@ -33,17 +30,9 @@ import org.apache.druid.query.aggregation.FloatSumAggregatorFactory; import org.apache.druid.query.aggregation.LongSumAggregatorFactory; import org.apache.druid.segment.column.ValueType; import org.apache.druid.sql.calcite.aggregation.Aggregation; -import org.apache.druid.sql.calcite.aggregation.Aggregations; -import org.apache.druid.sql.calcite.aggregation.SqlAggregator; -import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.planner.Calcites; -import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; -import javax.annotation.Nullable; -import java.util.List; - -public class SumSqlAggregator implements SqlAggregator +public class SumSqlAggregator extends SimpleSqlAggregator { @Override public SqlAggFunction calciteFunction() @@ -51,49 +40,16 @@ public class SumSqlAggregator implements SqlAggregator return SqlStdOperatorTable.SUM; } - @Nullable @Override - public Aggregation toDruidAggregation( - final PlannerContext plannerContext, - final RowSignature rowSignature, - final RexBuilder rexBuilder, + Aggregation getAggregation( final String name, final AggregateCall aggregateCall, - final Project project, - final List existingAggregations, - final boolean finalizeAggregations + final ExprMacroTable macroTable, + final String fieldName, + final String expression ) { - if (aggregateCall.isDistinct()) { - return null; - } - - final List arguments = Aggregations.getArgumentsForSimpleAggregator( - plannerContext, - rowSignature, - aggregateCall, - project - ); - - if (arguments == null) { - return null; - } - - final DruidExpression arg = Iterables.getOnlyElement(arguments); final ValueType valueType = Calcites.getValueTypeForSqlTypeName(aggregateCall.getType().getSqlTypeName()); - final ExprMacroTable macroTable = plannerContext.getExprMacroTable(); - - final String fieldName; - final String expression; - - if (arg.isDirectColumnAccess()) { - fieldName = arg.getDirectColumn(); - expression = null; - } else { - fieldName = null; - expression = arg.getExpression(); - } - return Aggregation.create(createSumAggregatorFactory(valueType, name, fieldName, expression, macroTable)); } diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java b/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java index fd2c1d86557..ef8764c48d3 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java @@ -50,6 +50,7 @@ import org.apache.druid.query.filter.OrDimFilter; import org.apache.druid.query.filter.SelectorDimFilter; import org.apache.druid.query.ordering.StringComparator; import org.apache.druid.query.ordering.StringComparators; +import org.apache.druid.segment.VirtualColumn; import org.apache.druid.segment.column.ColumnHolder; import org.apache.druid.segment.column.ValueType; import org.apache.druid.sql.calcite.filtration.BoundRefKey; @@ -57,6 +58,7 @@ import org.apache.druid.sql.calcite.filtration.Bounds; import org.apache.druid.sql.calcite.filtration.Filtration; import org.apache.druid.sql.calcite.planner.Calcites; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import org.joda.time.Interval; @@ -207,27 +209,35 @@ public class Expressions * Translates "condition" to a Druid filter, or returns null if we cannot translate the condition. * * @param plannerContext planner context - * @param rowSignature row signature of the dataSource to be filtered + * @param querySignature row signature of the dataSource to be filtered * @param expression Calcite row expression */ @Nullable public static DimFilter toFilter( final PlannerContext plannerContext, - final RowSignature rowSignature, + final DruidQuerySignature querySignature, final RexNode expression ) { final SqlKind kind = expression.getKind(); if (kind == SqlKind.IS_TRUE || kind == SqlKind.IS_NOT_FALSE) { - return toFilter(plannerContext, rowSignature, Iterables.getOnlyElement(((RexCall) expression).getOperands())); + return toFilter( + plannerContext, + querySignature, + Iterables.getOnlyElement(((RexCall) expression).getOperands()) + ); } else if (kind == SqlKind.IS_FALSE || kind == SqlKind.IS_NOT_TRUE) { return new NotDimFilter( - toFilter(plannerContext, rowSignature, Iterables.getOnlyElement(((RexCall) expression).getOperands())) + toFilter( + plannerContext, + querySignature, + Iterables.getOnlyElement(((RexCall) expression).getOperands()) + ) ); } else if (kind == SqlKind.CAST && expression.getType().getSqlTypeName() == SqlTypeName.BOOLEAN) { // Calcite sometimes leaves errant, useless cast-to-booleans inside filters. Strip them and continue. - return toFilter(plannerContext, rowSignature, Iterables.getOnlyElement(((RexCall) expression).getOperands())); + return toFilter(plannerContext, querySignature, Iterables.getOnlyElement(((RexCall) expression).getOperands())); } else if (kind == SqlKind.AND || kind == SqlKind.OR || kind == SqlKind.NOT) { @@ -235,7 +245,7 @@ public class Expressions for (final RexNode rexNode : ((RexCall) expression).getOperands()) { final DimFilter nextFilter = toFilter( plannerContext, - rowSignature, + querySignature, rexNode ); if (nextFilter == null) { @@ -254,7 +264,7 @@ public class Expressions } } else { // Handle filter conditions on everything else. - return toLeafFilter(plannerContext, rowSignature, expression); + return toLeafFilter(plannerContext, querySignature, expression); } } @@ -263,13 +273,13 @@ public class Expressions * if we cannot translate the condition. * * @param plannerContext planner context - * @param rowSignature row signature of the dataSource to be filtered + * @param querySignature row signature of the dataSource to be filtered * @param rexNode Calcite row expression */ @Nullable private static DimFilter toLeafFilter( final PlannerContext plannerContext, - final RowSignature rowSignature, + final DruidQuerySignature querySignature, final RexNode rexNode ) { @@ -279,17 +289,23 @@ public class Expressions return Filtration.matchNothing(); } - final DimFilter simpleFilter = toSimpleLeafFilter(plannerContext, rowSignature, rexNode); - return simpleFilter != null ? simpleFilter : toExpressionLeafFilter(plannerContext, rowSignature, rexNode); + final DimFilter simpleFilter = toSimpleLeafFilter( + plannerContext, + querySignature, + rexNode + ); + return simpleFilter != null + ? simpleFilter + : toExpressionLeafFilter(plannerContext, querySignature.getRowSignature(), rexNode); } /** - * Translates to a simple leaf filter, meaning one that hits just a single column and is not an expression filter. + * Translates to a simple leaf filter, i.e. is not an expression filter. */ @Nullable private static DimFilter toSimpleLeafFilter( final PlannerContext plannerContext, - final RowSignature rowSignature, + final DruidQuerySignature querySignature, final RexNode rexNode ) { @@ -298,14 +314,14 @@ public class Expressions if (kind == SqlKind.IS_TRUE || kind == SqlKind.IS_NOT_FALSE) { return toSimpleLeafFilter( plannerContext, - rowSignature, + querySignature, Iterables.getOnlyElement(((RexCall) rexNode).getOperands()) ); } else if (kind == SqlKind.IS_FALSE || kind == SqlKind.IS_NOT_TRUE) { return new NotDimFilter( toSimpleLeafFilter( plannerContext, - rowSignature, + querySignature, Iterables.getOnlyElement(((RexCall) rexNode).getOperands()) ) ); @@ -313,16 +329,35 @@ public class Expressions final RexNode operand = Iterables.getOnlyElement(((RexCall) rexNode).getOperands()); // operand must be translatable to a SimpleExtraction to be simple-filterable - final DruidExpression druidExpression = toDruidExpression(plannerContext, rowSignature, operand); - if (druidExpression == null || !druidExpression.isSimpleExtraction()) { + final DruidExpression druidExpression = + toDruidExpression(plannerContext, querySignature.getRowSignature(), operand); + + if (druidExpression == null) { return null; } - final DimFilter equalFilter = new SelectorDimFilter( - druidExpression.getSimpleExtraction().getColumn(), - NullHandling.defaultStringValue(), - druidExpression.getSimpleExtraction().getExtractionFn() - ); + final DimFilter equalFilter; + if (druidExpression.isSimpleExtraction()) { + equalFilter = new SelectorDimFilter( + druidExpression.getSimpleExtraction().getColumn(), + NullHandling.defaultStringValue(), + druidExpression.getSimpleExtraction().getExtractionFn() + ); + } else { + final VirtualColumn virtualColumn = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + druidExpression, + operand.getType().getSqlTypeName() + ); + if (virtualColumn == null) { + return null; + } + equalFilter = new SelectorDimFilter( + virtualColumn.getOutputName(), + NullHandling.defaultStringValue(), + null + ); + } return kind == SqlKind.IS_NOT_NULL ? new NotDimFilter(equalFilter) : equalFilter; } else if (kind == SqlKind.EQUALS @@ -379,7 +414,7 @@ public class Expressions } // Translate lhs to a DruidExpression. - final DruidExpression lhsExpression = toDruidExpression(plannerContext, rowSignature, lhs); + final DruidExpression lhsExpression = toDruidExpression(plannerContext, querySignature.getRowSignature(), lhs); if (lhsExpression == null) { return null; } @@ -392,14 +427,24 @@ public class Expressions return buildTimeFloorFilter(ColumnHolder.TIME_COLUMN_NAME, queryGranularity, flippedKind, rhsMillis); } - // In the general case, lhs must be translatable to a SimpleExtraction to be simple-filterable. - if (!lhsExpression.isSimpleExtraction()) { - return null; + final String column; + final ExtractionFn extractionFn; + if (lhsExpression.isSimpleExtraction()) { + column = lhsExpression.getSimpleExtraction().getColumn(); + extractionFn = lhsExpression.getSimpleExtraction().getExtractionFn(); + } else { + VirtualColumn virtualLhs = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + lhsExpression, + lhs.getType().getSqlTypeName() + ); + if (virtualLhs == null) { + return null; + } + column = virtualLhs.getOutputName(); + extractionFn = null; } - final String column = lhsExpression.getSimpleExtraction().getColumn(); - final ExtractionFn extractionFn = lhsExpression.getSimpleExtraction().getExtractionFn(); - if (column.equals(ColumnHolder.TIME_COLUMN_NAME) && extractionFn instanceof TimeFormatExtractionFn) { // Check if we can strip the extractionFn and convert the filter to a direct filter on __time. // This allows potential conversion to query-level "intervals" later on, which is ideal for Druid queries. @@ -477,19 +522,32 @@ public class Expressions if (conversion == null) { return null; } else { - DimFilter filter = conversion.toDruidFilter(plannerContext, rowSignature, rexNode); + DimFilter filter = + conversion.toDruidFilter(plannerContext, querySignature, rexNode); if (filter != null) { return filter; } - DruidExpression expression = conversion.toDruidExpression(plannerContext, rowSignature, rexNode); - if (expression != null) { - return new ExpressionDimFilter(expression.getExpression(), plannerContext.getExprMacroTable()); - } + return null; } } return null; } + /** + * Translates to an "expression" type leaf filter. Used as a fallback if we can't use a simple leaf filter. + */ + @Nullable + private static DimFilter toExpressionLeafFilter( + final PlannerContext plannerContext, + final RowSignature rowSignature, + final RexNode rexNode + ) + { + final DruidExpression druidExpression = toDruidExpression(plannerContext, rowSignature, rexNode); + return druidExpression != null + ? new ExpressionDimFilter(druidExpression.getExpression(), plannerContext.getExprMacroTable()) + : null; + } public static ExprType exprTypeForValueType(final ValueType valueType) { @@ -506,22 +564,6 @@ public class Expressions } } - /** - * Translates to an "expression" type leaf filter. Used as a fallback if we can't use a simple leaf filter. - */ - @Nullable - private static DimFilter toExpressionLeafFilter( - final PlannerContext plannerContext, - final RowSignature rowSignature, - final RexNode rexNode - ) - { - final DruidExpression druidExpression = toDruidExpression(plannerContext, rowSignature, rexNode); - return druidExpression == null - ? null - : new ExpressionDimFilter(druidExpression.getExpression(), plannerContext.getExprMacroTable()); - } - /** * Converts an expression to a Granularity, if possible. This is possible if, and only if, the expression * is a timestamp_floor function on the __time column with literal parameters for period, origin, and timeZone. diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/expression/SqlOperatorConversion.java b/sql/src/main/java/org/apache/druid/sql/calcite/expression/SqlOperatorConversion.java index 684ce58f387..dc85fdb6958 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/expression/SqlOperatorConversion.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/expression/SqlOperatorConversion.java @@ -23,6 +23,7 @@ import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.SqlOperator; import org.apache.druid.query.filter.DimFilter; import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.apache.druid.sql.calcite.table.RowSignature; import javax.annotation.Nullable; @@ -53,16 +54,16 @@ public interface SqlOperatorConversion /** * Returns a Druid Aggregation corresponding to a SQL {@link SqlOperator} used to filter rows * - * @param plannerContext SQL planner context - * @param rowSignature signature of the rows being aggregated - * @param rexNode a rexBuilder, in case you need one + * @param plannerContext SQL planner context + * @param querySignature signature of the rows being aggregated and expression column references + * @param rexNode filter expression rex node * * @return filter, or null if the call cannot be translated */ @Nullable default DimFilter toDruidFilter( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexNode rexNode ) { diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/LikeOperatorConversion.java b/sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/LikeOperatorConversion.java index 09bb341116d..b1b7d9d8680 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/LikeOperatorConversion.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/LikeOperatorConversion.java @@ -26,11 +26,12 @@ import org.apache.calcite.sql.SqlOperator; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.druid.query.filter.DimFilter; import org.apache.druid.query.filter.LikeDimFilter; +import org.apache.druid.segment.VirtualColumn; import org.apache.druid.sql.calcite.expression.DirectOperatorConversion; import org.apache.druid.sql.calcite.expression.DruidExpression; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import javax.annotation.Nullable; import java.util.List; @@ -54,24 +55,42 @@ public class LikeOperatorConversion extends DirectOperatorConversion @Override public DimFilter toDruidFilter( PlannerContext plannerContext, - RowSignature rowSignature, + DruidQuerySignature querySignature, RexNode rexNode ) { final List operands = ((RexCall) rexNode).getOperands(); final DruidExpression druidExpression = Expressions.toDruidExpression( plannerContext, - rowSignature, + querySignature.getRowSignature(), operands.get(0) ); - if (druidExpression == null || !druidExpression.isSimpleExtraction()) { + if (druidExpression == null) { return null; } - return new LikeDimFilter( - druidExpression.getSimpleExtraction().getColumn(), - RexLiteral.stringValue(operands.get(1)), - operands.size() > 2 ? RexLiteral.stringValue(operands.get(2)) : null, - druidExpression.getSimpleExtraction().getExtractionFn() - ); + + if (druidExpression.isSimpleExtraction()) { + return new LikeDimFilter( + druidExpression.getSimpleExtraction().getColumn(), + RexLiteral.stringValue(operands.get(1)), + operands.size() > 2 ? RexLiteral.stringValue(operands.get(2)) : null, + druidExpression.getSimpleExtraction().getExtractionFn() + ); + } else { + VirtualColumn v = querySignature.getOrCreateVirtualColumnForExpression( + plannerContext, + druidExpression, + operands.get(0).getType().getSqlTypeName() + ); + if (v == null) { + return null; + } + return new LikeDimFilter( + v.getOutputName(), + RexLiteral.stringValue(operands.get(1)), + operands.size() > 2 ? RexLiteral.stringValue(operands.get(2)) : null, + null + ); + } } } diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/filtration/ConvertBoundsToSelectors.java b/sql/src/main/java/org/apache/druid/sql/calcite/filtration/ConvertBoundsToSelectors.java index 3eb918e41a9..e75fe14266c 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/filtration/ConvertBoundsToSelectors.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/filtration/ConvertBoundsToSelectors.java @@ -24,20 +24,20 @@ import org.apache.druid.query.filter.DimFilter; import org.apache.druid.query.filter.SelectorDimFilter; import org.apache.druid.query.ordering.StringComparator; import org.apache.druid.sql.calcite.expression.SimpleExtraction; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; public class ConvertBoundsToSelectors extends BottomUpTransform { - private final RowSignature sourceRowSignature; + private final DruidQuerySignature querySignature; - private ConvertBoundsToSelectors(final RowSignature sourceRowSignature) + private ConvertBoundsToSelectors(final DruidQuerySignature querySignature) { - this.sourceRowSignature = sourceRowSignature; + this.querySignature = querySignature; } - public static ConvertBoundsToSelectors create(final RowSignature sourceRowSignature) + public static ConvertBoundsToSelectors create(final DruidQuerySignature querySignature) { - return new ConvertBoundsToSelectors(sourceRowSignature); + return new ConvertBoundsToSelectors(querySignature); } @Override @@ -45,7 +45,7 @@ public class ConvertBoundsToSelectors extends BottomUpTransform { if (filter instanceof BoundDimFilter) { final BoundDimFilter bound = (BoundDimFilter) filter; - final StringComparator naturalStringComparator = sourceRowSignature.naturalStringComparator( + final StringComparator comparator = querySignature.getRowSignature().naturalStringComparator( SimpleExtraction.of(bound.getDimension(), bound.getExtractionFn()) ); @@ -54,7 +54,7 @@ public class ConvertBoundsToSelectors extends BottomUpTransform && bound.getUpper().equals(bound.getLower()) && !bound.isUpperStrict() && !bound.isLowerStrict() - && bound.getOrdering().equals(naturalStringComparator)) { + && (querySignature.isVirtualColumnDefined(bound.getDimension()) || bound.getOrdering().equals(comparator))) { return new SelectorDimFilter( bound.getDimension(), bound.getUpper(), diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java b/sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java index 25232a59e6e..1d891d2eb4b 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java @@ -28,7 +28,7 @@ import org.apache.druid.query.filter.DimFilter; import org.apache.druid.query.filter.ExpressionDimFilter; import org.apache.druid.query.spec.MultipleIntervalSegmentSpec; import org.apache.druid.query.spec.QuerySegmentSpec; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import org.joda.time.Interval; import java.util.List; @@ -108,15 +108,15 @@ public class Filtration * * @return equivalent Filtration */ - public Filtration optimize(final RowSignature sourceRowSignature) + public Filtration optimize(final DruidQuerySignature querySignature) { return transform( this, ImmutableList.of( CombineAndSimplifyBounds.instance(), MoveTimeFiltersToIntervals.instance(), - ConvertBoundsToSelectors.create(sourceRowSignature), - ConvertSelectorsToIns.create(sourceRowSignature), + ConvertBoundsToSelectors.create(querySignature), + ConvertSelectorsToIns.create(querySignature.getRowSignature()), MoveMarkerFiltersToIntervals.instance(), ValidateNoMarkerFiltersRemain.instance() ) @@ -128,7 +128,7 @@ public class Filtration * * @return equivalent Filtration */ - public Filtration optimizeFilterOnly(final RowSignature sourceRowSignature) + public Filtration optimizeFilterOnly(final DruidQuerySignature querySignature) { if (!intervals.equals(ImmutableList.of(eternity()))) { throw new ISE("Cannot optimizeFilterOnly when intervals are set"); @@ -138,8 +138,8 @@ public class Filtration this, ImmutableList.of( CombineAndSimplifyBounds.instance(), - ConvertBoundsToSelectors.create(sourceRowSignature), - ConvertSelectorsToIns.create(sourceRowSignature) + ConvertBoundsToSelectors.create(querySignature), + ConvertSelectorsToIns.create(querySignature.getRowSignature()) ) ); diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java b/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java index 647e213dd19..832c202864b 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java @@ -44,7 +44,6 @@ import org.apache.calcite.util.ImmutableBitSet; import org.apache.druid.java.util.common.ISE; import org.apache.druid.java.util.common.granularity.Granularities; import org.apache.druid.java.util.common.granularity.Granularity; -import org.apache.druid.math.expr.ExprMacroTable; import org.apache.druid.math.expr.ExprType; import org.apache.druid.math.expr.Parser; import org.apache.druid.query.DataSource; @@ -84,11 +83,15 @@ import org.apache.druid.sql.calcite.planner.PlannerContext; import org.apache.druid.sql.calcite.rule.GroupByRules; import org.apache.druid.sql.calcite.table.RowSignature; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; +import java.util.Comparator; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.TreeSet; import java.util.stream.Collectors; @@ -99,7 +102,6 @@ import java.util.stream.Collectors; public class DruidQuery { private final DataSource dataSource; - private final RowSignature sourceRowSignature; private final PlannerContext plannerContext; @Nullable @@ -117,14 +119,15 @@ public class DruidQuery @Nullable private final DefaultLimitSpec limitSpec; - @Nullable - private final RowSignature outputRowSignature; - @Nullable private final RelDataType outputRowType; private final Query query; + private final DruidQuerySignature sourceQuerySignature; + + private final RowSignature outputRowSignature; + public DruidQuery( final PartialDruidQuery partialQuery, final DataSource dataSource, @@ -135,17 +138,16 @@ public class DruidQuery ) { this.dataSource = dataSource; - this.sourceRowSignature = sourceRowSignature; this.outputRowType = partialQuery.leafRel().getRowType(); + this.sourceQuerySignature = new DruidQuerySignature(sourceRowSignature); this.plannerContext = plannerContext; // Now the fun begins. - this.filter = computeWhereFilter(partialQuery, sourceRowSignature, plannerContext); - this.selectProjection = computeSelectProjection(partialQuery, plannerContext, sourceRowSignature); - this.grouping = computeGrouping(partialQuery, plannerContext, sourceRowSignature, rexBuilder, finalizeAggregations); + this.filter = computeWhereFilter(partialQuery, plannerContext, sourceQuerySignature); + this.selectProjection = computeSelectProjection(partialQuery, plannerContext, sourceQuerySignature); + this.grouping = computeGrouping(partialQuery, plannerContext, sourceQuerySignature, rexBuilder, finalizeAggregations); final RowSignature sortingInputRowSignature; - if (this.selectProjection != null) { sortingInputRowSignature = this.selectProjection.getOutputRowSignature(); } else if (this.grouping != null) { @@ -156,7 +158,6 @@ public class DruidQuery this.sortProject = computeSortProject(partialQuery, plannerContext, sortingInputRowSignature); - // outputRowSignature is used only for scan and select query, and thus sort and grouping must be null this.outputRowSignature = sortProject == null ? sortingInputRowSignature : sortProject.getOutputRowSignature(); this.limitSpec = computeLimitSpec(partialQuery, sortingInputRowSignature); @@ -166,8 +167,8 @@ public class DruidQuery @Nullable private static DimFilter computeWhereFilter( final PartialDruidQuery partialQuery, - final RowSignature sourceRowSignature, - final PlannerContext plannerContext + final PlannerContext plannerContext, + final DruidQuerySignature querySignature ) { final Filter whereFilter = partialQuery.getWhereFilter(); @@ -176,14 +177,40 @@ public class DruidQuery return null; } - final RexNode condition = whereFilter.getCondition(); + return getDimFilter(plannerContext, querySignature, whereFilter); + } + + @Nullable + private static DimFilter computeHavingFilter( + final PartialDruidQuery partialQuery, + final PlannerContext plannerContext, + final DruidQuerySignature querySignature + ) + { + final Filter havingFilter = partialQuery.getHavingFilter(); + + if (havingFilter == null) { + return null; + } + + return getDimFilter(plannerContext, querySignature, havingFilter); + } + + @Nonnull + private static DimFilter getDimFilter( + final PlannerContext plannerContext, + final DruidQuerySignature querySignature, + Filter filter + ) + { + final RexNode condition = filter.getCondition(); final DimFilter dimFilter = Expressions.toFilter( plannerContext, - sourceRowSignature, + querySignature, condition ); if (dimFilter == null) { - throw new CannotBuildQueryException(whereFilter, condition); + throw new CannotBuildQueryException(filter, condition); } else { return dimFilter; } @@ -193,7 +220,7 @@ public class DruidQuery private static SelectProjection computeSelectProjection( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, - final RowSignature sourceRowSignature + final DruidQuerySignature queryColumns ) { final Project project = partialQuery.getSelectProject(); @@ -207,7 +234,7 @@ public class DruidQuery for (final RexNode rexNode : project.getChildExps()) { final DruidExpression expression = Expressions.toDruidExpression( plannerContext, - sourceRowSignature, + queryColumns.getRowSignature(), rexNode ); @@ -219,41 +246,37 @@ public class DruidQuery } final List directColumns = new ArrayList<>(); - final List virtualColumns = new ArrayList<>(); + final Set virtualColumns = new HashSet<>(); final List rowOrder = new ArrayList<>(); - final String virtualColumnPrefix = Calcites.findUnusedPrefix( - "v", - new TreeSet<>(sourceRowSignature.getRowOrder()) - ); - int virtualColumnNameCounter = 0; - for (int i = 0; i < expressions.size(); i++) { final DruidExpression expression = expressions.get(i); if (expression.isDirectColumnAccess()) { directColumns.add(expression.getDirectColumn()); rowOrder.add(expression.getDirectColumn()); } else { - final String virtualColumnName = virtualColumnPrefix + virtualColumnNameCounter++; - virtualColumns.add( - expression.toVirtualColumn( - virtualColumnName, - Calcites.getValueTypeForSqlTypeName(project.getChildExps().get(i).getType().getSqlTypeName()), - plannerContext.getExprMacroTable() - ) + VirtualColumn virtualColumn = queryColumns.getOrCreateVirtualColumnForExpression( + plannerContext, + expression, + project.getChildExps().get(i).getType().getSqlTypeName() ); - rowOrder.add(virtualColumnName); + virtualColumns.add(virtualColumn); + rowOrder.add(virtualColumn.getOutputName()); } } - return new SelectProjection(directColumns, virtualColumns, RowSignature.from(rowOrder, project.getRowType())); + return new SelectProjection( + directColumns, + ImmutableList.copyOf(virtualColumns), + RowSignature.from(rowOrder, project.getRowType()) + ); } @Nullable private static Grouping computeGrouping( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, - final RowSignature sourceRowSignature, + final DruidQuerySignature queryColumns, final RexBuilder rexBuilder, final boolean finalizeAggregations ) @@ -265,11 +288,11 @@ public class DruidQuery return null; } - final List dimensions = computeDimensions(partialQuery, plannerContext, sourceRowSignature); + final List dimensions = computeDimensions(partialQuery, plannerContext, queryColumns); final List aggregations = computeAggregations( partialQuery, plannerContext, - sourceRowSignature, + queryColumns, rexBuilder, finalizeAggregations ); @@ -284,10 +307,11 @@ public class DruidQuery aggregate.getRowType() ); + DruidQuerySignature aggregateSignature = queryColumns.asAggregateSignature(aggregateRowSignature); final DimFilter havingFilter = computeHavingFilter( partialQuery, - aggregateRowSignature, - plannerContext + plannerContext, + aggregateSignature ); if (aggregateProject == null) { @@ -414,7 +438,7 @@ public class DruidQuery * * @param partialQuery partial query * @param plannerContext planner context - * @param sourceRowSignature source row signature + * @param querySignature source row signature and re-usable virtual column references * * @return dimensions * @@ -423,21 +447,20 @@ public class DruidQuery private static List computeDimensions( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, - final RowSignature sourceRowSignature + final DruidQuerySignature querySignature ) { final Aggregate aggregate = Preconditions.checkNotNull(partialQuery.getAggregate()); final List dimensions = new ArrayList<>(); - final String outputNamePrefix = Calcites.findUnusedPrefix("d", new TreeSet<>(sourceRowSignature.getRowOrder())); + final String outputNamePrefix = Calcites.findUnusedPrefix("d", new TreeSet<>(querySignature.getRowSignature().getRowOrder())); int outputNameCounter = 0; for (int i : aggregate.getGroupSet()) { // Dimension might need to create virtual columns. Avoid giving it a name that would lead to colliding columns. - final String dimOutputName = outputNamePrefix + outputNameCounter++; - final RexNode rexNode = Expressions.fromFieldAccess(sourceRowSignature, partialQuery.getSelectProject(), i); + final RexNode rexNode = Expressions.fromFieldAccess(querySignature.getRowSignature(), partialQuery.getSelectProject(), i); final DruidExpression druidExpression = Expressions.toDruidExpression( plannerContext, - sourceRowSignature, + querySignature.getRowSignature(), rexNode ); if (druidExpression == null) { @@ -451,6 +474,16 @@ public class DruidQuery throw new CannotBuildQueryException(aggregate, rexNode); } + final VirtualColumn virtualColumn; + + final String dimOutputName; + if (!druidExpression.isSimpleExtraction()) { + virtualColumn = querySignature.getOrCreateVirtualColumnForExpression(plannerContext, druidExpression, sqlTypeName); + dimOutputName = virtualColumn.getOutputName(); + } else { + dimOutputName = outputNamePrefix + outputNameCounter++; + } + dimensions.add(new DimensionExpression(dimOutputName, druidExpression, outputType)); } @@ -462,7 +495,7 @@ public class DruidQuery * * @param partialQuery partial query * @param plannerContext planner context - * @param sourceRowSignature source row signature + * @param querySignature source row signature and re-usable virtual column references * @param rexBuilder calcite RexBuilder * @param finalizeAggregations true if this query should include explicit finalization for all of its * aggregators, where required. Useful for subqueries where Druid's native query layer @@ -475,26 +508,26 @@ public class DruidQuery private static List computeAggregations( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, - final RowSignature sourceRowSignature, + final DruidQuerySignature querySignature, final RexBuilder rexBuilder, final boolean finalizeAggregations ) { final Aggregate aggregate = Preconditions.checkNotNull(partialQuery.getAggregate()); final List aggregations = new ArrayList<>(); - final String outputNamePrefix = Calcites.findUnusedPrefix("a", new TreeSet<>(sourceRowSignature.getRowOrder())); + final String outputNamePrefix = Calcites.findUnusedPrefix("a", new TreeSet<>(querySignature.getRowSignature().getRowOrder())); for (int i = 0; i < aggregate.getAggCallList().size(); i++) { final String aggName = outputNamePrefix + i; final AggregateCall aggCall = aggregate.getAggCallList().get(i); final Aggregation aggregation = GroupByRules.translateAggregateCall( plannerContext, - sourceRowSignature, + querySignature, rexBuilder, partialQuery.getSelectProject(), - aggCall, aggregations, aggName, + aggCall, finalizeAggregations ); @@ -508,32 +541,6 @@ public class DruidQuery return aggregations; } - @Nullable - private static DimFilter computeHavingFilter( - final PartialDruidQuery partialQuery, - final RowSignature outputRowSignature, - final PlannerContext plannerContext - ) - { - final Filter havingFilter = partialQuery.getHavingFilter(); - - if (havingFilter == null) { - return null; - } - - final RexNode condition = havingFilter.getCondition(); - final DimFilter dimFilter = Expressions.toFilter( - plannerContext, - outputRowSignature, - condition - ); - if (dimFilter == null) { - throw new CannotBuildQueryException(havingFilter, condition); - } else { - return dimFilter; - } - } - @Nullable private static DefaultLimitSpec computeLimitSpec( final PartialDruidQuery partialQuery, @@ -629,27 +636,43 @@ public class DruidQuery return toExprType.equals(fromExprType); } - public VirtualColumns getVirtualColumns(final ExprMacroTable macroTable, final boolean includeDimensions) + public VirtualColumns getVirtualColumns(final boolean includeDimensions) { - final List retVal = new ArrayList<>(); + // 'sourceRowSignature' could provide a list of all defined virtual columns while constructing a query, but we + // still want to collect the set of VirtualColumns this way to ensure we only add what is still being used after + // the various transforms and optimizations + Set virtualColumns = new HashSet<>(); + // we always want to add any virtual columns used by the query level DimFilter + if (filter != null) { + for (String columnName : filter.getRequiredColumns()) { + if (sourceQuerySignature.isVirtualColumnDefined(columnName)) { + virtualColumns.add(sourceQuerySignature.getVirtualColumn(columnName)); + } + } + } if (selectProjection != null) { - retVal.addAll(selectProjection.getVirtualColumns()); + virtualColumns.addAll(selectProjection.getVirtualColumns()); } else { if (grouping != null) { if (includeDimensions) { - for (DimensionExpression dimensionExpression : grouping.getDimensions()) { - retVal.addAll(dimensionExpression.getVirtualColumns(macroTable)); + for (DimensionExpression expression : grouping.getDimensions()) { + if (sourceQuerySignature.isVirtualColumnDefined(expression.getOutputName())) { + virtualColumns.add(sourceQuerySignature.getVirtualColumn(expression.getOutputName())); + } } } for (Aggregation aggregation : grouping.getAggregations()) { - retVal.addAll(aggregation.getVirtualColumns()); + virtualColumns.addAll(aggregation.getVirtualColumns()); } } } - return VirtualColumns.create(retVal); + // sort for predictable output + List columns = new ArrayList<>(virtualColumns); + columns.sort(Comparator.comparing(VirtualColumn::getOutputName)); + return VirtualColumns.create(columns); } public Grouping getGrouping() @@ -672,11 +695,6 @@ public class DruidQuery return outputRowType; } - public RowSignature getSourceRowSignature() - { - return sourceRowSignature; - } - public RowSignature getOutputRowSignature() { return outputRowSignature; @@ -794,7 +812,7 @@ public class DruidQuery return null; } - final Filtration filtration = Filtration.create(filter).optimize(sourceRowSignature); + final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature); final List postAggregators = new ArrayList<>(grouping.getPostAggregators()); if (sortProject != null) { @@ -808,7 +826,7 @@ public class DruidQuery dataSource, filtration.getQuerySegmentSpec(), descending, - getVirtualColumns(plannerContext.getExprMacroTable(), false), + getVirtualColumns(false), filtration.getDimFilter(), queryGranularity, grouping.getAggregatorFactories(), @@ -870,7 +888,7 @@ public class DruidQuery return null; } - final Filtration filtration = Filtration.create(filter).optimize(sourceRowSignature); + final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature); final List postAggregators = new ArrayList<>(grouping.getPostAggregators()); if (sortProject != null) { @@ -879,7 +897,7 @@ public class DruidQuery return new TopNQuery( dataSource, - getVirtualColumns(plannerContext.getExprMacroTable(), true), + getVirtualColumns(true), dimensionSpec, topNMetricSpec, limitSpec.getLimit(), @@ -904,8 +922,17 @@ public class DruidQuery return null; } - final Filtration filtration = Filtration.create(filter).optimize(sourceRowSignature); + final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature); + final DimFilterHavingSpec havingSpec; + if (grouping.getHavingFilter() != null) { + havingSpec = new DimFilterHavingSpec( + Filtration.create(grouping.getHavingFilter()).optimizeFilterOnly(sourceQuerySignature).getDimFilter(), + true + ); + } else { + havingSpec = null; + } final List postAggregators = new ArrayList<>(grouping.getPostAggregators()); if (sortProject != null) { postAggregators.addAll(sortProject.getPostAggregators()); @@ -914,13 +941,13 @@ public class DruidQuery return new GroupByQuery( dataSource, filtration.getQuerySegmentSpec(), - getVirtualColumns(plannerContext.getExprMacroTable(), true), + getVirtualColumns(true), filtration.getDimFilter(), Granularities.ALL, grouping.getDimensionSpecs(), grouping.getAggregatorFactories(), postAggregators, - grouping.getHavingFilter() != null ? new DimFilterHavingSpec(grouping.getHavingFilter(), true) : null, + havingSpec, limitSpec, null, ImmutableSortedMap.copyOf(plannerContext.getQueryContext()) @@ -950,7 +977,7 @@ public class DruidQuery throw new ISE("WTF?! Attempting to convert to Scan query without any columns?"); } - final Filtration filtration = Filtration.create(filter).optimize(sourceRowSignature); + final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature); // DefaultLimitSpec (which we use to "remember" limits) is int typed, and Integer.MAX_VALUE means "no limit". final long scanLimit = limitSpec == null || limitSpec.getLimit() == Integer.MAX_VALUE @@ -983,7 +1010,7 @@ public class DruidQuery return null; } - final Filtration filtration = Filtration.create(filter).optimize(sourceRowSignature); + final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature); final boolean descending; final int threshold; @@ -1011,7 +1038,7 @@ public class DruidQuery // We need to ask for dummy columns to prevent Select from returning all of them. String dummyColumn = "dummy"; - while (sourceRowSignature.getColumnType(dummyColumn) != null + while (sourceQuerySignature.getRowSignature().getColumnType(dummyColumn) != null || outputRowSignature.getRowOrder().contains(dummyColumn)) { dummyColumn = dummyColumn + "_"; } @@ -1044,7 +1071,7 @@ public class DruidQuery Granularities.ALL, ImmutableList.of(new DefaultDimensionSpec(dummyColumn, dummyColumn)), metrics.stream().sorted().distinct().collect(Collectors.toList()), - getVirtualColumns(plannerContext.getExprMacroTable(), true), + getVirtualColumns(true), pagingSpec, ImmutableSortedMap.copyOf(plannerContext.getQueryContext()) ); diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuerySignature.java b/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuerySignature.java new file mode 100644 index 00000000000..2b320ecc5cb --- /dev/null +++ b/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuerySignature.java @@ -0,0 +1,148 @@ +/* + * 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. + */ + +package org.apache.druid.sql.calcite.rel; + +import org.apache.calcite.sql.type.SqlTypeName; +import org.apache.druid.segment.VirtualColumn; +import org.apache.druid.sql.calcite.expression.DruidExpression; +import org.apache.druid.sql.calcite.planner.Calcites; +import org.apache.druid.sql.calcite.planner.PlannerContext; +import org.apache.druid.sql.calcite.table.RowSignature; + +import javax.annotation.Nullable; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeSet; + +/** + * Wraps a {@link RowSignature} and provides facilities to re-use {@link VirtualColumn} definitions for dimensions, + * filters, and filtered aggregators while constructing a {@link DruidQuery} + */ +public class DruidQuerySignature +{ + private final RowSignature rowSignature; + private final boolean isAggregateSignature; + + private final Map virtualColumnsByExpression; + private final Map virtualColumnsByName; + private final String virtualColumnPrefix; + private int virtualColumnCounter; + + public DruidQuerySignature(RowSignature rowSignature) + { + this.isAggregateSignature = false; + this.rowSignature = rowSignature; + this.virtualColumnPrefix = rowSignature == null ? "v" : Calcites.findUnusedPrefix( + "v", + new TreeSet<>(rowSignature.getRowOrder()) + ); + this.virtualColumnsByExpression = new HashMap<>(); + this.virtualColumnsByName = new HashMap<>(); + } + + private DruidQuerySignature( + RowSignature rowSignature, + String prefix, + Map virtualColumnsByExpression, + Map virtualColumnsByName, + boolean isAggregateSignature + ) + { + this.isAggregateSignature = isAggregateSignature; + this.rowSignature = rowSignature; + this.virtualColumnPrefix = prefix; + this.virtualColumnsByExpression = virtualColumnsByExpression; + this.virtualColumnsByName = virtualColumnsByName; + } + + /** + * Get {@link RowSignature} of {@link DruidQuery} under construction + */ + public RowSignature getRowSignature() + { + return rowSignature; + } + + /** + * Check if a {@link VirtualColumn} is defined by column name + */ + public boolean isVirtualColumnDefined(String virtualColumnName) + { + return virtualColumnsByName.containsKey(virtualColumnName); + } + + + /** + * Get existing or create new (if not {@link DruidQuerySignature#isAggregateSignature}) {@link VirtualColumn} for a given + * {@link DruidExpression} + */ + @Nullable + public VirtualColumn getOrCreateVirtualColumnForExpression( + PlannerContext plannerContext, + DruidExpression expression, + SqlTypeName typeName + ) + { + if (!isAggregateSignature && !virtualColumnsByExpression.containsKey(expression.getExpression())) { + final String virtualColumnName = virtualColumnPrefix + virtualColumnCounter++; + final VirtualColumn virtualColumn = expression.toVirtualColumn( + virtualColumnName, + Calcites.getValueTypeForSqlTypeName(typeName), + plannerContext.getExprMacroTable() + ); + virtualColumnsByExpression.put( + expression.getExpression(), + virtualColumn + ); + virtualColumnsByName.put( + virtualColumnName, + virtualColumn + ); + } + + return virtualColumnsByExpression.get(expression.getExpression()); + } + + /** + * Get existing virtual column by column name + */ + @Nullable + public VirtualColumn getVirtualColumn(String virtualColumnName) + { + return virtualColumnsByName.getOrDefault(virtualColumnName, null); + } + + /** + * Create as an "immutable" "aggregate" signature for a grouping, so that post aggregations and having filters + * can not define new virtual columns + * @param sourceSignature + * @return + */ + public DruidQuerySignature asAggregateSignature(RowSignature sourceSignature) + { + return new DruidQuerySignature( + sourceSignature, + virtualColumnPrefix, + virtualColumnsByExpression, + virtualColumnsByName, + true + ); + } +} diff --git a/sql/src/main/java/org/apache/druid/sql/calcite/rule/GroupByRules.java b/sql/src/main/java/org/apache/druid/sql/calcite/rule/GroupByRules.java index a3c35c00334..59891525e1e 100644 --- a/sql/src/main/java/org/apache/druid/sql/calcite/rule/GroupByRules.java +++ b/sql/src/main/java/org/apache/druid/sql/calcite/rule/GroupByRules.java @@ -31,7 +31,7 @@ import org.apache.druid.sql.calcite.aggregation.SqlAggregator; import org.apache.druid.sql.calcite.expression.Expressions; import org.apache.druid.sql.calcite.filtration.Filtration; import org.apache.druid.sql.calcite.planner.PlannerContext; -import org.apache.druid.sql.calcite.table.RowSignature; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; import java.util.ArrayList; import java.util.List; @@ -52,12 +52,12 @@ public class GroupByRules */ public static Aggregation translateAggregateCall( final PlannerContext plannerContext, - final RowSignature sourceRowSignature, + final DruidQuerySignature querySignature, final RexBuilder rexBuilder, final Project project, - final AggregateCall call, final List existingAggregations, final String name, + final AggregateCall call, final boolean finalizeAggregations ) { @@ -71,11 +71,11 @@ public class GroupByRules } final RexNode expression = project.getChildExps().get(call.filterArg); - final DimFilter nonOptimizedFilter = Expressions.toFilter(plannerContext, sourceRowSignature, expression); + final DimFilter nonOptimizedFilter = Expressions.toFilter(plannerContext, querySignature, expression); if (nonOptimizedFilter == null) { return null; } else { - filter = Filtration.create(nonOptimizedFilter).optimizeFilterOnly(sourceRowSignature).getDimFilter(); + filter = Filtration.create(nonOptimizedFilter).optimizeFilterOnly(querySignature).getDimFilter(); } } else { filter = null; @@ -121,12 +121,9 @@ public class GroupByRules final Aggregation retVal = sqlAggregator.toDruidAggregation( plannerContext, - sourceRowSignature, + querySignature, rexBuilder, - name, - call, - project, - existingAggregationsWithSameFilter, + name, call, project, existingAggregationsWithSameFilter, finalizeAggregations ); @@ -137,7 +134,7 @@ public class GroupByRules if (isUsingExistingAggregation(retVal, existingAggregationsWithSameFilter)) { return retVal; } else { - return retVal.filter(sourceRowSignature, filter); + return retVal.filter(querySignature, filter); } } } diff --git a/sql/src/test/java/org/apache/druid/sql/calcite/BaseCalciteQueryTest.java b/sql/src/test/java/org/apache/druid/sql/calcite/BaseCalciteQueryTest.java index 4ee3b1fb8f6..29247b54004 100644 --- a/sql/src/test/java/org/apache/druid/sql/calcite/BaseCalciteQueryTest.java +++ b/sql/src/test/java/org/apache/druid/sql/calcite/BaseCalciteQueryTest.java @@ -243,22 +243,22 @@ public class BaseCalciteQueryTest extends CalciteTestBase } // Generate timestamps for expected results - public static long t(final String timeString) + public static long timestamp(final String timeString) { return Calcites.jodaToCalciteTimestamp(DateTimes.of(timeString), DateTimeZone.UTC); } // Generate timestamps for expected results - public static long t(final String timeString, final String timeZoneString) + public static long timestamp(final String timeString, final String timeZoneString) { final DateTimeZone timeZone = DateTimes.inferTzFromString(timeZoneString); return Calcites.jodaToCalciteTimestamp(new DateTime(timeString, timeZone), timeZone); } // Generate day numbers for expected results - public static int d(final String dayString) + public static int day(final String dayString) { - return (int) (Intervals.utc(t("1970"), t(dayString)).toDurationMillis() / (86400L * 1000L)); + return (int) (Intervals.utc(timestamp("1970"), timestamp(dayString)).toDurationMillis() / (86400L * 1000L)); } public static QuerySegmentSpec querySegmentSpec(final Interval... intervals) @@ -296,7 +296,7 @@ public class BaseCalciteQueryTest extends CalciteTestBase return new ExpressionDimFilter(expression, CalciteTests.createExprMacroTable()); } - public static DimFilter numeric_Selector( + public static DimFilter numericSelector( final String fieldName, final String value, final ExtractionFn extractionFn @@ -339,7 +339,7 @@ public class BaseCalciteQueryTest extends CalciteTestBase return new CascadeExtractionFn(fns); } - public static List dimensionSpec(final DimensionSpec... dimensionSpecs) + public static List dimensions(final DimensionSpec... dimensionSpecs) { return Arrays.asList(dimensionSpecs); } @@ -354,7 +354,7 @@ public class BaseCalciteQueryTest extends CalciteTestBase return new DimFilterHavingSpec(filter, true); } - public static ExpressionVirtualColumn expression_Virtual_Column( + public static ExpressionVirtualColumn expressionVirtualColumn( final String name, final String expression, final ValueType outputType @@ -363,7 +363,7 @@ public class BaseCalciteQueryTest extends CalciteTestBase return new ExpressionVirtualColumn(name, expression, outputType, CalciteTests.createExprMacroTable()); } - public static ExpressionPostAggregator expresionPostAgg(final String name, final String expression) + public static ExpressionPostAggregator expressionPostAgg(final String name, final String expression) { return new ExpressionPostAggregator(name, expression, null, CalciteTests.createExprMacroTable()); } diff --git a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java index 839d8927ad9..f18c276266e 100644 --- a/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java +++ b/sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java @@ -109,7 +109,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest newScanQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .virtualColumns(expression_Virtual_Column("v0", "2", ValueType.LONG)) + .virtualColumns(expressionVirtualColumn("v0", "2", ValueType.LONG)) .columns("dim1", "v0") .resultFormat(ScanQuery.RESULT_FORMAT_COMPACTED_LIST) .limit(1) @@ -141,7 +141,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new DoubleSumAggregatorFactory("a1", "m2") )) .postAggregators( - expresionPostAgg("p0", "(exp(\"a0\") + 10)") + expressionPostAgg("p0", "(exp(\"a0\") + 10)") ) .context(QUERY_CONTEXT_DONT_SKIP_EMPTY_BUCKETS) .build()), @@ -164,7 +164,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new DoubleSumAggregatorFactory("a1", "m2") )) .postAggregators( - expresionPostAgg("p0", "(exp(\"a0\") + 10)") + expressionPostAgg("p0", "(exp(\"a0\") + 10)") ) .context(QUERY_CONTEXT_DONT_SKIP_EMPTY_BUCKETS) .build()), @@ -216,17 +216,17 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .granularity(Granularities.ALL) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .postAggregators( - expresionPostAgg("p0", "'foo'"), - expresionPostAgg("p1", "'xfoo'"), - expresionPostAgg("p2", "'foo'"), - expresionPostAgg("p3", "' foo'"), - expresionPostAgg("p4", "'foo'"), - expresionPostAgg("p5", "'foo'"), - expresionPostAgg("p6", "'foo'"), - expresionPostAgg("p7", "'foo '"), - expresionPostAgg("p8", "'foox'"), - expresionPostAgg("p9", "' foo'"), - expresionPostAgg("p10", "'xfoo'") + expressionPostAgg("p0", "'foo'"), + expressionPostAgg("p1", "'xfoo'"), + expressionPostAgg("p2", "'foo'"), + expressionPostAgg("p3", "' foo'"), + expressionPostAgg("p4", "'foo'"), + expressionPostAgg("p5", "'foo'"), + expressionPostAgg("p6", "'foo'"), + expressionPostAgg("p7", "'foo '"), + expressionPostAgg("p8", "'foox'"), + expressionPostAgg("p9", "' foo'"), + expressionPostAgg("p10", "'xfoo'") ) .context(TIMESERIES_CONTEXT_DEFAULT) .build() @@ -436,14 +436,14 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1f, 1.0, hyperLogLogCollectorClassName}, + new Object[]{timestamp("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1f, 1.0, hyperLogLogCollectorClassName}, new Object[]{ - t("2000-01-02"), 1L, "10.1", NULL_VALUE, "[\"b\",\"c\"]", 2f, 2.0, hyperLogLogCollectorClassName + timestamp("2000-01-02"), 1L, "10.1", NULL_VALUE, "[\"b\",\"c\"]", 2f, 2.0, hyperLogLogCollectorClassName }, - new Object[]{t("2000-01-03"), 1L, "2", "", "d", 3f, 3.0, hyperLogLogCollectorClassName}, - new Object[]{t("2001-01-01"), 1L, "1", "a", "", 4f, 4.0, hyperLogLogCollectorClassName}, - new Object[]{t("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5f, 5.0, hyperLogLogCollectorClassName}, - new Object[]{t("2001-01-03"), 1L, "abc", NULL_VALUE, NULL_VALUE, 6f, 6.0, hyperLogLogCollectorClassName} + new Object[]{timestamp("2000-01-03"), 1L, "2", "", "d", 3f, 3.0, hyperLogLogCollectorClassName}, + new Object[]{timestamp("2001-01-01"), 1L, "1", "a", "", 4f, 4.0, hyperLogLogCollectorClassName}, + new Object[]{timestamp("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5f, 5.0, hyperLogLogCollectorClassName}, + new Object[]{timestamp("2001-01-03"), 1L, "abc", NULL_VALUE, NULL_VALUE, 6f, 6.0, hyperLogLogCollectorClassName} ) ); } @@ -471,7 +471,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ), ImmutableList.of( new Object[]{ - t("2000-01-01"), + timestamp("2000-01-01"), 1L, "forbidden", "abcd", @@ -536,8 +536,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1.0f, 1.0, HLLC_STRING}, - new Object[]{t("2000-01-02"), 1L, "10.1", NULL_VALUE, "[\"b\",\"c\"]", 2.0f, 2.0, HLLC_STRING} + new Object[]{timestamp("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1.0f, 1.0, HLLC_STRING}, + new Object[]{timestamp("2000-01-02"), 1L, "10.1", NULL_VALUE, "[\"b\",\"c\"]", 2.0f, 2.0, HLLC_STRING} ) ); } @@ -552,7 +552,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .virtualColumns( - expression_Virtual_Column("v0", "substring(\"dim2\", 0, 1)", ValueType.STRING) + expressionVirtualColumn("v0", "substring(\"dim2\", 0, 1)", ValueType.STRING) ) .columns("v0") .limit(2) @@ -588,8 +588,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2001-01-03"), 1L, "abc", NULL_VALUE, NULL_VALUE, 6f, 6d, HLLC_STRING}, - new Object[]{t("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5f, 5d, HLLC_STRING} + new Object[]{timestamp("2001-01-03"), 1L, "abc", NULL_VALUE, NULL_VALUE, 6f, 6d, HLLC_STRING}, + new Object[]{timestamp("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5f, 5d, HLLC_STRING} ) ); } @@ -631,12 +631,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1f, 1.0, HLLC_STRING}, - new Object[]{t("2000-01-02"), 1L, "10.1", NULL_VALUE, "[\"b\",\"c\"]", 2f, 2.0, HLLC_STRING}, - new Object[]{t("2000-01-03"), 1L, "2", "", "d", 3f, 3.0, HLLC_STRING}, - new Object[]{t("2001-01-01"), 1L, "1", "a", "", 4f, 4.0, HLLC_STRING}, - new Object[]{t("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5f, 5.0, HLLC_STRING}, - new Object[]{t("2001-01-03"), 1L, "abc", NULL_VALUE, NULL_VALUE, 6f, 6.0, HLLC_STRING} + new Object[]{timestamp("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1f, 1.0, HLLC_STRING}, + new Object[]{timestamp("2000-01-02"), 1L, "10.1", NULL_VALUE, "[\"b\",\"c\"]", 2f, 2.0, HLLC_STRING}, + new Object[]{timestamp("2000-01-03"), 1L, "2", "", "d", 3f, 3.0, HLLC_STRING}, + new Object[]{timestamp("2001-01-01"), 1L, "1", "a", "", 4f, 4.0, HLLC_STRING}, + new Object[]{timestamp("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5f, 5.0, HLLC_STRING}, + new Object[]{timestamp("2001-01-03"), 1L, "abc", NULL_VALUE, NULL_VALUE, 6f, 6.0, HLLC_STRING} ) ); } @@ -672,7 +672,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest Druids.newSelectQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .dimensionSpecs(dimensionSpec(new DefaultDimensionSpec("dim1", "d1"))) + .dimensionSpecs(dimensions(new DefaultDimensionSpec("dim1", "d1"))) .granularity(Granularities.ALL) .descending(true) .dimensions(ImmutableList.of("dummy")) @@ -699,7 +699,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new GroupByQuery.Builder() .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setGranularity(Granularities.ALL) .setLimitSpec( new DefaultLimitSpec( @@ -798,7 +798,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -819,7 +819,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -841,7 +841,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setLimitSpec( new DefaultLimitSpec( @@ -883,8 +883,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 3L}, - new Object[]{t("2001-01-01"), 3L} + new Object[]{timestamp("2000-01-01"), 3L}, + new Object[]{timestamp("2001-01-01"), 3L} ) ); } @@ -899,7 +899,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setLimitSpec( new DefaultLimitSpec( @@ -932,7 +932,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("m1", "d0", ValueType.FLOAT))) + .setDimensions(dimensions(new DefaultDimensionSpec("m1", "d0", ValueType.FLOAT))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -958,7 +958,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("m2", "d0", ValueType.DOUBLE))) + .setDimensions(dimensions(new DefaultDimensionSpec("m2", "d0", ValueType.DOUBLE))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -1027,7 +1027,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setAggregatorSpecs(aggregators(new DoubleSumAggregatorFactory("a0", "m1"))) - .setHavingSpec(having(numeric_Selector("a0", "21", null))) + .setHavingSpec(having(selector("a0", "21", null))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ), @@ -1047,7 +1047,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs(aggregators(new DoubleSumAggregatorFactory("a0", "m1"))) .setHavingSpec( having( @@ -1086,7 +1086,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs( aggregators( new CardinalityAggregatorFactory( @@ -1144,7 +1144,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim2", "d0", ValueType.STRING), new DefaultDimensionSpec("m1", "d1", ValueType.FLOAT) ) @@ -1155,7 +1155,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0", "_d0", ValueType.STRING))) + .setDimensions(dimensions(new DefaultDimensionSpec("d0", "_d0", ValueType.STRING))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setHavingSpec( having( @@ -1190,14 +1190,14 @@ public class CalciteQueryTest extends BaseCalciteQueryTest { testQuery( PLANNER_CONFIG_FALLBACK, - "SELECT dim1, CASt(SUM(m1) AS FLOAT) AS m1_sum FROM druid.foo GROUP BY dim1 HAVING CAST(SUM(m1) AS FLOAT) > 1", + "SELECT dim1, CAST(SUM(m1) AS FLOAT) AS m1_sum FROM druid.foo GROUP BY dim1 HAVING CAST(SUM(m1) AS FLOAT) > 1", CalciteTests.REGULAR_USER_AUTH_RESULT, ImmutableList.of( GroupByQuery.builder() .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs(aggregators(new DoubleSumAggregatorFactory("a0", "m1"))) .setHavingSpec( having( @@ -1237,7 +1237,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(expressionFilter("((\"m1\" - 1) == \"dim1\")")) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("m1", "d1", ValueType.FLOAT) )) @@ -1273,7 +1273,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs(aggregators( new FilteredAggregatorFactory( new CountAggregatorFactory("a0"), @@ -1282,7 +1282,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CountAggregatorFactory("a1") )) .setPostAggregatorSpecs(ImmutableList.of( - expresionPostAgg("p0", "(\"a0\" / \"a1\")") + expressionPostAgg("p0", "(\"a0\" / \"a1\")") )) .setHavingSpec(having(expressionFilter("((\"a0\" / \"a1\") == 1)"))) .setContext(QUERY_CONTEXT_DEFAULT) @@ -1311,9 +1311,9 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setPostAggregatorSpecs(ImmutableList.of( - expresionPostAgg("p0", "substring(\"d0\", 1, -1)") + expressionPostAgg("p0", "substring(\"d0\", 1, -1)") )) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -1344,10 +1344,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setPostAggregatorSpecs(ImmutableList.of( - expresionPostAgg("p0", "substring(\"d0\", 1, -1)"), - expresionPostAgg("p1", "strlen(\"d0\")") + expressionPostAgg("p0", "substring(\"d0\", 1, -1)"), + expressionPostAgg("p1", "strlen(\"d0\")") )) .setLimitSpec(new DefaultLimitSpec( ImmutableList.of( @@ -1395,7 +1395,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .granularity(Granularities.ALL) .dimension(new DefaultDimensionSpec("dim1", "d0")) .postAggregators(ImmutableList.of( - expresionPostAgg("p0", "substring(\"d0\", 1, -1)") + expressionPostAgg("p0", "substring(\"d0\", 1, -1)") )) .metric(new DimensionTopNMetricSpec(null, StringComparators.LEXICOGRAPHIC)) .threshold(10) @@ -1432,8 +1432,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .granularity(Granularities.ALL) .dimension(new DefaultDimensionSpec("dim1", "d0")) .postAggregators(ImmutableList.of( - expresionPostAgg("p0", "substring(\"d0\", 1, -1)"), - expresionPostAgg("p1", "strlen(\"d0\")") + expressionPostAgg("p0", "substring(\"d0\", 1, -1)"), + expressionPostAgg("p1", "strlen(\"d0\")") )) .metric(new NumericTopNMetricSpec("p1")) .threshold(10) @@ -1555,7 +1555,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) .aggregators(aggregators(new DoubleSumAggregatorFactory("a0", "m1"))) - .postAggregators(ImmutableList.of(expresionPostAgg("p0", "(\"a0\" / 10)"))) + .postAggregators(ImmutableList.of(expressionPostAgg("p0", "(\"a0\" / 10)"))) .context(TIMESERIES_CONTEXT_DEFAULT) .build() ), @@ -1583,7 +1583,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setAggregatorSpecs(aggregators(new DoubleSumAggregatorFactory("a0", "m1"))) - .setHavingSpec(having(numeric_Selector("a0", "21", null))) + .setHavingSpec(having(selector("a0", "21", null))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ), @@ -1615,8 +1615,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "case_searched(" + "(CAST(timestamp_extract(\"__time\",'DAY','UTC'), 'DOUBLE') == \"m1\")," + "'match-m1'," @@ -1628,7 +1628,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ValueType.STRING ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0"))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -1656,13 +1656,13 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "case_searched(((\"m1\" > 1) && (\"m1\" < 5) && (\"cnt\" == 1)),'x',null)", ValueType.STRING ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0"))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -1772,13 +1772,13 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "case_searched(notnull(\"dim2\"),\"dim2\",\"dim1\")", ValueType.STRING ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.STRING))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.STRING))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -1884,9 +1884,9 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1.0f, 1.0d, HLLC_STRING}, - new Object[]{t("2001-01-01"), 1L, "1", "a", "", 4.0f, 4.0d, HLLC_STRING}, - new Object[]{t("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5.0f, 5.0d, HLLC_STRING} + new Object[]{timestamp("2000-01-01"), 1L, "", "a", "[\"a\",\"b\"]", 1.0f, 1.0d, HLLC_STRING}, + new Object[]{timestamp("2001-01-01"), 1L, "1", "a", "", 4.0f, 4.0d, HLLC_STRING}, + new Object[]{timestamp("2001-01-02"), 1L, "def", "abc", NULL_VALUE, 5.0f, 5.0d, HLLC_STRING} ) ); } @@ -2019,14 +2019,17 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) + .virtualColumns( + expressionVirtualColumn( + "v0", + "case_searched((\"dim2\" == 'abc'),'yes',(\"dim2\" == 'def'),'yes'," + DruidExpression.nullLiteral() + ")", + ValueType.STRING + ) + ) .aggregators(aggregators( new FilteredAggregatorFactory( new CountAggregatorFactory("a0"), - expressionFilter( - "notnull(case_searched((\"dim2\" == 'abc'),'yes',(\"dim2\" == 'def'),'yes'," - + DruidExpression.nullLiteral() - + "))" - ) + not(selector("v0", NullHandling.defaultStringValue(), null)) ) )) .context(TIMESERIES_CONTEXT_DEFAULT) @@ -2295,12 +2298,18 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) + .setVirtualColumns( + expressionVirtualColumn( + "v0", + "floor(CAST(\"dim1\", 'DOUBLE'))", + ValueType.DOUBLE) + ) .setDimFilter( or( selector("dim1", "10", null), and( - expressionFilter("(floor(CAST(\"dim1\", 'DOUBLE')) == 10.00)"), + selector("v0", "10.00", null), bound("dim1", "9", "10.5", true, false, null, StringComparators.NUMERIC) ) ) @@ -2351,7 +2360,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new FieldAccessPostAggregator(null, "a2:count") ) ), - expresionPostAgg("p0", "((\"a3\" + \"a4\") + \"a5\")") + expressionPostAgg("p0", "((\"a3\" + \"a4\") + \"a5\")") ) .context(TIMESERIES_CONTEXT_DEFAULT) .build() @@ -2386,7 +2395,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest )) .postAggregators( ImmutableList.of( - expresionPostAgg("p0", "(\"a0\" + \"a1\")") + expressionPostAgg("p0", "(\"a0\" + \"a1\")") ) ) .threshold(3) @@ -2415,12 +2424,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs( new FloatMinAggregatorFactory("a0", "m1"), new FloatMaxAggregatorFactory("a1", "m1") ) - .setPostAggregatorSpecs(ImmutableList.of(expresionPostAgg("p0", "(\"a0\" + \"a1\")"))) + .setPostAggregatorSpecs(ImmutableList.of(expressionPostAgg("p0", "(\"a0\" + \"a1\")"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( @@ -2459,14 +2468,14 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs( new FloatMinAggregatorFactory("a0", "m1"), new FloatMaxAggregatorFactory("a1", "m1") ) .setPostAggregatorSpecs( ImmutableList.of( - expresionPostAgg("p0", "(\"a0\" + \"a1\")") + expressionPostAgg("p0", "(\"a0\" + \"a1\")") ) ) .setLimitSpec( @@ -2566,7 +2575,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a10", null, - dimensionSpec(new DefaultDimensionSpec("m1", "m1", ValueType.FLOAT)), + dimensions(new DefaultDimensionSpec("m1", "m1", ValueType.FLOAT)), false, true ), @@ -2604,7 +2613,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("cnt", "d0", ValueType.LONG))) .setAggregatorSpecs(aggregators( new FilteredAggregatorFactory( new CountAggregatorFactory("a0"), @@ -2612,7 +2621,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ), new LongSumAggregatorFactory("a1", "cnt") )) - .setPostAggregatorSpecs(ImmutableList.of(expresionPostAgg("p0", "(\"a0\" + \"a1\")"))) + .setPostAggregatorSpecs(ImmutableList.of(expressionPostAgg("p0", "(\"a0\" + \"a1\")"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ), @@ -2689,8 +2698,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new DoubleMaxAggregatorFactory("a4", null, "(strlen(\"dim2\") + log(\"m1\"))", macroTable) )) .postAggregators( - expresionPostAgg("p0", "log((\"a1\" + \"a2\"))"), - expresionPostAgg("p1", "(\"a1\" % 4)") + expressionPostAgg("p0", "log((\"a1\" + \"a2\"))"), + expressionPostAgg("p1", "(\"a1\" % 4)") ) .context(TIMESERIES_CONTEXT_DEFAULT) .build() @@ -2718,16 +2727,16 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column("d0:v", "(floor((\"m1\" / 2)) * 2)", ValueType.FLOAT) + expressionVirtualColumn("v0", "(floor((\"m1\" / 2)) * 2)", ValueType.FLOAT) ) - .setDimFilter(expressionFilter("((floor((\"m1\" / 2)) * 2) > -1)")) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.FLOAT))) + .setDimFilter(bound("v0", "-1", null, true, false, null, StringComparators.NUMERIC)) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.FLOAT))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.DESCENDING, StringComparators.NUMERIC ) @@ -2764,18 +2773,18 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column("d0:v", "((CAST(\"m1\", 'LONG') / 2) * 2)", ValueType.LONG) + expressionVirtualColumn("v0", "((CAST(\"m1\", 'LONG') / 2) * 2)", ValueType.LONG) ) .setDimFilter( - expressionFilter("(((CAST(\"m1\", 'LONG') / 2) * 2) > -1)") + bound("v0", "-1", null, true, false, null, StringComparators.NUMERIC) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.DESCENDING, StringComparators.NUMERIC ) @@ -2812,22 +2821,22 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "(floor((CAST(\"dim1\", 'DOUBLE') / 2)) * 2)", ValueType.FLOAT ) ) .setDimFilter( - expressionFilter("((floor((CAST(\"dim1\", 'DOUBLE') / 2)) * 2) > -1)") + bound("v0", "-1", null, true, false, null, StringComparators.NUMERIC) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.FLOAT))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.FLOAT))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.DESCENDING, StringComparators.NUMERIC ) @@ -2862,7 +2871,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setDimFilter(new InDimFilter("dim1", ImmutableList.of("abc", "def", "ghi"), null)) .setAggregatorSpecs( aggregators( @@ -2901,7 +2910,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setDimFilter(new InDimFilter("dim1", elements, null)) .setAggregatorSpecs( aggregators( @@ -3030,7 +3039,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) - .filters(numeric_Selector("dim1", "2", null)) + .filters(numericSelector("dim1", "2", null)) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .context(TIMESERIES_CONTEXT_DEFAULT) .build() @@ -3364,8 +3373,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest not(selector("dim2", "a", null)), bound( "__time", - String.valueOf(t("2000-01-01")), - String.valueOf(t("2000-12-31T23:59:59.999")), + String.valueOf(timestamp("2000-01-01")), + String.valueOf(timestamp("2000-12-31T23:59:59.999")), false, false, null, @@ -3557,7 +3566,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column("d0:v", "timestamp_floor(\"cnt\",'P1Y',null,'UTC')", ValueType.LONG) + expressionVirtualColumn("v0", "timestamp_floor(\"cnt\",'P1Y',null,'UTC')", ValueType.LONG) ) .setDimFilter( bound( @@ -3570,13 +3579,13 @@ public class CalciteQueryTest extends BaseCalciteQueryTest StringComparators.NUMERIC ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ), ImmutableList.of( - new Object[]{t("1970-01-01"), 6L} + new Object[]{timestamp("1970-01-01"), 6L} ) ); } @@ -3591,7 +3600,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setDimFilter( or( selector( @@ -3627,11 +3636,15 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setVirtualColumns( + expressionVirtualColumn("v0", "strlen(\"dim1\")", ValueType.LONG), + expressionVirtualColumn("v1", "CAST(strlen(\"dim1\"), 'STRING')", ValueType.STRING) + ) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setDimFilter( or( - expressionFilter("(strlen(\"dim1\") == 3)"), - expressionFilter("(CAST(strlen(\"dim1\"), 'STRING') == 3)") + selector("v0", "3", null), + selector("v1", "3", null) ) ) .setContext(QUERY_CONTEXT_DEFAULT) @@ -3798,7 +3811,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a1", null, - dimensionSpec(new DefaultDimensionSpec("dim2", null)), + dimensions(new DefaultDimensionSpec("dim2", null)), false, true ), @@ -3882,7 +3895,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ) @@ -3923,7 +3936,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a0", null, - dimensionSpec(new DefaultDimensionSpec("dim2", null)), + dimensions(new DefaultDimensionSpec("dim2", null)), false, true ) @@ -3955,7 +3968,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("dim2", "d0"), new DefaultDimensionSpec("dim1", "d1") )) @@ -3966,7 +3979,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0", "_d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("d0", "_d0"))) .setAggregatorSpecs(aggregators( new LongSumAggregatorFactory("_a0", "a0"), new FilteredAggregatorFactory( @@ -4010,7 +4023,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) .virtualColumns( - expression_Virtual_Column("a4:v", "concat(substring(\"dim2\", 0, 1),'x')", ValueType.STRING) + expressionVirtualColumn("v0", "concat(substring(\"dim2\", 0, 1),'x')", ValueType.STRING) ) .aggregators( aggregators( @@ -4018,7 +4031,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a1", null, - dimensionSpec(new DefaultDimensionSpec("dim2", "dim2")), + dimensions(new DefaultDimensionSpec("dim2", "dim2")), false, true ), @@ -4026,7 +4039,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a2", null, - dimensionSpec(new DefaultDimensionSpec("dim2", "dim2")), + dimensions(new DefaultDimensionSpec("dim2", "dim2")), false, true ), @@ -4035,7 +4048,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a3", null, - dimensionSpec( + dimensions( new ExtractionDimensionSpec( "dim2", "dim2", @@ -4049,7 +4062,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a4", null, - dimensionSpec(new DefaultDimensionSpec("a4:v", "a4:v", ValueType.STRING)), + dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.STRING)), false, true ), @@ -4095,7 +4108,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("m2", "d0", ValueType.DOUBLE), new DefaultDimensionSpec("dim1", "d1") )) @@ -4107,15 +4120,15 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "_d0:v", + expressionVirtualColumn( + "v0", "timestamp_floor(\"a0\",'PT1H',null,'UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec( - new DefaultDimensionSpec("_d0:v", "_d0", ValueType.LONG), - new DefaultDimensionSpec("d1", "_d1", ValueType.STRING) + .setDimensions(dimensions( + new DefaultDimensionSpec("v0", "v0", ValueType.LONG), + new DefaultDimensionSpec("d1", "_d0", ValueType.STRING) )) .setAggregatorSpecs(aggregators( new CountAggregatorFactory("_a0") @@ -4153,7 +4166,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") )) @@ -4163,7 +4176,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d1", "_d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("d1", "_d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("_a0", "a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4232,7 +4245,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4277,13 +4290,13 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_floor(\"__time\",'P1D',null,'UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4296,7 +4309,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new LongMinAggregatorFactory("_a1", "a0"), new LongSumAggregatorFactory("_a2:sum", "a0"), new CountAggregatorFactory("_a2:count"), - new LongMaxAggregatorFactory("_a3", "d0"), + new LongMaxAggregatorFactory("_a3", "v0"), new CountAggregatorFactory("_a4") )) .setPostAggregatorSpecs( @@ -4309,7 +4322,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new FieldAccessPostAggregator(null, "_a2:count") ) ), - expresionPostAgg("s0", "timestamp_extract(\"_a3\",'EPOCH','UTC')") + expressionPostAgg("s0", "timestamp_extract(\"_a3\",'EPOCH','UTC')") ) ) .setLimit(1) @@ -4336,19 +4349,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_floor(\"__time\",'P1D',null,'UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs( aggregators( new CardinalityAggregatorFactory( "a0:a", null, - dimensionSpec(new DefaultDimensionSpec("cnt", "cnt", ValueType.LONG)), + dimensions(new DefaultDimensionSpec("cnt", "cnt", ValueType.LONG)), false, true ) @@ -4425,7 +4438,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(filter) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( @@ -4492,7 +4505,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(in("dim2", ImmutableList.of("", "a"), null)) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( @@ -4543,7 +4556,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( @@ -4589,7 +4602,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(not(selector("dim1", "", null))) - .setDimensions(dimensionSpec(new ExtractionDimensionSpec( + .setDimensions(dimensions(new ExtractionDimensionSpec( "dim1", "d0", new SubstringDimExtractionFn(0, 1) @@ -4608,7 +4621,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ImmutableList.of("1", "2", "a", "d"), new SubstringDimExtractionFn(0, 1) )) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ) @@ -4685,7 +4698,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setDimFilter(not(selector("dim2", "", null))) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4724,7 +4737,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setDimFilter(not(selector("dim2", null, null))) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4766,7 +4779,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimit(1) .setContext(QUERY_CONTEXT_DEFAULT) @@ -4811,7 +4824,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(not(selector("dim1", "", null))) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ) @@ -4823,14 +4836,14 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a1", null, - dimensionSpec(new DefaultDimensionSpec("d0", null)), + dimensions(new DefaultDimensionSpec("d0", null)), false, true ) )) .setPostAggregatorSpecs( ImmutableList.of( - expresionPostAgg("p0", "((1 - (\"a1\" / \"a0\")) * 100)") + expressionPostAgg("p0", "((1 - (\"a1\" / \"a0\")) * 100)") ) ) .setContext(QUERY_CONTEXT_DEFAULT) @@ -4859,7 +4872,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4867,7 +4880,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("a0", "_d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("a0", "_d0"))) .setAggregatorSpecs(aggregators( new CountAggregatorFactory("_a0") )) @@ -4904,7 +4917,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -4912,7 +4925,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("a0", "_d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("a0", "_d0"))) .setAggregatorSpecs(aggregators( new CountAggregatorFactory("_a0") )) @@ -4964,17 +4977,17 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a1", null, - dimensionSpec(new DefaultDimensionSpec("dim2", null)), + dimensions(new DefaultDimensionSpec("dim2", null)), false, true ) ) ) .postAggregators( - expresionPostAgg("p0", "CAST(\"a1\", 'DOUBLE')"), - expresionPostAgg("p1", "(\"a0\" / \"a1\")"), - expresionPostAgg("p2", "((\"a0\" / \"a1\") + 3)"), - expresionPostAgg("p3", "((CAST(\"a0\", 'DOUBLE') / CAST(\"a1\", 'DOUBLE')) + 3)") + expressionPostAgg("p0", "CAST(\"a1\", 'DOUBLE')"), + expressionPostAgg("p1", "(\"a0\" / \"a1\")"), + expressionPostAgg("p2", "((\"a0\" / \"a1\") + 3)"), + expressionPostAgg("p3", "((CAST(\"a0\", 'DOUBLE') / CAST(\"a1\", 'DOUBLE')) + 3)") ) .context(TIMESERIES_CONTEXT_DEFAULT) .build() @@ -5001,7 +5014,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CardinalityAggregatorFactory( "a0", null, - dimensionSpec( + dimensions( new ExtractionDimensionSpec( "dim1", null, @@ -5033,16 +5046,15 @@ public class CalciteQueryTest extends BaseCalciteQueryTest Druids.newTimeseriesQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .filters(not(selector("dim1", "", null))) .granularity(Granularities.ALL) - .virtualColumns(expression_Virtual_Column("a0:v", "trim(\"dim1\",' ')", ValueType.STRING)) - .filters(expressionFilter("(trim(\"dim1\",' ') != '')")) + .virtualColumns(expressionVirtualColumn("v0", "trim(\"dim1\",' ')", ValueType.STRING)) + .filters(not(selector("v0", NullHandling.emptyToNullIfNeeded(""), null))) .aggregators( aggregators( new CardinalityAggregatorFactory( "a0", null, - dimensionSpec(new DefaultDimensionSpec("a0:v", "a0:v", ValueType.STRING)), + dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.STRING)), false, true ) @@ -5071,12 +5083,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setVirtualColumns(expression_Virtual_Column( - "d0:v", + .setVirtualColumns(expressionVirtualColumn( + "v0", "(((timestamp_extract(\"__time\",'MONTH','UTC') - 1) / 3) + 1)", ValueType.LONG )) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -5110,7 +5122,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest )) ) .setDimensions( - dimensionSpec( + dimensions( new ExtractionDimensionSpec( "dim1", "d0", @@ -5148,7 +5160,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim2", "d0"), new DefaultDimensionSpec("dim1", "d1") ) @@ -5195,7 +5207,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") ) @@ -5213,7 +5225,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest 4 ) ) - .setHavingSpec(having(numeric_Selector("a0", "1", null))) + .setHavingSpec(having(selector("a0", "1", null))) .setContext(QUERY_CONTEXT_DEFAULT) .build() ), @@ -5289,7 +5301,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest CalciteTests.REGULAR_USER_AUTH_RESULT, ImmutableList.of(), ImmutableList.of( - new Object[]{t("2000-01-01T00Z", LOS_ANGELES), d("1999-12-31"), d("2000-01-01")} + new Object[]{timestamp("2000-01-01T00Z", LOS_ANGELES), day("1999-12-31"), day("2000-01-01")} ) ); } @@ -5445,11 +5457,15 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) + .virtualColumns( + expressionVirtualColumn("v0", "timestamp_extract(\"__time\",'YEAR','UTC')", ValueType.LONG), + expressionVirtualColumn("v1", "timestamp_extract(\"__time\",'MONTH','UTC')", ValueType.LONG) + ) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .filters( and( - expressionFilter("(timestamp_extract(\"__time\",'YEAR','UTC') == 2000)"), - expressionFilter("(timestamp_extract(\"__time\",'MONTH','UTC') == 1)") + selector("v0", "2000", null), + selector("v1", "1", null) ) ) .context(TIMESERIES_CONTEXT_DEFAULT) @@ -5473,15 +5489,23 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .granularity(Granularities.ALL) + .virtualColumns( + expressionVirtualColumn( + "v0", + "timestamp_extract(\"__time\",'YEAR','UTC')", + ValueType.LONG + ), + expressionVirtualColumn( + "v1", + "timestamp_extract(\"__time\",'DAY','UTC')", + ValueType.LONG + ) + ) .aggregators(aggregators(new CountAggregatorFactory("a0"))) .filters( and( - expressionFilter("(timestamp_extract(\"__time\",'YEAR','UTC') == 2000)"), - or( - expressionFilter("(timestamp_extract(\"__time\",'DAY','UTC') == 2)"), - expressionFilter("(timestamp_extract(\"__time\",'DAY','UTC') == 3)"), - expressionFilter("(timestamp_extract(\"__time\",'DAY','UTC') == 5)") - ) + selector("v0", "2000", null), + in("v1", ImmutableList.of("2", "3", "5"), null) ) ) .context(TIMESERIES_CONTEXT_DEFAULT) @@ -5525,9 +5549,9 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column("d0:v", "floor(CAST(\"dim1\", 'DOUBLE'))", ValueType.FLOAT) + expressionVirtualColumn("v0", "floor(CAST(\"dim1\", 'DOUBLE'))", ValueType.FLOAT) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.FLOAT))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.FLOAT))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -5552,17 +5576,17 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "floor(CAST(\"dim1\", 'DOUBLE'))", ValueType.FLOAT ) ) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec( - "d0:v", - "d0", + "v0", + "v0", ValueType.FLOAT ) ) @@ -5572,7 +5596,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.DESCENDING, StringComparators.NUMERIC ) @@ -5606,16 +5630,16 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_floor(\"__time\",'P1Y',null,'UTC')", ValueType.LONG ) ) .setDimensions( - dimensionSpec( - new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG), - new DefaultDimensionSpec("dim2", "d1") + dimensions( + new DefaultDimensionSpec("v0", "v0", ValueType.LONG), + new DefaultDimensionSpec("dim2", "d0") ) ) .setAggregatorSpecs( @@ -5627,12 +5651,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.NUMERIC ), new OrderByColumnSpec( - "d1", + "d0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.LEXICOGRAPHIC ), @@ -5650,19 +5674,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ), NullHandling.replaceWithDefault() ? ImmutableList.of( - new Object[]{t("2000"), "", 2L}, - new Object[]{t("2000"), "a", 1L}, - new Object[]{t("2001"), "", 1L}, - new Object[]{t("2001"), "a", 1L}, - new Object[]{t("2001"), "abc", 1L} + new Object[]{timestamp("2000"), "", 2L}, + new Object[]{timestamp("2000"), "a", 1L}, + new Object[]{timestamp("2001"), "", 1L}, + new Object[]{timestamp("2001"), "a", 1L}, + new Object[]{timestamp("2001"), "abc", 1L} ) : ImmutableList.of( - new Object[]{t("2000"), null, 1L}, - new Object[]{t("2000"), "", 1L}, - new Object[]{t("2000"), "a", 1L}, - new Object[]{t("2001"), null, 1L}, - new Object[]{t("2001"), "a", 1L}, - new Object[]{t("2001"), "abc", 1L} + new Object[]{timestamp("2000"), null, 1L}, + new Object[]{timestamp("2000"), "", 1L}, + new Object[]{timestamp("2000"), "a", 1L}, + new Object[]{timestamp("2001"), null, 1L}, + new Object[]{timestamp("2001"), "a", 1L}, + new Object[]{timestamp("2001"), "abc", 1L} ) ); } @@ -5677,8 +5701,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setVirtualColumns(expression_Virtual_Column("d0:v", "strlen(\"dim1\")", ValueType.LONG)) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setVirtualColumns(expressionVirtualColumn("v0", "strlen(\"dim1\")", ValueType.LONG)) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -5722,7 +5746,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest )) ) .setDimensions( - dimensionSpec( + dimensions( new ExtractionDimensionSpec( "dim1", "d0", @@ -5803,8 +5827,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{3L, t("2000-01-01")}, - new Object[]{3L, t("2001-01-01")} + new Object[]{3L, timestamp("2000-01-01")}, + new Object[]{3L, timestamp("2001-01-01")} ) ); } @@ -5832,8 +5856,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new LongSumAggregatorFactory("a0", "cnt"), bound( "__time", - String.valueOf(t("2000-01-01")), - String.valueOf(t("2000-02-01")), + String.valueOf(timestamp("2000-01-01")), + String.valueOf(timestamp("2000-02-01")), false, true, null, @@ -5844,8 +5868,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new LongSumAggregatorFactory("a1", "cnt"), bound( "__time", - String.valueOf(t("2001-01-01")), - String.valueOf(t("2001-02-01")), + String.valueOf(timestamp("2001-01-01")), + String.valueOf(timestamp("2001-02-01")), false, true, null, @@ -5885,10 +5909,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01", LOS_ANGELES)}, - new Object[]{2L, t("2000-01-01", LOS_ANGELES)}, - new Object[]{1L, t("2000-12-01", LOS_ANGELES)}, - new Object[]{2L, t("2001-01-01", LOS_ANGELES)} + new Object[]{1L, timestamp("1999-12-01", LOS_ANGELES)}, + new Object[]{2L, timestamp("2000-01-01", LOS_ANGELES)}, + new Object[]{1L, timestamp("2000-12-01", LOS_ANGELES)}, + new Object[]{2L, timestamp("2001-01-01", LOS_ANGELES)} ) ); } @@ -5916,10 +5940,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01", LOS_ANGELES)}, - new Object[]{2L, t("2000-01-01", LOS_ANGELES)}, - new Object[]{1L, t("2000-12-01", LOS_ANGELES)}, - new Object[]{2L, t("2001-01-01", LOS_ANGELES)} + new Object[]{1L, timestamp("1999-12-01", LOS_ANGELES)}, + new Object[]{2L, timestamp("2000-01-01", LOS_ANGELES)}, + new Object[]{1L, timestamp("2000-12-01", LOS_ANGELES)}, + new Object[]{2L, timestamp("2001-01-01", LOS_ANGELES)} ) ); } @@ -5944,8 +5968,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{3L, t("2000-01-01")}, - new Object[]{3L, t("2001-01-01")} + new Object[]{3L, timestamp("2000-01-01")}, + new Object[]{3L, timestamp("2001-01-01")} ) ); } @@ -5955,7 +5979,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest { testQuery( "SELECT SUM(cnt), gran FROM (\n" - + " SELECT TIME_FLOOR(TIME_SHIFT(__time, 'P1D', -1), 'P1M') AS gran,\n" + + " SELECT TIME_FLOOR(TIME_SHIFt(__time, 'P1D', -1), 'P1M') AS gran,\n" + " cnt FROM druid.foo\n" + ") AS x\n" + "GROUP BY gran\n" @@ -5966,19 +5990,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_floor(timestamp_shift(\"__time\",'P1D',-1),'P1M',null,'UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.NUMERIC ) @@ -5990,10 +6014,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01")}, - new Object[]{2L, t("2000-01-01")}, - new Object[]{1L, t("2000-12-01")}, - new Object[]{2L, t("2001-01-01")} + new Object[]{1L, timestamp("1999-12-01")}, + new Object[]{2L, timestamp("2000-01-01")}, + new Object[]{1L, timestamp("2000-12-01")}, + new Object[]{2L, timestamp("2001-01-01")} ) ); } @@ -6014,19 +6038,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_floor((\"__time\" + -86400000),'P1M',null,'UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.NUMERIC ) @@ -6038,10 +6062,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01")}, - new Object[]{2L, t("2000-01-01")}, - new Object[]{1L, t("2000-12-01")}, - new Object[]{2L, t("2001-01-01")} + new Object[]{1L, timestamp("1999-12-01")}, + new Object[]{2L, timestamp("2000-01-01")}, + new Object[]{1L, timestamp("2000-12-01")}, + new Object[]{2L, timestamp("2001-01-01")} ) ); } @@ -6072,10 +6096,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01T01:02:03")}, - new Object[]{2L, t("2000-01-01T01:02:03")}, - new Object[]{1L, t("2000-12-01T01:02:03")}, - new Object[]{2L, t("2001-01-01T01:02:03")} + new Object[]{1L, timestamp("1999-12-01T01:02:03")}, + new Object[]{2L, timestamp("2000-01-01T01:02:03")}, + new Object[]{1L, timestamp("2000-12-01T01:02:03")}, + new Object[]{2L, timestamp("2001-01-01T01:02:03")} ) ); } @@ -6100,10 +6124,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01T08")}, - new Object[]{2L, t("2000-01-01T08")}, - new Object[]{1L, t("2000-12-01T08")}, - new Object[]{2L, t("2001-01-01T08")} + new Object[]{1L, timestamp("1999-12-01T08")}, + new Object[]{2L, timestamp("2000-01-01T08")}, + new Object[]{1L, timestamp("2000-12-01T08")}, + new Object[]{2L, timestamp("2001-01-01T08")} ) ); } @@ -6131,10 +6155,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, t("1999-12-01", LOS_ANGELES)}, - new Object[]{2L, t("2000-01-01", LOS_ANGELES)}, - new Object[]{1L, t("2000-12-01", LOS_ANGELES)}, - new Object[]{2L, t("2001-01-01", LOS_ANGELES)} + new Object[]{1L, timestamp("1999-12-01", LOS_ANGELES)}, + new Object[]{2L, timestamp("2000-01-01", LOS_ANGELES)}, + new Object[]{1L, timestamp("2000-12-01", LOS_ANGELES)}, + new Object[]{2L, timestamp("2001-01-01", LOS_ANGELES)} ) ); } @@ -6164,30 +6188,30 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.builder() - .add(new Object[]{1L, t("2000-01-01")}) - .add(new Object[]{defaultVal, t("2000-01-01T01")}) - .add(new Object[]{defaultVal, t("2000-01-01T02")}) - .add(new Object[]{defaultVal, t("2000-01-01T03")}) - .add(new Object[]{defaultVal, t("2000-01-01T04")}) - .add(new Object[]{defaultVal, t("2000-01-01T05")}) - .add(new Object[]{defaultVal, t("2000-01-01T06")}) - .add(new Object[]{defaultVal, t("2000-01-01T07")}) - .add(new Object[]{defaultVal, t("2000-01-01T08")}) - .add(new Object[]{defaultVal, t("2000-01-01T09")}) - .add(new Object[]{defaultVal, t("2000-01-01T10")}) - .add(new Object[]{defaultVal, t("2000-01-01T11")}) - .add(new Object[]{defaultVal, t("2000-01-01T12")}) - .add(new Object[]{defaultVal, t("2000-01-01T13")}) - .add(new Object[]{defaultVal, t("2000-01-01T14")}) - .add(new Object[]{defaultVal, t("2000-01-01T15")}) - .add(new Object[]{defaultVal, t("2000-01-01T16")}) - .add(new Object[]{defaultVal, t("2000-01-01T17")}) - .add(new Object[]{defaultVal, t("2000-01-01T18")}) - .add(new Object[]{defaultVal, t("2000-01-01T19")}) - .add(new Object[]{defaultVal, t("2000-01-01T20")}) - .add(new Object[]{defaultVal, t("2000-01-01T21")}) - .add(new Object[]{defaultVal, t("2000-01-01T22")}) - .add(new Object[]{defaultVal, t("2000-01-01T23")}) + .add(new Object[]{1L, timestamp("2000-01-01")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T01")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T02")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T03")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T04")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T05")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T06")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T07")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T08")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T09")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T10")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T11")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T12")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T13")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T14")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T15")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T16")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T17")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T18")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T19")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T20")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T21")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T22")}) + .add(new Object[]{defaultVal, timestamp("2000-01-01T23")}) .build() ); } @@ -6212,12 +6236,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{1L, d("2000-01-01")}, - new Object[]{1L, d("2000-01-02")}, - new Object[]{1L, d("2000-01-03")}, - new Object[]{1L, d("2001-01-01")}, - new Object[]{1L, d("2001-01-02")}, - new Object[]{1L, d("2001-01-03")} + new Object[]{1L, day("2000-01-01")}, + new Object[]{1L, day("2000-01-02")}, + new Object[]{1L, day("2000-01-03")}, + new Object[]{1L, day("2001-01-01")}, + new Object[]{1L, day("2001-01-02")}, + new Object[]{1L, day("2001-01-03")} ) ); } @@ -6227,7 +6251,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest { testQuery( "SELECT SUM(cnt), dt FROM (\n" - + " SELECT CASt(FLOOR(__time TO QUARTER) AS DATE) AS dt,\n" + + " SELECT CAST(FLOOR(__time TO QUARTER) AS DATE) AS dt,\n" + " cnt FROM druid.foo\n" + ") AS x\n" + "GROUP BY dt\n" @@ -6242,8 +6266,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{3L, d("2000-01-01")}, - new Object[]{3L, d("2001-01-01")} + new Object[]{3L, day("2000-01-01")}, + new Object[]{3L, day("2001-01-01")} ) ); } @@ -6269,8 +6293,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2001-01-01"), 3L}, - new Object[]{t("2000-01-01"), 3L} + new Object[]{timestamp("2001-01-01"), 3L}, + new Object[]{timestamp("2000-01-01"), 3L} ) ); } @@ -6291,19 +6315,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_extract(\"__time\",'YEAR','UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.NUMERIC ) @@ -6326,10 +6350,10 @@ public class CalciteQueryTest extends BaseCalciteQueryTest { testQuery( "SELECT\n" - + " TIME_FORMAT(__time, 'yyyy MM') AS \"year\",\n" + + " TIME_FORMAt(__time, 'yyyy MM') AS \"year\",\n" + " SUM(cnt)\n" + "FROM druid.foo\n" - + "GROUP BY TIME_FORMAT(__time, 'yyyy MM')\n" + + "GROUP BY TIME_FORMAt(__time, 'yyyy MM')\n" + "ORDER BY 1", ImmutableList.of( GroupByQuery.builder() @@ -6337,19 +6361,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_format(\"__time\",'yyyy MM','UTC')", ValueType.STRING ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.STRING))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.STRING))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.LEXICOGRAPHIC ) @@ -6381,13 +6405,13 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_extract(timestamp_floor(\"__time\",'P1Y',null,'UTC'),'YEAR','UTC')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -6416,13 +6440,13 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d0:v", + expressionVirtualColumn( + "v0", "timestamp_extract(timestamp_floor(\"__time\",'P1Y',null,'America/Los_Angeles'),'YEAR','America/Los_Angeles')", ValueType.LONG ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_LOS_ANGELES) .build() @@ -6460,7 +6484,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 3L} + new Object[]{timestamp("2000-01-01"), 3L} ) ); } @@ -6487,7 +6511,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 3L} + new Object[]{timestamp("2000-01-01"), 3L} ) ); } @@ -6515,7 +6539,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2000-01-01"), 3L} + new Object[]{timestamp("2000-01-01"), 3L} ) ); } @@ -6534,16 +6558,16 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setVirtualColumns( - expression_Virtual_Column( - "d1:v", + expressionVirtualColumn( + "v0", "timestamp_floor(\"__time\",'P1M',null,'UTC')", ValueType.LONG ) ) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim2", "d0"), - new DefaultDimensionSpec("d1:v", "d1", ValueType.LONG) + new DefaultDimensionSpec("v0", "v0", ValueType.LONG) ) ) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) @@ -6552,7 +6576,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ImmutableList.of( new OrderByColumnSpec("d0", OrderByColumnSpec.Direction.ASCENDING), new OrderByColumnSpec( - "d1", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.NUMERIC ) @@ -6565,19 +6589,19 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ), NullHandling.replaceWithDefault() ? ImmutableList.of( - new Object[]{"", t("2000-01-01"), 2L}, - new Object[]{"", t("2001-01-01"), 1L}, - new Object[]{"a", t("2000-01-01"), 1L}, - new Object[]{"a", t("2001-01-01"), 1L}, - new Object[]{"abc", t("2001-01-01"), 1L} + new Object[]{"", timestamp("2000-01-01"), 2L}, + new Object[]{"", timestamp("2001-01-01"), 1L}, + new Object[]{"a", timestamp("2000-01-01"), 1L}, + new Object[]{"a", timestamp("2001-01-01"), 1L}, + new Object[]{"abc", timestamp("2001-01-01"), 1L} ) : ImmutableList.of( - new Object[]{null, t("2000-01-01"), 1L}, - new Object[]{null, t("2001-01-01"), 1L}, - new Object[]{"", t("2000-01-01"), 1L}, - new Object[]{"a", t("2000-01-01"), 1L}, - new Object[]{"a", t("2001-01-01"), 1L}, - new Object[]{"abc", t("2001-01-01"), 1L} + new Object[]{null, timestamp("2000-01-01"), 1L}, + new Object[]{null, timestamp("2001-01-01"), 1L}, + new Object[]{"", timestamp("2000-01-01"), 1L}, + new Object[]{"a", timestamp("2000-01-01"), 1L}, + new Object[]{"a", timestamp("2001-01-01"), 1L}, + new Object[]{"abc", timestamp("2001-01-01"), 1L} ) ); } @@ -6598,7 +6622,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(not(selector("dim1", "", null))) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim1", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim1", "d0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build(), GroupByQuery.builder() @@ -6612,7 +6636,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) ) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") ) @@ -6647,7 +6671,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest + " BindableJoin(condition=[true], joinType=[inner])\n" + " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[],\"resultFormat\":\"compactedList\",\"batchSize\":20480,\"limit\":9223372036854775807,\"filter\":null,\"columns\":[\"dim1\",\"dim2\"],\"legacy\":false,\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\"},\"descending\":false,\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING, dim2:STRING}])\n" + " DruidQueryRel(query=[{\"queryType\":\"timeseries\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"descending\":false,\"virtualColumns\":[],\"filter\":{\"type\":\"like\",\"dimension\":\"dim1\",\"pattern\":\"%bc\",\"escape\":null,\"extractionFn\":null},\"granularity\":{\"type\":\"all\"},\"aggregations\":[{\"type\":\"count\",\"name\":\"a0\"}],\"postAggregations\":[],\"limit\":2147483647,\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"skipEmptyBuckets\":true,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\"}}], signature=[{a0:LONG}])\n" - + " DruidQueryRel(query=[{\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"d1:v\",\"expression\":\"1\",\"outputType\":\"LONG\"}],\"filter\":{\"type\":\"like\",\"dimension\":\"dim1\",\"pattern\":\"%bc\",\"escape\":null,\"extractionFn\":null},\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"default\",\"dimension\":\"dim1\",\"outputName\":\"d0\",\"outputType\":\"STRING\"},{\"type\":\"default\",\"dimension\":\"d1:v\",\"outputName\":\"d1\",\"outputType\":\"LONG\"}],\"aggregations\":[],\"postAggregations\":[],\"having\":null,\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\"},\"descending\":false}], signature=[{d0:STRING, d1:LONG}])\n"; + + " DruidQueryRel(query=[{\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"1\",\"outputType\":\"LONG\"}],\"filter\":{\"type\":\"like\",\"dimension\":\"dim1\",\"pattern\":\"%bc\",\"escape\":null,\"extractionFn\":null},\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"default\",\"dimension\":\"dim1\",\"outputName\":\"d0\",\"outputType\":\"STRING\"},{\"type\":\"default\",\"dimension\":\"v0\",\"outputName\":\"v0\",\"outputType\":\"LONG\"}],\"aggregations\":[],\"postAggregations\":[],\"having\":null,\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\"},\"descending\":false}], signature=[{d0:STRING, v0:LONG}])\n"; final String theQuery = "SELECT dim1, dim2, COUNT(*) FROM druid.foo\n" + "WHERE dim1 = 'xxx' OR dim2 IN (SELECT dim1 FROM druid.foo WHERE dim1 LIKE '%bc')\n" @@ -6696,12 +6720,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimFilter(selector("dim2", "abc", null)) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") )) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) - .setHavingSpec(having(numeric_Selector("a0", "1", null))) + .setHavingSpec(having(selector("a0", "1", null))) .setContext(QUERY_CONTEXT_DEFAULT) .build(), newScanQueryBuilder() @@ -6720,7 +6744,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{t("2001-01-02"), 1L, "def", "abc"} + new Object[]{timestamp("2001-01-02"), 1L, "def", "abc"} ) ); } @@ -6744,7 +6768,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setLimitSpec( new DefaultLimitSpec( ImmutableList.of( @@ -6800,7 +6824,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setDimFilter(selector("dim1", "def", null)) .setContext(QUERY_CONTEXT_DEFAULT) .build(), @@ -6808,7 +6832,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) .virtualColumns( - expression_Virtual_Column("v0", "timestamp_extract(\"__time\",'MONTH','UTC')", ValueType.LONG) + expressionVirtualColumn("v0", "timestamp_extract(\"__time\",'MONTH','UTC')", ValueType.LONG) ) .filters( and( @@ -6844,7 +6868,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setDimFilter(selector("dim1", "def", null)) .setContext(QUERY_CONTEXT_DEFAULT) .build(), @@ -6852,7 +6876,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .builder() .setDataSource(CalciteTests.DATASOURCE1) .setVirtualColumns( - expression_Virtual_Column("d0:v", "timestamp_extract(\"__time\",'MONTH','UTC')", ValueType.LONG) + expressionVirtualColumn("v0", "timestamp_extract(\"__time\",'MONTH','UTC')", ValueType.LONG) ) .setDimFilter( and( @@ -6860,7 +6884,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest selector("dim2", "abc", null) ) ) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("d0:v", "d0", ValueType.LONG))) + .setDimensions(dimensions(new DefaultDimensionSpec("v0", "v0", ValueType.LONG))) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setAggregatorSpecs( @@ -6880,7 +6904,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new DefaultLimitSpec( ImmutableList.of( new OrderByColumnSpec( - "d0", + "v0", OrderByColumnSpec.Direction.ASCENDING, StringComparators.NUMERIC ) @@ -6911,7 +6935,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setGranularity(Granularities.ALL) .setDimFilter(not(selector("dim1", "", null))) .setDimensions( - dimensionSpec(new ExtractionDimensionSpec("dim1", "d0", new SubstringDimExtractionFn(0, 1))) + dimensions(new ExtractionDimensionSpec("dim1", "d0", new SubstringDimExtractionFn(0, 1))) ) .setContext(QUERY_CONTEXT_DEFAULT) .build(), @@ -6924,7 +6948,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ImmutableList.of("1", "2", "a", "d"), new SubstringDimExtractionFn(0, 1) )) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new CountAggregatorFactory("a0"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -6958,7 +6982,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new LikeDimFilter("dim1", "דר%", null, null), new SelectorDimFilter("dim1", "друид", null) )) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") )) @@ -6984,7 +7008,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") ) @@ -7023,7 +7047,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim1", "d0"), new DefaultDimensionSpec("dim2", "d1") ) @@ -7031,7 +7055,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setAggregatorSpecs( aggregators(new CountAggregatorFactory("a0"), new DoubleSumAggregatorFactory("a1", "m2")) ) - .setPostAggregatorSpecs(Collections.singletonList(expresionPostAgg( + .setPostAggregatorSpecs(Collections.singletonList(expressionPostAgg( "s0", "(\"a1\" / \"a0\")" ))) @@ -7068,7 +7092,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) .setDimensions( - dimensionSpec( + dimensions( new DefaultDimensionSpec("dim1", "d0") ) ) @@ -7124,7 +7148,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setDataSource(CalciteTests.DATASOURCE1) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("__time", "d0", ValueType.LONG), new DefaultDimensionSpec("m2", "d1", ValueType.DOUBLE), new DefaultDimensionSpec("dim1", "d2") @@ -7134,7 +7158,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) .setInterval(querySegmentSpec(Filtration.eternity())) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec( + .setDimensions(dimensions( new DefaultDimensionSpec("d0", "_d0", ValueType.LONG), new DefaultDimensionSpec("d2", "_d1", ValueType.STRING) )) @@ -7190,7 +7214,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ) ) .postAggregators( - expresionPostAgg("p0", "(\"a0\" + \"a1\")") + expressionPostAgg("p0", "(\"a0\" + \"a1\")") ) .descending(true) .context(TIMESERIES_CONTEXT_DEFAULT) @@ -7240,7 +7264,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new FieldAccessPostAggregator(null, "a0:count") ) ), - expresionPostAgg("p0", "(\"a1\" + \"a2\")") + expressionPostAgg("p0", "(\"a1\" + \"a2\")") ) ) .metric(new DimensionTopNMetricSpec(null, StringComparators.NUMERIC)) @@ -7259,12 +7283,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest public void testConcat() throws Exception { testQuery( - "SELECT CONCAT(dim1, '-', dim1, '_', dim1) as dimX FROM foo", + "SELECT CONCAt(dim1, '-', dim1, '_', dim1) as dimX FROM foo", ImmutableList.of( newScanQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .virtualColumns(expression_Virtual_Column( + .virtualColumns(expressionVirtualColumn( "v0", "concat(\"dim1\",'-',\"dim1\",'_',\"dim1\")", ValueType.STRING @@ -7285,12 +7309,12 @@ public class CalciteQueryTest extends BaseCalciteQueryTest ); testQuery( - "SELECT CONCAT(dim1, CONCAT(dim2,'x'), m2, 9999, dim1) as dimX FROM foo", + "SELECT CONCAt(dim1, CONCAt(dim2,'x'), m2, 9999, dim1) as dimX FROM foo", ImmutableList.of( newScanQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .virtualColumns(expression_Virtual_Column( + .virtualColumns(expressionVirtualColumn( "v0", "concat(\"dim1\",concat(\"dim2\",'x'),\"m2\",9999,\"dim1\")", ValueType.STRING @@ -7320,7 +7344,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest newScanQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .virtualColumns(expression_Virtual_Column("v0", "concat(\"dim1\",\"dim1\")", ValueType.STRING)) + .virtualColumns(expressionVirtualColumn("v0", "concat(\"dim1\",\"dim1\")", ValueType.STRING)) .columns("v0") .resultFormat(ScanQuery.RESULT_FORMAT_COMPACTED_LIST) .context(QUERY_CONTEXT_DEFAULT) @@ -7342,7 +7366,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest newScanQueryBuilder() .dataSource(CalciteTests.DATASOURCE1) .intervals(querySegmentSpec(Filtration.eternity())) - .virtualColumns(expression_Virtual_Column( + .virtualColumns(expressionVirtualColumn( "v0", "concat(\"dim1\",CAST(\"m2\", 'STRING'))", ValueType.STRING @@ -7387,8 +7411,8 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .build() ), ImmutableList.of( - new Object[]{3L, t("2000-01-01")}, - new Object[]{3L, t("2001-01-01")} + new Object[]{3L, timestamp("2000-01-01")}, + new Object[]{3L, timestamp("2001-01-01")} ) ); @@ -7411,7 +7435,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest JodaUtils.MAX_INSTANT ))) .setGranularity(Granularities.ALL) - .setDimensions(dimensionSpec(new DefaultDimensionSpec("dim2", "d0"))) + .setDimensions(dimensions(new DefaultDimensionSpec("dim2", "d0"))) .setAggregatorSpecs(aggregators(new LongSumAggregatorFactory("a0", "cnt"))) .setContext(QUERY_CONTEXT_DEFAULT) .build() @@ -7450,7 +7474,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest .setInterval(querySegmentSpec(Intervals.utc(DateTimes.of("2000-01-01").getMillis(), JodaUtils.MAX_INSTANT))) .setGranularity(Granularities.ALL) .setDimFilter(not(selector("dim1", "", null))) - .setDimensions(dimensionSpec(new ExtractionDimensionSpec( + .setDimensions(dimensions(new ExtractionDimensionSpec( "dim1", "d0", new SubstringDimExtractionFn(0, 1) @@ -7618,15 +7642,15 @@ public class CalciteQueryTest extends BaseCalciteQueryTest new CountAggregatorFactory("a0") )) .postAggregators( - expresionPostAgg("p0", "(exp(\"a0\") + 10)"), - expresionPostAgg("p1", "sin((pi() / 6))"), - expresionPostAgg("p2", "cos((pi() / 6))"), - expresionPostAgg("p3", "tan((pi() / 6))"), - expresionPostAgg("p4", "cot((pi() / 6))"), - expresionPostAgg("p5", "asin((exp(\"a0\") / 2))"), - expresionPostAgg("p6", "acos((exp(\"a0\") / 2))"), - expresionPostAgg("p7", "atan((exp(\"a0\") / 2))"), - expresionPostAgg("p8", "atan2(exp(\"a0\"),1)") + expressionPostAgg("p0", "(exp(\"a0\") + 10)"), + expressionPostAgg("p1", "sin((pi() / 6))"), + expressionPostAgg("p2", "cos((pi() / 6))"), + expressionPostAgg("p3", "tan((pi() / 6))"), + expressionPostAgg("p4", "cot((pi() / 6))"), + expressionPostAgg("p5", "asin((exp(\"a0\") / 2))"), + expressionPostAgg("p6", "acos((exp(\"a0\") / 2))"), + expressionPostAgg("p7", "atan((exp(\"a0\") / 2))"), + expressionPostAgg("p8", "atan2(exp(\"a0\"),1)") ) .context(QUERY_CONTEXT_DONT_SKIP_EMPTY_BUCKETS) .build()), diff --git a/sql/src/test/java/org/apache/druid/sql/calcite/filtration/FiltrationTest.java b/sql/src/test/java/org/apache/druid/sql/calcite/filtration/FiltrationTest.java index b85eae1e1dd..9d91a42811a 100644 --- a/sql/src/test/java/org/apache/druid/sql/calcite/filtration/FiltrationTest.java +++ b/sql/src/test/java/org/apache/druid/sql/calcite/filtration/FiltrationTest.java @@ -24,6 +24,9 @@ import org.apache.druid.java.util.common.Intervals; import org.apache.druid.query.filter.IntervalDimFilter; import org.apache.druid.query.filter.NotDimFilter; import org.apache.druid.segment.column.ColumnHolder; +import org.apache.druid.segment.column.ValueType; +import org.apache.druid.sql.calcite.rel.DruidQuerySignature; +import org.apache.druid.sql.calcite.table.RowSignature; import org.apache.druid.sql.calcite.util.CalciteTestBase; import org.junit.Assert; import org.junit.Test; @@ -42,7 +45,7 @@ public class FiltrationTest extends CalciteTestBase ) ), null - ).optimize(null); + ).optimize(new DruidQuerySignature(RowSignature.builder().add(ColumnHolder.TIME_COLUMN_NAME, ValueType.LONG).build())); Assert.assertEquals( ImmutableList.of(Filtration.eternity()), From 311816038725e22ef98f1a93f73852522d2a693a Mon Sep 17 00:00:00 2001 From: Venkatraman P Date: Tue, 12 Mar 2019 00:09:15 +0530 Subject: [PATCH 18/19] Adding a tutorial in doc for using Kerberized Hadoop as deep storage. (#6863) * Adding a tutorial in doc for using Kerberized Hadoop as deep storage. * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md Fixed - to ~ in Apache License section. * Update tutorial-kerberos-hadoop.md * Update tutorial-kerberos-hadoop.md --- .../tutorials/tutorial-kerberos-hadoop.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 docs/content/tutorials/tutorial-kerberos-hadoop.md diff --git a/docs/content/tutorials/tutorial-kerberos-hadoop.md b/docs/content/tutorials/tutorial-kerberos-hadoop.md new file mode 100644 index 00000000000..7b3d0025d0d --- /dev/null +++ b/docs/content/tutorials/tutorial-kerberos-hadoop.md @@ -0,0 +1,122 @@ +--- +layout: doc_page +title: "Configuring Druid to use a Kerberized Hadoop as Deep Storage" +--- + + + +# Configuring Druid to use a Kerberized Hadoop as Deep Storage + +## Hadoop Setup + +Following are the configurations files required to be copied over to Druid conf folders: + +1. For HDFS as a deep storage, hdfs-site.xml, core-site.xml +2. For ingestion, mapred-site.xml, yarn-site.xml + +### HDFS Folders and permissions + +1. Choose any folder name for the druid deep storage, for example 'druid' +2. Create the folder in hdfs under the required parent folder. For example, +`hdfs dfs -mkdir /druid` +OR +`hdfs dfs -mkdir /apps/druid` + +3. Give druid processes appropriate permissions for the druid processes to access this folder. This would ensure that druid is able to create necessary folders like data and indexing_log in HDFS. +For example, if druid processes run as user 'root', then + + `hdfs dfs -chown root:root /apps/druid` + + OR + + `hdfs dfs -chmod 777 /apps/druid` + +Druid creates necessary sub-folders to store data and index under this newly created folder. + +## Druid Setup + +Edit common.runtime.properties at conf/druid/_common/common.runtime.properties to include the HDFS properties. Folders used for the location are same as the ones used for example above. + +### common_runtime_properties + +```properties +# Deep storage +# +# For HDFS: + druid.storage.type=hdfs + druid.storage.storageDirectory=/druid/segments +# OR +# druid.storage.storageDirectory=/apps/druid/segments + +# +# Indexing service logs +# + +# For HDFS: +druid.indexer.logs.type=hdfs +druid.indexer.logs.directory=/druid/indexing-logs +# OR +# druid.storage.storageDirectory=/apps/druid/indexing-logs +``` + +Note: Comment out Local storage and S3 Storage parameters in the file + +Also include hdfs-storage core extension to conf/druid/_common/common.runtime. + +```properties +# +# Extensions +# + +druid.extensions.directory=dist/druid/extensions +druid.extensions.hadoopDependenciesDir=dist/druid/hadoop-dependencies +druid.extensions.loadList=["druid-parser-route", "mysql-metadata-storage", "druid-hdfs-storage", "druid-kerberos"] +``` +### Hadoop Jars + +Ensure that Druid has necessary jars to support the Hadoop version. + +Find the hadoop version using command, `hadoop version` + +In case there are other softwares used with hadoop, like WanDisco, ensure that +1. the necessary libraries are available +2. add the requisite extensions to `druid.extensions.loadlist` in `conf/druid/_common/common.runtime.properties` + +### Kerberos setup + +Create a headless keytab which would have access to the druid data and index. + +Edit conf/druid/_common/common.runtime.properties and add the following properties: + +```properties +druid.hadoop.security.kerberos.principal +druid.hadoop.security.kerberos.keytab +``` + +For example + +```properties +druid.hadoop.security.kerberos.principal=hdfs-test@EXAMPLE.IO +druid.hadoop.security.kerberos.keytab=/etc/security/keytabs/hdfs.headless.keytab +``` + +### Restart Druid Services + +With the above changes, restart Druid. This would ensure that Druid works with Kerberized Hadoop From 7e49d47391d17b411b0620794e503592d8f37481 Mon Sep 17 00:00:00 2001 From: Justin Borromeo Date: Tue, 12 Mar 2019 16:51:25 -0700 Subject: [PATCH 19/19] Added error message for UOE --- .../org/apache/druid/query/QueryInterruptedException.java | 5 ++++- .../apache/druid/query/QueryInterruptedExceptionTest.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/processing/src/main/java/org/apache/druid/query/QueryInterruptedException.java b/processing/src/main/java/org/apache/druid/query/QueryInterruptedException.java index 947a6566bdf..54bb132d79d 100644 --- a/processing/src/main/java/org/apache/druid/query/QueryInterruptedException.java +++ b/processing/src/main/java/org/apache/druid/query/QueryInterruptedException.java @@ -46,7 +46,8 @@ public class QueryInterruptedException extends RuntimeException public static final String QUERY_TIMEOUT = "Query timeout"; public static final String QUERY_CANCELLED = "Query cancelled"; public static final String RESOURCE_LIMIT_EXCEEDED = "Resource limit exceeded"; - public static final String UNAUTHORIZED = "Unauthorized request."; + public static final String UNAUTHORIZED = "Unauthorized request"; + public static final String UNSUPPORTED_OPERATION = "Unsupported operation"; public static final String UNKNOWN_EXCEPTION = "Unknown exception"; private final String errorCode; @@ -135,6 +136,8 @@ public class QueryInterruptedException extends RuntimeException return QUERY_TIMEOUT; } else if (e instanceof ResourceLimitExceededException) { return RESOURCE_LIMIT_EXCEEDED; + } else if (e instanceof UnsupportedOperationException) { + return UNSUPPORTED_OPERATION; } else { return UNKNOWN_EXCEPTION; } diff --git a/processing/src/test/java/org/apache/druid/query/QueryInterruptedExceptionTest.java b/processing/src/test/java/org/apache/druid/query/QueryInterruptedExceptionTest.java index ecfe3c08415..bf5d7a40549 100644 --- a/processing/src/test/java/org/apache/druid/query/QueryInterruptedExceptionTest.java +++ b/processing/src/test/java/org/apache/druid/query/QueryInterruptedExceptionTest.java @@ -22,6 +22,7 @@ package org.apache.druid.query; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; import org.apache.druid.java.util.common.ISE; +import org.apache.druid.java.util.common.UOE; import org.apache.druid.segment.TestHelper; import org.junit.Assert; import org.junit.Test; @@ -43,6 +44,7 @@ public class QueryInterruptedExceptionTest Assert.assertEquals("Query cancelled", new QueryInterruptedException(new CancellationException()).getErrorCode()); Assert.assertEquals("Query interrupted", new QueryInterruptedException(new InterruptedException()).getErrorCode()); Assert.assertEquals("Query timeout", new QueryInterruptedException(new TimeoutException()).getErrorCode()); + Assert.assertEquals("Unsupported operation", new QueryInterruptedException(new UOE("Unsupported")).getErrorCode()); Assert.assertEquals("Unknown exception", new QueryInterruptedException(null).getErrorCode()); Assert.assertEquals("Unknown exception", new QueryInterruptedException(new ISE("Something bad!")).getErrorCode()); Assert.assertEquals(