Skip to content
Merged
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
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.ui.connection.idleTimeout";
// 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,9 @@ 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