forked from apache/incubator-livy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LIVY-110, LIVY-93. Simplify RSC driver class hierarchy.
The separation between "client-mode" driver and REPL driver was a little hacky after recent changes. This patch aims at simplifying things. Now, there is a single entry point to the RSC (RSCDriverBootstrapper), and the actual driver implementation (which must extend RSCDriver, the new name of RemoteDriver) can be configured. The driver is responsible for handling RPC messages, so it must provide "handle()" methods for any messages that might arrive. RSCDriver handles all messages directed at the client-mode driver. The REPL driver extends it and adds handlers to REPL-specific messages, and re-uses the client-mode logic for running the PingJob used to detect when the session is ready. This simplified code a lot. On top of that I made some other clean up changes: - the code that launches the driver in-process and out-of-process was slightly modified to share more setup code. - when jobs send results back to the client, all clients now receive the message. This code path is mostly unused in Livy (most uses are in the unit tests), since the Livy API uses bypass jobs which have different logic. In any case, there should be very few, if any, situations when there are two clients connected to a remote driver. - fixed some sketchy error handling code, especially in the shutdown path of the driver. Closes apache#101
- Loading branch information
Marcelo Vanzin
committed
Apr 11, 2016
1 parent
8b63520
commit 8cdc459
Showing
19 changed files
with
623 additions
and
727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.