Re: Custom init for Spark interpreter

2021-05-21 Thread Jeff Zhang
Thanks Vladimir

Vladimir Prus  于2021年5月21日周五 下午5:35写道:

> Jeff,
>
> thanks for the response. I've created
> https://issues.apache.org/jira/browse/ZEPPELIN-5386 and will see whether
> I can make a generic patch for this.
>
> On Fri, May 21, 2021 at 11:21 AM Jeff Zhang  wrote:
>
>> Right,we have hooks for each paragraph execution, but no interpreter
>> process level hook. Could you create a ticket for that ? And welcome to
>> contribute.
>>
>> Vladimir Prus  于2021年5月21日周五 下午4:16写道:
>>
>>>
>>> Hi,
>>>
>>> is there a way, when using Spark interpreter, to always run additional
>>> Scala code after startup? E.g. I want to automatically execute
>>>
>>>  import com.joom.whatever._
>>>
>>> so that users don't have to do it all the time. I see that
>>> BaseSparkScalaInterpreter.spark2CreateContext imports a few thing, but the
>>> code does not appear to support customizing this sequence.
>>>
>>> --
>>> Vladimir Prus
>>> http://vladimirprus.com
>>>
>>
>>
>> --
>> Best Regards
>>
>> Jeff Zhang
>>
>
>
> --
> Vladimir Prus
> http://vladimirprus.com
>


-- 
Best Regards

Jeff Zhang


Re: Custom init for Spark interpreter

2021-05-21 Thread Vladimir Prus
Jeff,

thanks for the response. I've created
https://issues.apache.org/jira/browse/ZEPPELIN-5386 and will see whether I
can make a generic patch for this.

On Fri, May 21, 2021 at 11:21 AM Jeff Zhang  wrote:

> Right,we have hooks for each paragraph execution, but no interpreter
> process level hook. Could you create a ticket for that ? And welcome to
> contribute.
>
> Vladimir Prus  于2021年5月21日周五 下午4:16写道:
>
>>
>> Hi,
>>
>> is there a way, when using Spark interpreter, to always run additional
>> Scala code after startup? E.g. I want to automatically execute
>>
>>  import com.joom.whatever._
>>
>> so that users don't have to do it all the time. I see that
>> BaseSparkScalaInterpreter.spark2CreateContext imports a few thing, but the
>> code does not appear to support customizing this sequence.
>>
>> --
>> Vladimir Prus
>> http://vladimirprus.com
>>
>
>
> --
> Best Regards
>
> Jeff Zhang
>


-- 
Vladimir Prus
http://vladimirprus.com


Re: Custom init for Spark interpreter

2021-05-21 Thread Jeff Zhang
Right,we have hooks for each paragraph execution, but no interpreter
process level hook. Could you create a ticket for that ? And welcome to
contribute.

Vladimir Prus  于2021年5月21日周五 下午4:16写道:

>
> Hi,
>
> is there a way, when using Spark interpreter, to always run additional
> Scala code after startup? E.g. I want to automatically execute
>
>  import com.joom.whatever._
>
> so that users don't have to do it all the time. I see that
> BaseSparkScalaInterpreter.spark2CreateContext imports a few thing, but the
> code does not appear to support customizing this sequence.
>
> --
> Vladimir Prus
> http://vladimirprus.com
>


-- 
Best Regards

Jeff Zhang


Custom init for Spark interpreter

2021-05-21 Thread Vladimir Prus
Hi,

is there a way, when using Spark interpreter, to always run additional
Scala code after startup? E.g. I want to automatically execute

 import com.joom.whatever._

so that users don't have to do it all the time. I see that
BaseSparkScalaInterpreter.spark2CreateContext imports a few thing, but the
code does not appear to support customizing this sequence.

-- 
Vladimir Prus
http://vladimirprus.com