cuddly-jelly-27016
05/16/2025, 12:10 AMerror <class 'py4j.protocol.Py4JJavaError'>: An error occurred while calling o42.parquet.
: org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "s3"
• https://discuss.flyte.org/t/5158547/Hello-I-was-exploring-on-Kubernetes-Spark-job-and-i-tried-to.
• https://discuss.flyte.org/t/39240/U03CZJFCT7T-you-should-be-able-to-find-pods-in-the-flytesnac
### Expected behavior
If we want to support spark tasks running in local model then they should
1. Work out of the box
2. Explicitly tell users the task is running local or the plugin is not setup and the job is falling back.
The spark tasks run local mode after including the following config.
### Additional context to reproduce
import pandas as pd
from flytekit import task, workflow, StructuredDataset
from flytekitplugins.spark import Spark
import flytekit
def configure_s3(spark):
hadoop_conf = spark._jsc.hadoopConfiguration()
hadoop_conf.set("fs.s3.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem")
hadoop_conf.set("fs.s3a.aws.credentials.provider", "com.amazonaws.auth.WebIdentityTokenCredentialsProvider")
@task(container_image="ghcr.io/flyteorg/flytecookbook:k8s_spark-latest", task_config=Spark(
spark_conf={
"spark.driver.memory": "1000M",
"spark.executor.memory": "1000M",
"spark.executor.instances": "3",
"spark.driver.cores": "1",
"spark.executor.cores": "1",
}),
)
def t1() -> StructuredDataset:
spark = flytekit.current_context().spark_session
# The task fails without these settings.
# configure_s3(spark)
df = pd.DataFrame({"a": [1,2,3]})
df = spark.createDataFrame(df)
return StructuredDataset(dataframe=df)
@workflow
def wf() -> StructuredDataset:
sd = t1()
return sd
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/16/2025, 12:10 AM