Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/Helix-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Build with Maven
run: mvn clean install -Dmaven.test.skip.exec=true -DretryFailedDeploymentCount=5
- name: Run All Tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Helix-PR-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Build with Maven
run: mvn clean install -Dmaven.test.skip.exec=true -DretryFailedDeploymentCount=5
- name: Run All Tests
Expand Down
15 changes: 10 additions & 5 deletions helix-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,32 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.48.v20220622</version>
<version>10.0.13</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.15</version>
<version>2.35</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<version>2.15</version>
<version>2.35</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.15</version>
<version>2.35</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>2.35</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.4.48.v20220622</version>
<version>10.0.13</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ private void cleanupResourceConfigs() {
}
}

public void setupSslServer(int port, SslContextFactory sslContextFactory) {

public void setupSslServer(int port, SslContextFactory.Server sslContextFactory) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat : If Now parent factory class is deprecated and directly server and client class are encouraged to access then should we rename this variable as well to "sslContextServer"? Also may be update documentation/comments here?

if (_server != null && port > 0) {
try {
HttpConfiguration https = new HttpConfiguration();
Expand All @@ -303,6 +304,7 @@ public void setupSslServer(int port, SslContextFactory sslContextFactory) {
}
}


/**
* Register a SSLContext so that it could be used to create HTTPS clients.
* @param sslContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ protected Response serverError(Exception ex) {
}

protected Response notFound() {
return Response.status(Response.Status.NOT_FOUND).build();
return Response.status(Response.Status.NOT_FOUND).type(MediaType.TEXT_PLAIN).build();
}

protected Response notFound(String errorMsg) {
return Response.status(Response.Status.NOT_FOUND).entity(errorMsgToJson(errorMsg)).build();
return Response.status(Response.Status.NOT_FOUND).type(MediaType.TEXT_PLAIN)
.entity(errorMsgToJson(errorMsg)).build();
}

protected Response OK(Object entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.codahale.metrics.annotation.ResponseMetered;
Expand Down Expand Up @@ -77,6 +78,7 @@ public Response getPropertyByPath(@PathParam("clusterId") String clusterId,
BaseDataAccessor<byte[]> propertyStoreDataAccessor = getByteArrayDataAccessor();
if (!propertyStoreDataAccessor.exists(recordPath, AccessOption.PERSISTENT)) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.type(MediaType.TEXT_PLAIN)
.entity(String.format("The property store path %s doesn't exist", recordPath))
.build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.codahale.metrics.annotation.ResponseMetered;
Expand Down Expand Up @@ -180,7 +181,8 @@ private byte[] readBinaryDataFromZK(BaseDataAccessor<byte[]> zkBaseDataAccessor,
return zkBaseDataAccessor.get(path, stat, AccessOption.PERSISTENT);
} else {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity(String.format("The ZNode at path %s does not exist!", path)).build());
.entity(String.format("The ZNode at path %s does not exist!", path))
.type(MediaType.TEXT_PLAIN).build());
}
}

Expand All @@ -197,6 +199,7 @@ private Response getChildren(BaseDataAccessor<byte[]> zkBaseDataAccessor, String
return JSONRepresentation(result);
} else {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.type(MediaType.TEXT_PLAIN)
.entity(String.format("The ZNode at path %s does not exist", path)).build());
}
}
Expand All @@ -211,6 +214,7 @@ private Response getStat(BaseDataAccessor<byte[]> zkBaseDataAccessor, String pat
Stat stat = zkBaseDataAccessor.getStat(path, AccessOption.PERSISTENT);
if (stat == null) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.type(MediaType.TEXT_PLAIN)
.entity(String.format("The ZNode at path %s does not exist!", path)).build());
}
Map<String, String> result = ZKUtil.fromStatToMap(stat);
Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>11</release>
</configuration>
</plugin>
<plugin>
Expand Down