yihua commented on code in PR #19161:
URL: https://github.com/apache/hudi/pull/19161#discussion_r3618404743
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ExportInstantsProcedure.scala:
##########
@@ -88,19 +88,17 @@ class ExportInstantsProcedure extends BaseProcedure with
ProcedureBuilder with L
if (!new File(localFolder).isDirectory) throw new
HoodieException(localFolder + " is not a valid local directory")
- // The non archived instants can be listed from the Timeline. Wrap in a
mutable list because the
- // desc branch below reverses it in place via Collections.reverse, which
fails on the read-only
- // list produced by asJava over an immutable Scala collection.
- val nonArchivedInstants: util.List[HoodieInstant] = new
util.ArrayList[HoodieInstant](metaClient
+ // The non archived instants can be listed from the Timeline.
+ val nonArchivedInstants: util.List[HoodieInstant] = metaClient
Review Comment:
Fixed. Restored `ExportInstantsProcedure` to master so the `new
util.ArrayList(...)` wrapping from #19172 stays intact; this PR no longer
touches that production file, it is test-only now.
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ExportInstantsProcedure.scala:
##########
@@ -88,19 +88,17 @@ class ExportInstantsProcedure extends BaseProcedure with
ProcedureBuilder with L
if (!new File(localFolder).isDirectory) throw new
HoodieException(localFolder + " is not a valid local directory")
- // The non archived instants can be listed from the Timeline. Wrap in a
mutable list because the
- // desc branch below reverses it in place via Collections.reverse, which
fails on the read-only
- // list produced by asJava over an immutable Scala collection.
- val nonArchivedInstants: util.List[HoodieInstant] = new
util.ArrayList[HoodieInstant](metaClient
+ // The non archived instants can be listed from the Timeline.
+ val nonArchivedInstants: util.List[HoodieInstant] = metaClient
.getActiveTimeline
.filterCompletedInstants.getInstants.iterator().asScala
.filter((i: HoodieInstant) => actionSet.contains(i.getAction))
- .toList.asJava)
+ .toList.asJava
Review Comment:
Fixed, thanks for catching it. The file is restored to master; #19172 is
untouched.
--
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]