Idea hits the spark jar package and submits it to the spark cluster to run

Pack

Package file:
File-->>ProjectStructure -->Click Artificats-->>Click the green plus sign-->Click JAR-->>Select From module with dependices 

 


Click Output Layout to see if there is no third-party jar package, because you use the spark cluster environment, so you don't need a third-party jar package


 


重新build:
Build-->>Build Artifcat ..--->>build 或者rebuild


 


 


 

Submit to run

./bin/spark-submit  --class "sparkStreaming.workCount" --master local[4]  /usr/local/spark_jar/wordCount.jar

After --class is the main function when you package it

Finally, the location where you put the jar package, this location can be any location

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324853106&siteId=291194637