This is an automated email from the ASF dual-hosted git repository.
jiajunwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new c6c61f1 Fix builds failing on some non-Oracle JDKs (#1594)
c6c61f1 is described below
commit c6c61f1803d4bd377c2d8deb65464b232d753bb0
Author: Brent <[email protected]>
AuthorDate: Fri Dec 18 16:39:34 2020 -0800
Fix builds failing on some non-Oracle JDKs (#1594)
The ThreadCountBasedTaskAssigner class accidentally included an
exception from the sun.reflect.generics.reflectiveObjects package which
is not available in some JDKs. Replacing it with a standard unchecked
exception java.lang.UnsupportedOperationException.
---
.../org/apache/helix/task/assigner/ThreadCountBasedTaskAssigner.java | 3 +--
.../apache/helix/rest/server/resources/helix/InstancesAccessor.java | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git
a/helix-core/src/main/java/org/apache/helix/task/assigner/ThreadCountBasedTaskAssigner.java
b/helix-core/src/main/java/org/apache/helix/task/assigner/ThreadCountBasedTaskAssigner.java
index cb181d1..74d6253 100644
---
a/helix-core/src/main/java/org/apache/helix/task/assigner/ThreadCountBasedTaskAssigner.java
+++
b/helix-core/src/main/java/org/apache/helix/task/assigner/ThreadCountBasedTaskAssigner.java
@@ -32,7 +32,6 @@ import org.apache.helix.task.AssignableInstanceManager;
import org.apache.helix.task.TaskConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
public class ThreadCountBasedTaskAssigner implements TaskAssigner {
private static final Logger logger =
LoggerFactory.getLogger(ThreadCountBasedTaskAssigner.class);
@@ -68,7 +67,7 @@ public class ThreadCountBasedTaskAssigner implements
TaskAssigner {
@Override
public Map<String, TaskAssignResult>
assignTasks(Iterable<AssignableInstance> assignableInstances,
Iterable<TaskConfig> tasks, String quotaType) {
- throw new NotImplementedException();
+ throw new UnsupportedOperationException();
}
@Override
diff --git
a/helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/InstancesAccessor.java
b/helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/InstancesAccessor.java
index 6ebe57a..bacae0d 100644
---
a/helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/InstancesAccessor.java
+++
b/helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/InstancesAccessor.java
@@ -41,7 +41,6 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.commons.lang3.NotImplementedException;
import org.apache.helix.HelixAdmin;
import org.apache.helix.HelixDataAccessor;
import org.apache.helix.HelixException;
@@ -263,7 +262,7 @@ public class InstancesAccessor extends
AbstractHelixResource {
break;
case instance_based:
default:
- throw new NotImplementedException("instance_based selection is not
supported yet!");
+ throw new UnsupportedOperationException("instance_based selection is
not supported yet!");
}
return JSONRepresentation(result);
} catch (HelixException e) {