本地模式极大简化了我们的测试步骤
其实很简单,如下:
package wordcount
import org.apache.spark.{SparkConf, SparkContext}
object ForeachDemo {
def main(args: Array[String]): Unit = {
/*local[2]表示启动本地二个进程,local一个进程*/
val conf=new SparkConf().setAppName("ForeachDemo").setMaster("local")
val sc=new SparkContext(conf)
val rdd=sc.parallelize(List(1,2,3,4,5,6,7,8,9),3)
rdd.foreach(println(_))
sc.stop()
}
}
4.0.0
cn.yzx.wordcount
wordcount
1.0-SNAPSHOT
1.7
1.7
UTF-8
2.10.6
1.6.1
2.6.4
org.scala-lang
scala-library
${scala.version}
org.apache.spark
spark-core_2.10
${spark.version}
org.apache.hadoop
hadoop-client
${hadoop.version}
src/main/scala
src/test/scala
net.alchim31.maven
scala-maven-plugin
3.2.2
compile
testCompile
-make:transitive
-dependencyfile
${project.build.directory}/.scala_dependencies
org.apache.maven.plugins
maven-shade-plugin
2.4.3
package
shade
*:*
META-INF/*.SF
META-INF/*.DSA
META-INF/*.RSA
cn.yzx.WordCount
D:\jdk1.8\bin\java "-javaagent:G:\yzx\Scala\IDEA-2017-2-1_install\IntelliJ IDEA Community Edition 2017.2.1\lib\idea_rt.jar=43930:G:\yzx\Scala\IDEA-2017-2-1_install\IntelliJ IDEA Community Edition 2017.2.1\bin" -Dfile.encoding=UTF-8 -classpath D:\jdk1.8\jre\lib\charsets.jar;D:\jdk1.8\jre\lib\deploy.jar;D:\jdk1.8\jre\lib\ext\access-bridge-64.jar;D:\jdk1.8\jre\lib\ext\cldrdata.jar;D:\jdk1.8\jre\lib\ext\dnsns.jar;D:\jdk1.8\jre\lib\ext\jaccess.jar;D:\jdk1.8\jre\lib\ext\jfxrt.jar;D:\jdk1.8\jre\lib\ext\localedata.jar;D:\jdk1.8\jre\lib\ext\nashorn.jar;D:\jdk1.8\jre\lib\ext\sunec.jar;D:\jdk1.8\jre\lib\ext\sunjce_provider.jar;D:\jdk1.8\jre\lib\ext\sunmscapi.jar;D:\jdk1.8\jre\lib\ext\sunpkcs11.jar;D:\jdk1.8\jre\lib\ext\zipfs.jar;D:\jdk1.8\jre\lib\javaws.jar;D:\jdk1.8\jre\lib\jce.jar;D:\jdk1.8\jre\lib\jfr.jar;D:\jdk1.8\jre\lib\jfxswt.jar;D:\jdk1.8\jre\lib\jsse.jar;D:\jdk1.8\jre\lib\management-agent.jar;D:\jdk1.8\jre\lib\plugin.jar;D:\jdk1.8\jre\lib\resources.jar;D:\jdk1.8\jre\lib\rt.jar;G:\yzx\Scala\Wordcount\target\classes;C:\Users\admin\.m2\repository\org\scala-lang\scala-library\2.10.6\scala-library-2.10.6.jar;C:\Users\admin\.m2\repository\org\apache\spark\spark-core_2.10\1.6.1\spark-core_2.10-1.6.1.jar;C:\Users\admin\.m2\repository\org\apache\avro\avro-mapred\1.7.7\avro-mapred-1.7.7-hadoop2.jar;C:\Users\admin\.m2\repository\org\apache\avro\avro-ipc\1.7.7\avro-ipc-1.7.7.jar;C:\Users\admin\.m2\repository\org\apache\avro\avro-ipc\1.7.7\avro-ipc-1.7.7-tests.jar;C:\Users\admin\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;C:\Users\admin\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;C:\Users\admin\.m2\repository\com\twitter\chill_2.10\0.5.0\chill_2.10-0.5.0.jar;C:\Users\admin\.m2\repository\com\esotericsoftware\kryo\kryo\2.21\kryo-2.21.jar;C:\Users\admin\.m2\repository\com\esotericsoftware\reflectasm\reflectasm\1.07\reflectasm-1.07-shaded.jar;C:\Users\admin\.m2\repository\com\esotericsoftware\minlog\minlog\1.2\minlog-1.2.jar;C:\Users\admin\.m2\repository\org\objenesis\objenesis\1.2\objenesis-1.2.jar;C:\Users\admin\.m2\repository\com\twitter\chill-java\0.5.0\chill-java-0.5.0.jar;C:\Users\admin\.m2\repository\org\apache\xbean\xbean-asm5-shaded\4.4\xbean-asm5-shaded-4.4.jar;C:\Users\admin\.m2\repository\org\apache\spark\spark-launcher_2.10\1.6.1\spark-launcher_2.10-1.6.1.jar;C:\Users\admin\.m2\repository\org\apache\spark\spark-network-common_2.10\1.6.1\spark-network-common_2.10-1.6.1.jar;C:\Users\admin\.m2\repository\org\apache\spark\spark-network-shuffle_2.10\1.6.1\spark-network-shuffle_2.10-1.6.1.jar;C:\Users\admin\.m2\repository\org\fusesource\leveldbjni\leveldbjni-all\1.8\leveldbjni-all-1.8.jar;C:\Users\admin\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.4.4\jackson-annotations-2.4.4.jar;C:\Users\admin\.m2\repository\org\apache\spark\spark-unsafe_2.10\1.6.1\spark-unsafe_2.10-1.6.1.jar;C:\Users\admin\.m2\repository\net\java\dev\jets3t\jets3t\0.7.1\jets3t-0.7.1.jar;C:\Users\admin\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;C:\Users\admin\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\admin\.m2\repository\org\apache\curator\curator-recipes\2.4.0\curator-recipes-2.4.0.jar;C:\Users\admin\.m2\repository\org\apache\curator\curator-framework\2.4.0\curator-framework-2.4.0.jar;C:\Users\admin\.m2\repository\org\apache\zookeeper\zookeeper\3.4.5\zookeeper-3.4.5.jar;C:\Users\admin\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;C:\Users\admin\.m2\repository\com\google\guava\guava\14.0.1\guava-14.0.1.jar;C:\Users\admin\.m2\repository\org\eclipse\jetty\orbit\javax.servlet\3.0.0.v201112011016\javax.servlet-3.0.0.v201112011016.jar;C:\Users\admin\.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\admin\.m2\repository\org\apache\commons\commons-math3\3.4.1\commons-math3-3.4.1.jar;C:\Users\admin\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\admin\.m2\repository\org\slf4j\slf4j-api\1.7.10\slf4j-api-1.7.10.jar;C:\Users\admin\.m2\repository\org\slf4j\jul-to-slf4j\1.7.10\jul-to-slf4j-1.7.10.jar;C:\Users\admin\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.10\jcl-over-slf4j-1.7.10.jar;C:\Users\admin\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\admin\.m2\repository\org\slf4j\slf4j-log4j12\1.7.10\slf4j-log4j12-1.7.10.jar;C:\Users\admin\.m2\repository\com\ning\compress-lzf\1.0.3\compress-lzf-1.0.3.jar;C:\Users\admin\.m2\repository\org\xerial\snappy\snappy-java\1.1.2\snappy-java-1.1.2.jar;C:\Users\admin\.m2\repository\net\jpountz\lz4\lz4\1.3.0\lz4-1.3.0.jar;C:\Users\admin\.m2\repository\org\roaringbitmap\RoaringBitmap\0.5.11\RoaringBitmap-0.5.11.jar;C:\Users\admin\.m2\repository\commons-net\commons-net\2.2\commons-net-2.2.jar;C:\Users\admin\.m2\repository\com\typesafe\akka\akka-remote_2.10\2.3.11\akka-remote_2.10-2.3.11.jar;C:\Users\admin\.m2\repository\com\typesafe\akka\akka-actor_2.10\2.3.11\akka-actor_2.10-2.3.11.jar;C:\Users\admin\.m2\repository\com\typesafe\config\1.2.1\config-1.2.1.jar;C:\Users\admin\.m2\repository\io\netty\netty\3.8.0.Final\netty-3.8.0.Final.jar;C:\Users\admin\.m2\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;C:\Users\admin\.m2\repository\org\uncommons\maths\uncommons-maths\1.2.2a\uncommons-maths-1.2.2a.jar;C:\Users\admin\.m2\repository\com\typesafe\akka\akka-slf4j_2.10\2.3.11\akka-slf4j_2.10-2.3.11.jar;C:\Users\admin\.m2\repository\org\json4s\json4s-jackson_2.10\3.2.10\json4s-jackson_2.10-3.2.10.jar;C:\Users\admin\.m2\repository\org\json4s\json4s-core_2.10\3.2.10\json4s-core_2.10-3.2.10.jar;C:\Users\admin\.m2\repository\org\json4s\json4s-ast_2.10\3.2.10\json4s-ast_2.10-3.2.10.jar;C:\Users\admin\.m2\repository\org\scala-lang\scalap\2.10.0\scalap-2.10.0.jar;C:\Users\admin\.m2\repository\org\scala-lang\scala-compiler\2.10.0\scala-compiler-2.10.0.jar;C:\Users\admin\.m2\repository\com\sun\jersey\jersey-server\1.9\jersey-server-1.9.jar;C:\Users\admin\.m2\repository\asm\asm\3.1\asm-3.1.jar;C:\Users\admin\.m2\repository\com\sun\jersey\jersey-core\1.9\jersey-core-1.9.jar;C:\Users\admin\.m2\repository\org\apache\mesos\mesos\0.21.1\mesos-0.21.1-shaded-protobuf.jar;C:\Users\admin\.m2\repository\io\netty\netty-all\4.0.29.Final\netty-all-4.0.29.Final.jar;C:\Users\admin\.m2\repository\com\clearspring\analytics\stream\2.7.0\stream-2.7.0.jar;C:\Users\admin\.m2\repository\io\dropwizard\metrics\metrics-core\3.1.2\metrics-core-3.1.2.jar;C:\Users\admin\.m2\repository\io\dropwizard\metrics\metrics-jvm\3.1.2\metrics-jvm-3.1.2.jar;C:\Users\admin\.m2\repository\io\dropwizard\metrics\metrics-json\3.1.2\metrics-json-3.1.2.jar;C:\Users\admin\.m2\repository\io\dropwizard\metrics\metrics-graphite\3.1.2\metrics-graphite-3.1.2.jar;C:\Users\admin\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.4.4\jackson-databind-2.4.4.jar;C:\Users\admin\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.4.4\jackson-core-2.4.4.jar;C:\Users\admin\.m2\repository\com\fasterxml\jackson\module\jackson-module-scala_2.10\2.4.4\jackson-module-scala_2.10-2.4.4.jar;C:\Users\admin\.m2\repository\org\scala-lang\scala-reflect\2.10.4\scala-reflect-2.10.4.jar;C:\Users\admin\.m2\repository\com\thoughtworks\paranamer\paranamer\2.6\paranamer-2.6.jar;C:\Users\admin\.m2\repository\org\apache\ivy\ivy\2.4.0\ivy-2.4.0.jar;C:\Users\admin\.m2\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\Users\admin\.m2\repository\org\tachyonproject\tachyon-client\0.8.2\tachyon-client-0.8.2.jar;C:\Users\admin\.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;C:\Users\admin\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\admin\.m2\repository\org\tachyonproject\tachyon-underfs-hdfs\0.8.2\tachyon-underfs-hdfs-0.8.2.jar;C:\Users\admin\.m2\repository\org\tachyonproject\tachyon-underfs-s3\0.8.2\tachyon-underfs-s3-0.8.2.jar;C:\Users\admin\.m2\repository\org\tachyonproject\tachyon-underfs-local\0.8.2\tachyon-underfs-local-0.8.2.jar;C:\Users\admin\.m2\repository\net\razorvine\pyrolite\4.9\pyrolite-4.9.jar;C:\Users\admin\.m2\repository\net\sf\py4j\py4j\0.9\py4j-0.9.jar;C:\Users\admin\.m2\repository\org\spark-project\spark\unused\1.0.0\unused-1.0.0.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-client\2.6.4\hadoop-client-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-common\2.6.4\hadoop-common-2.6.4.jar;C:\Users\admin\.m2\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;C:\Users\admin\.m2\repository\xmlenc\xmlenc\0.52\xmlenc-0.52.jar;C:\Users\admin\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\admin\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\admin\.m2\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;C:\Users\admin\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\Users\admin\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;C:\Users\admin\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;C:\Users\admin\.m2\repository\org\apache\avro\avro\1.7.4\avro-1.7.4.jar;C:\Users\admin\.m2\repository\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-auth\2.6.4\hadoop-auth-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\httpcomponents\httpclient\4.2.5\httpclient-4.2.5.jar;C:\Users\admin\.m2\repository\org\apache\httpcomponents\httpcore\4.2.4\httpcore-4.2.4.jar;C:\Users\admin\.m2\repository\org\apache\directory\server\apacheds-kerberos-codec\2.0.0-M15\apacheds-kerberos-codec-2.0.0-M15.jar;C:\Users\admin\.m2\repository\org\apache\directory\server\apacheds-i18n\2.0.0-M15\apacheds-i18n-2.0.0-M15.jar;C:\Users\admin\.m2\repository\org\apache\directory\api\api-asn1-api\1.0.0-M20\api-asn1-api-1.0.0-M20.jar;C:\Users\admin\.m2\repository\org\apache\directory\api\api-util\1.0.0-M20\api-util-1.0.0-M20.jar;C:\Users\admin\.m2\repository\org\apache\curator\curator-client\2.6.0\curator-client-2.6.0.jar;C:\Users\admin\.m2\repository\org\htrace\htrace-core\3.0.4\htrace-core-3.0.4.jar;C:\Users\admin\.m2\repository\org\apache\commons\commons-compress\1.4.1\commons-compress-1.4.1.jar;C:\Users\admin\.m2\repository\org\tukaani\xz\1.0\xz-1.0.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-hdfs\2.6.4\hadoop-hdfs-2.6.4.jar;C:\Users\admin\.m2\repository\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;C:\Users\admin\.m2\repository\xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar;C:\Users\admin\.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-app\2.6.4\hadoop-mapreduce-client-app-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-common\2.6.4\hadoop-mapreduce-client-common-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-yarn-client\2.6.4\hadoop-yarn-client-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-yarn-server-common\2.6.4\hadoop-yarn-server-common-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-shuffle\2.6.4\hadoop-mapreduce-client-shuffle-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-yarn-api\2.6.4\hadoop-yarn-api-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-core\2.6.4\hadoop-mapreduce-client-core-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-yarn-common\2.6.4\hadoop-yarn-common-2.6.4.jar;C:\Users\admin\.m2\repository\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;C:\Users\admin\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\admin\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\admin\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Users\admin\.m2\repository\com\sun\jersey\jersey-client\1.9\jersey-client-1.9.jar;C:\Users\admin\.m2\repository\org\codehaus\jackson\jackson-jaxrs\1.9.13\jackson-jaxrs-1.9.13.jar;C:\Users\admin\.m2\repository\org\codehaus\jackson\jackson-xc\1.9.13\jackson-xc-1.9.13.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-mapreduce-client-jobclient\2.6.4\hadoop-mapreduce-client-jobclient-2.6.4.jar;C:\Users\admin\.m2\repository\org\apache\hadoop\hadoop-annotations\2.6.4\hadoop-annotations-2.6.4.jar wordcount.ForeachDemo
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
17/08/23 23:08:31 INFO SparkContext: Running Spark version 1.6.1
17/08/23 23:08:32 INFO SecurityManager: Changing view acls to: admin
17/08/23 23:08:32 INFO SecurityManager: Changing modify acls to: admin
17/08/23 23:08:32 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(admin); users with modify permissions: Set(admin)
17/08/23 23:08:34 INFO Utils: Successfully started service 'sparkDriver' on port 43953.
17/08/23 23:08:34 INFO Slf4jLogger: Slf4jLogger started
17/08/23 23:08:34 INFO Remoting: Starting remoting
17/08/23 23:08:35 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://[email protected]:43967]
17/08/23 23:08:35 INFO Utils: Successfully started service 'sparkDriverActorSystem' on port 43967.
17/08/23 23:08:35 INFO SparkEnv: Registering MapOutputTracker
17/08/23 23:08:35 INFO SparkEnv: Registering BlockManagerMaster
17/08/23 23:08:35 INFO DiskBlockManager: Created local directory at C:\Users\admin\AppData\Local\Temp\blockmgr-6279ac88-3d88-4f46-a6fb-dc372d3c6d5f
17/08/23 23:08:35 INFO MemoryStore: MemoryStore started with capacity 1087.1 MB
17/08/23 23:08:35 INFO SparkEnv: Registering OutputCommitCoordinator
17/08/23 23:08:36 INFO Utils: Successfully started service 'SparkUI' on port 4040.
17/08/23 23:08:36 INFO SparkUI: Started SparkUI at http://192.168.8.199:4040
17/08/23 23:08:36 INFO Executor: Starting executor ID driver on host localhost
17/08/23 23:08:36 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 43974.
17/08/23 23:08:36 INFO NettyBlockTransferService: Server created on 43974
17/08/23 23:08:36 INFO BlockManagerMaster: Trying to register BlockManager
17/08/23 23:08:36 INFO BlockManagerMasterEndpoint: Registering block manager localhost:43974 with 1087.1 MB RAM, BlockManagerId(driver, localhost, 43974)
17/08/23 23:08:36 INFO BlockManagerMaster: Registered BlockManager
17/08/23 23:08:37 INFO SparkContext: Starting job: foreach at ForeachDemo.scala:11
17/08/23 23:08:37 INFO DAGScheduler: Got job 0 (foreach at ForeachDemo.scala:11) with 3 output partitions
17/08/23 23:08:37 INFO DAGScheduler: Final stage: ResultStage 0 (foreach at ForeachDemo.scala:11)
17/08/23 23:08:37 INFO DAGScheduler: Parents of final stage: List()
17/08/23 23:08:37 INFO DAGScheduler: Missing parents: List()
17/08/23 23:08:37 INFO DAGScheduler: Submitting ResultStage 0 (ParallelCollectionRDD[0] at parallelize at ForeachDemo.scala:10), which has no missing parents
17/08/23 23:08:37 INFO MemoryStore: Block broadcast_0 stored as values in memory (estimated size 1184.0 B, free 1184.0 B)
17/08/23 23:08:37 INFO MemoryStore: Block broadcast_0_piece0 stored as bytes in memory (estimated size 864.0 B, free 2.0 KB)
17/08/23 23:08:37 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on localhost:43974 (size: 864.0 B, free: 1087.1 MB)
17/08/23 23:08:37 INFO SparkContext: Created broadcast 0 from broadcast at DAGScheduler.scala:1006
17/08/23 23:08:37 INFO DAGScheduler: Submitting 3 missing tasks from ResultStage 0 (ParallelCollectionRDD[0] at parallelize at ForeachDemo.scala:10)
17/08/23 23:08:37 INFO TaskSchedulerImpl: Adding task set 0.0 with 3 tasks
17/08/23 23:08:38 INFO TaskSetManager: Starting task 0.0 in stage 0.0 (TID 0, localhost, partition 0,PROCESS_LOCAL, 2030 bytes)
17/08/23 23:08:38 INFO Executor: Running task 0.0 in stage 0.0 (TID 0)
1
2
3
17/08/23 23:08:38 INFO Executor: Finished task 0.0 in stage 0.0 (TID 0). 915 bytes result sent to driver
17/08/23 23:08:38 INFO TaskSetManager: Starting task 1.0 in stage 0.0 (TID 1, localhost, partition 1,PROCESS_LOCAL, 2030 bytes)
17/08/23 23:08:38 INFO Executor: Running task 1.0 in stage 0.0 (TID 1)
4
5
6
17/08/23 23:08:38 INFO Executor: Finished task 1.0 in stage 0.0 (TID 1). 915 bytes result sent to driver
17/08/23 23:08:38 INFO TaskSetManager: Starting task 2.0 in stage 0.0 (TID 2, localhost, partition 2,PROCESS_LOCAL, 2030 bytes)
17/08/23 23:08:38 INFO Executor: Running task 2.0 in stage 0.0 (TID 2)
7
8
9
17/08/23 23:08:38 INFO Executor: Finished task 2.0 in stage 0.0 (TID 2). 915 bytes result sent to driver
17/08/23 23:08:38 INFO TaskSetManager: Finished task 1.0 in stage 0.0 (TID 1) in 30 ms on localhost (1/3)
17/08/23 23:08:38 INFO TaskSetManager: Finished task 2.0 in stage 0.0 (TID 2) in 24 ms on localhost (2/3)
17/08/23 23:08:38 INFO TaskSetManager: Finished task 0.0 in stage 0.0 (TID 0) in 141 ms on localhost (3/3)
17/08/23 23:08:38 INFO TaskSchedulerImpl: Removed TaskSet 0.0, whose tasks have all completed, from pool
17/08/23 23:08:38 INFO DAGScheduler: ResultStage 0 (foreach at ForeachDemo.scala:11) finished in 0.167 s
17/08/23 23:08:38 INFO DAGScheduler: Job 0 finished: foreach at ForeachDemo.scala:11, took 0.657865 s
17/08/23 23:08:38 INFO SparkUI: Stopped Spark web UI at http://192.168.8.199:4040
17/08/23 23:08:38 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
17/08/23 23:08:38 INFO MemoryStore: MemoryStore cleared
17/08/23 23:08:38 INFO BlockManager: BlockManager stopped
17/08/23 23:08:38 INFO BlockManagerMaster: BlockManagerMaster stopped
17/08/23 23:08:38 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
17/08/23 23:08:38 INFO SparkContext: Successfully stopped SparkContext
17/08/23 23:08:38 INFO RemoteActorRefProvider$RemotingTerminator: Shutting down remote daemon.
17/08/23 23:08:38 INFO RemoteActorRefProvider$RemotingTerminator: Remote daemon shut down; proceeding with flushing remote transports.
17/08/23 23:08:38 INFO ShutdownHookManager: Shutdown hook called
17/08/23 23:08:38 INFO ShutdownHookManager: Deleting directory C:\Users\admin\AppData\Local\Temp\spark-55bd74c6-d381-4b0f-a826-17bb9890d437
Process finished with exit code 0