上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页
摘要: select * from global_temp.TABLE_NAME 阅读全文
posted @ 2020-09-29 14:48 PEAR2020 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 一、Dataset 特定域对象中的强类型集合 // 1.DS=> RDD + schema val spark = SparkSession.builder().master("local[2]").appName("test").getOrCreate() val rdd = spark.spar 阅读全文
posted @ 2020-09-27 21:51 PEAR2020 阅读(261) 评论(0) 推荐(0) 编辑
摘要: val pi:Double = scala.math.Pi println pi #3.14159265358979 val pi1:String = pi.formatted("%.3f") #保留3位小数,3可随意指定 println pi1 #"3.142" val pi11:String = 阅读全文
posted @ 2020-09-26 18:11 PEAR2020 阅读(3019) 评论(0) 推荐(0) 编辑
摘要: 一、如何确定按姓分区的Partitioner?为什么不能用HashPartitioner? 1. 根据余数测试,得知: 结论:[1到num]% num 一定是不一样的分区值,[>num] % num 的分区一定会有重复 2. 为什么不能用HashPartitioner -> 应该取substring 阅读全文
posted @ 2020-09-25 17:37 PEAR2020 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 可能是spark2.3.4版本和hive1.1.0不匹配,在环境变量里配置SPARK_HOME后hive启动会寻找到这个环境变量并且匹配什么的 所以解决办法就是把SPARK_HOME从环境变量里删掉! 阅读全文
posted @ 2020-09-25 14:47 PEAR2020 阅读(674) 评论(0) 推荐(0) 编辑
摘要: spark2.0版本之后,原有lib目录下的spark-assembly-*.jar包被拆成多个jar包,存放路径是在spark的jars目录下。解决方案:进入hive安装目录:(我的目录是/usr/local/hive)cd /usr/local/hivecd ./bin编辑hive >>> 将s 阅读全文
posted @ 2020-09-25 14:38 PEAR2020 阅读(611) 评论(0) 推荐(0) 编辑
摘要: 当我们输入./schematool -initSchema -dbType mysql的时候,会出现以下错误 Metastore connection URL: jdbc:mysql://192.168.*./hive?createDatabaseIfNotExist=trueMetastore C 阅读全文
posted @ 2020-09-25 14:36 PEAR2020 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 1,setting.xml 文件需要先进记事本去掉中文空格,再写进来 2,先central镜像再nexus作为辅助 <mirrors> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> 阅读全文
posted @ 2020-09-21 16:40 PEAR2020 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 一、pom.xml <!-- spark --> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-core_2.11</artifactId> <version>2.3.4</version> </dependen 阅读全文
posted @ 2020-09-21 16:30 PEAR2020 阅读(324) 评论(0) 推荐(0) 编辑
摘要: // move len move’ len' temp final move // 4 * 1 4=4-0 1=2*0+1 => 0=(len-1)/2 => move=4-(len-1)/2// 3 *** 3 3=4-1 3=2*1+1// 2 ***** 5 2=4-2 // 1 ****** 阅读全文
posted @ 2020-09-19 22:51 PEAR2020 阅读(537) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页