This is an automated email from the ASF dual-hosted git repository.

dlmarion pushed a commit to branch 1451-external-compactions-feature
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to 
refs/heads/1451-external-compactions-feature by this push:
     new 0951d00  Fix runtime error in http endpoints
0951d00 is described below

commit 0951d00b857f71caafc56bc23bde7760101564f4
Author: Dave Marion <[email protected]>
AuthorDate: Mon Apr 26 19:24:24 2021 +0000

    Fix runtime error in http endpoints
---
 .../apache/accumulo/coordinator/CompactionCoordinator.java  | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git 
a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
 
b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
index bbf23a2..8209057 100644
--- 
a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
+++ 
b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
@@ -30,10 +30,6 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
 import org.apache.accumulo.coordinator.QueueSummaries.PrioTserver;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -79,7 +75,6 @@ import org.apache.accumulo.server.rpc.TServerUtils;
 import org.apache.accumulo.server.rpc.ThriftServerType;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityOperation;
-import org.apache.http.entity.ContentType;
 import org.apache.thrift.TException;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
@@ -96,6 +91,10 @@ import org.slf4j.LoggerFactory;
 
 import com.google.gson.Gson;
 
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
 public class CompactionCoordinator extends AbstractServer
     implements 
org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Iface,
     LiveTServerSet.Listener {
@@ -257,7 +256,7 @@ public class CompactionCoordinator extends AbstractServer
           HttpServletResponse response) throws IOException, ServletException {
         baseRequest.setHandled(true);
         response.setStatus(200);
-        response.setContentType(ContentType.APPLICATION_JSON.toString());
+        response.setContentType("application/json");
         response.getWriter().print(metrics.toJson(GSON));
       }
     });
@@ -270,7 +269,7 @@ public class CompactionCoordinator extends AbstractServer
           HttpServletResponse response) throws IOException, ServletException {
         baseRequest.setHandled(true);
         response.setStatus(200);
-        response.setContentType(ContentType.APPLICATION_JSON.toString());
+        response.setContentType("application/json");
         response.getWriter().print(GSON.toJson(RUNNING));
       }
     });

Reply via email to