You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Egor Pahomov <pa...@gmail.com> on 2016/07/24 20:47:55 UTC

Interpreters initialization on 0.5.6 is a mess.

Hi, on 0.5.6 functionality of ZEPPELIN_INTERPRETERS simply does not work.

Comma separated interpreter configurations [Class]. First interpreter
> become a default


It indeed sort interpreters in interpreters tab, but does not make first
one default.

After doing very simple patch:

---
>> ../myzeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java (revision
>> b94e780f6762a0991bde6ed1c62a86dc5ebed828)
>
> +++
>> ../myzeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java (revision
>> )
>
> @@ -393,14 +393,14 @@
>
>      ZEPPELIN_SSL_TRUSTSTORE_PASSWORD("zeppelin.ssl.truststore.password",
>> null),
>
>      ZEPPELIN_WAR("zeppelin.war", "../zeppelin-web/dist"),
>
>      ZEPPELIN_WAR_TEMPDIR("zeppelin.war.tempdir", "webapps"),
>
> -    ZEPPELIN_INTERPRETERS("zeppelin.interpreters",
>> "org.apache.zeppelin.spark.SparkInterpreter,"
>
> +    ZEPPELIN_INTERPRETERS("zeppelin.interpreters",
>>  "org.apache.zeppelin.hive.HiveInterpreter," +
>
> +            "org.apache.zeppelin.spark.SparkInterpreter,"
>
>          + "org.apache.zeppelin.spark.PySparkInterpreter,"
>
>          + "org.apache.zeppelin.spark.SparkSqlInterpreter,"
>
>          + "org.apache.zeppelin.spark.DepInterpreter,"
>
>          + "org.apache.zeppelin.markdown.Markdown,"
>
>          + "org.apache.zeppelin.angular.AngularInterpreter,"
>
>          + "org.apache.zeppelin.shell.ShellInterpreter,"
>
> -        + "org.apache.zeppelin.hive.HiveInterpreter,"
>
>          + "org.apache.zeppelin.phoenix.PhoenixInterpreter,"
>
>          + "org.apache.zeppelin.tajo.TajoInterpreter,"
>
>          + "org.apache.zeppelin.flink.FlinkInterpreter,"
>
>
It changes default interpreter. But "%sql" starts to return -

sql interpreter not found


After hour of digging into the code I could not fix it - it's total
spaghetti, where list of  classes used in 4 different places, somewhere
just to keep an order of interpreters.

Can anyone help me, please?

-- 


*Sincerely yoursEgor Pakhomov*

Re: Interpreters initialization on 0.5.6 is a mess.

Posted by Jongyoul Lee <jo...@gmail.com>.
Hi Egor,

If you want to use a HiveInterpreter, you can type %hive in your paragraph.
There's no %sql matched when you use different Interpreter group from
Spark. %sql is parsed %spark.sql when you use SparkInterpreter by default.

Here is the interpreter ordering mechanism on 0.5.6. When you write
something started with '%{something}':

if {something} has a two part with ".", find {group.name} in bound
interpreters in your note. If it's not, at first, Zeppelin assume
{something} as a name of default interpreter group. If it exists, return
that interpreter, otherwise, Zeppelin assumes that as a group and return
the the first interpreter in {something} group. If note doesn't have a
group named {something}, it returns 'interpreter not found' or 'prefix not
fount'

I also think it's not clear in a code level, and we are refactoring them.

Hope this help,
Jongyoul

On Mon, Jul 25, 2016 at 5:47 AM, Egor Pahomov <pa...@gmail.com>
wrote:

> Hi, on 0.5.6 functionality of ZEPPELIN_INTERPRETERS simply does not work.
>
> Comma separated interpreter configurations [Class]. First interpreter
> > become a default
>
>
> It indeed sort interpreters in interpreters tab, but does not make first
> one default.
>
> After doing very simple patch:
>
> ---
> >>
> ../myzeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
> (revision
> >> b94e780f6762a0991bde6ed1c62a86dc5ebed828)
> >
> > +++
> >>
> ../myzeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
> (revision
> >> )
> >
> > @@ -393,14 +393,14 @@
> >
> >      ZEPPELIN_SSL_TRUSTSTORE_PASSWORD("zeppelin.ssl.truststore.password",
> >> null),
> >
> >      ZEPPELIN_WAR("zeppelin.war", "../zeppelin-web/dist"),
> >
> >      ZEPPELIN_WAR_TEMPDIR("zeppelin.war.tempdir", "webapps"),
> >
> > -    ZEPPELIN_INTERPRETERS("zeppelin.interpreters",
> >> "org.apache.zeppelin.spark.SparkInterpreter,"
> >
> > +    ZEPPELIN_INTERPRETERS("zeppelin.interpreters",
> >>  "org.apache.zeppelin.hive.HiveInterpreter," +
> >
> > +            "org.apache.zeppelin.spark.SparkInterpreter,"
> >
> >          + "org.apache.zeppelin.spark.PySparkInterpreter,"
> >
> >          + "org.apache.zeppelin.spark.SparkSqlInterpreter,"
> >
> >          + "org.apache.zeppelin.spark.DepInterpreter,"
> >
> >          + "org.apache.zeppelin.markdown.Markdown,"
> >
> >          + "org.apache.zeppelin.angular.AngularInterpreter,"
> >
> >          + "org.apache.zeppelin.shell.ShellInterpreter,"
> >
> > -        + "org.apache.zeppelin.hive.HiveInterpreter,"
> >
> >          + "org.apache.zeppelin.phoenix.PhoenixInterpreter,"
> >
> >          + "org.apache.zeppelin.tajo.TajoInterpreter,"
> >
> >          + "org.apache.zeppelin.flink.FlinkInterpreter,"
> >
> >
> It changes default interpreter. But "%sql" starts to return -
>
> sql interpreter not found
>
>
> After hour of digging into the code I could not fix it - it's total
> spaghetti, where list of  classes used in 4 different places, somewhere
> just to keep an order of interpreters.
>
> Can anyone help me, please?
>
> --
>
>
> *Sincerely yoursEgor Pakhomov*
>



-- 
이종열, Jongyoul Lee, 李宗烈
http://madeng.net