id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_47561229 | stackoverflow | DATA_ENGINEERING | Submitting a Spark job using Shell script file | Submitting a Spark job using Shell script file
I am trying to submit a Spark Job from a shell script.
Its a simple script with just spark-submit command. I am trying to give an argument to my Main function through the spark-submit command, But when i try executing the shell file the job is failing with Error :
scal... | https://stackoverflow.com/questions/47561229/submitting-a-spark-job-using-shell-script-file | apache-spark, apache-spark-sql | 1,511,987,205 |
se_79934574 | stackoverflow | DATA_ENGINEERING | Spark Structured Streaming from many S3 buckets with different customer credentials and schemas | Spark Structured Streaming from many S3 buckets with different customer credentials and schemas
have a Spark-on-Kubernetes ingestion use case and I’m trying to understand the right design for Spark Structured Streaming.
Each customer has their own S3 bucket and their own credentials. Inside each customer bucket, the d... | https://stackoverflow.com/questions/79934574/spark-structured-streaming-from-many-s3-buckets-with-different-customer-credenti | apache-spark, kubernetes, pyspark, spark-streaming | 1,777,626,720 |
se_62194057 | stackoverflow | DATA_ENGINEERING | SPARK on EMR Container from a bad node | SPARK on EMR Container from a bad node
I am trying to run our pipelines on EMR as steps but I am stuck on this step.
EMR cluster's configuration:
"logPath" : "s3://ekin-logs/",
"masterInstanceType" : "m5.xlarge",
"slaveInstanceType" : "m5.xlarge",
"instanceCount" : 2,
"subnetIds" : $SUBNET_ID,
"ec2KeyName" : "ek... | https://stackoverflow.com/questions/62194057/spark-on-emr-container-from-a-bad-node | amazon-web-services, apache-spark, hadoop-yarn, amazon-emr | 1,591,271,908 |
se_52619510 | stackoverflow | DATA_ENGINEERING | Azure databricks spark - write to blob storage | Azure databricks spark - write to blob storage
I have a data frame with two columns - filepath (wasbs file path for blobs), string and want to write each string to a seperate blob with that file name. How can i do this? | https://stackoverflow.com/questions/52619510/azure-databricks-spark-write-to-blob-storage | apache-spark, pyspark, databricks, azure-blob-storage | 1,538,539,192 |
se_64169977 | stackoverflow | DATA_ENGINEERING | ModuleNotFoundError: No module named 'pyspark' | ModuleNotFoundError: No module named 'pyspark'
I recently installed pyspark on Linux and get the error when importing pyspark:
ModuleNotFoundError: No module named 'pyspark'
Pyspark is in my 'pip list'
I addded the following lines to my .bashrc:
export SPARK_HOME=~/Spark/spark-3.0.1-bin-hadoop2.7
export PATH=... | https://stackoverflow.com/questions/64169977/modulenotfounderror-no-module-named-pyspark | python, apache-spark, pyspark | 1,601,634,120 |
se_38553155 | stackoverflow | DATA_ENGINEERING | Filter data based on resultant computation | Filter data based on resultant computation
I have a data frame, which contains three columns, timestamp, hostname, and num_denied. I want sum up the num_denied based on groupby of timestamp and hostname and display result where, the num_denied is greater than a value (say 500000).
Example:
>>> df.show()
+----------+... | https://stackoverflow.com/questions/38553155/filter-data-based-on-resultant-computation | apache-spark, pyspark, apache-spark-sql | 1,469,370,664 |
se_70935484 | stackoverflow | DATA_ENGINEERING | Explode multiple array columns in pyspark | Explode multiple array columns in pyspark
I have data farme inpyspark. I am trying to explode some array columns to create rows.
Create data frame:
df = spark.createDataFrame([('12345','0036',25),('12356','0036',24),('12347','0036',20)],("ext_contract", "legal_entity", "amount"))
>>> df.show()
+------------+---------... | https://stackoverflow.com/questions/70935484/explode-multiple-array-columns-in-pyspark | apache-spark, pyspark | 1,643,688,763 |
se_44320699 | stackoverflow | DATA_ENGINEERING | How to concatenate/append multiple Spark dataframes column wise in Pyspark? | How to concatenate/append multiple Spark dataframes column wise in Pyspark?
How to do pandas equivalent of pd.concat([df1,df2],axis='columns') using Pyspark dataframes?
I googled and couldn't find a good solution.
DF1
var1
3
4
5
DF2
var2 var3
23 31
44 45... | https://stackoverflow.com/questions/44320699/how-to-concatenate-append-multiple-spark-dataframes-column-wise-in-pyspark | python, apache-spark, pyspark, apache-spark-sql | 1,496,377,080 |
se_41961233 | stackoverflow | DATA_ENGINEERING | How to set Spark application exit status? | How to set Spark application exit status?
I'm writing a spark application and run it using spark-submit shell script (using yarn-cluster/yarn-client)
As I see now, exit code of spark-submit is decided according to the related yarn application - if SUCCEEDED status is 0, otherwise 1.
I want to have the option to retu... | https://stackoverflow.com/questions/41961233/how-to-set-spark-application-exit-status | apache-spark, hadoop-yarn, exit-code, spark-submit | 1,485,876,277 |
se_79542996 | stackoverflow | DATA_ENGINEERING | YARN framework issue for any application reporting setsid not found | YARN framework issue for any application reporting setsid not found
I can't solve this issue that I have when trying to run applications using yarn.
I've checked the user its environment to ensure the PATH includes /usr/bin/setsid or any grants are missing.
All 3 nodes are reported as active in the yarn webgui.
I've t... | https://stackoverflow.com/questions/79542996/yarn-framework-issue-for-any-application-reporting-setsid-not-found | apache-spark, containers, hadoop-yarn | 1,743,238,348 |
se_43298165 | stackoverflow | DATA_ENGINEERING | sparkR: Error while instantiating 'org.apache.spark.sql.hive.HiveSessionState': | sparkR: Error while instantiating 'org.apache.spark.sql.hive.HiveSessionState':
I am struggling solving this problem when I try to use sparkR.
sparkR.session(master = "local[*]", sparkConfig = list(spark.driver.memory = "1g"))
Error in handleErrors(returnStatus, conn) :
java.lang.IllegalArgumentException:... | https://stackoverflow.com/questions/43298165/sparkr-error-while-instantiating-org-apache-spark-sql-hive-hivesessionstate | java, scala, apache-spark, sparkr | 1,491,672,231 |
se_36133952 | stackoverflow | DATA_ENGINEERING | How to run spark-shell with YARN in client mode? | How to run spark-shell with YARN in client mode?
I've installed spark-1.6.1-bin-hadoop2.6.tgz on a 15-node Hadoop cluster. All nodes run Java 1.8.0_72 and the latest version of Hadoop. The Hadoop cluster itself is functional, e.g. YARN can run various MapReduce jobs successfully.
I can run Spark Shell locally on a n... | https://stackoverflow.com/questions/36133952/how-to-run-spark-shell-with-yarn-in-client-mode | hadoop, apache-spark, hadoop-yarn | 1,458,571,033 |
se_79543296 | stackoverflow | DATA_ENGINEERING | Bind address error when node is elected for driver on which the spark submit job is not invoked on. (cluster deploy mode vs client deploy mode) | Bind address error when node is elected for driver on which the spark submit job is not invoked on. (cluster deploy mode vs client deploy mode)
When running in "cluster" deploy mode and another node is elected as the driver then the app fails with address bind issues.
When running in "client" deploy mode from any of t... | https://stackoverflow.com/questions/79543296/bind-address-error-when-node-is-elected-for-driver-on-which-the-spark-submit-job | apache-spark, binding, port, cluster-mode | 1,743,253,793 |
se_79872924 | stackoverflow | DATA_ENGINEERING | Spark Parquet timestamp min/max statistics | Spark Parquet timestamp min/max statistics
I have a table in Iceberg as below:
spark.sql("""
CREATE OR REPLACE TABLE my_db.my_table (
serverTime TIMESTAMP,
id LONG,
...
)
USING iceberg
PARTITIONED BY (days(serverTime), bucket(50, id));
"""
)
I run below queries:... | https://stackoverflow.com/questions/79872924/spark-parquet-timestamp-min-max-statistics | sql, apache-spark, parquet, apache-iceberg | 1,769,003,756 |
se_47378165 | stackoverflow | DATA_ENGINEERING | Spark GC time is very high causing task execution slow | Spark GC time is very high causing task execution slow
I am running spark application on 5 node cluster. Each node have configuration as 16 core and 64 GB ram.
There are 4 stages in my application. 3 stages executed fast for 4th stage ie mapToPair is it taking too much time(almost 4 hours).
Below is the job statisti... | https://stackoverflow.com/questions/47378165/spark-gc-time-is-very-high-causing-task-execution-slow | java, apache-spark, garbage-collection | 1,511,102,881 |
se_42645836 | stackoverflow | DATA_ENGINEERING | Split dataset based on column values in spark | Split dataset based on column values in spark
I am trying to split the Dataset into different Datasets based on Manufacturer column contents. It is very slow Please suggest a way to improve the code, so that it can execute faster and reduce the usage of Java code.
List<Row> lsts= countsByAge.collectAsList();
... | https://stackoverflow.com/questions/42645836/split-dataset-based-on-column-values-in-spark | java, apache-spark, apache-spark-sql, apache-spark-dataset, apache-spark-2.0 | 1,488,882,643 |
se_41543758 | stackoverflow | DATA_ENGINEERING | How to convert javaRDD to dataset | How to convert javaRDD to dataset
I try to use spark read the data from the Oracle database into dataset, then convert the dataset into javaRDD for map operation, my code can only store the dataset Spark official documents show: http://spark.apache.org/docs/latest/sql-programming-guide.html#in... | https://stackoverflow.com/questions/41543758/how-to-convert-javardd-to-dataset | java, apache-spark | 1,483,950,249 |
se_73230120 | stackoverflow | DATA_ENGINEERING | How to move data between databases in AWS rds using Glue and PySpark? | How to move data between databases in AWS rds using Glue and PySpark?
I have 2 databases A and B in my RDS cluster. It’s Postgres based. I have 2 glue connections setup one for A and another for B.
I have a helper function that gets details such as host, url, port, username and password from the respective connections... | https://stackoverflow.com/questions/73230120/how-to-move-data-between-databases-in-aws-rds-using-glue-and-pyspark | postgresql, apache-spark, pyspark, aws-glue | 1,659,584,552 |
se_36984960 | stackoverflow | DATA_ENGINEERING | An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe | An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe
I am new to spark and facing an error while converting .csv file to dataframe. I am using pyspark_csv module for the conversion but gives an error,
here is the stack trace for the error, can any one of give me suggestions resolving... | https://stackoverflow.com/questions/36984960/an-error-occurred-while-calling-zorg-apache-spark-api-python-pythonrdd-collecta | python-3.x, apache-spark, pyspark, apache-spark-sql | 1,462,199,472 |
se_50021421 | stackoverflow | DATA_ENGINEERING | How to fix 22: error: not found: value SparkSession in Scala? | How to fix 22: error: not found: value SparkSession in Scala?
I am new to Spark and I would like to read a CSV-file to a Dataframe.
Spark 1.3.0 / Scala 2.3.0
This is what I have so far:
# Start Scala with CSV Package Module
spark-shell --packages com.databricks:spark-csv_2.10:1.3.0
# Import Spark Classes
import or... | https://stackoverflow.com/questions/50021421/how-to-fix-22-error-not-found-value-sparksession-in-scala | scala, apache-spark, apache-spark-sql | 1,524,656,505 |
se_64960333 | stackoverflow | DATA_ENGINEERING | Pyspark - Failed to get main class in JAR with error 'File file:/home/xpto/spark/, does not exist' | Pyspark - Failed to get main class in JAR with error 'File file:/home/xpto/spark/, does not exist'
Im using pyspark to write into kafka.
When I run the command:
bin/spark-submit --packages org.apache.spark:spark-streaming-kafka-0-10-assembly_2.12:3.0.1,org.apache.spark:spark-sql-kafka-0-10_2.11:2.0.2 --jars /h... | https://stackoverflow.com/questions/64960333/pyspark-failed-to-get-main-class-in-jar-with-error-file-file-home-xpto-spark | apache-spark, pyspark, apache-kafka | 1,606,084,463 |
se_74272261 | stackoverflow | DATA_ENGINEERING | "Unable to infer schema for JSON." error in PySpark? | "Unable to infer schema for JSON." error in PySpark?
I have a json file with about 1,200,000 records.
I want to read this file with pyspark as :
spark.read.option("multiline","true").json('file.json')
But it causes this error:
AnalysisException: Unable to infer schema for JSON. It must be specified manuall... | https://stackoverflow.com/questions/74272261/unable-to-infer-schema-for-json-error-in-pyspark | json, file, apache-spark, pyspark, schema | 1,667,284,012 |
se_54601917 | stackoverflow | DATA_ENGINEERING | Spark 2.4.0 - unable to parse ISO8601 string into TimestampType preserving ms | Spark 2.4.0 - unable to parse ISO8601 string into TimestampType preserving ms
When trying to convert ISO8601 strings with time zone information into a TimestampType using a cast(TimestampType) only strings using the time zone format +01:00 is accepted. If the time zone is defined in the ISO8601 legal way +0100 (withou... | https://stackoverflow.com/questions/54601917/spark-2-4-0-unable-to-parse-iso8601-string-into-timestamptype-preserving-ms | apache-spark, databricks, azure-databricks | 1,549,671,132 |
se_79960724 | stackoverflow | DATA_ENGINEERING | Does the airflow-db-cleanup.py DAG need any import modifications when using SparkKubernetesOperator? | Does the airflow-db-cleanup.py DAG need any import modifications when using SparkKubernetesOperator?
I need to set up a metadata cleanup DAG for our Airflow environment, which uses the SparkKubernetesOperator (from apache-airflow-providers-cncf-kubernetes) to run Spark jobs on Kubernetes.
I'm planning to use this wide... | https://stackoverflow.com/questions/79960724/does-the-airflow-db-cleanup-py-dag-need-any-import-modifications-when-using-spar | apache-spark, airflow, kubernetes-operator | 1,781,623,394 |
se_51664932 | stackoverflow | DATA_ENGINEERING | Getting FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask exception while access Hive views | Getting FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask exception while access Hive views
I am trying to access the views in Hive, getting following Exception:
Getting log thread is interrupted, since query is done!
Error: Error while processing statement: FAILED: Execution Er... | https://stackoverflow.com/questions/51664932/getting-failed-execution-error-return-code-2-from-org-apache-hadoop-hive-ql-ex | sql, apache-spark, hadoop, hive, view | 1,533,267,108 |
se_37082504 | stackoverflow | DATA_ENGINEERING | Parquet file compression | Parquet file compression
What would be the most optimized compression logic for Parquet files when using in Spark? Also what would be the approximate size of a 1gb parquet file after compression with each compression type? | https://stackoverflow.com/questions/37082504/parquet-file-compression | apache-spark, compression, parquet | 1,462,575,023 |
se_32064280 | stackoverflow | DATA_ENGINEERING | Load a local file to spark using sc.textFile() | Load a local file to spark using sc.textFile()
Question
How to load a file from the local file system to Spark using sc.textFile? Do I need to change any -env variables? Also when I tried the same on my windows where Hadoop is not installed I got the same error.
Code
> val inputFile = sc.textFile("file///C:/Users/swa... | https://stackoverflow.com/questions/32064280/load-a-local-file-to-spark-using-sc-textfile | scala, apache-spark, hadoop, rdd | 1,439,876,166 |
se_79956103 | stackoverflow | DATA_ENGINEERING | PySpark CONTEXT_ONLY_VALID_ON_DRIVER error when calling class method inside RDD transformation (AWS Glue) | PySpark CONTEXT_ONLY_VALID_ON_DRIVER error when calling class method inside RDD transformation (AWS Glue)
I am running a Glue job where I call a framework Python file stored in S3.
I download and import the framework like this:
os.system(f'aws s3 cp s3://s3_bucket/Common/ABC/XML_TO_PARQUE_FRAMEWORK.py ./ --region eu-w... | https://stackoverflow.com/questions/79956103/pyspark-context-only-valid-on-driver-error-when-calling-class-method-inside-rdd | apache-spark, pyspark, aws-glue, rdd | 1,781,105,754 |
se_49395093 | stackoverflow | DATA_ENGINEERING | How to iterate through a spark dataset and update a column value in Java? | How to iterate through a spark dataset and update a column value in Java?
I'm working on POC where I have to update the account number in DB with tokens. I read the data into a dataset dsRecords(about 2M records). I have another routine that had captured distinct account numbers and got the tokens, the mapping is stor... | https://stackoverflow.com/questions/49395093/how-to-iterate-through-a-spark-dataset-and-update-a-column-value-in-java | java, apache-spark | 1,521,584,499 |
se_60837615 | stackoverflow | DATA_ENGINEERING | Drop table using Pyspark | Drop table using Pyspark
The SparkSession.catalog object has a bunch of methods to interact with the metastore, namely:
['cacheTable',
'clearCache',
'createExternalTable',
'createTable',
'currentDatabase',
'dropGlobalTempView',
'dropTempView',
'isCached',
'listColumns',
'listDatabases',
'listFunctions',
'l... | https://stackoverflow.com/questions/60837615/drop-table-using-pyspark | scala, apache-spark, pyspark, hive, apache-spark-sql | 1,585,076,523 |
se_79915210 | stackoverflow | DATA_ENGINEERING | Spark 4.0 MemoryStream was moved or changed? | Spark 4.0 MemoryStream was moved or changed?
I tried to upgrade my project from Spark 3.5 to Spark 4.0. In the process, I ran into this issue in our unit tests.
error: cannot find symbol
import org.apache.spark.sql.execution.streaming.MemoryStream;
error: cannot find symbol
MemoryStream inputStream =
Bel... | https://stackoverflow.com/questions/79915210/spark-4-0-memorystream-was-moved-or-changed | java, scala, apache-spark, apache-spark-4.0 | 1,774,543,020 |
se_79828865 | stackoverflow | DATA_ENGINEERING | Connectivity issues in standalone Spark 4.0 | Connectivity issues in standalone Spark 4.0
In Azure VM, I have installed standalone Spark 4.0. On the same VM I have Python 3.11 with Jupyter deployed. In my notebook I submitted the following program:
from pyspark.sql import SparkSession
spark = SparkSession.builder.remote("sc://192.168.2.5:15002").getOrCreate()
df ... | https://stackoverflow.com/questions/79828865/connectivity-issues-in-standalone-spark-4-0 | apache-spark, pyspark, connectivity, apache-spark-4.0 | 1,764,001,012 |
se_78942347 | stackoverflow | DATA_ENGINEERING | How to test Spark 4.0 preview on Databricks Community edition | How to test Spark 4.0 preview on Databricks Community edition
Question: How can we install (use) Preview Release of Spark 4.0 in Databricks Community Edition? I'm using Windows 10. When creating a cluster, the highest version it shows in the dropdown is 15.4 LTS (includes Apache Spark 3.5.0, Scala 2.12)
Remarks:
If pr... | https://stackoverflow.com/questions/78942347/how-to-test-spark-4-0-preview-on-databricks-community-edition | apache-spark, pyspark, databricks, databricks-community-edition, apache-spark-4.0 | 1,725,324,884 |
se_79677967 | stackoverflow | DATA_ENGINEERING | IllegalThreadStateException in Spark 4.0 when Adaptive Query Execution (AQE) is active and when running many queries in the same Spark instance | IllegalThreadStateException in Spark 4.0 when Adaptive Query Execution (AQE) is active and when running many queries in the same Spark instance
Upon upgrading to Spark 4, we get (deterministically) an IllegalThreadStateException in long series of queries including spark.ml or Delta Lake (e.g. in estimator.fit()) in th... | https://stackoverflow.com/questions/79677967/illegalthreadstateexception-in-spark-4-0-when-adaptive-query-execution-aqe-is | multithreading, apache-spark, apache-spark-sql, apache-spark-ml, apache-spark-4.0 | 1,750,785,041 |
se_79771627 | stackoverflow | DATA_ENGINEERING | How to pass array of structure as parameter to udf in spark 4 | How to pass array of structure as parameter to udf in spark 4
does anybody know what am I doing wrong? Following is reduced code snippet working in spark-3.x but doesn't work in spark-4.x.
In my usecase I need to pass complex data structure to udf (let's say array of structures), but in new spark version 4 it does not... | https://stackoverflow.com/questions/79771627/how-to-pass-array-of-structure-as-parameter-to-udf-in-spark-4 | scala, apache-spark, apache-spark-sql, apache-spark-4.0 | 1,758,545,461 |
se_79765912 | stackoverflow | DATA_ENGINEERING | Deserialization of multiple avro tables in Databricks | Deserialization of multiple avro tables in Databricks
I have multiple tables sent to eventhub and they're avro based with apicurio as schema registry but how can I deserialize them as pyspark's from_avro only does 1 table? | https://stackoverflow.com/questions/79765912/deserialization-of-multiple-avro-tables-in-databricks | apache-spark, avro | 1,758,008,695 |
se_26339520 | stackoverflow | DATA_ENGINEERING | Strings concatenation in Spark SQL query | Strings concatenation in Spark SQL query
I'm experimenting with Spark and Spark SQL and I need to concatenate a value at the beginning of a string field that I retrieve as output from a select (with a join) like the following:
val result = sim.as('s)
.join(
event.as('e),
Inner,
Option("... | https://stackoverflow.com/questions/26339520/strings-concatenation-in-spark-sql-query | sql, scala, apache-spark, apache-spark-sql | 1,413,201,663 |
se_52236944 | stackoverflow | DATA_ENGINEERING | How to submit spark job Remotely | How to submit spark job Remotely
I have Nodejs server where spark is NOT installed and have spark with YARN setup in different server.
Requirement is to run spark job from Nodejs server remotely. Can someone help on this?.
Thanks for prompt response. | https://stackoverflow.com/questions/52236944/how-to-submit-spark-job-remotely | java, scala, apache-spark | 1,536,422,267 |
se_61937364 | stackoverflow | DATA_ENGINEERING | Apache Spark - Adding a incremental Id in based on a column value | Apache Spark - Adding a incremental Id in based on a column value
I would like to create an incremental id in based on a column value.
For example if I have the following table
-----------------------
| id | value |
-----------------------
| 3 | a |
| 2 | a |
| 1 | b |
| 4 | b... | https://stackoverflow.com/questions/61937364/apache-spark-adding-a-incremental-id-in-based-on-a-column-value | apache-spark | 1,590,073,014 |
se_63069315 | stackoverflow | DATA_ENGINEERING | SparkException: Job aborted due to stage failure. Caused by: java.lang.ArrayIndexOutOfBoundsException | SparkException: Job aborted due to stage failure. Caused by: java.lang.ArrayIndexOutOfBoundsException
I am trying to read some data from parquet file using spark SQL and trying to put that data into some other table. But while writing data into another table I am getting the below error.
The parquet file is pulled fro... | https://stackoverflow.com/questions/63069315/sparkexception-job-aborted-due-to-stage-failure-caused-by-java-lang-arrayinde | apache-spark, pyspark, apache-spark-sql, azure-databricks | 1,595,577,554 |
se_56533824 | stackoverflow | DATA_ENGINEERING | error in initSerDe : java.lang.ClassNotFoundException class org.apache.hive.hcatalog.data.JsonSerDe not found | error in initSerDe : java.lang.ClassNotFoundException class org.apache.hive.hcatalog.data.JsonSerDe not found
I am trying to read data from the Hive table using spark sql (scala) and it is throwing me error as
ERROR hive.log: error in initSerDe: java.lang.ClassNotFoundException Class org.apache.hive.hcatalog.data.J... | https://stackoverflow.com/questions/56533824/error-in-initserde-java-lang-classnotfoundexception-class-org-apache-hive-hcat | scala, apache-spark, hive, apache-spark-sql | 1,560,202,475 |
se_53341845 | stackoverflow | DATA_ENGINEERING | spark-submit encounter PKIX path building failed | spark-submit encounter PKIX path building failed
So I have cluster node on Google Kubernetes Engine and I do spark-submit to run some spark job. (I didn't use spark-submit exactly, I launch the submit using java code, but they are essentially invoking the same Scala class, which is SparkSubmit.class)
And in my case, ... | https://stackoverflow.com/questions/53341845/spark-submit-encounter-pkix-path-building-failed | apache-spark, kubernetes, pkix | 1,542,385,649 |
se_50849839 | stackoverflow | DATA_ENGINEERING | Jupyter Notebook connection to remote hive | Jupyter Notebook connection to remote hive
I'm trying to get datas from Hive of our company's remote server. I use Anaconda3 (Windows 64-bit) and my Hadoop works on Ambari.
I've tryed to do smth like these ...
import findspark
findspark.init()
from pyspark import SparkContext, SparkConf
from pyspark.sql import HiveC... | https://stackoverflow.com/questions/50849839/jupyter-notebook-connection-to-remote-hive | apache-spark, hadoop, hive, pyspark, anaconda | 1,528,952,055 |
se_56460631 | stackoverflow | DATA_ENGINEERING | Filter a spark dataframe with a greater than and a less than of list of dates | Filter a spark dataframe with a greater than and a less than of list of dates
I have a dataframe with the fields from_date and to_date:
(2017-01-10 2017-01-14)
(2017-01-03 2017-01-13)
and a List of dates
2017-01-05,
2017-01-12,
2017-01-13,
2017-01-15
The idea is to retrieve from the table all the rows in... | https://stackoverflow.com/questions/56460631/filter-a-spark-dataframe-with-a-greater-than-and-a-less-than-of-list-of-dates | scala, apache-spark, dataframe, apache-spark-sql | 1,559,738,240 |
se_79905259 | stackoverflow | DATA_ENGINEERING | Java Spark mapPartitions retry causing duplicate inserts into BigQuery on task failure | Java Spark mapPartitions retry causing duplicate inserts into BigQuery on task failure
I have a dataproc java Spark job that processes a dataset in partitions and inserts rows into batches.
The code uses rdd.mapPartitions with an iterator, splitting rows into batches (e.g., 100 rows each).
Inside the iterator, each ba... | https://stackoverflow.com/questions/79905259/java-spark-mappartitions-retry-causing-duplicate-inserts-into-bigquery-on-task-f | java, apache-spark, google-cloud-platform, google-cloud-dataproc | 1,773,223,714 |
se_48331115 | stackoverflow | DATA_ENGINEERING | PYspark SparkContext Error "error occurred while calling None.org.apache.spark.api.java.JavaSparkContext." | PYspark SparkContext Error "error occurred while calling None.org.apache.spark.api.java.JavaSparkContext."
I know this question has been posted before, but I tried implementing the solutions, but none worked for me. I installed Spark for Jupyter Notebook
using this tutorial:
https://medium.com/@GalarnykMich... | https://stackoverflow.com/questions/48331115/pyspark-sparkcontext-error-error-occurred-while-calling-none-org-apache-spark-a | macos, apache-spark, terminal, pyspark | 1,516,313,244 |
se_67210723 | stackoverflow | DATA_ENGINEERING | Scala Spark RDD error : java.lang.ClassCastException: cannot assign instance of java.lang.invoke.SerializedLambda | Scala Spark RDD error : java.lang.ClassCastException: cannot assign instance of java.lang.invoke.SerializedLambda
I am a beginner to Scala and Spark.
scala version : 2.12.10
spark version : 3.0.1
I'm trying a very simple spark rdd function in scala.
But I get an error.
(1) build.sbt
scalaVersion := "2.12.10"
name :... | https://stackoverflow.com/questions/67210723/scala-spark-rdd-error-java-lang-classcastexception-cannot-assign-instance-of | scala, apache-spark, pyspark, apache-spark-sql, rdd | 1,619,084,348 |
se_79915364 | stackoverflow | DATA_ENGINEERING | Upgraded to version IntelliJ IDEA 2026.1 , gradle fails to sync or build | Upgraded to version IntelliJ IDEA 2026.1 , gradle fails to sync or build
class org.jetbrains.plugins.gradle.tooling.serialization.internal.adapter.InternalIdeaModule cannot be cast to class org.gradle.tooling.model.ProjectModel (org.jetbrains.plugins.gradle.tooling.serialization.internal.adapter.InternalIdeaModule is ... | https://stackoverflow.com/questions/79915364/upgraded-to-version-intellij-idea-2026-1-gradle-fails-to-sync-or-build | apache-spark, intellij-idea, build.gradle, jetbrains-ide | 1,774,562,746 |
se_74881236 | stackoverflow | DATA_ENGINEERING | Pyspark ANSI SQL | Pyspark ANSI SQL
I'm working with pyspark SQL. I need to write and check the SQL query standards with ANSI, how to get it done with pyspark?
I have tried adding spark.sql.ansi.enabled to True in option while reading data from the database.
I need to add ANSI SQL standards in my pyspark SQL queries. | https://stackoverflow.com/questions/74881236/pyspark-ansi-sql | apache-spark, pyspark, apache-spark-sql, apache-spark-4.0 | 1,671,652,917 |
se_67908378 | stackoverflow | DATA_ENGINEERING | Pyspark GCP UnsupportedOperationException: org.apache.parquet.column.values.dictionary.PlainValuesDictionary$PlainDoubleDictionary | Pyspark GCP UnsupportedOperationException: org.apache.parquet.column.values.dictionary.PlainValuesDictionary$PlainDoubleDictionary
I am new to pyspark, so hope someone can help. I am trying to read parquet files stored on a GCP bucket. The file are partitioned by date so for example bucket-name/year={}/month={}/day={}... | https://stackoverflow.com/questions/67908378/pyspark-gcp-unsupportedoperationexception-org-apache-parquet-column-values-dict | apache-spark, pyspark, parquet, unsupportedoperation, google-bucket | 1,623,256,880 |
se_47287359 | stackoverflow | DATA_ENGINEERING | hive reach max worker and cannot connect to hiveserver2 | hive reach max worker and cannot connect to hiveserver2
when i use beeline connect to hiveserver2 ,the err msg is like this.
I have connect to the hiveserver2 before.
This error is show after i connect to hiveserver2 some times.
and i can connect use jdbc:hive2://
beeline> !connect jdbc:hive2://master:10000
SLF4J: ... | https://stackoverflow.com/questions/47287359/hive-reach-max-worker-and-cannot-connect-to-hiveserver2 | java, hadoop, apache-spark, hive | 1,510,666,925 |
se_63967283 | stackoverflow | DATA_ENGINEERING | How to solve the following issue in Spark 3.0? Can not create the managed table. The associated location already exists.; | How to solve the following issue in Spark 3.0? Can not create the managed table. The associated location already exists.;
In my spark job, I tried to overwrite a table in each microbatch of structured streaming
batchDF.write.mode(SaveMode.Overwrite).saveAsTable("mytable")
It generated the following error.
Can not c... | https://stackoverflow.com/questions/63967283/how-to-solve-the-following-issue-in-spark-3-0-can-not-create-the-managed-table | apache-spark, spark-streaming, spark3 | 1,600,507,992 |
se_33584550 | stackoverflow | DATA_ENGINEERING | Spark Job failing with exit status 15 | Spark Job failing with exit status 15
I am trying to run simple word count job in spark but I am getting exception while running job.
For more detailed output, check application tracking page:http://quickstart.cloudera:8088/proxy/application_1446699275562_0006/Then, click on links to logs of each attempt.
Diagnos... | https://stackoverflow.com/questions/33584550/spark-job-failing-with-exit-status-15 | scala, hadoop, apache-spark | 1,446,911,094 |
se_72340767 | stackoverflow | DATA_ENGINEERING | Control the compression level when writing Parquet files using Polars in Rust | Control the compression level when writing Parquet files using Polars in Rust
I found that by default polars' output Parquet files are around 35% larger than Parquet files output by Spark (on the same data). Spark uses snappy for compression by default and it doesn't help if I switch ParquetCompression to snappy in po... | https://stackoverflow.com/questions/72340767/control-the-compression-level-when-writing-parquet-files-using-polars-in-rust | dataframe, apache-spark, compression, parquet, rust-polars | 1,653,248,286 |
se_75722514 | stackoverflow | DATA_ENGINEERING | Apache Spark with Delta Lake on Local Machine | Apache Spark with Delta Lake on Local Machine
I'm trying to learn more about Spark and the Delta Lake format. To try to save on Databricks costs, while learning and experimenting, I've been trying to set Spark with Delta up on my local dev laptop.
No issues getting Spark working by itself, that seems to be fine; I can... | https://stackoverflow.com/questions/75722514/apache-spark-with-delta-lake-on-local-machine | apache-spark, pyspark, delta-lake | 1,678,714,092 |
se_54141081 | stackoverflow | DATA_ENGINEERING | How to fix 'Exception: Java gateway process exited before sending its port number' in Eclipse IDE | How to fix 'Exception: Java gateway process exited before sending its port number' in Eclipse IDE
I am trying to connect MySQL using pyspark in pydev environment of Eclipse IDE.
Getting below error:
Exception: Java gateway process exited before sending its port number
I have checked Java is properly installe... | https://stackoverflow.com/questions/54141081/how-to-fix-exception-java-gateway-process-exited-before-sending-its-port-numbe | apache-spark, pyspark | 1,547,186,157 |
se_50754517 | stackoverflow | DATA_ENGINEERING | PySpark: Failed to locate the winutils binary in the hadoop binary path | PySpark: Failed to locate the winutils binary in the hadoop binary path
I am running a huge text file using PyCharm and PySpark.
This is what I am trying to do:
spark_home = os.environ.get('SPARK_HOME', None)
os.environ["SPARK_HOME"] = "C:\spark-2.3.0-bin-hadoop2.7"
import pyspark
from pyspark import SparkContext, S... | https://stackoverflow.com/questions/50754517/pyspark-failed-to-locate-the-winutils-binary-in-the-hadoop-binary-path | python, python-2.7, apache-spark, pyspark, apache-spark-sql | 1,528,438,951 |
se_27123006 | stackoverflow | DATA_ENGINEERING | Feeding Apache Spark Streaming from Amazon SQS? | Feeding Apache Spark Streaming from Amazon SQS?
Spark can be fed in many ways as it is explained in the documentation (like Kafka, Flume, Twitter, ZeroMQ, Kinesis or plain old TCP sockets).
Does anybody know how to feed Spark Streaming from Amazon SQS? | https://stackoverflow.com/questions/27123006/feeding-apache-spark-streaming-from-amazon-sqs | apache-spark, amazon-sqs | 1,416,907,840 |
se_57326658 | stackoverflow | DATA_ENGINEERING | How to use Databricks S3-SQS connector to read SQS messages in Structured Streaming? | How to use Databricks S3-SQS connector to read SQS messages in Structured Streaming?
I am trying to read messages from sqs using spark streaming using below code
import org.apache.spark.sql.streaming._
import org.apache.spark.sql.types._
import org.apache.spark.sql.{DataFrame, SaveMode, SparkSession}
val df = spark.... | https://stackoverflow.com/questions/57326658/how-to-use-databricks-s3-sqs-connector-to-read-sqs-messages-in-structured-stream | apache-spark, amazon-sqs, spark-structured-streaming | 1,564,749,504 |
se_79943923 | stackoverflow | DATA_ENGINEERING | Can we control the total resouces used by Spark with its Kubernetes operator? | Can we control the total resouces used by Spark with its Kubernetes operator?
We are currently planning a migration to Kubernetes with our Spark applications.
Until this point we used a standalone cluster where we submitted multiple applications, with dynamic resource allocation enabled. That meant that some of the a... | https://stackoverflow.com/questions/79943923/can-we-control-the-total-resouces-used-by-spark-with-its-kubernetes-operator | apache-spark, kubernetes | 1,779,268,350 |
se_79943368 | stackoverflow | DATA_ENGINEERING | BroadcastExchange breaks RDD's lineage | BroadcastExchange breaks RDD's lineage
I'm writing this post so hopefully someone can verify my findings and add some missing pieces.
After calling cleanShuffleDependencies on an RDD after a long series of transformations, I noticed that if a broadcast exchange triggers, the resulting RDD has a very short lineage,... | https://stackoverflow.com/questions/79943368/broadcastexchange-breaks-rdds-lineage | apache-spark, rdd | 1,779,184,087 |
se_79942315 | stackoverflow | DATA_ENGINEERING | Configuring Spark ThriftServer and Spark Connect Server | Configuring Spark ThriftServer and Spark Connect Server
I'm newbee to Spark world.
I have installed single node Spark in my AZ VM.
I want to have both services up and running (Thrift and Connect). It only works when:
Thrift is on and Connect is off
Thrift is off and Connect is on
I think is caused by my wrong conf... | https://stackoverflow.com/questions/79942315/configuring-spark-thriftserver-and-spark-connect-server | apache-spark, spark-thriftserver, spark-connect | 1,778,976,532 |
se_50183775 | stackoverflow | DATA_ENGINEERING | How to write aws glue file output to a specific name | How to write aws glue file output to a specific name
I have an aws glue python job which joins two Aurora tables and writes/sinks output to s3 bucket as json format. The job is working fine as expected. By default the output file is written to s3 bucket in this name format/pattern "run-123456789-part-r-00000" [Behind ... | https://stackoverflow.com/questions/50183775/how-to-write-aws-glue-file-output-to-a-specific-name | python, apache-spark, pyspark, etl, aws-glue | 1,525,472,446 |
se_57321416 | stackoverflow | DATA_ENGINEERING | Spark specify multiple logical condition in where clause of spark dataframe | Spark specify multiple logical condition in where clause of spark dataframe
While defining the multiple logical/relational condition in spark scala dataframe getting the error as mentioned below. But same thing is working fine in scala
Python code:
df2=df1.where(((col('a')==col('b')) & (abs(col('c')) <= 1))
| ((col... | https://stackoverflow.com/questions/57321416/spark-specify-multiple-logical-condition-in-where-clause-of-spark-dataframe | scala, apache-spark, apache-spark-sql | 1,564,729,313 |
se_39279702 | stackoverflow | DATA_ENGINEERING | ValueError: RDD is empty-- Pyspark (Windows Standalone) | ValueError: RDD is empty-- Pyspark (Windows Standalone)
I am trying to create an RDD but spark not creating it, throwing back error, pasted below;
data = records.map(lambda r: LabeledPoint(extract_label(r), extract_features(r)))
first_point = data.first()
Py4JJavaError Traceback (most rec... | https://stackoverflow.com/questions/39279702/valueerror-rdd-is-empty-pyspark-windows-standalone | python, apache-spark, pyspark, rdd | 1,472,758,994 |
se_79939567 | stackoverflow | DATA_ENGINEERING | PySpark: are interdependent aggregations allowed in a single .agg() call? | PySpark: are interdependent aggregations allowed in a single .agg() call?
I recently wrote some PySpark code that uses this pattern:
df = ... # some dataframe
res_df = df.groupby('col1', 'col2').agg(
<aggregation func/expr>.alias('agg1'),
<aggregation func/expr that depends on agg1>.alias('agg2')
)
That is, I... | https://stackoverflow.com/questions/79939567/pyspark-are-interdependent-aggregations-allowed-in-a-single-agg-call | apache-spark, pyspark | 1,778,528,238 |
se_75959513 | stackoverflow | DATA_ENGINEERING | Error while writing Spark DF to parquet (Parquet column cannot be converted. Column: [word_c], Expected: StringType, Found: INT64 | Error while writing Spark DF to parquet (Parquet column cannot be converted. Column: [word_c], Expected: StringType, Found: INT64
I have a couple of parquet files spread across different folders and I'm using following command to read them into a Spark DF on Databricks:
df = spark.read.option("mergeSchema", "true").sc... | https://stackoverflow.com/questions/75959513/error-while-writing-spark-df-to-parquet-parquet-column-cannot-be-converted-col | dataframe, apache-spark, pyspark, databricks, azure-data-lake | 1,680,879,128 |
se_79876118 | stackoverflow | DATA_ENGINEERING | How to read/write in minio using spark? | How to read/write in minio using spark?
I've build a spark and minio docker container with the below config:
services:
spark:
build: .
command: sleep infinity
container_name: spark
volumes:
- ./spark_scripts:/opt/spark/work-dir
# - ./init/spark/init.sh:/init_scripts/init.sh
working... | https://stackoverflow.com/questions/79876118/how-to-read-write-in-minio-using-spark | python, docker, apache-spark, pyspark, minio | 1,769,408,488 |
se_36792590 | stackoverflow | DATA_ENGINEERING | Spark java.io.EOFException: Premature EOF: no length prefix available | Spark java.io.EOFException: Premature EOF: no length prefix available
I am trying to read parquet file and perform some operations on it and save the result as parquet on HDFS. I am doing it using Spark. While doing so I am getting following exception.
java.io.EOFException: Premature EOF: no length prefix available
a... | https://stackoverflow.com/questions/36792590/spark-java-io-eofexception-premature-eof-no-length-prefix-available | hadoop, apache-spark, hdfs, cloudera | 1,461,324,330 |
se_40606535 | stackoverflow | DATA_ENGINEERING | Check if an element is present in a StructType in a Spark DataFrame | Check if an element is present in a StructType in a Spark DataFrame
I have in python a Spark DataFrame with nested columns, and I have the path a.b.c, and want to check if there is a nested column after c called d, so if a.b.c.d exists.
Simply checking df.columns['a']['b']['c']['d'] or df.columns['a.b.c.d'] doesn't s... | https://stackoverflow.com/questions/40606535/check-if-an-element-is-present-in-a-structtype-in-a-spark-dataframe | python, dataframe, apache-spark, pyspark, apache-spark-sql | 1,479,202,954 |
se_73465937 | stackoverflow | DATA_ENGINEERING | Apache Spark 3.3.0 breaks on Java 17 with "cannot access class sun.nio.ch.DirectBuffer" | Apache Spark 3.3.0 breaks on Java 17 with "cannot access class sun.nio.ch.DirectBuffer"
A similar question was asked at Running unit tests with Spark 3.3.0 on Java 17 fails with IllegalAccessError: class StorageUtils cannot access class sun.nio.ch.DirectBuffer, but that question (and solution) was only about... | https://stackoverflow.com/questions/73465937/apache-spark-3-3-0-breaks-on-java-17-with-cannot-access-class-sun-nio-ch-direct | java, apache-spark, java-17 | 1,661,297,423 |
se_79935775 | stackoverflow | DATA_ENGINEERING | Access non-Iceberg Glue tables cross-account from Spark (Glue job) using AssumeRole | Access non-Iceberg Glue tables cross-account from Spark (Glue job) using AssumeRole
I have a Glue Catalog in Account B containing multiple tables: some are Iceberg, some are standard (non-Iceberg / Hive / external)
I run a Glue Spark job in Account A with RoleA, and I need to access that catalog using AssumeRole → Rol... | https://stackoverflow.com/questions/79935775/access-non-iceberg-glue-tables-cross-account-from-spark-glue-job-using-assumer | python, apache-spark, hive, amazon-iam | 1,777,889,345 |
se_79929239 | stackoverflow | DATA_ENGINEERING | Efficient Spark Strategy for Joining 1.5M Accounts Across Two Systems of Record | Efficient Spark Strategy for Joining 1.5M Accounts Across Two Systems of Record
I'm building a PySpark pipeline to retrieve account-specific transactions from two different Systems of Record (SOR):
SOR-A (Teradata): Contains ~1.5 million account IDs that need transactions
SOR-B (Teradata): Contains the transaction d... | https://stackoverflow.com/questions/79929239/efficient-spark-strategy-for-joining-1-5m-accounts-across-two-systems-of-record | apache-spark | 1,776,754,314 |
se_72062510 | stackoverflow | DATA_ENGINEERING | How can I stop seeing JVM Full Thread dumps in my AWS EMR Spark job stdout logs? | How can I stop seeing JVM Full Thread dumps in my AWS EMR Spark job stdout logs?
I have PySpark jobs running in AWS EMR. Recently, I upgraded (AWS EMR 6.4, Spark 3.1.2) and switched to running the job in a docker container. Ever since, there are sporadic thread dumps in the stdout logs that start with Full thread dump... | https://stackoverflow.com/questions/72062510/how-can-i-stop-seeing-jvm-full-thread-dumps-in-my-aws-emr-spark-job-stdout-logs | java, apache-spark, jvm, amazon-emr, thread-dump | 1,651,258,169 |
se_58307765 | stackoverflow | DATA_ENGINEERING | Databricks notebook detaches in standard cluster mode | Databricks notebook detaches in standard cluster mode
EDIT: Update. This happens regardless of the number of users. Even with one user, it still happens.
The databricks notebook is repeatedly detaching while in use.
Our data scientist comes from a Jupyter background, and since Koalas has some gaps, he's continued to... | https://stackoverflow.com/questions/58307765/databricks-notebook-detaches-in-standard-cluster-mode | apache-spark, databricks, azure-databricks | 1,570,635,766 |
se_46084158 | stackoverflow | DATA_ENGINEERING | How can you parse a string that is json from an existing temp table using PySpark? | How can you parse a string that is json from an existing temp table using PySpark?
I have an existing Spark dataframe that has columns as such:
--------------------
pid | response
--------------------
12 | {"status":"200"}
response is a string column.
Is there a way to cast it into JSON and extract specific fields... | https://stackoverflow.com/questions/46084158/how-can-you-parse-a-string-that-is-json-from-an-existing-temp-table-using-pyspar | apache-spark, pyspark, apache-spark-sql | 1,504,731,196 |
se_79926107 | stackoverflow | DATA_ENGINEERING | H3 cells are duplicated across timezone polygons | H3 cells are duplicated across timezone polygons
I am trying to produce a dataset that maps H3 resolution 6 cells to timezones, so I can more quickly produce local date-time entries for a geospatial/temporal dataset via an H3 to H3 join, rather than a geospatial join (e.g., contains). I am using Apache Spark and Sedon... | https://stackoverflow.com/questions/79926107/h3-cells-are-duplicated-across-timezone-polygons | apache-spark, pyspark, timezone, h3, apache-sedona | 1,776,264,497 |
se_42986645 | stackoverflow | DATA_ENGINEERING | Running Spark-Shell on Windows | Running Spark-Shell on Windows
I have downloaded spark, sbt, scala, and git onto my Windows computer. When I try and run spark-shell in my command prompt, I get "Failed to find Spark assembly JAR. You need to build Spark with sbt\sbt assembly before running this program."
I tried to follow this guide: https://x86x64... | https://stackoverflow.com/questions/42986645/running-spark-shell-on-windows | windows, scala, apache-spark | 1,490,302,005 |
se_58640218 | stackoverflow | DATA_ENGINEERING | Databricks Spark: java.lang.OutOfMemoryError: GC overhead limit exceeded i | Databricks Spark: java.lang.OutOfMemoryError: GC overhead limit exceeded i
I am executing a Spark job in Databricks cluster. I am triggering the job via a Azure Data Factory pipeline and it execute at 15 minute interval so after the successful execution of three or four times it is getting failed and throwing with the... | https://stackoverflow.com/questions/58640218/databricks-spark-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-i | apache-spark, databricks, azure-databricks | 1,572,513,993 |
se_55178462 | stackoverflow | DATA_ENGINEERING | How to solve analysis exception error in Pyspark | How to solve analysis exception error in Pyspark
I got an error in Pyspark:
AnalysisException: u'Resolved attribute(s) week#5230 missing from
longitude#4976,address#4982,minute#4986,azimuth#4977,province#4979,
action_type#4972,user_id#4969,week#2548,month#4989,postcode#4983,location#4981
in operator !Aggregate [user_... | https://stackoverflow.com/questions/55178462/how-to-solve-analysis-exception-error-in-pyspark | apache-spark, pyspark, apache-spark-sql | 1,552,638,668 |
se_69193769 | stackoverflow | DATA_ENGINEERING | How to specify primary key constraints when creating a Delta table | How to specify primary key constraints when creating a Delta table
I am using something like this to create a dataframe. I then save it in a delta table using something like the following.
diamonds_with_schema.write.format("delta").saveAsTable(saveLocation)
My question is how can I make a column as primary key. Also,... | https://stackoverflow.com/questions/69193769/how-to-specify-primary-key-constraints-when-creating-a-delta-table | sql, apache-spark, pyspark, databricks, delta-lake | 1,631,711,194 |
se_45140822 | stackoverflow | DATA_ENGINEERING | Run spark program locally with intellij | Run spark program locally with intellij
I tried to run a simple test code in intellij IDEA. Here is my code:
import org.apache.spark.sql.functions._
import org.apache.spark.{SparkConf}
import org.apache.spark.sql.{DataFrame, SparkSession}
object hbasetest {
val spconf = new SparkConf()
val spark = SparkSession.... | https://stackoverflow.com/questions/45140822/run-spark-program-locally-with-intellij | apache-spark, intellij-idea | 1,500,284,566 |
se_55124814 | stackoverflow | DATA_ENGINEERING | Will not attempt to authenticate using SASL (unknown error) | Will not attempt to authenticate using SASL (unknown error)
I try to query data from Solr through Spark. I have a problem with ZooKeeper connection. I have started solr as follows:
solr start (not solr cloud) and also zkserver on another cmd.
Please have a look at my code:
object solr extends App {
val zkHost = ... | https://stackoverflow.com/questions/55124814/will-not-attempt-to-authenticate-using-sasl-unknown-error | scala, apache-spark, solr | 1,552,403,414 |
se_79931502 | stackoverflow | DATA_ENGINEERING | Spark changing date values (showing 0800-xx-xx) when inserting from one table to another | Spark changing date values (showing 0800-xx-xx) when inserting from one table to another
I am facing an issue in Spark where date values are getting changed when I insert data from one table into another.
I am inserting data like this:
INSERT INTO target_table
SELECT * FROM source_table;
The source table has correct ... | https://stackoverflow.com/questions/79931502/spark-changing-date-values-showing-0800-xx-xx-when-inserting-from-one-table-to | apache-spark | 1,777,055,921 |
se_55494154 | stackoverflow | DATA_ENGINEERING | How to fix org.apache.spark.SparkException: Job aborted due to stage failure Task & com.datastax.spark.connector.rdd.partitioner.CassandraPartition | How to fix org.apache.spark.SparkException: Job aborted due to stage failure Task & com.datastax.spark.connector.rdd.partitioner.CassandraPartition
In my project i am using spark-Cassandra-connector to read the from Cassandra table and process it further into JavaRDD but i am facing issue while processing Cassandr... | https://stackoverflow.com/questions/55494154/how-to-fix-org-apache-spark-sparkexception-job-aborted-due-to-stage-failure-tas | java, spring-boot, apache-spark, cassandra, spark-cassandra-connector | 1,554,291,170 |
se_79900811 | stackoverflow | DATA_ENGINEERING | Recomputation of common stages across multiple actionless branches in Spark | Recomputation of common stages across multiple actionless branches in Spark
My team has been working in a Spark process that reads one (of many tables) and does divergently steps with subsets of that table (after some preprocess).
Common trunk looks like this:
Read & Filter 1
Read & Filter 2
Union 1 and 2 my name (th... | https://stackoverflow.com/questions/79900811/recomputation-of-common-stages-across-multiple-actionless-branches-in-spark | dataframe, apache-spark, pyspark, bigdata, scala-spark | 1,772,625,395 |
se_73136810 | stackoverflow | DATA_ENGINEERING | Make Spark run faster when run locally, for training purposes | Make Spark run faster when run locally, for training purposes
My team builds and maintains an API built on top of PySpark SQL. It is meant for production use cases, and does a good job at scaling to large data on clusters. We can also run it locally, which is useful for development, testing, and training people via in... | https://stackoverflow.com/questions/73136810/make-spark-run-faster-when-run-locally-for-training-purposes | performance, apache-spark, pyspark, apache-spark-sql | 1,658,919,934 |
se_58152882 | stackoverflow | DATA_ENGINEERING | Spark SparkOutOfMemoryError despite having each task memory greater than input | Spark SparkOutOfMemoryError despite having each task memory greater than input
I am using 10 r4.8xlarge with 32 codes and 244 GB memory and 100GB SSD my input is 100 22GB txt files.
Below is my executor parameters
--num-executors 59 --executor-cores 5 --executor-memory 37g
I put executor-cores 5 because it seems... | https://stackoverflow.com/questions/58152882/spark-sparkoutofmemoryerror-despite-having-each-task-memory-greater-than-input | scala, apache-spark | 1,569,738,891 |
se_38635381 | stackoverflow | DATA_ENGINEERING | How to manually commit offset in Spark Kafka direct streaming? | How to manually commit offset in Spark Kafka direct streaming?
I looked around hard but didn't find a satisfactory answer to this. Maybe I'm missing something. Please help.
We have a Spark streaming application consuming a Kafka topic, which needs to ensure end-to-end processing before advancing Kafka offsets, e.g. u... | https://stackoverflow.com/questions/38635381/how-to-manually-commit-offset-in-spark-kafka-direct-streaming | apache-spark, apache-kafka | 1,469,706,225 |
se_62551905 | stackoverflow | DATA_ENGINEERING | Output column already exists error when fit with pipeline PySpark | Output column already exists error when fit with pipeline PySpark
I'm trying to create a pipeline in PySpark in order to prepare my data for Random Forest. I'm using Spark 2.2 (2.2.0.2.6.4.0-91).
My data contains no null values. I identified the categorical columns and numerical columns.
I'm encoding categorical colum... | https://stackoverflow.com/questions/62551905/output-column-already-exists-error-when-fit-with-pipeline-pyspark | apache-spark, machine-learning, pyspark, one-hot-encoding | 1,592,991,114 |
se_51275558 | stackoverflow | DATA_ENGINEERING | Py4JJavaError: Using Pyspark in Jupyter notebook trying to run examples using "spark." | Py4JJavaError: Using Pyspark in Jupyter notebook trying to run examples using "spark."
I'm trying to run the examples (for example spark/examples/src/main/python/ml/fpgrowth_example.py) for PySpark in Jupyter notebook. However, I am getting exceptions any time I try to do "spark.(some function)" In the case ... | https://stackoverflow.com/questions/51275558/py4jjavaerror-using-pyspark-in-jupyter-notebook-trying-to-run-examples-using-s | python, apache-spark, pyspark, jupyter-notebook | 1,531,268,364 |
se_79864128 | stackoverflow | DATA_ENGINEERING | Spark Declarative Pipelines (SDP) – TABLE_OR_VIEW_NOT_FOUND for upstream table even though it is defined | Spark Declarative Pipelines (SDP) – TABLE_OR_VIEW_NOT_FOUND for upstream table even though it is defined
I am trying to learn Spark Declarative Pipelines (Spark 4.0 / pyspark.pipelines) locally using the spark-pipelines CLI.
I have a simple Bronze → Silver → Gold pipeline, but I keep getting:
pyspark.errors.exception... | https://stackoverflow.com/questions/79864128/spark-declarative-pipelines-sdp-table-or-view-not-found-for-upstream-table-e | python, apache-spark, pyspark, declarative-programming | 1,767,952,559 |
se_68687170 | stackoverflow | DATA_ENGINEERING | spark worker cannot connect to master | spark worker cannot connect to master
My spark worker cannot connect to master. I've tried:
adding spark-env.sh like some answers I found, set SPARK_MASTER_HOST=IP
restarted both the master and worker
None of them worked.
Here's what I did:
start spark master
starting org.apache.spark.deploy.master.Master, logging t... | https://stackoverflow.com/questions/68687170/spark-worker-cannot-connect-to-master | java, apache-spark | 1,628,281,721 |
se_24622108 | stackoverflow | DATA_ENGINEERING | Apache Spark: The number of cores vs. the number of executors | Apache Spark: The number of cores vs. the number of executors
I'm trying to understand the relationship of the number of cores and the number of executors when running a Spark job on YARN.
The test environment is as follows:
Number of data nodes: 3
Data node machine spec:
CPU: Core i7-4790 (# of cores: 4, # of th... | https://stackoverflow.com/questions/24622108/apache-spark-the-number-of-cores-vs-the-number-of-executors | hadoop, apache-spark, hadoop-yarn | 1,404,780,411 |
se_79917977 | stackoverflow | DATA_ENGINEERING | Spark SQL MERGE/INSERT on Iceberg Recomputes Upstream Join Instead of Reusing Cached DataFrame (MEMORY_AND_DISK) | Spark SQL MERGE/INSERT on Iceberg Recomputes Upstream Join Instead of Reusing Cached DataFrame (MEMORY_AND_DISK)
Spark SQL + Iceberg: MERGE and INSERT appear to ignore cached DataFrame and re-scan source
I am trying to optimize an SCD2 flow in Spark SQL (Python API) using a cached intermediate DataFrame.
Environment
... | https://stackoverflow.com/questions/79917977/spark-sql-merge-insert-on-iceberg-recomputes-upstream-join-instead-of-reusing-ca | python, apache-spark, pyspark, caching, apache-iceberg | 1,774,982,632 |
se_28192201 | stackoverflow | DATA_ENGINEERING | Spark driver program launching in `cluster` mode failed in a weird way | Spark driver program launching in `cluster` mode failed in a weird way
I'm new to Spark. Now I encountered a problem: when I launch a program in a standalone spark cluster while command line:
./spark-submit --class scratch.Pi --deploy-mode cluster --executor-memory 5g --name pi --driver-memory 5g --driver-java-option... | https://stackoverflow.com/questions/28192201/spark-driver-program-launching-in-cluster-mode-failed-in-a-weird-way | apache-spark | 1,422,447,923 |
se_74078619 | stackoverflow | DATA_ENGINEERING | Read data from Oracle DB through Spark (pySpark) | Read data from Oracle DB through Spark (pySpark)
I am trying to read the data using pySpark and writing on to HDFS from Oracle Database. I am trying two different methods:
Method 1: Using simple plain query with no numPartitions and related parameter.
query = "(select * from table_name where eff_dt between '01SEP2022'... | https://stackoverflow.com/questions/74078619/read-data-from-oracle-db-through-spark-pyspark | python, oracle-database, apache-spark, pyspark, apache-spark-sql | 1,665,829,555 |
se_79893765 | stackoverflow | DATA_ENGINEERING | Registering Partition Information to Glue Iceberg Tables | Registering Partition Information to Glue Iceberg Tables
I am creating Glue Iceberg tables using Spark on EMR. After creation, I also write a few records to the table. However, when I do this, Spark does not register any partition information in Glue table metadata.
As I understand, when we use hive, during writes, sp... | https://stackoverflow.com/questions/79893765/registering-partition-information-to-glue-iceberg-tables | amazon-web-services, apache-spark, aws-glue, apache-iceberg | 1,771,718,744 |
se_79882953 | stackoverflow | DATA_ENGINEERING | CONVERT TO DELTA fails to merge file schema | CONVERT TO DELTA fails to merge file schema
This is in Azure Databricks.
I have a directory of Parquet files in Azure Data Lake Storage that I want to convert to a Delta Lake table. I run this:
CONVERT TO DELTA parquet.`abfss://container@storage_account.dfs.core.windows.net/directory_name`;
But it throws this error:
... | https://stackoverflow.com/questions/79882953/convert-to-delta-fails-to-merge-file-schema | apache-spark, databricks, parquet, delta-lake, databricks-sql | 1,770,225,689 |
se_78065483 | stackoverflow | DATA_ENGINEERING | Py4JJavaError: An error occurred while calling t.addCustomDisplayData | Py4JJavaError: An error occurred while calling t.addCustomDisplayData
What am i doing wrong here?
df = ( spark.read .format('kafka')
.option('kafka.bootstrap.servers', BOOTSTRAP_SERVER)
.option('kafka.security.protocol','SASL_SSL')
.option('kafka.sasl.mechanism','PLAIN')
.option('kafka.sasl.jaas.config', f"{JAAS_M... | https://stackoverflow.com/questions/78065483/py4jjavaerror-an-error-occurred-while-calling-t-addcustomdisplaydata | apache-spark, pyspark, apache-kafka, azure-databricks, kafka-consumer-api | 1,709,014,764 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.