Big Data
-
Dynamically Loading Spark Properties(--master)Big Data 2022. 3. 6. 23:14
intellij에서 spark application을 실행할 때, cluster master url을 VM Option "-Dspark.master=local"로 세팅하고, application 내에서는 cluster master url이 dynamically loading 되게끔 코딩한다. 좀 더 상세히 설명하면.. spark application을 제출(spark-sumit) 할 때, 해당 job이 수행되는 클러스터의 master url을 지정해준다. $spark-submit --class [class_name] --master [local, spark, mesos, yarn, k8s] ... 상세 참고 : https://spark.apache.org/docs/latest/submitting-appl..
-
spark - remote hive connectionBig Data 2020. 8. 11. 23:27
(production code는 아니고) 모델 개발 중에 remote hive의 데이터를 가져와 기존 데이터와 함께 처리해야 하는 경우가 있었다. 이 case를 해결할 수 있는 방법은 아래와 같다. 방법 1. remote hive(hadoop cluster)의 데이터를 기존 cluster로 ETL(distcp 등) 방법 2. remote hive connection 지금까지 방법 1로 cron tab 돌려서 사용하다가, 신규 data/table들이 생길 때마다 ETL job 만들어야 하는 단점이 있었다. (distcp는 remote hive/cluster 담당자와 협의가 필요하기도 해서 안 쓰고, remote hive 인증 계정으로 ETL job 만들어버림) 그래서 방법2로 변경하였다. spark에 hi..
-
spark2 thrift server 'Connection to STS still is not created'Big Data 2020. 4. 20. 21:16
spark2 thrift server에서 'Connection to STS still is not created'의 error case를 해결한 3시간 넘게 한 삽질의 기록이다. 다양한 case가 있겠지만, 이번 경우는 yarn.nodemanager.resource.memory-mb가 spark executor의 최소 (1024+384MB) size보다 작아서 발생한 것이다. 이 원인을 찾아낸 과정의 기록이다. -------- 예전에 HDP Cluster 구축 테스트 하느라고, local pc에 VM 3개에 띄우고, Cluster 구축한 환경이 있었다. 최근에 다시 필요해져서 VM 올리고 service들 다시 올려보니, thrift server가 계속 올라오지 않았다. Ambari 화면이다. task l..