Have you checked whether the additional objects can be cast to 
wrappedinterpreter or classloaderinterpreter? 

I suspect I'm hitting a similar issue. For the r interpreter, I need to parse 
the list of interpreters in the group to find the SparkInterpreter. I find a 
class with that name, but it can't be cast to a SparkInterpreter. Every 
interpreter seems to be a classloaderinterpreter or a wrappedinterpreter, but 
when I call getInnerInterpreter() I just get more of the same object. 

More clarity: I'll get an object that doesn't pattern match on the expected 
class, say RReplInterpreter, but pattern matches on wrappedinterpreter or 
lazyopeninterpreter. getClassName will return RRepl, which is a wrapper. Ok, 
fine. But casting to RRepl produces an exception, and so does trying to reflect 
using RRepl fields. I think these all reflect as ClassLoaderInterpreters.  
Calling getInnerInterpreter on an RRepl should return an RReplInterpreter. But 
instead it returns another object with the className RRepl that can't be cast 
or reflected to a RRepl. 

I think it might be helpful if someone explained/documented the interpreter 
registration/startup/loading process?

I'm getting the sense that there's something going on there that many of us 
don't understand and isn't clear from the source code.

> On Aug 21, 2015, at 11:41 AM, IT CTO <goi....@gmail.com> wrote:
> 
> Can someone explain how that possible?
> 
> 
> Size == 16
> with only 8 values in the List?
> 
> 
>> On Fri, Aug 21, 2015 at 6:26 PM IT CTO <goi....@gmail.com> wrote:
>> How come 
>> InterpreterFactory.getRegisterInterpreterList().size()
>> https://github.com/apache/incubator-zeppelin/blob/67f7f3e403bdaa84b75f72241c418842fcc13696/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java#L313
>> 
>> and Interpreter.registeredInterpreters().size
>> https://github.com/apache/incubator-zeppelin/blob/d4a2ab430de8eb228ee48b2a04932ed75e1f9826/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L257
>> return different result!?
>> 
>> When I call on  InterpreterFactory.getRegisterInterpreterList().size() I get 
>> 16 (the amount of interpreters in the config file) 
>> while Interpreter.registeredInterpreters().size return 8 (the number of 
>> interpreters register on my environment
>> 
>> Bug?
>> Eran

Reply via email to