XComp commented on code in PR #19970:
URL: https://github.com/apache/flink/pull/19970#discussion_r1497091046
##########
flink-formats/flink-hadoop-bulk/src/test/java/org/apache/flink/formats/hadoop/bulk/AbstractFileCommitterTest.java:
##########
@@ -232,7 +227,7 @@ private void verifyFileNotExists(
FileSystem fileSystem = FileSystem.get(basePath.toUri(),
configuration);
for (String targetFileName : targetFileNames) {
assertThat(fileSystem.exists(new Path(basePath, targetFileName)))
- .as("Pre-committed file should not exists: " +
targetFileName)
+ .as("Pre-committed file should not exist: " +
targetFileName)
Review Comment:
interesting feature. I didn't notice that before. But keep in mind two
things when writing code:
1. There's also a trade-off between readability and performance improvement:
Not every performance-related change is needed/useful. Here we have a test
implementation where we don't need to worry too much about the performance of a
String operation in case of a failure. Readability (i.e. less code) might be
preferable here because the additional code snippet doesn't add any value.
...at least as far as I can see.
2. "Workarounds" that are way more "uncommon" in the code base might cause
hotfix PRs later on by contributors who do not know this particular feature
(which increases the review efforts on the committers' side or, at least,
increases the projects PR count). I see that specific risk for this change
proposal here. But to be fair, that's a subjective judgement on my end.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]