Skip to content

Commit

Permalink
[HUDI-4826] Update RemoteHoodieTableFileSystemView to allow base path…
Browse files Browse the repository at this point in the history
… in UTF-8 (apache#6544)
  • Loading branch information
wangp-nhlab authored Sep 10, 2022
1 parent c92ea8a commit e788eb2
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

package org.apache.hudi.common.table.view;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.client.fluent.Request;
import org.apache.http.client.fluent.Response;
import org.apache.http.client.utils.URIBuilder;
import org.apache.hudi.common.model.CompactionOperation;
import org.apache.hudi.common.model.FileSlice;
import org.apache.hudi.common.model.HoodieBaseFile;
Expand All @@ -44,6 +39,13 @@
import org.apache.hudi.common.util.ValidationUtils;
import org.apache.hudi.common.util.collection.Pair;
import org.apache.hudi.exception.HoodieRemoteException;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.Consts;
import org.apache.http.client.fluent.Request;
import org.apache.http.client.fluent.Response;
import org.apache.http.client.utils.URIBuilder;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

Expand Down Expand Up @@ -177,7 +179,7 @@ private <T> T executeRequest(String requestPath, Map<String, String> queryParame
String url = builder.toString();
LOG.info("Sending request : (" + url + ")");
Response response = retryHelper != null ? retryHelper.start(() -> get(timeoutMs, url, method)) : get(timeoutMs, url, method);
String content = response.returnContent().asString();
String content = response.returnContent().asString(Consts.UTF_8);
return (T) mapper.readValue(content, reference);
}

Expand Down

0 comments on commit e788eb2

Please sign in to comment.