RE: Conda Python Env in K8S

2021-12-03 Thread Bode, Meikel, NMA-CFD
Hi Mich,

sure thats possible. But distributing the complete env would be more practical.
A workaround at the moment is, that we build different environments and store 
them in a pv and then we mount it into the pods and refer from the 
SparkApplication resource to the desired env..

But actually these options exist and I want to understand what the issue is...
Any hints on that?

Best,
Meikel

From: Mich Talebzadeh 
Sent: Freitag, 3. Dezember 2021 13:27
To: Bode, Meikel, NMA-CFD 
Cc: dev ; user@spark.apache.org
Subject: Re: Conda Python Env in K8S

Build python packages into the docker image itself first with pip install

RUN pip install panda . . -no-cache

HTH

On Fri, 3 Dec 2021 at 11:58, Bode, Meikel, NMA-CFD 
mailto:meikel.b...@bertelsmann.de>> wrote:
Hello,

I am trying to run spark jobs using Spark Kubernetes Operator.
But when I try to bundle a conda python environment using the following 
resource description the python interpreter is only unpack to the driver and 
not to the executors.

apiVersion: 
"sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
  name: ...
spec:
  type: Python
  pythonVersion: "3"
  mode: cluster
  mainApplicationFile: local:///path/script.py
..
  sparkConf:
"spark.archives": "local:///path/conda-env.tar.gz#environment"
"spark.pyspark.python": "./environment/bin/python"
"spark.pyspark.driver.python": "./environment/bin/python"


The driver is unpacking the archive and the python scripts gets executed.
On executors there is no log message indicating that the archive gets unpacked.
Executors then fail as they cant find the python executable at the given 
location "./environment/bin/python".

Any hint?

Best,
Meikel
--




 
[https://docs.google.com/uc?export=download&id=1-q7RFGRfLMObPuQPWSd9sl_H1UPNFaIZ&revid=0B1BiUVX33unjMWtVUWpINWFCd0ZQTlhTRHpGckh4Wlg4RG80PQ]
   view my Linkedin 
profile



Disclaimer: Use it at your own risk. Any and all responsibility for any loss, 
damage or destruction of data or any other property which may arise from 
relying on this email's technical content is explicitly disclaimed. The author 
will in no case be liable for any monetary damages arising from such loss, 
damage or destruction.




Re: Conda Python Env in K8S

2021-12-03 Thread Mich Talebzadeh
Build python packages into the docker image itself first with pip install

RUN pip install panda . . —no-cache

HTH

On Fri, 3 Dec 2021 at 11:58, Bode, Meikel, NMA-CFD <
meikel.b...@bertelsmann.de> wrote:

> Hello,
>
>
>
> I am trying to run spark jobs using Spark Kubernetes Operator.
>
> But when I try to bundle a conda python environment using the following
> resource description the python interpreter is only unpack to the driver
> and not to the executors.
>
>
>
> apiVersion: "sparkoperator.k8s.io/v1beta2"
>
> kind: SparkApplication
>
> metadata:
>
>   name: …
>
> spec:
>
>   type: Python
>
>   pythonVersion: "3"
>
>   mode: cluster
>
>   mainApplicationFile: local:///path/script.py
>
> ..
>
>   sparkConf:
>
> "spark.archives": "local:///path/conda-env.tar.gz#environment"
>
> "spark.pyspark.python": "./environment/bin/python"
>
> "spark.pyspark.driver.python": "./environment/bin/python"
>
>
>
>
>
> The driver is unpacking the archive and the python scripts gets executed.
>
> On executors there is no log message indicating that the archive gets
> unpacked.
>
> Executors then fail as they cant find the python executable at the given
> location "./environment/bin/python".
>
>
>
> Any hint?
>
>
>
> Best,
>
> Meikel
>
-- 



   view my Linkedin profile




*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.


Re: Exploding huge array elements in spark

2021-12-03 Thread Gourav Sengupta
Hi Srikanth,

what is the spark version that you are using?

Can you tell us the data dictionary and the PK? Also if possible the data
volumes that you are dealing with?

Thanks and Regards,
Gourav Sengupta

On Thu, Dec 2, 2021 at 4:33 PM Shrikanth J R 
wrote:

> Hi,
>
> I am facing an issue when exploding multiple array columns where few
> columns have a huge element list. Repartition dataset before explode
> doesn't work Getting memory and space issue though file size before explode
> is ~16mb and Ram is 32gb with ~150gb. What is the efficient way of handling
>
> Regards,
> Shrikanth R.
>


Conda Python Env in K8S

2021-12-03 Thread Bode, Meikel, NMA-CFD
Hello,

I am trying to run spark jobs using Spark Kubernetes Operator.
But when I try to bundle a conda python environment using the following 
resource description the python interpreter is only unpack to the driver and 
not to the executors.

apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
  name: ...
spec:
  type: Python
  pythonVersion: "3"
  mode: cluster
  mainApplicationFile: local:///path/script.py
..
  sparkConf:
"spark.archives": "local:///path/conda-env.tar.gz#environment"
"spark.pyspark.python": "./environment/bin/python"
"spark.pyspark.driver.python": "./environment/bin/python"


The driver is unpacking the archive and the python scripts gets executed.
On executors there is no log message indicating that the archive gets unpacked.
Executors then fail as they cant find the python executable at the given 
location "./environment/bin/python".

Any hint?

Best,
Meikel