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

[SPARK-17707] [WEBUI] Web UI prevents spark-submit application to be finished #15381

Closed
wants to merge 2 commits into from

Conversation

srowen
Copy link
Member

@srowen srowen commented Oct 6, 2016

What changes were proposed in this pull request?

This expands calls to Jetty's simple ServerConnector constructor to explicitly specify a ScheduledExecutorScheduler that makes daemon threads. It should otherwise result in exactly the same configuration, because the other args are copied from the constructor that is currently called.

(I'm not sure we should change the Hive Thriftserver impl, but I did anyway.)

This also adds sc.stop() to the quick start guide example.

How was this patch tested?

Existing tests; pending at least manual verification of the fix.

@srowen
Copy link
Member Author

srowen commented Oct 6, 2016

CC @maver1ck and @zsxwing

@SparkQA
Copy link

SparkQA commented Oct 6, 2016

Test build #66458 has finished for PR 15381 at commit ad19603.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@@ -90,8 +95,21 @@ public void run() {
Arrays.toString(sslContextFactory.getExcludeProtocols()));
sslContextFactory.setKeyStorePath(keyStorePath);
sslContextFactory.setKeyStorePassword(keyStorePassword);
connector = new ServerConnector(httpServer, sslContextFactory);
connectionFactories = AbstractConnectionFactory.getFactories(
Copy link
Member

Choose a reason for hiding this comment

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

This will expose both http and https, and it's a behavior change. Right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so just because I copied it from the Jetty constructor that was already being called in this path:

    /* ------------------------------------------------------------ */
    /** HTTP Server Connection.
     * <p>Construct a ServerConnector with a private instance of {@link HttpConnectionFactory} as the primary protocol</p>.
     * @param server The {@link Server} this connector will accept connection for. 
     * @param sslContextFactory If non null, then a {@link SslConnectionFactory} is instantiated and prepended to the 
     * list of HTTP Connection Factory.
     */
    public ServerConnector(
        @Name("server") Server server,
        @Name("sslContextFactory") SslContextFactory sslContextFactory)
    {
        this(server,null,null,null,-1,-1,AbstractConnectionFactory.getFactories(sslContextFactory,new HttpConnectionFactory()));
    }

However if this wasn't actually the intended behavior we can change it of course.

Copy link
Member

Choose a reason for hiding this comment

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

Got it. Thanks!

@zsxwing
Copy link
Member

zsxwing commented Oct 7, 2016

LGTM. Merging to master and 2.0.

@asfgit asfgit closed this in cff5607 Oct 7, 2016
asfgit pushed a commit that referenced this pull request Oct 7, 2016
…inished

This expands calls to Jetty's simple `ServerConnector` constructor to explicitly specify a `ScheduledExecutorScheduler` that makes daemon threads. It should otherwise result in exactly the same configuration, because the other args are copied from the constructor that is currently called.

(I'm not sure we should change the Hive Thriftserver impl, but I did anyway.)

This also adds `sc.stop()` to the quick start guide example.

Existing tests; _pending_ at least manual verification of the fix.

Author: Sean Owen <sowen@cloudera.com>

Closes #15381 from srowen/SPARK-17707.

(cherry picked from commit cff5607)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
@zsxwing
Copy link
Member

zsxwing commented Oct 7, 2016

FYI, I fixed import conflicts in JettyUtils manually for branch-2.0.

@srowen srowen deleted the SPARK-17707 branch October 7, 2016 19:20
abridgett pushed a commit to opensignal/spark that referenced this pull request Oct 10, 2016
…inished

This expands calls to Jetty's simple `ServerConnector` constructor to explicitly specify a `ScheduledExecutorScheduler` that makes daemon threads. It should otherwise result in exactly the same configuration, because the other args are copied from the constructor that is currently called.

(I'm not sure we should change the Hive Thriftserver impl, but I did anyway.)

This also adds `sc.stop()` to the quick start guide example.

Existing tests; _pending_ at least manual verification of the fix.

Author: Sean Owen <sowen@cloudera.com>

Closes apache#15381 from srowen/SPARK-17707.
@yuj
Copy link
Contributor

yuj commented Nov 15, 2016

Thanks for fixing this issue. It works in 2.0.2 now.

uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…inished

## What changes were proposed in this pull request?

This expands calls to Jetty's simple `ServerConnector` constructor to explicitly specify a `ScheduledExecutorScheduler` that makes daemon threads. It should otherwise result in exactly the same configuration, because the other args are copied from the constructor that is currently called.

(I'm not sure we should change the Hive Thriftserver impl, but I did anyway.)

This also adds `sc.stop()` to the quick start guide example.

## How was this patch tested?

Existing tests; _pending_ at least manual verification of the fix.

Author: Sean Owen <sowen@cloudera.com>

Closes apache#15381 from srowen/SPARK-17707.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants