Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spark cluster 에서 사용 불가 (local 로만 가능) #1

Open
maxmin93 opened this issue Jun 21, 2020 · 0 comments
Open

spark cluster 에서 사용 불가 (local 로만 가능) #1

maxmin93 opened this issue Jun 21, 2020 · 0 comments

Comments

@maxmin93
Copy link
Contributor

maxmin93 commented Jun 21, 2020

증상

spark.master=spark://:7077

스파크 마스터를 원격으로 붙어서 실행할 시, ES-HADOOP 의 데이터를 읽은 후 RDD 변환시 오류 발생

원인

spark rdd 를 처리하는 로직이 spark 안에 import 된 것이 아니라 바깥에서 구동하는 형태라, 원격의 cluster 구성에서는 처리가 안됨. (agenspop-spark-xxx.jar 파일을 Worker에 배포해도 마찬가지)

해결방법

현재로서는 "spark.master=local" 로 고정하고 사용하는 수 밖에 없음

향후 개선방향

neo4j-spark-connector 처럼 spark 처리 로직을 package 로 만들어 import 해야 함
==> Worker 로딩시 포함해서 올라가도록

이렇게 해야 cluster mode 에서도 작동 가능하고, spark-shell 등에서도 사용 가능해짐

참고

에러로그

  • vertex 와 edge 를 읽어오는 2단계 까지는 정상 수행
  • scala 모듈의 rdd 결과를 lazy loading 시키면서 ClassCastException 오류 발생
**esQuery => {"query":{"bool":{ "filter":{"term":{"datasource":"northwind"}}}}}
  ==> northwind[agensvertex].count = 1050
**esQuery => {"query":{"bool":{ "filter":{"term":{"datasource":"northwind"}}}}}
  ==> northwind[agensedge].count = 4807
20/06/21 14:02:31 ERROR TaskSetManager: Task 14 in stage 7.0 failed 4 times; 
aborting job
  - indegree ERROR ==> Job aborted due to stage failure: Task 14 in stage 7.0 
failed 4 times, most recent failure: Lost task 14.3 in stage 7.0 (TID 62, 
192.168.0.30, executor 0): java.lang.ClassCastException: cannot assign 
instance of scala.collection.immutable.List$SerializationProxy to field 
org.apache.spark.rdd.RDD.org$apache$spark$rdd$RDD$$dependencies_ of type 
scala.collection.Seq in instance of org.apache.spark.rdd.MapPartitionsRDD
@maxmin93 maxmin93 changed the title spark cluster 에서 사용 불가 (java.lang.ClassCastException) spark cluster 에서 사용 불가 (local 로만 가능) Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant