slfan1989 commented on code in PR #10187:
URL: https://github.com/apache/ozone/pull/10187#discussion_r3192731980
##########
hadoop-ozone/iceberg/src/test/java/org/apache/hadoop/ozone/iceberg/TestRewriteTablePathOzoneAction.java:
##########
@@ -188,6 +189,51 @@ void tablePathRewriteForStartAndEndVersionProvided()
throws Exception {
assertAllInternalPathsRewritten(csvPairs, targetPrefix);
}
+ @Test
+ void executeRejectsMissingLocationPrefix() {
+ NullPointerException exception = assertThrows(NullPointerException.class,
+ () -> new RewriteTablePathOzoneAction(table)
+ .stagingLocation(stagingDir.toString() + "/")
+ .execute());
+
+ assertEquals("Source prefix is null", exception.getMessage());
+ }
Review Comment:
@sreejasahithi That makes sense. I kept this as a defensive check for
possible non-CLI callers, and to make the execute() contract a bit clearer.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]