Skip to content

Commit

Permalink
[apache#768] remove the blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
beryllw committed Jun 18, 2023
1 parent 41859c0 commit 3890d23
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
5 changes: 1 addition & 4 deletions cli/src/main/java/org/apache/uniffle/api/AdminRestApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
public class AdminRestApi {
private UniffleRestClient client;

private static final String API_BASE_PATH = "admin";

private AdminRestApi() {
}

Expand All @@ -36,9 +34,8 @@ public AdminRestApi(UniffleRestClient client) {
}

public String refreshAccessChecker() {
String path = String.format("/api/server/%s/%s", API_BASE_PATH, "refreshChecker");
Map<String, Object> params = new HashMap<>();
return this.getClient().get(path, params, null);
return this.getClient().get("/api/server/admin/refreshChecker", params, null);
}

private RestClient getClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@


public class RestClientImpl implements RestClient {

private static final Logger LOG = LoggerFactory.getLogger(RestClientImpl.class);

private CloseableHttpClient httpclient;

private String baseUrl;

public RestClientImpl(String baseUrl, CloseableHttpClient httpclient) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import org.apache.http.impl.client.CloseableHttpClient;

public class UniffleRestClient implements AutoCloseable {

private RestClient restClient;
private RestClientConf conf;

// This is the base host URL for the coordinator server.
// It should be in the format of "https://server:port" or "http://server:port".
private String hostUrl;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public void setup() throws Exception {

@Test
public void testRunRefreshAccessChecker() throws UniffleCliArgsException {

Mockito.when(uniffleRestClient.getHttpClient()
.get(Mockito.anyString(), Mockito.anyMap(), Mockito.anyString()))
.thenReturn("OK");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void registerRESTAPI() throws Exception {
"/api/server/cancelDecommission");
jettyServer.addServlet(
new RefreshCheckerServlet(this),
"/api/server/admin/refreshChecker");
"/api/admin/refreshChecker");
}

private void registerMetrics() throws Exception {
Expand Down
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -603,6 +607,10 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down

0 comments on commit 3890d23

Please sign in to comment.