From 2e129d7179670eaaf2ade24323ee15cb8e81e272 Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Fri, 29 Nov 2019 15:32:59 -0800 Subject: [PATCH 1/3] Address security vulnerabilities CVSS >= 7 Update dependencies to address security vulnerabilities with CVSS scores of 7 or higher. A new Travis CI job is added to prevent new high/critical security vulnerabilities from being added. Updated dependencies: - api-util 1.0.0 -> 1.0.3 - jackson 2.9.10 -> 2.10.1 - kafka 2.1.0 -> 2.1.1 - libthrift 0.10.0 -> 0.13.0 - protobuf 3.2.0 -> 3.11.0 The following high/critical security vulnerabilities are currently suppressed (so that the new Travis CI job can be added now) and are left as future work to fix: - hibernate-validator:5.2.5 - jackson-mapper-asl:1.9.13 - libthrift:0.6.1 - netty:3.10.6 - nimbus-jose-jwt:4.41.1 --- .travis.yml | 12 ++ benchmarks/pom.xml | 7 + .../input/impl/prefetch/JsonIterator.java | 4 +- distribution/bin/check-licenses.py | 5 + distribution/pom.xml | 9 +- .../ambari-metrics-emitter/pom.xml | 22 ++ extensions-contrib/cassandra-storage/pom.xml | 10 + .../movingaverage/MovingAverageQueryTest.java | 7 +- extensions-contrib/thrift-extensions/pom.xml | 2 +- .../druid/security/basic/BasicAuthUtils.java | 12 +- .../kafka-extraction-namespace/pom.xml | 4 - extensions-core/protobuf-extensions/pom.xml | 6 +- integration-tests/pom.xml | 11 +- .../CoordinatorResourceTestClient.java | 5 +- .../ITBasicAuthConfigurationTest.java | 4 +- licenses.yaml | 44 +++- licenses/bin/jakarta.activation-api.EDL1 | 13 ++ owasp-dependency-check-suppressions.xml | 198 ++++++++++++++++++ pom.xml | 25 ++- .../SQLMetadataStorageActionHandler.java | 12 +- .../query/ResultLevelCachingQueryRunner.java | 2 +- .../server/coordinator/HttpLoadQueuePeon.java | 16 +- services/pom.xml | 16 ++ 23 files changed, 392 insertions(+), 54 deletions(-) create mode 100644 licenses/bin/jakarta.activation-api.EDL1 create mode 100644 owasp-dependency-check-suppressions.xml diff --git a/.travis.yml b/.travis.yml index f4aa88b4bdcc..a0ad65bdb1fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,6 +114,18 @@ jobs: https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html " + - name: "security vulnerabilities" + install: skip + script: ${MVN} dependency-check:check + after_failure: |- + echo "FAILURE EXPLANATION: + + The OWASP dependency check has found security vulnerabilities. Please use a newer version + of the dependency that does not have vulenerabilities. If the analysis has false positives, + they can be suppressed by adding entries to owasp-dependency-check-suppressions.xml (for more + information, see https://jeremylong.github.io/DependencyCheck/general/suppression.html). + " + - &package name: "(openjdk8) packaging check" install: skip diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 027f81f67375..9b85b21cf10e 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -216,6 +216,13 @@ + + org.owasp + dependency-check-maven + + true + + diff --git a/core/src/main/java/org/apache/druid/data/input/impl/prefetch/JsonIterator.java b/core/src/main/java/org/apache/druid/data/input/impl/prefetch/JsonIterator.java index 6bd56cbc2a6e..2a241f66de7c 100644 --- a/core/src/main/java/org/apache/druid/data/input/impl/prefetch/JsonIterator.java +++ b/core/src/main/java/org/apache/druid/data/input/impl/prefetch/JsonIterator.java @@ -43,7 +43,7 @@ public class JsonIterator implements Iterator, Closeable { private JsonParser jp; private ObjectCodec objectCodec; - private final TypeReference typeRef; + private final TypeReference typeRef; private final InputStream inputStream; private final Closeable resourceCloser; private final ObjectMapper objectMapper; @@ -55,7 +55,7 @@ public class JsonIterator implements Iterator, Closeable * @param objectMapper object mapper, used for deserialization */ public JsonIterator( - TypeReference typeRef, + TypeReference typeRef, InputStream inputStream, Closeable resourceCloser, ObjectMapper objectMapper diff --git a/distribution/bin/check-licenses.py b/distribution/bin/check-licenses.py index cbbcf3c18311..aad34cb5ca3d 100755 --- a/distribution/bin/check-licenses.py +++ b/distribution/bin/check-licenses.py @@ -239,6 +239,7 @@ def build_compatible_license_names(): compatible_licenses['The BSD 3-Clause License'] = 'BSD-3-Clause License' compatible_licenses['Revised BSD'] = 'BSD-3-Clause License' compatible_licenses['New BSD License'] = 'BSD-3-Clause License' + compatible_licenses['3-Clause BSD License'] = 'BSD-3-Clause License' compatible_licenses['ICU License'] = 'ICU License' @@ -254,6 +255,10 @@ def build_compatible_license_names(): compatible_licenses['Eclipse Public License - Version 1.0'] = 'Eclipse Public License 1.0' compatible_licenses['Eclipse Public License, Version 1.0'] = 'Eclipse Public License 1.0' + compatible_licenses['Eclipse Distribution License 1.0'] = 'Eclipse Distribution License 1.0' + compatible_licenses['Eclipse Distribution License - v 1.0'] = 'Eclipse Distribution License 1.0' + compatible_licenses['EDL 1.0'] = 'Eclipse Distribution License 1.0' + compatible_licenses['Mozilla Public License Version 2.0'] = 'Mozilla Public License Version 2.0' compatible_licenses['Mozilla Public License, Version 2.0'] = 'Mozilla Public License Version 2.0' diff --git a/distribution/pom.xml b/distribution/pom.xml index 215cd8d95b12..ac8848fa7e99 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -98,6 +98,13 @@ + + org.owasp + dependency-check-maven + + true + + @@ -421,4 +428,4 @@ - \ No newline at end of file + diff --git a/extensions-contrib/ambari-metrics-emitter/pom.xml b/extensions-contrib/ambari-metrics-emitter/pom.xml index fb81ee146951..59639ab20f90 100644 --- a/extensions-contrib/ambari-metrics-emitter/pom.xml +++ b/extensions-contrib/ambari-metrics-emitter/pom.xml @@ -69,6 +69,12 @@ + + + org.apache.hadoop + hadoop-annotations + ${hadoop.compile.version} + commons-io commons-io @@ -126,6 +132,22 @@ test + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + org.apache.hadoop:hadoop-annotations + + + + + + hortonworks diff --git a/extensions-contrib/cassandra-storage/pom.xml b/extensions-contrib/cassandra-storage/pom.xml index 6171a008fc33..993e0057300d 100644 --- a/extensions-contrib/cassandra-storage/pom.xml +++ b/extensions-contrib/cassandra-storage/pom.xml @@ -41,6 +41,11 @@ provided + com.netflix.astyanax astyanax 1.0.1 @@ -113,6 +118,11 @@ com.github.stephenc.high-scale-lib high-scale-lib + + + org.mortbay.jetty + jetty + diff --git a/extensions-contrib/moving-average-query/src/test/java/org/apache/druid/query/movingaverage/MovingAverageQueryTest.java b/extensions-contrib/moving-average-query/src/test/java/org/apache/druid/query/movingaverage/MovingAverageQueryTest.java index ca9e4c5ec18b..83881c79cf97 100644 --- a/extensions-contrib/moving-average-query/src/test/java/org/apache/druid/query/movingaverage/MovingAverageQueryTest.java +++ b/extensions-contrib/moving-average-query/src/test/java/org/apache/druid/query/movingaverage/MovingAverageQueryTest.java @@ -38,7 +38,6 @@ import org.apache.druid.client.cache.MapCache; import org.apache.druid.client.selector.ServerSelector; import org.apache.druid.data.input.MapBasedRow; -import org.apache.druid.data.input.Row; import org.apache.druid.guice.DruidProcessingModule; import org.apache.druid.guice.GuiceInjectors; import org.apache.druid.guice.QueryRunnerFactoryModule; @@ -99,7 +98,7 @@ public class MovingAverageQueryTest extends InitializedNullHandlingTest private final RetryQueryRunnerConfig retryConfig; private final ServerConfig serverConfig; - private final List groupByResults = new ArrayList<>(); + private final List groupByResults = new ArrayList<>(); private final List> timeseriesResults = new ArrayList<>(); private final TestConfig config; @@ -222,9 +221,9 @@ private Class getExpectedQueryType() return MovingAverageQuery.class; } - private TypeReference getExpectedResultType() + private TypeReference> getExpectedResultType() { - return new TypeReference>() + return new TypeReference>() { }; } diff --git a/extensions-contrib/thrift-extensions/pom.xml b/extensions-contrib/thrift-extensions/pom.xml index 80c9af2145ff..71d5b03ee5d4 100644 --- a/extensions-contrib/thrift-extensions/pom.xml +++ b/extensions-contrib/thrift-extensions/pom.xml @@ -36,7 +36,7 @@ 4.0.0 - 0.10.0 + 0.13.0 4.17 19.10.0 diff --git a/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java b/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java index 21664d0659f2..1646fc334b1b 100644 --- a/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java +++ b/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java @@ -67,32 +67,32 @@ public class BasicAuthUtils public static final int KEY_LENGTH = 512; public static final String ALGORITHM = "PBKDF2WithHmacSHA512"; - public static final TypeReference AUTHENTICATOR_USER_MAP_TYPE_REFERENCE = + public static final TypeReference> AUTHENTICATOR_USER_MAP_TYPE_REFERENCE = new TypeReference>() { }; - public static final TypeReference AUTHORIZER_USER_MAP_TYPE_REFERENCE = + public static final TypeReference> AUTHORIZER_USER_MAP_TYPE_REFERENCE = new TypeReference>() { }; - public static final TypeReference AUTHORIZER_GROUP_MAPPING_MAP_TYPE_REFERENCE = + public static final TypeReference> AUTHORIZER_GROUP_MAPPING_MAP_TYPE_REFERENCE = new TypeReference>() { }; - public static final TypeReference AUTHORIZER_ROLE_MAP_TYPE_REFERENCE = + public static final TypeReference> AUTHORIZER_ROLE_MAP_TYPE_REFERENCE = new TypeReference>() { }; - public static final TypeReference AUTHORIZER_USER_AND_ROLE_MAP_TYPE_REFERENCE = + public static final TypeReference AUTHORIZER_USER_AND_ROLE_MAP_TYPE_REFERENCE = new TypeReference() { }; - public static final TypeReference AUTHORIZER_GROUP_MAPPING_AND_ROLE_MAP_TYPE_REFERENCE = + public static final TypeReference AUTHORIZER_GROUP_MAPPING_AND_ROLE_MAP_TYPE_REFERENCE = new TypeReference() { }; diff --git a/extensions-core/kafka-extraction-namespace/pom.xml b/extensions-core/kafka-extraction-namespace/pom.xml index 259bdb12f3e5..32a1853a644a 100644 --- a/extensions-core/kafka-extraction-namespace/pom.xml +++ b/extensions-core/kafka-extraction-namespace/pom.xml @@ -33,10 +33,6 @@ ../../pom.xml - - 2.1.0 - - org.apache.druid diff --git a/extensions-core/protobuf-extensions/pom.xml b/extensions-core/protobuf-extensions/pom.xml index 97f617287664..c29a82a56c05 100644 --- a/extensions-core/protobuf-extensions/pom.xml +++ b/extensions-core/protobuf-extensions/pom.xml @@ -35,10 +35,6 @@ ../../pom.xml - - 3.2.0 - - org.apache.druid @@ -111,7 +107,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.0.0 + 3.2.1 false diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 79e8c2c8c65d..7822af33b3ef 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -31,10 +31,6 @@ 0.17.0-incubating-SNAPSHOT - - 2.1.0 - - org.apache.druid @@ -252,6 +248,13 @@ + + org.owasp + dependency-check-maven + + true + + diff --git a/integration-tests/src/main/java/org/apache/druid/testing/clients/CoordinatorResourceTestClient.java b/integration-tests/src/main/java/org/apache/druid/testing/clients/CoordinatorResourceTestClient.java index 074c77b11dbf..71ca9f83a4d0 100644 --- a/integration-tests/src/main/java/org/apache/druid/testing/clients/CoordinatorResourceTestClient.java +++ b/integration-tests/src/main/java/org/apache/druid/testing/clients/CoordinatorResourceTestClient.java @@ -41,7 +41,6 @@ import org.joda.time.Interval; import java.net.URL; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -96,7 +95,7 @@ private String getLoadStatusURL() // return a list of the segment dates for the specified datasource public List getMetadataSegments(final String dataSource) { - ArrayList segments; + List segments; try { StatusResponseHolder response = makeRequest(HttpMethod.GET, getMetadataSegmentsURL(dataSource)); @@ -115,7 +114,7 @@ public List getMetadataSegments(final String dataSource) // return a list of the segment dates for the specified datasource public List getSegmentIntervals(final String dataSource) { - ArrayList segments; + List segments; try { StatusResponseHolder response = makeRequest(HttpMethod.GET, getIntervalsURL(dataSource)); diff --git a/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java b/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java index e074b2f64c18..cb675bf5b4c3 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java @@ -74,12 +74,12 @@ public class ITBasicAuthConfigurationTest { private static final Logger LOG = new Logger(ITBasicAuthConfigurationTest.class); - private static final TypeReference LOAD_STATUS_TYPE_REFERENCE = + private static final TypeReference> LOAD_STATUS_TYPE_REFERENCE = new TypeReference>() { }; - private static final TypeReference SYS_SCHEMA_RESULTS_TYPE_REFERENCE = + private static final TypeReference>> SYS_SCHEMA_RESULTS_TYPE_REFERENCE = new TypeReference>>() { }; diff --git a/licenses.yaml b/licenses.yaml index ecb864c3515e..636de2bdfb6a 100644 --- a/licenses.yaml +++ b/licenses.yaml @@ -196,7 +196,7 @@ name: Jackson license_category: binary module: java-core license_name: Apache License version 2.0 -version: 2.9.10 +version: 2.10.1 libraries: - com.fasterxml.jackson.core: jackson-annotations - com.fasterxml.jackson.core: jackson-core @@ -233,6 +233,30 @@ notice: | --- +name: JavaBeans Activation Framework API JAR +license_category: binary +module: java-core +license_name: Eclipse Distribution License 1.0 +version: 1.2.1 +copyright: Oracle and/or its affiliates. +license_file_path: licenses/bin/jakarta.activation-api.EDL1 +libraries: + - jakarta.activation: jakarta.activation-api + +--- + +name: Jakarta XML Bind API +license_category: binary +module: java-core +license_name: Eclipse Distribution License 1.0 +version: 2.3.2 +copyright: Oracle and/or its affiliates. +license_file_path: licenses/bin/jakarta.activation-api.EDL1 +libraries: + - jakarta.xml.bind: jakarta.xml.bind-api + +--- + name: Caffeine license_category: binary module: java-core @@ -2744,11 +2768,21 @@ license_name: Apache License version 2.0 version: 1.0.0-M20 libraries: - org.apache.directory.api: api-asn1-api + +--- + +name: Apache Directory +license_category: binary +module: hadoop-client +license_name: Apache License version 2.0 +version: 1.0.3 +libraries: - org.apache.directory.api: api-util notices: - api-util: | Apache Directory LDAP API Utilities Copyright 2003-2013 The Apache Software Foundation + --- name: Apache Directory Server @@ -3161,7 +3195,7 @@ name: Gson license_category: binary module: extensions/protobuf-extensions license_name: Apache License version 2.0 -version: 2.7 +version: 2.8.6 libraries: - com.google.code.gson: gson @@ -3279,7 +3313,7 @@ name: Protocol Buffers license_category: binary module: java-core license_name: BSD-3-Clause License -version: 3.1.0 +version: 3.11.0 copyright: Google, Inc. license_file_path: - licenses/bin/protobuf-java.BSD3 @@ -3444,7 +3478,7 @@ name: Protocol Buffers license_category: binary module: extensions/druid-protobuf-extensions license_name: BSD-3-Clause License -version: 3.2.0 +version: 3.11.0 copyright: Google, Inc. license_file_path: licenses/bin/protobuf-java.BSD3 libraries: @@ -3932,7 +3966,7 @@ name: Apache Kafka license_category: binary module: extensions/kafka-extraction-namespace license_name: Apache License version 2.0 -version: 2.1.0 +version: 2.1.1 libraries: - org.apache.kafka: kafka_2.12 - org.apache.kafka: kafka-clients diff --git a/licenses/bin/jakarta.activation-api.EDL1 b/licenses/bin/jakarta.activation-api.EDL1 new file mode 100644 index 000000000000..8e44780c8564 --- /dev/null +++ b/licenses/bin/jakarta.activation-api.EDL1 @@ -0,0 +1,13 @@ +Eclipse Distribution License - v 1.0 + +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +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 Eclipse Foundation, 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. diff --git a/owasp-dependency-check-suppressions.xml b/owasp-dependency-check-suppressions.xml new file mode 100644 index 000000000000..cf88f3957448 --- /dev/null +++ b/owasp-dependency-check-suppressions.xml @@ -0,0 +1,198 @@ + + + + + + + ^pkg:maven/org\.apache\.druid/druid\-indexing\-hadoop@.*$ + CVE-2012-4449 + + + + + ^pkg:maven/org\.apache\.druid/druid\-indexing\-hadoop@.*$ + CVE-2017-3162 + + + + + ^pkg:maven/org\.apache\.druid/druid\-processing@.*$ + CVE-2018-1000840 + + + + + ^pkg:maven/org\.apache\.jclouds\.api/openstack\-swift@.*$ + CVE-2016-0737 + CVE-2016-0738 + CVE-2017-16613 + + + + + ^pkg:maven/org\.apache\.jclouds\.api/openstack\-keystone@.*$ + CVE-2015-7546 + + + + + + + ^pkg:maven/org\.hibernate/hibernate\-validator@.*$ + CVE-2017-7536 + + + + + ^pkg:maven/org\.codehaus\.jackson/jackson\-mapper\-asl@.*$ + CVE-2017-7525 + CVE-2017-15095 + CVE-2017-17485 + CVE-2018-5968 + CVE-2018-7489 + CVE-2018-14718 + CVE-2019-10172 + CVE-2019-14540 + CVE-2019-16335 + CVE-2019-17267 + + + + + ^pkg:maven/io\.netty/netty@.*$ + CVE-2019-16869 + + + + + ^pkg:maven/com\.nimbusds/nimbus\-jose\-jwt@.*$ + CVE-2019-17195 + + + + + ^pkg:maven/org\.apache\.thrift/libthrift@.*$ + CVE-2016-5397 + CVE-2018-1320 + CVE-2019-0205 + + + + + ^pkg:maven/com\.fasterxml\.jackson\.core/jackson\-databind@.*$ + CVE-2017-7525 + CVE-2017-15095 + CVE-2017-17485 + CVE-2018-5968 + CVE-2018-7489 + CVE-2018-11307 + CVE-2018-14718 + CVE-2018-14719 + CVE-2018-14720 + CVE-2018-14721 + CVE-2018-19360 + CVE-2018-19361 + CVE-2018-19362 + CVE-2019-14540 + CVE-2019-16335 + CVE-2019-16942 + CVE-2019-16943 + CVE-2019-17267 + CVE-2019-17531 + + diff --git a/pom.xml b/pom.xml index d3cacfb13130..6569e30fa120 100644 --- a/pom.xml +++ b/pom.xml @@ -78,6 +78,7 @@ 0.9.0.M2 4.1.0 2.12.0 + 2.1.1 1.15.0 1.9.1 1.21.0 @@ -88,7 +89,7 @@ 1.3 9.4.12.v20180830 1.19.3 - 2.9.10 + 2.10.1 1.9.13 2.8.2 3.10.6.Final @@ -96,6 +97,7 @@ 4.1.42.Final v10.14.2 6.5.0 + 3.11.0 1.7.12 2.8.5 @@ -758,7 +760,7 @@ com.google.protobuf protobuf-java - 3.1.0 + ${protobuf.version} io.tesla.aether @@ -988,7 +990,7 @@ org.apache.directory.api api-util - 1.0.0-M20 + 1.0.3 org.apache.calcite @@ -1478,6 +1480,23 @@ + + org.owasp + dependency-check-maven + 5.2.4 + + 24 + 7 + true + true + owasp-dependency-check-suppressions.xml + + + + none + + + diff --git a/server/src/main/java/org/apache/druid/metadata/SQLMetadataStorageActionHandler.java b/server/src/main/java/org/apache/druid/metadata/SQLMetadataStorageActionHandler.java index acdbbd0f2c1a..eb9e9916cac8 100644 --- a/server/src/main/java/org/apache/druid/metadata/SQLMetadataStorageActionHandler.java +++ b/server/src/main/java/org/apache/druid/metadata/SQLMetadataStorageActionHandler.java @@ -59,10 +59,10 @@ public abstract class SQLMetadataStorageActionHandler entryType; + private final TypeReference statusType; + private final TypeReference logType; + private final TypeReference lockType; private final String entryTypeName; private final String entryTable; @@ -107,7 +107,7 @@ protected ObjectMapper getJsonMapper() return jsonMapper; } - protected TypeReference getStatusType() + protected TypeReference getStatusType() { return statusType; } @@ -127,7 +127,7 @@ protected String getEntryTypeName() return entryTypeName; } - public TypeReference getEntryType() + public TypeReference getEntryType() { return entryType; } diff --git a/server/src/main/java/org/apache/druid/query/ResultLevelCachingQueryRunner.java b/server/src/main/java/org/apache/druid/query/ResultLevelCachingQueryRunner.java index ac1636c1e644..0a7407fa52f8 100644 --- a/server/src/main/java/org/apache/druid/query/ResultLevelCachingQueryRunner.java +++ b/server/src/main/java/org/apache/druid/query/ResultLevelCachingQueryRunner.java @@ -185,7 +185,7 @@ private Sequence deserializeResults(final byte[] cachedResult, CacheStrategy log.error("Cached result set is null"); } final Function pullFromCacheFunction = strategy.pullFromCache(true); - final TypeReference cacheObjectClazz = strategy.getCacheObjectClazz(); + final TypeReference cacheObjectClazz = strategy.getCacheObjectClazz(); //Skip the resultsetID and its length bytes Sequence cachedSequence = Sequences.simple(() -> { try { 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 eea87118f9e9..0d297697ee29 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 @@ -67,13 +67,15 @@ */ public class HttpLoadQueuePeon extends LoadQueuePeon { - public static final TypeReference REQUEST_ENTITY_TYPE_REF = new TypeReference>() - { - }; - - public static final TypeReference RESPONSE_ENTITY_TYPE_REF = new TypeReference>() - { - }; + public static final TypeReference> REQUEST_ENTITY_TYPE_REF = + new TypeReference>() + { + }; + + public static final TypeReference> RESPONSE_ENTITY_TYPE_REF = + new TypeReference>() + { + }; private static final EmittingLogger log = new EmittingLogger(HttpLoadQueuePeon.class); diff --git a/services/pom.xml b/services/pom.xml index fb927038fa12..15301f103437 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -226,6 +226,22 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + javax.xml.bind:jaxb-api + + + jakarta.xml.bind:jakarta.xml.bind-api + + + From 0c3809e925f4c9f020327eabfc1f4d8f1996fa2b Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Wed, 4 Dec 2019 10:26:49 -0800 Subject: [PATCH 2/3] Rename EDL1 license file --- licenses.yaml | 4 ++-- licenses/bin/{jakarta.activation-api.EDL1 => jakarta.EDL1} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename licenses/bin/{jakarta.activation-api.EDL1 => jakarta.EDL1} (100%) diff --git a/licenses.yaml b/licenses.yaml index 636de2bdfb6a..f375dce96fd2 100644 --- a/licenses.yaml +++ b/licenses.yaml @@ -239,7 +239,7 @@ module: java-core license_name: Eclipse Distribution License 1.0 version: 1.2.1 copyright: Oracle and/or its affiliates. -license_file_path: licenses/bin/jakarta.activation-api.EDL1 +license_file_path: licenses/bin/jakarta.EDL1 libraries: - jakarta.activation: jakarta.activation-api @@ -251,7 +251,7 @@ module: java-core license_name: Eclipse Distribution License 1.0 version: 2.3.2 copyright: Oracle and/or its affiliates. -license_file_path: licenses/bin/jakarta.activation-api.EDL1 +license_file_path: licenses/bin/jakarta.EDL1 libraries: - jakarta.xml.bind: jakarta.xml.bind-api diff --git a/licenses/bin/jakarta.activation-api.EDL1 b/licenses/bin/jakarta.EDL1 similarity index 100% rename from licenses/bin/jakarta.activation-api.EDL1 rename to licenses/bin/jakarta.EDL1 From de9a4cc5017fe2f4be697df15e1c2b1a6bd36c5c Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Wed, 4 Dec 2019 13:02:00 -0800 Subject: [PATCH 3/3] Fix inspection errors --- .../druid/query/lookup/NamespaceLookupExtractorFactoryTest.java | 2 +- .../indexing/seekablestream/SeekableStreamIndexTaskRunner.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/NamespaceLookupExtractorFactoryTest.java b/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/NamespaceLookupExtractorFactoryTest.java index bab8259dbcfc..64c5022a376b 100644 --- a/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/NamespaceLookupExtractorFactoryTest.java +++ b/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/NamespaceLookupExtractorFactoryTest.java @@ -471,7 +471,7 @@ public void testSerDe() throws Exception namespaceLookupExtractorFactory.getExtractionNamespace().getClass() ); Assert.assertFalse(namespaceLookupExtractorFactory.replaces(mapper.readValue(str, LookupExtractorFactory.class))); - final Map map = new HashMap<>(mapper.>readValue( + final Map map = new HashMap<>(mapper.readValue( str, JacksonUtils.TYPE_REFERENCE_MAP_STRING_OBJECT )); diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java index 6d33179c27aa..e1f3861531ea 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java @@ -1079,7 +1079,7 @@ private boolean restoreSequences() throws IOException final File sequencesPersistFile = getSequencesPersistFile(toolbox); if (sequencesPersistFile.exists()) { sequences = new CopyOnWriteArrayList<>( - toolbox.getJsonMapper().>>readValue( + toolbox.getJsonMapper().readValue( sequencesPersistFile, getSequenceMetadataTypeReference() )