Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core][jdk17] Support jdk17 #7086

Open
wants to merge 56 commits into
base: dev
Choose a base branch
from
Open

[Core][jdk17] Support jdk17 #7086

wants to merge 56 commits into from

Conversation

liugddx
Copy link
Member

@liugddx liugddx commented Jun 30, 2024

Purpose of this pull request

Refer to https://issues.apache.org/jira/browse/FLINK-15736

  • Upgrade hadoop client
  • Startup script changes
  • Disable LocalFileIT test on jdk 17

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@github-actions github-actions bot added document dependencies Pull requests that update a dependency file CI&CD core SeaTunnel core module Zeta e2e connector-v2 labels Jul 12, 2024
@github-actions github-actions bot added the Spark label Jul 14, 2024
gdliu3 added 2 commits July 15, 2024 16:18
Comment on lines +54 to +60
public static DateTimeFormatter TIME_FORMAT =
new DateTimeFormatterBuilder()
.appendPattern("HH:mm:ss")
.appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true)
.toFormatter();

public Map<String, DateTimeFormatter> fieldFormatterMap = new HashMap<>();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format date format instead using toString. Strings generated in different jdk versions are inconsistent

Comment on lines 270 to 284
LzopCodec lzo = new LzopCodec();
Path path = Paths.get(file.getAbsolutePath() + ".lzo");
OutputStream outputStream = lzo.createOutputStream(Files.newOutputStream(path));
outputStream.write(Files.readAllBytes(file.toPath()));
outputStream.close();
// Define the output path
Path path = Paths.get(file.getAbsolutePath() + ".lzma");

// Use try-with-resources to ensure streams are closed properly
try (FileInputStream fis = new FileInputStream(file);
FileOutputStream fos = new FileOutputStream(path.toFile());
LZMACompressorOutputStream lzmaOut = new LZMACompressorOutputStream(fos)) {

byte[] buffer = new byte[1024];
int len;
while ((len = fis.read(buffer)) != -1) {
lzmaOut.write(buffer, 0, len);
}
}

Copy link
Member Author

@liugddx liugddx Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.RuntimeException: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @3025782f [in thread "main"]. Skip jdk17 test environment

@github-actions github-actions bot removed the format label Jul 16, 2024
Comment on lines +130 to +131
final String datetime = "2023-12-22 00:00:00";
LocalDateTime parse = DateTimeUtils.parse(datetime, Formatter.YYYY_MM_DD_HH_MM_SS);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jdk17 optimizes timestamps and temporarily uses a fixed format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI&CD connectors-v2 core SeaTunnel core module dependencies Pull requests that update a dependency file document e2e Spark Zeta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants