大数据技术
文章平均质量分 68
你那谁
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
scala 继承extends,with浅见
近来学习scala,在继承这一块有一点小小的发现,遂记录下来,以备以后复习之用。1,当with放在子类定义的后面时,输出的结果为:300和150class Animal { val weight = 100 val doubleWeight = 2 * weight } class Tiger extends { override val weight: Int = 150 } wit...原创 2018-02-10 10:16:09 · 5923 阅读 · 0 评论 -
新手速学之spark快速读写mysql以及解决中文乱码问题
1.spark快速读取mysql val spark = SparkSession.builder.appName("bidInfo").getOrCreate() val sc = spark.sparkContext val properties = new Properties() properties.put("user","root") properties.put("passwo原创 2018-02-06 11:21:42 · 5299 阅读 · 1 评论 -
python读取mysql
1.python读取mysql #!/usr/bin/python3 import pymysql # 打开数据库连接 db = pymysql.connect(host="192.138.7.104",user="root",password="root",db="dbname",port=port,charset='utf8') # 使用 cursor() 方法创建一个游标对象 cu原创 2018-02-06 11:40:12 · 841 阅读 · 0 评论 -
去除spark运行信息
在平时用spark时,经常会有一些内部的操作信息出现在操作台,往往会将我们自己的输出信息淹没在这些信息中如下所示,很是麻烦。 18/02/06 11:50:29 INFO BlockManagerMaster: Registering BlockManager BlockManagerId(driver, 192.168.159.1, 6423) 18/02/06 11:50:29 INFO原创 2018-02-06 12:27:22 · 898 阅读 · 0 评论
分享