Trying to create a table in Apache Spark gives the following error.
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
I have tried following the same steps as described here Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z, but with no luck.
I have downloaded Apache Spark 3.3.1 (spark-3.3.1-bin-hadoop3.tgz version) and the hadoop.dll file as well as the winutils.exe file from the 3.3.1/bin from https://github.com/kontext-tech/winutils.
I have added the environment variables. I have added the files to the system32 folder.
I have also tried it with Apache Spark 3.3.0.
But I still get the same error message. Not sure what else to do. Can there be some security setting that is blocking the files from working? I'm using a work computer after all.
EDIT: Some clarification
- I downloaded spark 3.3.1 (spark-3.3.1-bin-hadoop3.tgz) from the spark website. https://spark.apache.org/downloads.html
- I extracted the files into my C:\Spark folder.
- I downloaded the hadoop.dll file as well as the winutils.exe file from the 3.3.1/bin from https://github.com/kontext-tech/winutils I put these files into my C:\Hadoop\bin folder as well as the C:\Windows\system32 folder.
- I added the environmental variables HADOOP_HOME = C:\Hadoop and SPARK_HOME = C:\Spark as described in STEP 7 in https://phoenixnap.com/kb/install-spark-on-windows-10. I also added these variables to the path, i.e %SPARK_HOME%\bin and %HADOOP_HOME%\bin
- Restarted my computer.
'name := "Simple Project"
version := "1.0"
scalaVersion := "2.12.15"
libraryDependencies ++= Seq("org.apache.spark" %% "spark-sql" % "3.3.1", "io.delta" %% "delta-core" % "2.1.1")