liuxun created ZEPPELIN-3623:
--------------------------------
Summary: Create a cluster interpreter process module design
Key: ZEPPELIN-3623
URL: https://issues.apache.org/jira/browse/ZEPPELIN-3623
Project: Zeppelin
Issue Type: Sub-task
Components: zeppelin-server
Affects Versions: 0.9.0
Reporter: liuxun
Assignee: liuxun
Fix For: 0.9.0
h3.
# Create an interpreter process in the specified Zeeppelin-Server via Thrift
{{zeppelin/zeppelin-interpreter/src/main/thrift/ClusterManagerService.thrift}}
# Create interpreter process parameters remotely
struct ClusterInterpreterParam {
1: string host,
2: i32 port,
3: string userName,
4: string noteId,
5: string replName
}
# Create a cluster interpreter process function
service ClusterManagerService {
bool startInterpreterProcess(1: ClusterInterpreterParam
clusterInterpreterParam);
}
The Interpreter process in Zeppelin-Server is created or used in the
getOrCreateClusterIntpProcess() function of the ManagedInterpreterGroup class,
so the process of creating the cluster interpreter process is put into this
function;
*The logic for creating a cluster interpreter is as follows*:
** The user performs a note operation on the Zepplin-Server-A server;
** If the remoteInterpreterProcess instance is not created in the
getOrCreateClusterIntpProcess() function, find the Zepplin-Server with the idle
resources from the metadata of the cluster.
** If the server with idle resources is the Zepplin-Server-A native, the
Interpreter Process instance is created directly locally;
** If the server with idle resources is not Zepplin-Server-A, Zepplin-Server-A
calls the callStartInterpreterProcess() function interface of the
Zepplin-Server-B server through the Thrift interface, and the Interpreter
Process instance is performed by getOrCreateClusterIntpProcess() in the
Zepplin-Server-B server. Creation.
** In particular, the remote creation process needs to be aware that because
the Interpreter Process instance is created locally or remotely in the same
code logic, in order to avoid the getOrCreateClusterIntpProcess() infinite loop
call, a createClusterInptProcess boolean variable is added, if there are
multiple Zepplin-Servers. The composedClusterInptProcess is equal to true in
the cluster environment. It is equal to false in the single server environment.
The createClusterInptProcess boolean variable is set to false in the
Zepplin-Server-B server when the callStartInterpreterProcess() function is
called, so getOrCreateClusterIntpProcess() It is possible to create an
Interpreter Process instance locally on the Zepplin-Server-B server;
** After the Interpreter Process instance is created locally on the
Zepplin-Server-B server, the Interpreter Process instance will report its
Thrift IP and port to the Zeppelin cluster metadata. The
remoteInterpreterProcess in the Zepplin-Server-A server is connected to the
cluster metadata. The Thrift IP and port can establish a remote connection
across servers;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)