Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
*참고 : http://sungsoo.github.io/2015/04/24/sparknotebook.html
1. spark-notebook.io에서 다운로드 받아 압축을 푼다.
(Build: | buildTime-Mon Oct 31 17:22:51 UTC 2016 | formattedShaVersion-0.7.0-c955e71d0204599035f603109527e679aa3bd570 | sbtVersion-0.13.8 | scalaVersion-2.11.8 | sparkNotebookVersion-0.7.0 | hadoopVersion-2.7.2 | jets3tVersion-0.7.1 | jlineDef-(jline,2.12) | sparkVersion-2.0.1 | withHive-true |.)
2. conf/밑에 있는 profiles을 아래와 같이 수정해준다.
(spark가 설치되어 있고 spark의 standalone모드로 사용하는 경우임)
3. ./bin/spark-notebook을 띄워준다.
4. http://localhost:9001로 접근하여 사용한다.
----------------------profiles
-bash-4.1$ vi profiles
{
"local" : {
"id" : "local",
"name" : "Local",
"template" : {
"customLocalRepo" : null,
"customRepos" : null,
"customDeps" : null,
"customImports" : null,
"customSparkConf" : {
"spark.app.name" : "Notebook",
"spark.master" : "local[8]",
"spark.executor.memory" : "1G"
}
}
},
"standalone" : {
"id" : "standalone",
"name" : "Standalone",
"template" : {
"customLocalRepo" : null,
"customRepos" : null,
"customDeps" : null,
"customImports" : null,
"customSparkConf" : {
"spark.app.name" : "Notebook",
"spark.master" : "spark://sda1:7077,sda2:7077",
"spark.executor.memory" : "5G"
}
}
},
"mesos" : {
"id" : "mesos",
"name" : "Mesos",
"template" : {
"customLocalRepo" : null,
"customRepos" : null,
"customDeps" : null,
"customImports" : null,
"profiles" 66L, 1712C 1,1 꼭대기
{
"local" : {
"id" : "local",
"name" : "Local",
"template" : {
"customLocalRepo" : null,
"customRepos" : null,
"customDeps" : null,
"customImports" : null,
"customSparkConf" : {
"spark.app.name" : "Notebook",
"spark.master" : "local[8]",
"spark.executor.memory" : "1G"
}
}
},
"standalone" : {
"id" : "standalone",
"name" : "Standalone",
"template" : {
"customLocalRepo" : null,
"customRepos" : null,
"customDeps" : null,
"customImports" : null,
"customSparkConf" : {
"spark.app.name" : "Notebook",
"spark.master" : "spark://sda1:7077,sda2:7077",
"spark.executor.memory" : "5G"
}
}
},
"mesos" : {
"id" : "mesos",
"name" : "Mesos",
"template" : {
"customLocalRepo" : null,
"customRepos" : null,
"customDeps" : null,
"customImports" : null,
"customSparkConf" : {
"spark.app.name" : "Notebook",
"spark.master" : "mesos://<master>:<port>",
"spark.executor.memory" : "512m",
"spark.executor.uri" : "hdfs://<spark>.tgz",
"spark.driver.host" : "<host>",
"spark.local.dir" : "<path>"
}
}
},
"yarn" : {
"id" : "yarn-client",