ChenSammi commented on code in PR #4294:
URL: https://github.com/apache/ozone/pull/4294#discussion_r1174755128
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OMNodeDetails.java:
##########
@@ -160,23 +164,27 @@ public OMNodeDetails build() {
}
}
- public String getOMDBCheckpointEnpointUrl(boolean isHttpPolicy) {
- if (isHttpPolicy) {
- if (StringUtils.isNotEmpty(getHttpAddress())) {
- return "http://" + getHttpAddress() +
- OZONE_DB_CHECKPOINT_HTTP_ENDPOINT +
- "?" + OZONE_DB_CHECKPOINT_REQUEST_FLUSH + "=true&" +
- OZONE_DB_CHECKPOINT_INCLUDE_SNAPSHOT_DATA + "=true";
- }
- } else {
- if (StringUtils.isNotEmpty(getHttpsAddress())) {
- return "https://" + getHttpsAddress() +
- OZONE_DB_CHECKPOINT_HTTP_ENDPOINT +
- "?" + OZONE_DB_CHECKPOINT_REQUEST_FLUSH + "=true&" +
- OZONE_DB_CHECKPOINT_INCLUDE_SNAPSHOT_DATA + "=true";
+ public URL getOMDBCheckpointEndpointUrl(boolean isHttp, boolean flush,
+ List<String> sstList) throws IOException {
+ URL url;
+ try {
+ URIBuilder urlBuilder = new URIBuilder().
+ setScheme(isHttp ? "http" : "https").
+ setHost(isHttp ? getHttpAddress() : getHttpsAddress()).
+ setPath(OZONE_DB_CHECKPOINT_HTTP_ENDPOINT).
+ addParameter(OZONE_DB_CHECKPOINT_INCLUDE_SNAPSHOT_DATA, "true").
+ addParameter(OZONE_DB_CHECKPOINT_REQUEST_FLUSH,
+ flush ? "true" : "false");
+ if (sstList != null && !sstList.isEmpty()) {
+ for (String s: sstList) {
+ urlBuilder.addParameter(OZONE_DB_CHECKPOINT_REQUEST_SST, s);
Review Comment:
I would suggest use one parameter, and add all sst files path as the value
of this parameter.
For the first incremental snapshot, there will be a lot of sst needs
excluded. Jetty server has a max head size. Currently it's 64K in
Ozone(HTTP_MAX_REQUEST_HEADER_SIZE_KEY). Give the sst file name(000311.sst) is
10 byte, 64K can hold 6.4K sst file. If each sst file use a parameter, then
this number can be easily cut half.
--
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]