攻城狮科学家

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

01 2016 档案

摘要:# Set this to where Spark is installed Sys.setenv(SPARK_HOME="/Users/shivaram/spark") # This line loads SparkR from the installed directory .libPaths( 阅读全文
posted @ 2016-01-28 17:06 攻城狮科学家 阅读(278) 评论(0) 推荐(0)

摘要:https://spark.apache.org/docs/1.5.1/api/java/org/apache/spark/sql/DataFrame.html https://github.com/yu-iskw/spark-dataframe-introduction/blob/master/d 阅读全文
posted @ 2016-01-28 17:05 攻城狮科学家 阅读(410) 评论(0) 推荐(0)

摘要:在所有master和slave上也要在spark/conf/spark-conf.sh里面设置driver的classpath,解决编译找不到driver的问题 http://www.iteblog.com/archives/1300 类似这样: export SPARK_CLASSPATH=$SP 阅读全文
posted @ 2016-01-28 15:54 攻城狮科学家 阅读(1234) 评论(0) 推荐(0)

摘要:code: import java.sql.{ResultSet, DriverManager} import com.mysql.jdbc.Connection object hoursAvg { val url = "jdbc:mysql://IP/dB" val user = "usernam 阅读全文
posted @ 2016-01-27 15:09 攻城狮科学家 阅读(681) 评论(0) 推荐(0)

摘要:They are different between local R and sparkR:sparkR 跑通的函数:http://blog.csdn.net/wa2003/article/details/46777237 sparkR doc:https://spark.apache.org/do... 阅读全文
posted @ 2016-01-18 15:49 攻城狮科学家 阅读(135) 评论(0) 推荐(0)

摘要:setwd("D:/Research/code/rcode") #notice the "/"list.files(getwd())heisenberg <- read.csv(file="simple.csv",head=TRUE,sep=",")colnames(datatemp)<-c("I... 阅读全文
posted @ 2016-01-12 16:18 攻城狮科学家 阅读(233) 评论(0) 推荐(0)

摘要:1, mysql -u database username -p2, database password3, use (database name) -> change database4,Mysql导出表结构及表数据 mysqldump用法 1) 导出數據库為dbname的表结构(其中用戶名為r... 阅读全文
posted @ 2016-01-12 09:53 攻城狮科学家 阅读(145) 评论(0) 推荐(0)

摘要:Scala CookBook:http://scalacookbook.com/@throws(classOf[java.io.IOException])@throws(classOf[java.net.SocketTimeoutException])def get(url: String, ... 阅读全文
posted @ 2016-01-11 16:46 攻城狮科学家 阅读(565) 评论(0) 推荐(0)

摘要:Sys.setenv(SPARK_HOME="/usr/spark").libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths()))library(SparkR)sc<-sparkR.init(master="sp... 阅读全文
posted @ 2016-01-07 11:21 攻城狮科学家 阅读(806) 评论(0) 推荐(0)

摘要:Cassandra rowkey is Blob type, cannot select by spark.How? 阅读全文
posted @ 2016-01-06 09:30 攻城狮科学家 阅读(174) 评论(0) 推荐(0)