-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HADOOP-19385. S3A: Add iceberg bulk delete test #7316
base: trunk
Are you sure you want to change the base?
HADOOP-19385. S3A: Add iceberg bulk delete test #7316
Conversation
Add Iceberg core to the hadoop-aws test classpath. Iceberg is java17+ only, so this adds * A new test source path src/test/java17 * A new profile "java-17-or-later" which includes this and declares the dependency on iceberg-core. The new test is ITestIcebergBulkDelete; it is parameterized Iceberg bulk delete enabled/disabled and s3a multipart delete enabled/disabled. There is a superclass contract test org.apache.fs.test.formats.AbstractIcebergDeleteTest To support future stores which implement bulk delete. This is currently a minimal superclass; all tests are currently in ITestIcebergBulkDelete Change-Id: Ica8682f4efdd0cb04ca7f4762b2e47d396552910
09b4682
to
d37310c
Compare
🎊 +1 overall
This message was automatically generated. |
@@ -787,7 +787,17 @@ | |||
<version>${hadoop.version}</version> | |||
<type>test-jar</type> | |||
</dependency> | |||
|
|||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
@@ -1521,6 +1521,13 @@ private Constants() { | |||
*/ | |||
public static final String FS_S3A_PERFORMANCE_FLAGS = | |||
"fs.s3a.performance.flags"; | |||
|
|||
/** | |||
* All performance flags in the enumeration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@value
* @return a configuration for subclasses to extend | ||
*/ | ||
|
||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cut for now, or make this suite parameterized on bulk delete enabled
* Format tests. | ||
*/ | ||
|
||
package org.apache.fs.test.formats; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
|
||
private static final int DELETE_FILE_COUNT = 7; | ||
|
||
@Parameterized.Parameters(name = "multiobjectdelete-{0}-usebulk-{1}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flip params and add a javadoc
* The classic invocation mechanism reports a failure. | ||
*/ | ||
@Test | ||
public void testDeleteDirectory() throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expand detail in name directory does not happen
public void testDeleteManyFiles() throws Throwable { | ||
Path path = methodPath(); | ||
final FileSystem fs = getFileSystem(); | ||
final List<Path> files = createFiles(fs, path, 1, DELETE_FILE_COUNT, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+add a local temp file to show mixing of filesystems
assertSuccessfulBulkDelete(bulkDelete_delete(getFileSystem(), basePath, paths)); | ||
} | ||
|
||
public static List<String> stringList(List<Path> files) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
javadocs and explain why not .toURI()
} | ||
|
||
@Test | ||
public void testDeleteManyFiles() throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment that this is how it is expected to be used
/** Is bulk delete enabled on hadoop runtimes with API support: {@value}. */ | ||
public static final String ICEBERG_BULK_DELETE_ENABLED = "iceberg.hadoop.bulk.delete.enabled"; | ||
|
||
private static final int DELETE_PAGE_SIZE = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain choice of this and the delete file count
final FileSystem fs = getFileSystem(); | ||
final List<Path> files = createFiles(fs, path, 1, DELETE_FILE_COUNT, 0); | ||
try (HadoopFileIO fileIO = createFileIO()) { | ||
fileIO.deleteFiles(stringList(files)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add iostats assertions
Add Iceberg core to the hadoop-aws test classpath to verify that it is correctly
invoked through the HadoopFileIO component when enabled in iceberg
Iceberg is java17+ only, so this adds
The new test is ITestIcebergBulkDelete; it is parameterized Iceberg bulk delete enabled/disabled and s3a multipart delete enabled/disabled.
There is a superclass contract test
This is to support future stores which implement bulk delete. This is currently a minimal superclass; all tests are currently in
ITestIcebergBulkDelete
How was this patch tested?
Fun!
Once we have iceberg PR 10233 merged in, we can merge this. Until then it doesn't currently compile as for testing unless we move to DynMethods there (maybe I should)
Important: Yetus cannot test this yet!
Yetus doesn't have a java17 run, so the new test is not executed. Even if the Iceberg Jar was there
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?