Problem with MariaDB and jdbc

2017-07-05 Thread Iavor Jelev
Hi everyone,

first off - I'm new to Zeppelin, but I already love it. Great work on
the software!

I'm running Zeppelin 0.6.2 in docker and expiriencing a strange issue:
There is a MariaDB in the same network, which I want to connect to. I
set up the jdbc-Interpreter as shown here (for the lack of a mariaDB
example in the 0.6.2 documentation, assuming it is the same):

https://zeppelin.apache.org/docs/0.7.1/interpreter/jdbc.html#mariadb

Now, when I open a notebook and type the following, it works fine:

%jdbc
show databases

If I run the following, it works also:

%jdbc
use testdb

Here comes the strange part. If I run the following, I get an Exception:

%jdbc
use testdb;
show tables;

You have an error in your SQL syntax; check the manual that corresponds
to your MariaDB server version for the right syntax to use near 'show
tables' at line 2
Query is : use testdb;
show tables;
class java.sql.SQLSyntaxErrorException
org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:127)
org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:71)
org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:226)
org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:260)
org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:273)
org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:322)
org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:408)
org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94)
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:341)
org.apache.zeppelin.scheduler.Job.run(Job.java:176)
org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Also - if I run 'use testdb', again a query which works by itself, and I
run 'show tables' in a new panel directly after, then I get:

No database selected
Query is : show tables;
class java.sql.SQLException
org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:138)
org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:71)
org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:226)
org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:260)
org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:273)
org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:322)
org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:408)
org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94)
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:341)
org.apache.zeppelin.scheduler.Job.run(Job.java:176)
org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Both approaches work on my local installation (which is zeppelin 0.7.2
with a local MySQL though, so not a fair comparison). Has anyone had
similar issues? Can anyone offer some advice on what might be going
wrong here?


Best regards,
Iavor


Re: Zeppelin without internet, speedup startup

2017-07-05 Thread Serega Sheypak
Thanks for clear explanation. We like buttons and don't want to loose them.
:)

> Please note that the latest release (0.7.2) should solve the problems you
mentioned.
It's still there. I'm using distro downloaded from site.

2017-07-05 10:23 GMT+02:00 Raffaele S :

> Helium is a plugin framework, with it you can add more features to
> Zeppelin.
> If Helium is disabled you will not miss any of the original Zeppelin's
> features (like the "buttons" in your image).
>
> Please note that the latest release (0.7.2) should solve the problems you
> mentioned.
>
> 2017-06-29 22:03 GMT+02:00 Serega Sheypak :
>
>> Thanks!
>> Will these buttons disappear if I disable Helium?
>>
>> [image: Встроенное изображение 1]
>>
>> I don't quite well understand what Helium is
>> https://cwiki.apache.org/confluence/display/ZEPPELIN/Helium+proposal
>>
>> So what I propose is a framework, code-named *Helium* that turns
>> Zeppelin into a data analytics application platform by:
>>
>> - Leveraging computing resources provided by Interpreters
>> - Generalizing dependency loader
>> - Providing SDK on top of Angular Display system
>> - adding a package repository
>>
>>
>> I don't understand is it something internal to Zeppelin devs or it's some
>> public feature used by end-users like data analysts.
>>
>>
>> 2017-06-29 21:11 GMT+02:00 Иван Шаповалов :
>>
>>> if you use helium - it will be installing npm at start time. See
>>> HeliumVisualizationFactory.java
>>>
>>> 2017-06-29 17:09 GMT+03:00 Serega Sheypak :
>>>
 Hi, I'm starting zeppelin w/o internet. Looks like it tries to access
 some external resources. Is it true?
 Can I stop it somehow? It takes 2 minutes to start. I failed to find it
 in source code.

 Thanks!

>>>
>>>
>>>
>>> --
>>> Ivan Shapovalov
>>> Kharkov, Ukraine
>>>
>>>
>>
>


Re: Use Bokeh in Apache Zeppelin

2017-07-05 Thread CHALLA
Thank u I will check

On Wed, Jul 5, 2017 at 1:54 PM, Raffaele S  wrote:

> This is something I was looking for, thanks!
>
> 2017-07-02 1:39 GMT+02:00 moon soo Lee :
>
>> Cool. Thanks for sharing!
>>
>> On Sun, 2 Jul 2017 at 8:00 AM Jeff Zhang  wrote:
>>
>>>
>>> I write a tutorial on using bokeh in apache zeppelin. If you are
>>> interested in data visualization in zeppelin notebook, bokeh would be a
>>> very good library for you. And you can take a look at the tutorial here.
>>>
>>> https://community.hortonworks.com/articles/109837/use-bokeh-
>>> in-apache-zeppelin.html
>>>
>>>
>>>
>


Re: Use Bokeh in Apache Zeppelin

2017-07-05 Thread Raffaele S
This is something I was looking for, thanks!

2017-07-02 1:39 GMT+02:00 moon soo Lee :

> Cool. Thanks for sharing!
>
> On Sun, 2 Jul 2017 at 8:00 AM Jeff Zhang  wrote:
>
>>
>> I write a tutorial on using bokeh in apache zeppelin. If you are
>> interested in data visualization in zeppelin notebook, bokeh would be a
>> very good library for you. And you can take a look at the tutorial here.
>>
>> https://community.hortonworks.com/articles/109837/use-bokeh-
>> in-apache-zeppelin.html
>>
>>
>>


Re: Zeppelin without internet, speedup startup

2017-07-05 Thread Raffaele S
Helium is a plugin framework, with it you can add more features to Zeppelin.
If Helium is disabled you will not miss any of the original Zeppelin's
features (like the "buttons" in your image).

Please note that the latest release (0.7.2) should solve the problems you
mentioned.

2017-06-29 22:03 GMT+02:00 Serega Sheypak :

> Thanks!
> Will these buttons disappear if I disable Helium?
>
> [image: Встроенное изображение 1]
>
> I don't quite well understand what Helium is
> https://cwiki.apache.org/confluence/display/ZEPPELIN/Helium+proposal
>
> So what I propose is a framework, code-named *Helium* that turns Zeppelin
> into a data analytics application platform by:
>
> - Leveraging computing resources provided by Interpreters
> - Generalizing dependency loader
> - Providing SDK on top of Angular Display system
> - adding a package repository
>
>
> I don't understand is it something internal to Zeppelin devs or it's some
> public feature used by end-users like data analysts.
>
>
> 2017-06-29 21:11 GMT+02:00 Иван Шаповалов :
>
>> if you use helium - it will be installing npm at start time. See
>> HeliumVisualizationFactory.java
>>
>> 2017-06-29 17:09 GMT+03:00 Serega Sheypak :
>>
>>> Hi, I'm starting zeppelin w/o internet. Looks like it tries to access
>>> some external resources. Is it true?
>>> Can I stop it somehow? It takes 2 minutes to start. I failed to find it
>>> in source code.
>>>
>>> Thanks!
>>>
>>
>>
>>
>> --
>> Ivan Shapovalov
>> Kharkov, Ukraine
>>
>>
>


Re: Are there any way a notebook to be black box?

2017-07-05 Thread 小野圭二
Hi there,
I created this issue on JIRA as ZEPPELIN-2721.

-Ono


ウイルス
フリー。 www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

2017-07-05 16:10 GMT+09:00 Khalid Huseynov :

> Hello Ono,
>
> Thanks for reporting your use case scenario and it's indeed valid that
> users would like to share their notes across Zeppelin instances with their
> original permissions. It definitely deserves an issue and should be handled
> toward maturity of Zeppelin (e.g. in v. 0.9~1.0). Possible solutions could
> be including permission info inside of note, or some hash identifying the
> original creator. Also as you mentioned, some of scenarios possibly could
> be handled in zepl.com.
>
> On Wed, Jul 5, 2017 at 1:36 PM, Hyung Sung Shim  wrote:
>
>> Thank you very much to describe in detail.
>> I totally understand your question now.
>> There is no way to solve your question for now but it's really
>> interesting issue.
>> so Could you make a Jira issue for this with your experience?
>> Thanks!
>>
>> 2017-07-05 10:16 GMT+09:00 小野圭二 :
>>
>>> Thx for your reply, Hyung.
>>>
>>> Thank you for introducing some docs, but i knew them already.And my
>>> point was each notebook execute but hide/invisible the code.
>>> The zeppelin auth system manage every notebooks at once. That feature
>>> effect in the case of all user share same zeppelin system, like cloud
>>> computing.
>>>
>>> Against it, how about in the case of just sharing notebook?
>>> For example i set strict roles  into my notebook, and share it with
>>> someone who has their zeppelin. After they download and import my strict
>>> auth notebook into their zeppelin, they can arrange my roles setting by
>>> themselves. In this case, they can see my hided code on their zeppelin.
>>>
>>> I do not misunderstand about the zeppelin auth system, do i ?
>>>
>>> To prevent this issue, may need another authenticate/management feature
>>> on Zeppelin, this is my point. :^)
>>>
>>> What for it, imagine such a case.
>>> In the case of selling my big data analyze application through zeppelin
>>> eco-system, i write and test my code on my zeppelin. Then export it and
>>> upload to sharing site.
>>> May someone see my sharing notebook on the site, then they download and
>>> import it into their zeppelin, and execute it,
>>>
>>> Ok that is good, fantastic, viva Zeppelin, if i am a volunteer
>>> programmer.
>>>
>>> But i would like to get some revenue from my code if someone go down my
>>> analyzing, hopefully.
>>> In this case, i just want to provide the result of analyzing, not my
>>> algorithm.
>>> Even my client share my notebook on his zeppelin, my code is protected
>>> by independent authentication, encryption and so on.
>>>
>>> This is my point. :-)
>>> Sorry for getting longer.
>>>
>>> -Ono
>>>
>>>
>>> 2017-07-04 23:35 GMT+09:00 Hyung Sung Shim :
>>>
 Hello onokeiji.

 You can refer http://zeppelin.apache.org/docs/0.7.2/quickstart/explo
 rezeppelinui.html#note-toolbar if you want to hide code in the
 notebook.
 and http://zeppelin.apache.org/docs/0.7.2/security/notebook_
 authorization.html#authorization-setting is relate to lock code your
 note.

 Hope this helps.


 2017-07-04 22:05 GMT+09:00 小野圭二 :

> Hey, how do you think about my idea of BLACKBOX-NOTEBOOK?
>
> -Ono.
>
>
> 
>  ウイルス
> フリー。 www.avast.com
> 
> <#m_-2740405082895278623_m_7229949389285741499_m_-8962903669315512691_m_3961825290808015369_m_-7798815867934407536_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> 2017-06-30 10:38 GMT+09:00 小野圭二 :
>
>> Hi,
>>
>> I wonder if this mail title would be realize.
>> I mean, when I do not want to be changed my notebook programing code,
>> but just give a way to change the query of programing by dynamic forms.
>>
>> 1. are there way to hide all code in the notebook?
>> 2. are there rock system to prevent changing the code in notebook?
>>
>> If No.1 would be available, it makes easy to provide commercial codes
>> and/or secret codes to widely.
>> In fact, from the view of code writers, especially in the case of
>> commercial products, they do not want to provide any source code to their
>> customers definitely. Another hand, it is costly to force R or Python
>> programer to write Java or Scala program to change their naked codes to
>> binary code.
>>
>> I have a image Script programers write and test their
>> R/Python/Spark-Shell/SQL codes on notebooks and be it to
>> BLACKBOX-

Error with Tutorial

2017-07-05 Thread CHALLA
code being executed
import sys.process._

val sqlContext = new org.apache.spark.sql.SQLContext(sc)

val bankText =
sc.textFile("D:\Softs\zeppelin-0.7.2-bin-all\Bank\bank-full.csv")

case class Bank(age:Integer, job:String, marital : String, education :
String, balance : Integer)

// split each line, filter out header (starts with "age"), and map it into
Bank case class
val bank = bankText.map(s=>s.split(";")).filter(s=>s(0)!="\"age\"").map(
s=>Bank(s(0).toInt,
s(1).replaceAll("\"", ""),
s(2).replaceAll("\"", ""),
s(3).replaceAll("\"", ""),
s(5).replaceAll("\"", "").toInt
)
)

// convert to DataFrame and create temporal table
bank.toDF().registerTempTable("bank")


error is as below

java.lang.NullPointerException
at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:38)
at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:33)
at
org.apache.zeppelin.spark.SparkInterpreter.createSparkContext_2(SparkInterpreter.java:391)

at
org.apache.zeppelin.spark.SparkInterpreter.createSparkContext(SparkInterpreter.java:380)

at
org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:146)

at
org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:828)
at
org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)

at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:491)

at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
at
org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown
Source)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
==
Please help


Helium packages are not getting displayed in reports

2017-07-05 Thread arpit tak
I have added these 2 helium packages in helium and also enabled them on helium 
menu.  
ultimate-line-chart 
ultimate-range-chart

But when I run %spark or any other interpreter these packages/charts are not 
getting displayed there. I am just seeing default chart option there. 
Here that i did:-
I have added json file in helium dir. 
Restarted  zeppelin
Enable packages in helium menu. 
Is there anything I need to do . 

Regards,
Arpit

Re: Are there any way a notebook to be black box?

2017-07-05 Thread Khalid Huseynov
Hello Ono,

Thanks for reporting your use case scenario and it's indeed valid that
users would like to share their notes across Zeppelin instances with their
original permissions. It definitely deserves an issue and should be handled
toward maturity of Zeppelin (e.g. in v. 0.9~1.0). Possible solutions could
be including permission info inside of note, or some hash identifying the
original creator. Also as you mentioned, some of scenarios possibly could
be handled in zepl.com.

On Wed, Jul 5, 2017 at 1:36 PM, Hyung Sung Shim  wrote:

> Thank you very much to describe in detail.
> I totally understand your question now.
> There is no way to solve your question for now but it's really interesting
> issue.
> so Could you make a Jira issue for this with your experience?
> Thanks!
>
> 2017-07-05 10:16 GMT+09:00 小野圭二 :
>
>> Thx for your reply, Hyung.
>>
>> Thank you for introducing some docs, but i knew them already.And my point
>> was each notebook execute but hide/invisible the code.
>> The zeppelin auth system manage every notebooks at once. That feature
>> effect in the case of all user share same zeppelin system, like cloud
>> computing.
>>
>> Against it, how about in the case of just sharing notebook?
>> For example i set strict roles  into my notebook, and share it with
>> someone who has their zeppelin. After they download and import my strict
>> auth notebook into their zeppelin, they can arrange my roles setting by
>> themselves. In this case, they can see my hided code on their zeppelin.
>>
>> I do not misunderstand about the zeppelin auth system, do i ?
>>
>> To prevent this issue, may need another authenticate/management feature
>> on Zeppelin, this is my point. :^)
>>
>> What for it, imagine such a case.
>> In the case of selling my big data analyze application through zeppelin
>> eco-system, i write and test my code on my zeppelin. Then export it and
>> upload to sharing site.
>> May someone see my sharing notebook on the site, then they download and
>> import it into their zeppelin, and execute it,
>>
>> Ok that is good, fantastic, viva Zeppelin, if i am a volunteer programmer.
>>
>> But i would like to get some revenue from my code if someone go down my
>> analyzing, hopefully.
>> In this case, i just want to provide the result of analyzing, not my
>> algorithm.
>> Even my client share my notebook on his zeppelin, my code is protected by
>> independent authentication, encryption and so on.
>>
>> This is my point. :-)
>> Sorry for getting longer.
>>
>> -Ono
>>
>>
>> 2017-07-04 23:35 GMT+09:00 Hyung Sung Shim :
>>
>>> Hello onokeiji.
>>>
>>> You can refer http://zeppelin.apache.org/docs/0.7.2/quickstart/explo
>>> rezeppelinui.html#note-toolbar if you want to hide code in the notebook.
>>> and http://zeppelin.apache.org/docs/0.7.2/security/notebook_
>>> authorization.html#authorization-setting is relate to lock code your
>>> note.
>>>
>>> Hope this helps.
>>>
>>>
>>> 2017-07-04 22:05 GMT+09:00 小野圭二 :
>>>
 Hey, how do you think about my idea of BLACKBOX-NOTEBOOK?

 -Ono.


 
  ウイルス
 フリー。 www.avast.com
 
 <#m_7229949389285741499_m_-8962903669315512691_m_3961825290808015369_m_-7798815867934407536_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

 2017-06-30 10:38 GMT+09:00 小野圭二 :

> Hi,
>
> I wonder if this mail title would be realize.
> I mean, when I do not want to be changed my notebook programing code,
> but just give a way to change the query of programing by dynamic forms.
>
> 1. are there way to hide all code in the notebook?
> 2. are there rock system to prevent changing the code in notebook?
>
> If No.1 would be available, it makes easy to provide commercial codes
> and/or secret codes to widely.
> In fact, from the view of code writers, especially in the case of
> commercial products, they do not want to provide any source code to their
> customers definitely. Another hand, it is costly to force R or Python
> programer to write Java or Scala program to change their naked codes to
> binary code.
>
> I have a image Script programers write and test their
> R/Python/Spark-Shell/SQL codes on notebooks and be it to
> BLACKBOX-NOTEBOOK, then upload it to github/svn where endusers who 
> want
> to use those notebooks could access by themselves. The endusers down load
> those BLACKBOX-NOTEBOOK and import into their Zeppelin and it works fine.
> Sound like happy the both.
>
> No.2 seems like easier than No.1, because the issue is depend on
> authorization. But it is incomplete, because the codes reveal to the
> endusers.
>
> I saw zepl.com as well.
> Seems like Zeppelin and ZELP are aimed to help collaboration between