From 5f7c4f903fb51b2cb67ebdbdf4532db69e72bada Mon Sep 17 00:00:00 2001 From: Wei Date: Thu, 2 Dec 2021 11:43:29 +0800 Subject: [PATCH] [refactor](log) Remove unused log instance creation (#7249) --- .../org/apache/doris/http/ActionController.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/http/ActionController.java b/fe/fe-core/src/main/java/org/apache/doris/http/ActionController.java index 7d9c1aa9cc..8264f9169f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/http/ActionController.java +++ b/fe/fe-core/src/main/java/org/apache/doris/http/ActionController.java @@ -17,25 +17,21 @@ package org.apache.doris.http; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import org.apache.doris.common.path.PathTrie; import com.google.common.base.Strings; import io.netty.handler.codec.http.HttpMethod; public class ActionController { - private static final Logger LOG = LogManager.getLogger(ActionController.class); private final PathTrie getHandlers = new PathTrie<>(WebUtils.REST_DECODER); private final PathTrie postHandlers = new PathTrie<>(WebUtils.REST_DECODER); private final PathTrie putHandlers = new PathTrie<>(WebUtils.REST_DECODER); private final PathTrie deleteHandlers = new PathTrie<>(WebUtils.REST_DECODER); private final PathTrie headHandlers = new PathTrie<>(WebUtils.REST_DECODER); private final PathTrie optionsHandlers = new PathTrie<>(WebUtils.REST_DECODER); - + // Registers a rest handler to be execute when the provided method and path match the request. - public void registerHandler(HttpMethod method, String path, IAction handler) + public void registerHandler(HttpMethod method, String path, IAction handler) throws IllegalArgException { if (method.equals(HttpMethod.GET)) { getHandlers.insert(path, handler); @@ -54,7 +50,7 @@ public class ActionController { "Can't handle [" + method + "] for path [" + path + "]"); } } - + public IAction getHandler(BaseRequest request) { String path = getPath(request.getRequest().uri()); HttpMethod method = request.getRequest().method(); @@ -74,8 +70,8 @@ public class ActionController { return null; } } - - // e.g. + + // e.g. // in: /www/system?path=//jobs // out: /www/system private String getPath(String uri) {