Submitting spring boot application jar to spark-submit

前端 未结 4 1773
野的像风
野的像风 2021-02-08 17:58

I am pretty new to spark, and i am trying to try out spark submit. I created an application in spring boot , used mvn package to create a jar . But when i am trying

4条回答
  •  长情又很酷
    2021-02-08 18:17

    We ran into the same problem, actually, on the same day you posted this. Our solutions was to use the shade plugin for maven to edit our build a bit. We found that when packaging with the spring-boot-maven plugin it nested our classes in BOOT-INF/classes which spark didn't like. I'll paste the relevant section so you can try it out on your own application -- good luck!

    
       
          
                org.apache.maven.plugins
                maven-shade-plugin
                
                    
                        org.springframework.boot
                        spring-boot-maven-plugin
                        ${spring-boot-version}
                    
                
                
                    false
                    false
                    
                        
                            *:*
                            
                                META-INF/*.SF
                                META-INF/*.DSA
                                META-INF/*.RSA
                            
                        
                    
                    
                        
                            META-INF/spring.handlers
                        
                        
                            META-INF/spring.factories
                        
                        
                            META-INF/spring.schemas
                        
                        
                        
                            ${start-class}
                        
                    
                
                
                    
                        package
                        
                            shade
                        
                    
                
            
        
    
    

提交回复
热议问题