Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-28138 Make the connection idle timeout configurable for the embedded HTTP servers #5457

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ public class HttpServer implements FilterContainer {
// limitation otherwise the UTs will fail
private static final int DEFAULT_MAX_HEADER_SIZE = Character.MAX_VALUE - 1;

//Add configuration for jetty idle timeout
private static final String HTTP_JETTY_IDLE_TIMEOUT = "hbase.master.ui.connection.idleTimeout";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this property actually affects all processes that run an http server, not only the master UI. So we should name it accordingly.

//Default jetty idle timeout
private static final long DEFAULT_HTTP_JETTY_IDLE_TIMEOUT = 30000;

static final String FILTER_INITIALIZERS_PROPERTY = "hbase.http.filter.initializers";
static final String HTTP_MAX_THREADS = "hbase.http.max.threads";

Expand Down Expand Up @@ -467,6 +472,8 @@ public HttpServer build() throws IOException {

// default settings for connector
listener.setAcceptQueueSize(128);
// config idle timeout for jetty
listener.setIdleTimeout(conf.getLong(HTTP_JETTY_IDLE_TIMEOUT,DEFAULT_HTTP_JETTY_IDLE_TIMEOUT));
if (Shell.WINDOWS) {
// result of setting the SO_REUSEADDR flag is different on Windows
// http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
Expand Down