Skip to content

Commit bd8ddc1

Browse files
committed
updated
1 parent 4424b3a commit bd8ddc1

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

docs/layouts/shortcodes/generated/history_server_configuration.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
</tr>
99
</thead>
1010
<tbody>
11+
<tr>
12+
<td><h5>historyserver.archive.cached-retained-jobs</h5></td>
13+
<td style="word-wrap: break-word;">(none)</td>
14+
<td>Integer</td>
15+
<td>The maximum number of n latest jobs to retain in the local directory defined by `historyserver.web.tmpdir`. If this configuration is provided, the remote and local storage of job archives will be decoupled.If set to `0` or less than `-1` HistoryServer will throw an <code class="highlighter-rouge">IllegalConfigurationException</code>. </td>
16+
</tr>
1117
<tr>
1218
<td><h5>historyserver.archive.clean-expired-jobs</h5></td>
1319
<td style="word-wrap: break-word;">false</td>
@@ -26,6 +32,12 @@
2632
<td>Duration</td>
2733
<td>Interval for refreshing the archived job directories.</td>
2834
</tr>
35+
<tr>
36+
<td><h5>historyserver.archive.num-cached-most-recently-viewed-jobs</h5></td>
37+
<td style="word-wrap: break-word;">1</td>
38+
<td>Integer</td>
39+
<td>The maximum number of jobs to retain in the local cache defined by `historyserver.web.tmpdir` which stores the job archives that are fetched from the remote storage. This limit is distinct from the number of most recent jobs which will in the cache.The total cache size is a combination of the number of remote cache jobs and the number of remote fetch cached jobs and retained cache jobs.If set to less than `0` HistoryServer will throw an <code class="highlighter-rouge">IllegalConfigurationException</code>. </td>
40+
</tr>
2941
<tr>
3042
<td><h5>historyserver.archive.retained-jobs</h5></td>
3143
<td style="word-wrap: break-word;">-1</td>

flink-core/src/main/java/org/apache/flink/configuration/HistoryServerOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ public class HistoryServerOptions {
136136
String.format(
137137
"The maximum number of n latest jobs to retain in the local directory defined by `%s`. ",
138138
HISTORY_SERVER_WEB_DIR.key()))
139-
.text("If this configuration is provided, the remote and local storage of job archives will be decoupled.")
139+
.text(
140+
"If this configuration is provided, the remote and local storage of job archives will be decoupled.")
140141
.text(
141142
"If set to `0` or less than `-1` HistoryServer will throw an %s. ",
142143
code("IllegalConfigurationException"))

flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ protected boolean removeEldestEntry(Map.Entry<String, String> eldest) {
139139
private final int generalCachedJobSize;
140140

141141
private final boolean remoteFetchEnabled;
142+
142143
/** Cache of all available jobs identified by their id and refresh directory. */
143144
private final Map<Path, Set<String>> cachedArchivesPerRefreshDirectory;
144145

flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcherTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
public class HistoryServerArchiveFetcherTest {
4444

4545
@Test
46-
void testMostRecentlyViewedCacheEvictedWhenFull(@TempDir Path tmpDir)
47-
throws IOException {
46+
void testMostRecentlyViewedCacheEvictedWhenFull(@TempDir Path tmpDir) throws IOException {
4847
final Path webDir = Files.createDirectory(tmpDir.resolve("webDir"));
4948
final Path tempDir = Files.createDirectory(tmpDir.resolve("tmpDir"));
5049
final org.apache.flink.core.fs.Path tempDirFs =

flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/history/HistoryServerTest.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ private void startHistoryServerWithCacheSizeLimit(int maxCacheSize)
286286
Configuration historyServerConfig =
287287
createTestConfiguration(
288288
HistoryServerOptions.HISTORY_SERVER_CLEANUP_EXPIRED_JOBS.defaultValue());
289-
historyServerConfig.set(
290-
HistoryServerOptions.HISTORY_SERVER_CACHED_JOBS, maxCacheSize);
289+
historyServerConfig.set(HistoryServerOptions.HISTORY_SERVER_CACHED_JOBS, maxCacheSize);
291290
new HistoryServer(historyServerConfig).start();
292291
}
293292

@@ -297,8 +296,7 @@ private void startHistoryServerWithRemoteFetchCacheSizeLimit(
297296
Configuration historyServerConfig =
298297
createTestConfiguration(
299298
HistoryServerOptions.HISTORY_SERVER_CLEANUP_EXPIRED_JOBS.defaultValue());
300-
historyServerConfig.set(
301-
HistoryServerOptions.HISTORY_SERVER_CACHED_JOBS, 3);
299+
historyServerConfig.set(HistoryServerOptions.HISTORY_SERVER_CACHED_JOBS, 3);
302300
historyServerConfig.set(
303301
HistoryServerOptions.HISTORY_SERVER_NUM_CACHED_MOST_RECENTLY_VIEWED_JOBS,
304302
numCachedMostRecentlyViewedJobs);
@@ -434,13 +432,8 @@ private static Stream<Arguments> remoteAndLocalCacheSource() {
434432
2,
435433
HistoryServerOptions.HISTORY_SERVER_RETAINED_JOBS.defaultValue(),
436434
2),
437-
Arguments.arguments(
438-
true, -1, 2, 2),
439-
Arguments.arguments(
440-
false,
441-
-1,
442-
2,
443-
2));
435+
Arguments.arguments(true, -1, 2, 2),
436+
Arguments.arguments(false, -1, 2, 2));
444437
}
445438

446439
@ParameterizedTest

0 commit comments

Comments
 (0)