mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-804 Refactoring registration mechanism on Interpreters
- Ignored while registering a new interpreter with existing interpreter key
This commit is contained in:
parent
312dd77b18
commit
25bc501e6f
1 changed files with 5 additions and 1 deletions
|
|
@ -301,7 +301,11 @@ public abstract class Interpreter {
|
|||
}
|
||||
|
||||
public static void register(RegisteredInterpreter registeredInterpreter) {
|
||||
registeredInterpreters.put(registeredInterpreter.getInterpreterKey(), registeredInterpreter);
|
||||
// TODO(jongyoul): Error should occur when two same interpreter key with different settings
|
||||
String interpreterKey = registeredInterpreter.getInterpreterKey();
|
||||
if (!registeredInterpreters.containsKey(interpreterKey)) {
|
||||
registeredInterpreters.put(interpreterKey, registeredInterpreter);
|
||||
}
|
||||
}
|
||||
|
||||
public static RegisteredInterpreter findRegisteredInterpreterByClassName(String className) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue