reswqa commented on code in PR #28402:
URL: https://github.com/apache/flink/pull/28402#discussion_r3451055748


##########
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java:
##########
@@ -464,21 +440,27 @@ void updateOverview() {
      * <p>For the display in the HistoryServer WebFrontend we have to combine 
these overviews.
      */
     void updateJobOverview() {
-        try (JsonGenerator gen =
-                jacksonFactory.createGenerator(
-                        HistoryServer.createOrGetFile(webDir, 
JobsOverviewHeaders.URL))) {
-            File[] overviews = new File(webOverviewDir.getPath()).listFiles();
-            if (overviews != null) {
-                Collection<JobDetails> allJobs = new 
ArrayList<>(overviews.length);
-                for (File overview : overviews) {
-                    MultipleJobsDetails subJobs =
-                            mapper.readValue(overview, 
MultipleJobsDetails.class);
-                    allJobs.addAll(subJobs.getJobs());
+        try {
+            Collection<JobDetails> allJobs = new ArrayList<>();
+            List<Entry> overviews = 
archiveStorage.getEntriesByPrefix(JOB_OVERVIEWS_KEY_PREFIX);
+            for (Entry overview : overviews) {
+                MultipleJobsDetails subJobs;
+                // Parse file directly to avoid loading the archive into 
string.

Review Comment:
   ```suggestion
                   // We treated File as a special case, mainly as a 
performance trade-off to avoid the overhead of loading the archive into string.
   ```
   
   ditto for `ApplicationArchiveFetcher`.



-- 
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]

Reply via email to