sparkmagic icon indicating copy to clipboard operation
sparkmagic copied to clipboard

Way to export modules to spark cluster

Open joaolaitano opened this issue 3 years ago • 3 comments

I'm not sure if there is already a way to send modules from the local environment to the cluster.

Ideally I would like something like this: %%send_module <name_of_my_module>

and then from my_module import func_foo

This would be extremely usefull, if this is currently implemented or if there is any workaround please let me know.

Thanks!

joaolaitano avatar Aug 23 '22 14:08 joaolaitano

لست متأكدا مما إذا كانت هناك بالفعل طريقة لإرسال الوحدات النمطية من البيئة المحلية إلى المجموعة.

من الناحية المثالية ، أود شيئا من هذا القبيل: %%send_module <name_of_my_module>

وبعد ذلك from my_module import func_foo

سيكون هذا مفيدا للغاية ، إذا تم تنفيذ ذلك حاليا أو إذا كان هناك أي حل بديل ، فيرجى إعلامي.

شكرا!

gido3823 avatar Aug 23 '22 14:08 gido3823

This would be nice to know!

jonvlcs07 avatar Aug 24 '22 12:08 jonvlcs07

لست متأكدا مما إذا كانت هناك بالفعل طريقة لإرسال الوحدات النمطية من البيئة المحلية إلى المجموعة.

من الناحية المثالية ، أود شيئا من هذا القبيل: %%send_module <name_of_my_module>

وبعد ذلك from my_module import func_foo

سيكون هذا مفيدا للغاية ، إذا تم تنفيذ ذلك حاليا أو إذا كان هناك أي حل بديل ، فيرجى إعلامي.

شكرا!

gido3823 avatar Aug 24 '22 12:08 gido3823

Hi @joaolaitano @jonvlcs07 thanks for making an issue. This is a design flaw (feature, not a bug) of Apache Livy. This is a common problem, but unfortunately there is no generic solution, it's very environment specific.

You could implement a function like %%send_module <name_of_my_module> and it would work if <name_of_my_module> doesn't rely on other local modules or files, but there are too many edge cases (local files, copying permission, etc) for us to expose build it as a generic API.

Hope this help!

devstein avatar Oct 20 '22 15:10 devstein