Skip to content

Commit d9e73d0

Browse files
committed
Add CheckpointStatistics to increase inner class visibility
1 parent 4539856 commit d9e73d0

File tree

3 files changed

+817
-0
lines changed

3 files changed

+817
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package org.apache.flink.runtime.rest.messages.checkpoints;
20+
21+
import org.apache.flink.runtime.rest.HttpMethodWrapper;
22+
import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
23+
import org.apache.flink.runtime.rest.messages.RuntimeMessageHeaders;
24+
25+
import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus;
26+
27+
/** Copied over for CheckpointStatistics to work. See CheckpointStatistics. */
28+
public class CheckpointStatisticDetailsHeaders
29+
implements RuntimeMessageHeaders<
30+
EmptyRequestBody, CheckpointStatistics, CheckpointMessageParameters> {
31+
32+
private static final CheckpointStatisticDetailsHeaders INSTANCE =
33+
new CheckpointStatisticDetailsHeaders();
34+
35+
public static final String URL = "/jobs/:jobid/checkpoints/details/:checkpointid";
36+
37+
private CheckpointStatisticDetailsHeaders() {}
38+
39+
@Override
40+
public Class<EmptyRequestBody> getRequestClass() {
41+
return EmptyRequestBody.class;
42+
}
43+
44+
@Override
45+
public Class<CheckpointStatistics> getResponseClass() {
46+
return CheckpointStatistics.class;
47+
}
48+
49+
@Override
50+
public HttpResponseStatus getResponseStatusCode() {
51+
return HttpResponseStatus.OK;
52+
}
53+
54+
@Override
55+
public CheckpointMessageParameters getUnresolvedMessageParameters() {
56+
return new CheckpointMessageParameters();
57+
}
58+
59+
@Override
60+
public HttpMethodWrapper getHttpMethod() {
61+
return HttpMethodWrapper.GET;
62+
}
63+
64+
@Override
65+
public String getTargetRestEndpointURL() {
66+
return URL;
67+
}
68+
69+
public static CheckpointStatisticDetailsHeaders getInstance() {
70+
return INSTANCE;
71+
}
72+
73+
@Override
74+
public String getDescription() {
75+
return "Returns details for a checkpoint.";
76+
}
77+
}

0 commit comments

Comments
 (0)