Re: How to launch a Helium Application in local deploy mode

2017-04-18 Thread fish fish
Hi

Just wonder any updates on this thread? Thanks!

Best,
Chen

2017-04-18 16:10 GMT+08:00 fish fish <fishfish...@gmail.com>:

> Thank you Lee! I can run the Clock example. However, in
> https://github.com/apache/zeppelin/blob/master/spark/
> src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java#L1287 ,
> SparkInterpreter only put last evaluated variable into resource pool. So if
> my helium app need multiple resources like 
> [[":org.apache.spark.sql.SparkSession",
> ":org.apache.spark.SparkContext", ":org.apache.spark.sql.SQLContext"]],
> how should I run in one paragraph? I run following code in one paragraph
> but seems only the last sqlContext be out in resource pool.
> %spark
> sc
> spark
> sqlContext
>
> Best,
> Chen
>
> 2017-04-17 13:27 GMT+08:00 moon soo Lee <m...@apache.org>:
>
>> Hi,
>>
>> Helium application launch will appear when ResourcePool has required
>> resource [1] for an application.
>>
>> Spark interpreter put last evaluated object in the ResourcePool.
>> For example, if you run "new java.util.Date()" in a paragraph, a date
>> object will be created in the ResourcePool. And there will be a button
>> displayed in the paragraph and list all applications that consumes
>> java.util.Date type object.
>>
>> if you build Zeppelin with -Pexamples flag, then you can run "new
>> java.util.Date()" in spark interpreter and run example application.
>>
>> Let me know if it helps.
>>
>> Thanks,
>> moon
>>
>> [1] http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/developme
>> nt/writingzeppelinapplication.html#resources
>>
>>
>>
>> On Mon, Apr 17, 2017 at 12:55 PM fish fish <fishfish...@gmail.com> wrote:
>>
>>> Hi Lee,
>>>
>>> Thank you for your reply. Actually I already tried dev mode and
>>> succeeded. My question is how to launch Helium application not in
>>> development mode but in deploy mode like 'SPELL' described in
>>> https://zeppelin.apache.org/docs/snapshot/development/wri
>>> tingzeppelinspell.html#1-enabling. Could you please kindly guide more?
>>> Thanks!
>>>
>>> Best,
>>> Chen
>>>
>>> 2017-04-15 17:13 GMT+08:00 moon soo Lee <m...@apache.org>:
>>>
>>>> Hi,
>>>>
>>>> Dev mode in actual implementation became '%dev run' instead of '%helium
>>>> run' in proposal.
>>>>
>>>> Please check http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/develop
>>>> ment/writingzeppelinapplication.html#development-mode.
>>>>
>>>> To use '%dev run', you need build Zeppelin with -Phelium-dev flag.
>>>>
>>>> Hope this helps!
>>>>
>>>> Best,
>>>> moon
>>>>
>>>> On Fri, Apr 14, 2017 at 8:16 PM fish fish <fishfish...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Group,
>>>>>
>>>>> I have written a Helium application and deploy in local mode. Also I
>>>>> enable it in 'Helium' page. However, I don't know how to launch the 
>>>>> enabled
>>>>> application in notebook. I tried type "%helium run" as showed in this
>>>>> video: https://cwiki.apache.org/confluence/display/ZEPPELIN/Helium+
>>>>> proposal , but error occurs which indicate no helium interpreter.
>>>>> Could anyone kindly tell me how to launch Helium application in right way?
>>>>> Thanks!
>>>>>
>>>>> Zeppelin version: 0.8.0-snapshot
>>>>>
>>>>> application.json:
>>>>>
>>>>> {
>>>>>   "type" : "APPLICATION",
>>>>>   "name" : "test_app",
>>>>>   "description" : "test Helium App",
>>>>>   "license" : "Apache-2.0",
>>>>>   "artifact" : "./examples/zeppelin-mytest-0.0.1-SNAPSHOT.jar",
>>>>>   "className" : "com.test.Test",
>>>>>   "resources" : [[":org.apache.spark.sql.SparkSession", 
>>>>> ":org.apache.spark.SparkContext", ":org.apache.spark.sql.SQLContext"]],
>>>>>   "icon" : ""
>>>>> }
>>>>>
>>>>>
>>>
>


Re: How to launch a Helium Application in local deploy mode

2017-04-16 Thread fish fish
Hi Lee,

Thank you for your reply. Actually I already tried dev mode and succeeded.
My question is how to launch Helium application not in development mode but
in deploy mode like 'SPELL' described in
https://zeppelin.apache.org/docs/snapshot/development/writingzeppelinspell.html#1-enabling.
Could you please kindly guide more? Thanks!

Best,
Chen

2017-04-15 17:13 GMT+08:00 moon soo Lee <m...@apache.org>:

> Hi,
>
> Dev mode in actual implementation became '%dev run' instead of '%helium
> run' in proposal.
>
> Please check http://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/development/
> writingzeppelinapplication.html#development-mode.
>
> To use '%dev run', you need build Zeppelin with -Phelium-dev flag.
>
> Hope this helps!
>
> Best,
> moon
>
> On Fri, Apr 14, 2017 at 8:16 PM fish fish <fishfish...@gmail.com> wrote:
>
>> Hi Group,
>>
>> I have written a Helium application and deploy in local mode. Also I
>> enable it in 'Helium' page. However, I don't know how to launch the enabled
>> application in notebook. I tried type "%helium run" as showed in this
>> video: https://cwiki.apache.org/confluence/display/ZEPPELIN/
>> Helium+proposal , but error occurs which indicate no helium interpreter.
>> Could anyone kindly tell me how to launch Helium application in right way?
>> Thanks!
>>
>> Zeppelin version: 0.8.0-snapshot
>>
>> application.json:
>>
>> {
>>   "type" : "APPLICATION",
>>   "name" : "test_app",
>>   "description" : "test Helium App",
>>   "license" : "Apache-2.0",
>>   "artifact" : "./examples/zeppelin-mytest-0.0.1-SNAPSHOT.jar",
>>   "className" : "com.test.Test",
>>   "resources" : [[":org.apache.spark.sql.SparkSession", 
>> ":org.apache.spark.SparkContext", ":org.apache.spark.sql.SQLContext"]],
>>   "icon" : ""
>> }
>>
>>


Re: How to bind angular object with backend when write Helium Application

2017-03-24 Thread fish fish
Hi Lee,

Follow your instruction, I can update frontend from beckend and get
AngularObject through 'HeliumAppAngularObjectRegistry'. However, I don't
know how to get 'InterpreterContext' in Helium Application, which is needed
to initialize an 'AngularObjectWatcher' when adding watcher. I checked
ApplicationContext but seems I cannot get InterpreterContext there. Could
you share more lights on that? Thanks!

2017-03-21 11:20 GMT+08:00 fish fish <fishfish...@gmail.com>:

> Thank you Lee for such promptly response! Will check the code and get back
> if any further problems. Thank you again!
>
> 2017-03-21 3:23 GMT+08:00 moon soo Lee <m...@apache.org>:
>
>> Hi Hishfish,
>>
>> If you take a look Clock example [1], you'll see how it creates angular
>> objects and update every seconds from backend, so front-end can be updated
>> accordingly.
>>
>> After you add your object into AngularObjectRegistry, you can get
>> AngularObject and add watcher [2]. Then any changes of the angular scope
>> variable from front end will trigger your watcher where you can place your
>> backend logics.
>>
>> Hope this helps,
>>
>> Thanks,
>> moon
>>
>> [1] https://github.com/apache/zeppelin/blob/master/zeppelin-
>> examples/zeppelin-example-clock/src/main/java/org/apache/
>> zeppelin/example/app/clock/Clock.java#L72
>> [2] https://github.com/apache/zeppelin/blob/master/zeppelin-
>> interpreter/src/main/java/org/apache/zeppelin/display/Angula
>> rObject.java#L219
>>
>>
>> On Mon, Mar 20, 2017 at 8:47 AM fish fish <fishfish...@gmail.com> wrote:
>>
>>> Hi Group,
>>>
>>> Recently we are exploring building data analysis application based on
>>> Zeppelin. We checked Helium document and think it could be an appropriate
>>> way to customize both frontend and backend in Zeppelin. However, we did not
>>> find a way to bind angular object with backend data when extends
>>> Application. More detail, we want to catch the frontend angular object
>>> value / change event in the backend and then process in some way to
>>> feedback to frontend. Could someone kindly show us the right way to do
>>> this? We are now using 0.8.0 snapshot code. Thank you very much in advance!
>>>
>>> Best,
>>>
>>> Fishfish
>>>
>>
>


Re: How to bind angular object with backend when write Helium Application

2017-03-20 Thread fish fish
Thank you Lee for such promptly response! Will check the code and get back
if any further problems. Thank you again!

2017-03-21 3:23 GMT+08:00 moon soo Lee <m...@apache.org>:

> Hi Hishfish,
>
> If you take a look Clock example [1], you'll see how it creates angular
> objects and update every seconds from backend, so front-end can be updated
> accordingly.
>
> After you add your object into AngularObjectRegistry, you can get
> AngularObject and add watcher [2]. Then any changes of the angular scope
> variable from front end will trigger your watcher where you can place your
> backend logics.
>
> Hope this helps,
>
> Thanks,
> moon
>
> [1] https://github.com/apache/zeppelin/blob/master/zeppelin-
> examples/zeppelin-example-clock/src/main/java/org/
> apache/zeppelin/example/app/clock/Clock.java#L72
> [2] https://github.com/apache/zeppelin/blob/master/zeppelin-
> interpreter/src/main/java/org/apache/zeppelin/display/
> AngularObject.java#L219
>
>
> On Mon, Mar 20, 2017 at 8:47 AM fish fish <fishfish...@gmail.com> wrote:
>
>> Hi Group,
>>
>> Recently we are exploring building data analysis application based on
>> Zeppelin. We checked Helium document and think it could be an appropriate
>> way to customize both frontend and backend in Zeppelin. However, we did not
>> find a way to bind angular object with backend data when extends
>> Application. More detail, we want to catch the frontend angular object
>> value / change event in the backend and then process in some way to
>> feedback to frontend. Could someone kindly show us the right way to do
>> this? We are now using 0.8.0 snapshot code. Thank you very much in advance!
>>
>> Best,
>>
>> Fishfish
>>
>


How to bind angular object with backend when write Helium Application

2017-03-20 Thread fish fish
Hi Group,

Recently we are exploring building data analysis application based on
Zeppelin. We checked Helium document and think it could be an appropriate
way to customize both frontend and backend in Zeppelin. However, we did not
find a way to bind angular object with backend data when extends
Application. More detail, we want to catch the frontend angular object
value / change event in the backend and then process in some way to
feedback to frontend. Could someone kindly show us the right way to do
this? We are now using 0.8.0 snapshot code. Thank you very much in advance!

Best,

Fishfish