Skip to content

Commit

Permalink
[FLINK-33705] Upgrade to flink-shaded 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin authored Jan 12, 2024
1 parent 413aed0 commit 5d9d874
Show file tree
Hide file tree
Showing 300 changed files with 451 additions and 395 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Method <org.apache.flink.connector.datagen.table.RandomGeneratorVisitor.visit(or
Method <org.apache.flink.connector.datagen.table.RandomGeneratorVisitor.visit(org.apache.flink.table.types.logical.YearMonthIntervalType)> calls method <org.apache.flink.streaming.api.functions.source.datagen.RandomGenerator.intGenerator(int, int)> in (RandomGeneratorVisitor.java:292)
Method <org.apache.flink.connector.datagen.table.RandomGeneratorVisitor.visit(org.apache.flink.table.types.logical.YearMonthIntervalType)> calls method <org.apache.flink.streaming.api.functions.source.datagen.RandomGenerator.withNullRate(float)> in (RandomGeneratorVisitor.java:293)
Method <org.apache.flink.connector.datagen.table.RandomGeneratorVisitor.visit(org.apache.flink.table.types.logical.ZonedTimestampType)> calls method <org.apache.flink.streaming.api.functions.source.datagen.RandomGenerator.withNullRate(float)> in (RandomGeneratorVisitor.java:331)
Method <org.apache.flink.connector.datagen.table.SequenceGeneratorVisitor$2.next()> calls method <org.apache.flink.shaded.guava31.com.google.common.primitives.Longs.toByteArray(long)> in (SequenceGeneratorVisitor.java:221)
Method <org.apache.flink.connector.datagen.table.SequenceGeneratorVisitor$2.next()> calls method <org.apache.flink.shaded.guava32.com.google.common.primitives.Longs.toByteArray(long)> in (SequenceGeneratorVisitor.java:221)
Method <org.apache.flink.connector.datagen.table.SequenceGeneratorVisitor.getSequenceBytesGenerator(long, long)> has return type <org.apache.flink.streaming.api.functions.source.datagen.SequenceGenerator> in (SequenceGeneratorVisitor.java:0)
Method <org.apache.flink.connector.datagen.table.SequenceGeneratorVisitor.getSequenceStringGenerator(long, long)> has return type <org.apache.flink.streaming.api.functions.source.datagen.SequenceGenerator> in (SequenceGeneratorVisitor.java:0)
Method <org.apache.flink.connector.datagen.table.SequenceGeneratorVisitor.visit(org.apache.flink.table.types.logical.BigIntType)> calls method <org.apache.flink.streaming.api.functions.source.datagen.SequenceGenerator.longGenerator(long, long)> in (SequenceGeneratorVisitor.java:172)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import org.apache.flink.util.FlinkRuntimeException;
import org.apache.flink.util.ShutdownHookUtil;

import org.apache.flink.shaded.guava31.com.google.common.collect.MapDifference;
import org.apache.flink.shaded.guava31.com.google.common.collect.Maps;
import org.apache.flink.shaded.guava32.com.google.common.collect.MapDifference;
import org.apache.flink.shaded.guava32.com.google.common.collect.Maps;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import java.util.Collection;

import static org.apache.flink.shaded.guava31.com.google.common.base.Preconditions.checkNotNull;
import static org.apache.flink.shaded.guava32.com.google.common.base.Preconditions.checkNotNull;

/**
* This class decorates the URL of the original message headers by adding a prefix. The purpose of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.apache.flink.client.program.PackagedProgram;
import org.apache.flink.client.testjar.TestJob;

import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableList;
import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableMap;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableList;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableMap;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.apache.flink.runtime.testutils.CancelableInvokable;
import org.apache.flink.runtime.testutils.WaitingCancelableInvokable;

import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableMap;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableMap;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.sink.v2.DiscardingSink;

import org.apache.flink.shaded.guava31.com.google.common.collect.Lists;
import org.apache.flink.shaded.guava32.com.google.common.collect.Lists;

/** Simulate a class setting a configuration. */
public class ForbidConfigurationJob {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import org.apache.flink.util.CollectionUtil;
import org.apache.flink.util.Preconditions;

import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableList;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableList;

import org.apache.calcite.plan.RelOptCluster;
import org.apache.calcite.plan.RelTraitSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.apache.flink.util.Preconditions;

import org.apache.flink.shaded.guava31.com.google.common.io.Resources;
import org.apache.flink.shaded.guava32.com.google.common.io.Resources;

import com.klarna.hiverunner.HiveServerContainer;
import com.klarna.hiverunner.HiveServerContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import org.apache.flink.table.catalog.hive.HiveTestUtils;

import org.apache.flink.shaded.guava31.com.google.common.base.Joiner;
import org.apache.flink.shaded.guava31.com.google.common.base.Throwables;
import org.apache.flink.shaded.guava32.com.google.common.base.Joiner;
import org.apache.flink.shaded.guava32.com.google.common.base.Throwables;

import com.klarna.hiverunner.HiveServerContext;
import org.apache.hadoop.hive.conf.HiveConf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.apache.flink.util.CollectionUtil;
import org.apache.flink.util.TestLoggerExtension;

import org.apache.flink.shaded.guava31.com.google.common.collect.Lists;
import org.apache.flink.shaded.guava32.com.google.common.collect.Lists;

import org.apache.hadoop.hive.conf.HiveConf;
import org.junit.jupiter.api.AfterAll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.apache.flink.util.CollectionUtil;
import org.apache.flink.util.FileUtils;

import org.apache.flink.shaded.guava31.com.google.common.collect.Lists;
import org.apache.flink.shaded.guava32.com.google.common.collect.Lists;

import org.junit.AfterClass;
import org.junit.BeforeClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.util.Preconditions;

import org.apache.flink.shaded.guava31.com.google.common.util.concurrent.FutureCallback;
import org.apache.flink.shaded.guava32.com.google.common.util.concurrent.FutureCallback;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.apache.flink.api.common.functions.RuntimeContext;

import org.apache.flink.shaded.guava31.com.google.common.util.concurrent.RateLimiter;
import org.apache.flink.shaded.guava32.com.google.common.util.concurrent.RateLimiter;

/**
* An implementation of {@link FlinkConnectorRateLimiter} that uses Guava's RateLimiter for rate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.flink.annotation.Internal;
import org.apache.flink.util.concurrent.ExecutorThreadFactory;

import org.apache.flink.shaded.guava31.com.google.common.util.concurrent.RateLimiter;
import org.apache.flink.shaded.guava32.com.google.common.util.concurrent.RateLimiter;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.flink.annotation.Internal;
import org.apache.flink.util.Preconditions;

import org.apache.flink.shaded.guava31.com.google.common.base.Defaults;
import org.apache.flink.shaded.guava32.com.google.common.base.Defaults;

import javax.annotation.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.apache.flink.configuration.description.Description;
import org.apache.flink.configuration.description.TextElement;

import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableSet;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet;

import java.time.Duration;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.flink.configuration.description.Description;
import org.apache.flink.util.ArrayUtils;

import org.apache.flink.shaded.guava31.com.google.common.collect.Iterables;
import org.apache.flink.shaded.guava32.com.google.common.collect.Iterables;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.apache.flink.annotation.PublicEvolving;

import org.apache.flink.shaded.guava31.com.google.common.base.Strings;
import org.apache.flink.shaded.guava32.com.google.common.base.Strings;

import java.util.Arrays;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.util.function.FunctionWithException;

import org.apache.flink.shaded.guava31.com.google.common.collect.Iterators;
import org.apache.flink.shaded.guava32.com.google.common.collect.Iterators;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import java.util.List;
import java.util.Map;

import static org.apache.flink.shaded.guava31.com.google.common.collect.Lists.reverse;
import static org.apache.flink.shaded.guava32.com.google.common.collect.Lists.reverse;

/**
* This class allows to register instances of {@link AutoCloseable}, which are all closed if this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.List;
import java.util.Map;

import static org.apache.flink.shaded.guava31.com.google.common.collect.Lists.reverse;
import static org.apache.flink.shaded.guava32.com.google.common.collect.Lists.reverse;

/**
* This class allows to register instances of {@link Closeable}, which are all closed if this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
import org.apache.flink.util.ExceptionUtils;
import org.apache.flink.util.TemporaryClassLoaderContext;

import org.apache.flink.shaded.guava31.com.google.common.base.Splitter;
import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableMultimap;
import org.apache.flink.shaded.guava31.com.google.common.collect.Iterators;
import org.apache.flink.shaded.guava31.com.google.common.collect.Multimap;
import org.apache.flink.shaded.guava32.com.google.common.base.Splitter;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableMultimap;
import org.apache.flink.shaded.guava32.com.google.common.collect.Iterators;
import org.apache.flink.shaded.guava32.com.google.common.collect.Multimap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.apache.flink.annotation.Internal;
import org.apache.flink.annotation.VisibleForTesting;

import org.apache.flink.shaded.guava31.com.google.common.base.Joiner;
import org.apache.flink.shaded.guava31.com.google.common.collect.Iterators;
import org.apache.flink.shaded.guava32.com.google.common.base.Joiner;
import org.apache.flink.shaded.guava32.com.google.common.collect.Iterators;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
4 changes: 2 additions & 2 deletions flink-core/src/main/java/org/apache/flink/util/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ public static java.nio.file.Path getCurrentWorkingDirectory() {
*/
public static boolean isJarFile(java.nio.file.Path file) {
return JAR_FILE_EXTENSION.equals(
org.apache.flink.shaded.guava31.com.google.common.io.Files.getFileExtension(
org.apache.flink.shaded.guava32.com.google.common.io.Files.getFileExtension(
file.toString()));
}

Expand All @@ -640,7 +640,7 @@ public static boolean isJarFile(java.nio.file.Path file) {
*/
public static String stripFileExtension(String fileName) {
final String extension =
org.apache.flink.shaded.guava31.com.google.common.io.Files.getFileExtension(
org.apache.flink.shaded.guava32.com.google.common.io.Files.getFileExtension(
fileName);
if (!extension.isEmpty()) {
return fileName.substring(0, fileName.lastIndexOf(extension) - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.flink.annotation.Internal;
import org.apache.flink.configuration.IllegalConfigurationException;

import org.apache.flink.shaded.guava31.com.google.common.net.InetAddresses;
import org.apache.flink.shaded.guava32.com.google.common.net.InetAddresses;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.apache.flink.util.TestLogger;

import org.apache.flink.shaded.guava31.com.google.common.collect.Sets;
import org.apache.flink.shaded.guava32.com.google.common.collect.Sets;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.flink.core.memory.DataInputDeserializer;
import org.apache.flink.core.memory.DataOutputSerializer;

import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableList;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableList;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.apache.flink.core.testutils.CommonTestUtils;
import org.apache.flink.util.TestLogger;

import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableMap;
import org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableMap;

import org.junit.After;
import org.junit.BeforeClass;
Expand Down
34 changes: 34 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,40 @@ under the License.
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</exclusion>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.runtime.util.bash.BashJavaUtils;

import org.apache.flink.shaded.guava31.com.google.common.collect.Sets;
import org.apache.flink.shaded.guava32.com.google.common.collect.Sets;

import org.hamcrest.Matchers;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.apache.flink.util.clock.Clock;
import org.apache.flink.util.clock.SystemClock;

import org.apache.flink.shaded.guava31.com.google.common.io.Closer;
import org.apache.flink.shaded.guava32.com.google.common.io.Closer;

import java.io.IOException;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

import static org.apache.flink.shaded.guava31.com.google.common.collect.Iterables.getOnlyElement;
import static org.apache.flink.shaded.guava32.com.google.common.collect.Iterables.getOnlyElement;
import static org.apache.flink.util.ExceptionUtils.rethrowIOException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.apache.flink.streaming.api.functions.source.RichSourceFunction;
import org.apache.flink.util.Collector;

import org.apache.flink.shaded.guava31.com.google.common.collect.Iterables;
import org.apache.flink.shaded.guava32.com.google.common.collect.Iterables;

import java.time.Duration;
import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

package org.apache.flink.fs.gs.utils;

import org.apache.flink.shaded.guava31.com.google.common.hash.HashFunction;
import org.apache.flink.shaded.guava31.com.google.common.hash.Hashing;
import org.apache.flink.shaded.guava32.com.google.common.hash.HashFunction;
import org.apache.flink.shaded.guava32.com.google.common.hash.Hashing;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.flink.fs.gs.utils.ChecksumUtils;
import org.apache.flink.util.Preconditions;

import org.apache.flink.shaded.guava31.com.google.common.hash.Hasher;
import org.apache.flink.shaded.guava32.com.google.common.hash.Hasher;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.apache.flink.configuration.Configuration;
import org.apache.flink.fs.gs.TestUtils;

import org.apache.flink.shaded.guava31.com.google.common.collect.MapDifference;
import org.apache.flink.shaded.guava31.com.google.common.collect.Maps;
import org.apache.flink.shaded.guava32.com.google.common.collect.MapDifference;
import org.apache.flink.shaded.guava32.com.google.common.collect.Maps;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Loading

0 comments on commit 5d9d874

Please sign in to comment.