ChenSammi commented on code in PR #4294:
URL: https://github.com/apache/ozone/pull/4294#discussion_r1174782454


##########
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:
   What if there are too many sst files, their concatenated value exceed the 
max header size? 



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

Reply via email to